Class FileSystemTemplateLoader
Template loader implementation that loads templates fromt he filesystem
Inheritance
System.Object
FileSystemTemplateLoader
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.UIDataTemplate
Assembly: Simplic.UIDataTemplate.dll
Syntax
public class FileSystemTemplateLoader : ITemplateLoader
Constructors
| Improve this Doc View SourceFileSystemTemplateLoader(String)
Initialize filesystem template loader
Declaration
public FileSystemTemplateLoader(string baseDirectory)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseDirectory |
Properties
| Improve this Doc View SourceIsReadOnly
Gets whether the loaded code is readonly (true)
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceGetTemplate(String, String)
Try to load a template from the filesystem
Declaration
public LoaderResult GetTemplate(string templateName, string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | DateTemplate name |
System.String | path | Relative path to the file |
Returns
Type | Description |
---|---|
LoaderResult | The code of the template if found, else null |
SaveTemplate(String, String, String)
Save template code in a file on the filesystem
Declaration
public void SaveTemplate(string templateName, string path, string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | DateTemplate name |
System.String | path | Full path to the template |
System.String | code | Code which should be saved |