C# Class Umbraco.Belle.System.ManifestParser

Parses the Main.js file and replaces all tokens accordingly.
Afficher le fichier Open project: umbraco/Belle Class Usage Examples

Méthodes publiques

Méthode Description
GetJavascriptInitialization ( ) : string

Processes all found manifest files and outputs the main.js file containing all plugin manifests

GetManifests ( ) : IEnumerable

Get all registered manifests

ManifestParser ( DirectoryInfo pluginsDir ) : System

Private Methods

Méthode Description
CreateManifests ( ) : IEnumerable

Creates a list of PropertyEditorManifest from the file contents of each manifest file

This ensures that comments are removed (but they have to be /* */ style comments and ensures that virtual paths are replaced with real ones

FolderDepth ( DirectoryInfo baseDir, DirectoryInfo currDir ) : int

Get the folder depth compared to the base folder

GetAllManfifestFileContents ( DirectoryInfo currDir ) : IEnumerable

Get the file contents from all declared manifest files

GetDefaultConfig ( ) : Newtonsoft.Json.Linq.JObject

Returns the default config as a JObject

GetDefaultInitialization ( ) : Newtonsoft.Json.Linq.JArray

Returns the default config as a JArray

GetPropertyEditors ( Newtonsoft.Json.Linq.JArray jsonEditors ) : IEnumerable

Parse the property editors from the json array

MergeJArrays ( Newtonsoft.Json.Linq.JArray receiver, Newtonsoft.Json.Linq.JArray donor ) : void

Merges the donor array values into the receiver array

MergeJObjects ( Newtonsoft.Json.Linq.JObject receiver, Newtonsoft.Json.Linq.JObject donor, bool keepOriginal = false ) : void

Merges two json objects together

taken from http://stackoverflow.com/questions/4002508/does-c-sharp-have-a-library-for-parsing-multi-level-cascading-json/4002550#4002550

ParseMain ( ) : string

Parses the JsResources.Main and replaces the replacement tokens accordingly.

ReplaceVirtualPaths ( Newtonsoft.Json.Linq.JObject jObj ) : void

Replaces any virtual paths found in properties

Method Details

GetJavascriptInitialization() public méthode

Processes all found manifest files and outputs the main.js file containing all plugin manifests
public GetJavascriptInitialization ( ) : string
Résultat string

GetManifests() public méthode

Get all registered manifests
public GetManifests ( ) : IEnumerable
Résultat IEnumerable

ManifestParser() public méthode

public ManifestParser ( DirectoryInfo pluginsDir ) : System
pluginsDir System.IO.DirectoryInfo
Résultat System