Class InstanceCreator
Class containing the logic to create instances.
Inheritance
Inherited Members
Namespace:Extend
Assembly:Extend.dll
Syntax
public static class InstanceCreator
Properties
| Improve this Doc View SourceAnonymousItemName
Gets or sets the name used for anonymous items.
Declaration
public static string AnonymousItemName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name used for anonymous items. |
Remarks
Targets collection items.
DefaultFactories
Gets the default factories.
Declaration
public static List<IInstanceFactory> DefaultFactories { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><IInstanceFactory> |
Remarks
The default factories.
DefaultMemberChildreSelectionRules
Gets the default member children selection rule.
Declaration
public static List<IMemberSelectionRule> DefaultMemberChildreSelectionRules { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><IMemberSelectionRule> | The default member children selection rule. |
DefaultMemberSelectionRules
Gets the default member selection rule.
Declaration
public static List<IMemberSelectionRule> DefaultMemberSelectionRules { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><IMemberSelectionRule> | The default member selection rule. |
PopulateCollections
Gets or sets a value determining whether collections should get populated or not.
Declaration
public static bool PopulateCollections { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A value determining whether collections should get populated or not. |
PopulateCollectionsMaxCount
Gets or sets the maximum number of items to generate for a collection.
Declaration
public static int PopulateCollectionsMaxCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The maximum number of items to generate for a collection. |
PopulateCollectionsMinCount
Gets or sets the minimum number of items to generate for a collection.
Declaration
public static int PopulateCollectionsMinCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The minimum number of items to generate for a collection. |
RuleInspector
Gets or sets the IMemberSelectionRuleInspector used to inspect member selection rules.
Declaration
public static IMemberSelectionRuleInspector RuleInspector { get; set; }
Property Value
Type | Description |
---|---|
IMemberSelectionRuleInspector | The IMemberSelectionRuleInspector used to inspect member selection rules. |
Methods
| Improve this Doc View SourceCreateInstance<T>()
Creates an instance of the specified type without any special configuration.
Declaration
public static T CreateInstance<T>()where T : class, new ()
Returns
Type | Description |
---|---|
T | Returns the new created instance. |
Type Parameters
Name | Description |
---|---|
T | The type to create an instance of. |
CreateInstance<T>(ICreateInstanceOptionsComplete<T>)
Creates an instance of the specified type based on the given options.
Declaration
public static T CreateInstance<T>(this ICreateInstanceOptionsComplete<T> options)where T : class
Parameters
Type | Name | Description |
---|---|---|
ICreateInstanceOptionsComplete<T><T> | options | Some create instance options. |
Returns
Type | Description |
---|---|
T | Returns the new created instance. |
Type Parameters
Name | Description |
---|---|
T | The type to create an instance of. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | options can not be null. |
CreateInstanceOptions<T>()
Creates instance options for the specified type.
Declaration
public static ICreateInstanceOptions<T> CreateInstanceOptions<T>()where T : class, new ()
Returns
Type | Description |
---|---|
ICreateInstanceOptions<T><T> | Returns the new created create instance options. |
Type Parameters
Name | Description |
---|---|
T | The type to create an instance of. |