-
-
Notifications
You must be signed in to change notification settings - Fork 10
Crow.IML.Instantiator
Jean-Philippe Bruyère edited this page Oct 26, 2021
·
4 revisions
Reflection being very slow, the settings of the starting values for widgets are set by a dynamic method. This method is created on the first instacing and is recalled for further widget instancing.
It includes:
- XML values setting
- Default values (appearing as attribute in C#) loading
- Styling
Their are stored in the Interface with their path as key, and inlined template and itemtemplate are stored with a generated uuid
namespace: Crow.IML
-
Instantiator
public class Instantiator
⬜ | prototype | description |
---|---|---|
Instantiator (Interface _iface, string path) |
Initializes a new instance of the Instantiator class. | |
Instantiator (Interface _iface, Stream stream, string srcPath=null) |
Initializes a new instance of the Instantiator class. | |
Instantiator (Interface _iface, XmlReader itr) |
Initializes a new instance of the Instantiator class with an already openned xml reader positionned on the start tag inside the itemTemplate | |
Instantiator (Interface _iface, Type _root, InstanciatorInvoker _loader) |
__ |
⬜ | name | description |
---|
⬜ | prototype | description |
---|---|---|
Instantiator CreateFromImlFragment(Interface _iface, string fragment) |
Create a new instantiator from IML fragment provided directely as a string | |
Widget CreateInstance() |
Creates a new instance of the Widget compiled in the instantiator | |
T CreateInstance< T >() |
Creates a new instance of T compiled in the instantiator and bind it the an interface | |
Delegate emitDataSourceBindings(PropertyInfo piSource, BindingDefinition bindingDef) |
create the valuechanged handler and the datasourcechanged handler and return the DataSourceChange delegate | |
Type GetWidgetTypeFromName(string typeName) |
search for graphic object type in crow assembly, if not found, search for type independently of namespace in all the loaded assemblies | |
string[]> loadItemTemplatesFromTemplatedGroupProperty(Interface iface, string itemTemplatePath) |
__ | |
string[]> loadItemTemplatesFromTemplatedGroupProperty(Interface iface, Stream stream, string itemTemplatePath=null) |
__ |
⬜ | name | description |
---|