Méthode | Description | |
---|---|---|
CallMethod ( object instance, string method ) : object |
Calls a method on an object dynamically.
|
|
CallMethodCom ( object instance, string method ) : object |
Wrapper method to call a 'dynamic' (non-typelib) method on a COM object
|
|
CallMethodEx ( object parent, string method ) : object |
Calls a method on an object with extended . syntax (object: this Method: Entity.CalculateOrderTotal)
|
|
CallStaticMethod ( string typeName, string method ) : object |
Invokes a static method
|
|
CreateComInstance ( string progId ) : object |
Creates a COM instance from a ProgID. Loads either Exe or DLL servers.
|
|
CreateInstanceFromString ( string typeName ) : object |
Creates an instance of a type based on a string. Assumes that the type's
|
|
CreateInstanceFromType ( |
Creates an instance from a type by calling the parameterless constructor. Note this will not work with COM objects - continue to use the Activator.CreateInstance for COM objects.
|
|
GetField ( object Object, string Property ) : object |
Retrieve a field dynamically from an object. This is a simple implementation that's straight Reflection and doesn't support indexers.
|
|
GetProperty ( object instance, string property ) : object |
Retrieve a property value from an object dynamically. This is a simple version that uses Reflection calls directly. It doesn't support indexers.
|
|
GetPropertyCom ( object instance, string property ) : object |
Retrieve a dynamic 'non-typelib' property
|
|
GetPropertyEx ( object Parent, string Property ) : object |
Returns a property or field value using a base object and sub members including . syntax. For example, you can access: this.oCustomer.oData.Company with (this,"oCustomer.oData.Company") This method also supports indexers in the Property value such as: Customer.DataSet.Tables["Customers"].Rows[0]
|
|
GetPropertyExCom ( object parent, string property ) : object |
Returns a property or field value using a base object and sub members including . syntax. For example, you can access: this.oCustomer.oData.Company with (this,"oCustomer.oData.Company")
|
|
GetTypeFromName ( string typeName ) : |
Helper routine that looks up a type name and tries to retrieve the full type reference in the actively executing assemblies.
|
|
SetField ( object Object, string Property, object Value ) : void |
Sets the field on an object. This is a simple method that uses straight Reflection and doesn't support indexers.
|
|
SetProperty ( object Object, string Property, object Value ) : void |
Sets the property on an object. This is a simple method that uses straight Reflection and doesn't support indexers.
|
|
SetPropertyCom ( object Object, string Property, object Value ) : void |
Sets the property on an object.
|
|
SetPropertyEx ( object parent, string property, object value ) : object |
Sets a value on an object. Supports . syntax for named properties (ie. Customer.Entity.Company) as well as indexers.
|
|
SetPropertyExCom ( object parent, string property, object value ) : object |
Sets the value of a field or property via Reflection. This method alws for using '.' syntax to specify objects multiple levels down. ReflectionUtils.SetPropertyEx(this,"Invoice.LineItemsCount",10) which would be equivalent of: this.Invoice.LineItemsCount = 10;
|
|
StringToTypedValue ( string sourceString, |
Turns a string into a typed value. Useful for auto-conversion routines like form variable or XML parsers.
|
|
StringToTypedValue ( string sourceString, |
Turns a string into a typed value. Useful for auto-conversion routines like form variable or XML parsers.
|
|
TypedValueToString ( object rawValue ) : string |
Converts a type to string if possible. This method uses the current culture for numeric and DateTime values. It calls the ToString() method on common types and uses a type converter on all other objects if available.
|
|
TypedValueToString ( object rawValue, |
Converts a type to string if possible. This method supports an optional culture generically on any value. It calls the ToString() method on common types and uses a type converter on all other objects if available
|
Méthode | Description | |
---|---|---|
GetPropertyInternal ( object Parent, string Property ) : object |
Parses Properties and Fields including Array and Collection references. Used internally for the 'Ex' Reflection methods.
|
|
SetPropertyInternal ( object Parent, string Property, object Value ) : object |
Parses Properties and Fields including Array and Collection references.
|
public static CallMethod ( object instance, string method ) : object | ||
instance | object | |
method | string | |
Résultat | object |
public static CallMethodCom ( object instance, string method ) : object | ||
instance | object | |
method | string | |
Résultat | object |
public static CallMethodEx ( object parent, string method ) : object | ||
parent | object | |
method | string | |
Résultat | object |
public static CallStaticMethod ( string typeName, string method ) : object | ||
typeName | string | |
method | string | |
Résultat | object |
public static CreateComInstance ( string progId ) : object | ||
progId | string | |
Résultat | object |
public static CreateInstanceFromString ( string typeName ) : object | ||
typeName | string | |
Résultat | object |
public static CreateInstanceFromType ( |
||
typeToCreate | /// The type from which to create an instance. /// | |
Résultat | object |
public static GetField ( object Object, string Property ) : object | ||
Object | object | Object to retreve Field from |
Property | string | name of the field to retrieve |
Résultat | object |
public static GetProperty ( object instance, string property ) : object | ||
instance | object | Object to make the call on |
property | string | Property to retrieve |
Résultat | object |
public static GetPropertyCom ( object instance, string property ) : object | ||
instance | object | Object to make the call on |
property | string | Property to retrieve |
Résultat | object |
public static GetPropertyEx ( object Parent, string Property ) : object | ||
Parent | object | Parent object to 'start' parsing from. Typically this will be the Page. |
Property | string | The property to retrieve. Example: 'Customer.Entity.Company' |
Résultat | object |
public static GetPropertyExCom ( object parent, string property ) : object | ||
parent | object | Parent object to 'start' parsing from. |
property | string | The property to retrieve. Example: 'oBus.oData.Company' |
Résultat | object |
public static GetTypeFromName ( string typeName ) : |
||
typeName | string | |
Résultat |
public static SetField ( object Object, string Property, object Value ) : void | ||
Object | object | Object to set property on |
Property | string | Name of the field to set |
Value | object | value to set it to |
Résultat | void |
public static SetProperty ( object Object, string Property, object Value ) : void | ||
Object | object | Object to set property on |
Property | string | Name of the property to set |
Value | object | value to set it to |
Résultat | void |
public static SetPropertyCom ( object Object, string Property, object Value ) : void | ||
Object | object | Object to set property on |
Property | string | Name of the property to set |
Value | object | value to set it to |
Résultat | void |
public static SetPropertyEx ( object parent, string property, object value ) : object | ||
parent | object | |
property | string | |
value | object | |
Résultat | object |
public static SetPropertyExCom ( object parent, string property, object value ) : object | ||
parent | object | |
property | string | |
value | object | |
Résultat | object |
public static StringToTypedValue ( string sourceString, |
||
sourceString | string | The input string to convert |
targetType | The Type to convert it to | |
Résultat | object |
public static StringToTypedValue ( string sourceString, |
||
sourceString | string | /// The string to convert from /// |
targetType | /// The type to convert to /// | |
culture | /// Culture used for numeric and datetime values. /// | |
Résultat | object |
public static TypedValueToString ( object rawValue ) : string | ||
rawValue | object | The Value or Object to convert to a string |
Résultat | string |
public static TypedValueToString ( object rawValue, |
||
rawValue | object | The Value or Object to convert to a string |
culture | Culture for numeric and DateTime values | |
Résultat | string |