C# Class Framework.Mvc.Resources.YamlResourceCache

Parses resources from yaml-files. Monitors resource files changes for development environment.
YamlResourceCache is thread safe.
Inheritance: IResourceCache, IDisposable
显示文件 Open project: coreframework/Core-Framework

Public Properties

Property Type Description
ScopeSeparator String

Public Methods

Method Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetEnumerator ( ) : String>>.IEnumerator

Gets resources enumerator.

GetResource ( String key ) : String

Gets the resource by key.

Update ( ) : void

Updates resources cache.

YamlResourceCache ( Framework.Core.Configuration.Environment environment, String resourcesPath ) : System

Initializes a new instance of the YamlResourceCache class.

Private Methods

Method Description
AddNode ( Yaml.Grammar.DataItem node, String path ) : void
Combine ( String key, String prefix ) : String
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

IsFileAccessible ( String filename ) : bool

Check if the file is accesible.

ProcessFile ( Object state ) : void
ReadResources ( ) : void
ResourcesChangedHandler ( Object sender, FileSystemEventArgs e ) : void

Method Details

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

GetEnumerator() public method

Gets resources enumerator.
public GetEnumerator ( ) : String>>.IEnumerator
return String>>.IEnumerator

GetResource() public method

Gets the resource by key.
public GetResource ( String key ) : String
key String The resource key.
return String

Update() public method

Updates resources cache.
public Update ( ) : void
return void

YamlResourceCache() public method

Initializes a new instance of the YamlResourceCache class.
public YamlResourceCache ( Framework.Core.Configuration.Environment environment, String resourcesPath ) : System
environment Framework.Core.Configuration.Environment The environment.
resourcesPath String The resources path.
return System

Property Details

ScopeSeparator public_oe static_oe property

Scope separator.
public static String ScopeSeparator
return String