Class EmbeddedResourceTemplateLoader
Embedded resource template loader, which loads templates from a list of assemblies
Inheritance
System.Object
EmbeddedResourceTemplateLoader
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 EmbeddedResourceTemplateLoader : ITemplateLoader
Constructors
| Improve this Doc View SourceEmbeddedResourceTemplateLoader(IList<Assembly>)
Initialize resource loader
Declaration
public EmbeddedResourceTemplateLoader(IList<Assembly> assemblies)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Reflection.Assembly> | assemblies | List of assemblies |
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 |
Path
Gets or sets the truely loaded path
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceGetTemplate(String, String)
Search a template in the list of assemblies and returns its code
Declaration
public LoaderResult GetTemplate(string templateName, string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | DateTemplate name |
System.String | path | Absolute path to the template |
Returns
Type | Description |
---|---|
LoaderResult | Code of the template if found, else null |
SaveTemplate(String, String, String)
!Saving to embedded resources is not allowed
Declaration
public void SaveTemplate(string templateName, string path, string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | DateTemplate name |
System.String | path | - |
System.String | code | - |