Class SingleViewWriter
A class responsible for writing the c# code to create a view of a single entity item in the LemonEdge UI API from a ICustomView definition.
See https://web.lemonedge.com/help/custom-views/ for more information on custom view definitions
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Core.Writers
Assembly: ClientCore.dll
Syntax
public class SingleViewWriter
Constructors
SingleViewWriter(ICustomView, IEnumerable<ICustomViewControl>, String)
Creates a new single view writer for the specified ICustomView and its associated settings
Declaration
public SingleViewWriter(ICustomView view, IEnumerable<ICustomViewControl> controls, string customUsing = null)
Parameters
Type | Name | Description |
---|---|---|
ICustomView | view | The custom view definition to generate the equivelant c# code for |
System.Collections.Generic.IEnumerable<ICustomViewControl> | controls | The definition of every control in the view |
System.String | customUsing | An optional custom namespace to be included in the usings header section of the generated file |
Methods
AddFileFooterAndCloseNamespaces(ClassFileWriter)
Ends the namespace created by this single view writer (through AddFileHeadersAndNamespace(ClassFileWriter)) for creating custom single views in
Declaration
public void AddFileFooterAndCloseNamespaces(ClassFileWriter writer)
Parameters
Type | Name | Description |
---|---|---|
ClassFileWriter | writer | The writer to finish the single view namespace for |
AddFileHeadersAndNamespace(ClassFileWriter)
Adds the using statement and namespace required for generating a single view class.
Declaration
public void AddFileHeadersAndNamespace(ClassFileWriter writer)
Parameters
Type | Name | Description |
---|---|---|
ClassFileWriter | writer | The writer to add the header code to. |
UpdateView(ICustomView, IEnumerable<ICustomViewControl>)
Updates the single view definition to use when generating the equivelant code
Declaration
public void UpdateView(ICustomView view, IEnumerable<ICustomViewControl> controls)
Parameters
Type | Name | Description |
---|---|---|
ICustomView | view | The custom view definition to generate the equivelant c# code for |
System.Collections.Generic.IEnumerable<ICustomViewControl> | controls | The definition of every control in the view |
WriteFile()
Creates and returns an entire c# file containing all the code to create the equivelant ICustomView in code referencing the LemonEdge UI API
Declaration
public string WriteFile()
Returns
Type | Description |
---|---|
System.String | An entire c# file containing all the code to create the equivelant ICustomView in code referencing the LemonEdge UI API |
WriteToFile(ClassFileWriter)
Writes a class definition of the current single view, and its settings (controls), to the specified ClassFileWriter
Declaration
public void WriteToFile(ClassFileWriter writer)
Parameters
Type | Name | Description |
---|---|---|
ClassFileWriter | writer | The writer to add a class for this single view to |