Class TypesToLoadList
Lets you specify a list of TypeNames and invoke a member in those types.
Implements
Inherited Members
Namespace: Syncfusion.Reflection
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class TypesToLoadList : ArrayListExt, IList, ICollection, IEnumerable, ICloneable
Remarks
This class is used in Essential Tools to load certain types in memory.
Once you add the types to load into this list, you can call the InitInvokeMemberSettings(String, BindingFlags, Binder, Object[], ParameterModifier[], CultureInfo, String[]) method to specify a member in those types to invoke and then also call InvokeMemberOnExisitingTypes() later to repeat the invoke.
Constructors
TypesToLoadList()
Declaration
public TypesToLoadList()
Properties
ArgsCount
Returns the number of arguments to be used in the method call when invoked.
Declaration
public int ArgsCount { get; }
Property Value
Type |
---|
System.Int32 |
Remarks
This will be zero if invoking a property. Call InitInvokeMemberSettings(String, BindingFlags, Binder, Object[], ParameterModifier[], CultureInfo, String[]) to reset this property.
InvokeMemberName
Returns the static member name to invoke.
Declaration
public string InvokeMemberName { get; set; }
Property Value
Type |
---|
System.String |
Item[Int32]
Gets / sets the indexer for this list.
Declaration
public TypeName this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
TypeName | Specifies the TypeName object at this index. |
Methods
GetArg(Int32)
Returns the argument at the specified index, that will be used during invoking.
Declaration
public object GetArg(int i)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i | The argument index. |
Returns
Type | Description |
---|---|
System.Object | The argument at the specified index. NULL if index is out of range. |
InitInvokeMemberSettings(String, BindingFlags, Binder, Object[], ParameterModifier[], CultureInfo, String[])
Call this method to provide information for the member invoke.
Declaration
public void InitInvokeMemberSettings(string memberName, BindingFlags invokeAttr, Binder binder, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | memberName | |
System.Reflection.BindingFlags | invokeAttr | |
System.Reflection.Binder | binder | |
System.Object[] | args | |
System.Reflection.ParameterModifier[] | modifiers | |
System.Globalization.CultureInfo | culture | |
System.String[] | namedParameters |
Remarks
Take a look at System.Type.InvokeMember(System.String,System.Reflection.BindingFlags,System.Reflection.Binder,System.Object,System.Object[],System.Reflection.ParameterModifier[],System.Globalization.CultureInfo,System.String[]) method for information on these parameters. This method will also call InvokeMemberOnExisitingTypes().
InvokeMemberOnExisitingTypes()
Invokes the member specified using InitInvokeMemberSettings(String, BindingFlags, Binder, Object[], ParameterModifier[], CultureInfo, String[]) on the specified types in this list.
Declaration
[Obsolete("InvokeMemberOnExisitingTypes method is deprecated, please use InvokeMemberOnExisistingTypes method.")]
public void InvokeMemberOnExisitingTypes()
InvokeMemberOnExistingTypes()
Invokes the member specified using InitInvokeMemberSettings(String, BindingFlags, Binder, Object[], ParameterModifier[], CultureInfo, String[]) on the specified types in this list.
Declaration
public void InvokeMemberOnExistingTypes()
InvokeMemberOnType(TypeName)
Invokes the member on each type.
Declaration
protected void InvokeMemberOnType(TypeName typename)
Parameters
Type | Name | Description |
---|---|---|
TypeName | typename | The TypeName on which to invoke. |
OnCollectionChanged(CollectionChangeEventArgs)
Declaration
protected override void OnCollectionChanged(CollectionChangeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.CollectionChangeEventArgs | args |
Overrides
OnItemPropertyChanged(Object, SyncfusionPropertyChangedEventArgs)
Declaration
protected override void OnItemPropertyChanged(object sender, SyncfusionPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | |
SyncfusionPropertyChangedEventArgs | e |
Overrides
Events
TypeNotFound
Fired when a type to invoke is not found.
Declaration
public event TypeNotFoundEventHandler TypeNotFound
Event Type
Type |
---|
Syncfusion.Reflection.TypeNotFoundEventHandler |