Метод | Описание | |
---|---|---|
AddToArray ( |
Adds to array.
|
|
ConvertTo ( string text, |
Converts from string to the type. Can covert from string, enums booleans, bytes, int32 and datetime
|
|
GetFieldValue ( object obj, |
Gets the field value from object, and return
|
|
GetFieldsDictionary ( object obj ) : IDictionary |
Gets the fields names and values. The keys holds the names of the fields. The values hold the value of the field if it's a simple type, or the name of the field's type.
|
|
GetFieldsWithAttribute ( |
Gets all the fields from the object's type with specified attribute
|
|
GetFieldsWithOutAttributes ( |
Gets all the fields WITHOUT ANY of the specified attributes.
|
|
GetName ( object obj ) : string |
Gets the name of an object. The name of the object is it's type name or the value of its Name property or field
|
|
GetNameOrEmpty ( object obj ) : string |
Gets the value of a property or field name in the object. Or return empty string if there aren't any.
|
|
GetProperties ( object obj ) : System.Reflection.PropertyInfo[] |
Gets the properties.
|
|
GetPropertiesDictionary ( object obj ) : IDictionary |
Gets the readable (non indexed) properties names and values. The keys holds the names of the properties. The values are the values of the properties
|
|
GetPropertyValue ( |
Gets the property value.
|
|
GetPropertyValue ( object obj, string property ) : object |
Gets the property value.
|
|
GetValue ( object obj ) : string |
Gets the value of the object, if the object is simple, the returned string is the object ToString(), otherwise, it's the object name (if it has one) or the object type.
|
|
HasValue ( object value ) : bool |
An object has value if it's not null, an collection containing elements and a non-empty string
|
|
IsSimpleObject ( object obj ) : bool |
Determines whether the object is simple. An object is simple if its type is simple or if it's null.
|
|
IsSimpleType ( |
Determines whether type is simple enough to need just ToString() to show its state. (string,int, bool, enums are simple. Anything else is false.
|
|
RemoveFromArray ( |
Removes from array.
|
|
SetName ( object obj, string name ) : void |
Sets the name property or value of an object to the value of name. Does nothing if the object doesn't have any fields or properties named 'name'
|
Метод | Описание | |
---|---|---|
GetField ( object obj, string field ) : |
Gets the FieldInfo thus named
|
|
GetProperty ( object obj, string property ) : |
Gets the PropertyInfo thus named.
|
|
PropertyHasValue ( object obj, |
Check if the property is not null and can be read and is no indexed. This is done to know if it can be read safely.
|
public static AddToArray ( |
||
field | The field. | |
instance | object | The instance. |
val | object | The val. |
Результат | void |
public static ConvertTo ( string text, |
||
text | string | Text. |
type | Type. | |
Результат | object |
public static GetFieldValue ( object obj, |
||
obj | object | |
field | ||
Результат | object |
public static GetFieldsDictionary ( object obj ) : IDictionary | ||
obj | object | |
Результат | IDictionary |
public static GetFieldsWithAttribute ( |
||
type | ||
attribute | ||
Результат |
public static GetFieldsWithOutAttributes ( |
||
type | ||
Результат |
public static GetName ( object obj ) : string | ||
obj | object | |
Результат | string |
public static GetNameOrEmpty ( object obj ) : string | ||
obj | object | |
Результат | string |
public static GetProperties ( object obj ) : System.Reflection.PropertyInfo[] | ||
obj | object | The obj. |
Результат | System.Reflection.PropertyInfo[] |
public static GetPropertiesDictionary ( object obj ) : IDictionary | ||
obj | object | |
Результат | IDictionary |
public static GetPropertyValue ( |
||
property | The property. | |
obj | object | The obj. |
Результат | object |
public static GetPropertyValue ( object obj, string property ) : object | ||
obj | object | obj. |
property | string | Property. |
Результат | object |
public static GetValue ( object obj ) : string | ||
obj | object | |
Результат | string |
public static HasValue ( object value ) : bool | ||
value | object | |
Результат | bool |
public static IsSimpleObject ( object obj ) : bool | ||
obj | object | |
Результат | bool |
public static IsSimpleType ( |
||
type | ||
Результат | bool |
public static RemoveFromArray ( |
||
field | The field. | |
instance | object | The instance. |
index | int | The index. |
Результат | void |
public static SetName ( object obj, string name ) : void | ||
obj | object | |
name | string | |
Результат | void |