Class DynamicHelper
Represents a class which is responsible to reflect System.Dynamic.DynamicObject and System.Dynamic.ExpandoObject. Also maintains cache for faster reflection.
Inheritance
Implements
Namespace: Syncfusion.Android.DataForm
Assembly: Syncfusion.SfDataForm.Android.dll
Syntax
public class DynamicHelper : Object, IDisposable
Constructors
DynamicHelper()
Initializes a new instance of the DynamicHelper.
Declaration
public DynamicHelper()
Methods
CheckIsDynamicObject(Type)
Returns a value that indicates whether specified type is dynamic object.
Declaration
public static bool CheckIsDynamicObject(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | Type of the data object |
Returns
| Type |
|---|
| System.Boolean |
Dispose()
Disposes all the resources used by the DynamicHelper class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the DynamicHelper class.
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isDisposing | Indicates whether the call is from Dispose method or from a finalizer. |
GetValue(Object, String)
Gets the value of the specified property for the specified object
Declaration
public object GetValue(object dynamic, string propName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | dynamic | The dynamic object provider of the property. |
| System.String | propName | Property name. |
Returns
| Type | Description |
|---|---|
| System.Object | Returns the value of the specified property if that property is valid. Else, null/> |
IsComplexCollection(IDynamicMetaObjectProvider, String)
Returns a value that indicates whether specified property is complex collection.
Declaration
public static bool IsComplexCollection(IDynamicMetaObjectProvider dynamic, string propName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Dynamic.IDynamicMetaObjectProvider | dynamic | The dynamic object provider of the property. |
| System.String | propName | Property name. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsPythonType(String)
Returns a value that indicates whether specified property is Python type.
Declaration
public static bool IsPythonType(string propName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propName | Property name. |
Returns
| Type |
|---|
| System.Boolean |
SetValue(Object, String, Object)
Sets the value if the specified property is valid.
Declaration
public bool SetValue(object dynamic, string propName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | dynamic | The dynamic object provider of the property. |
| System.String | propName | Property name. |
| System.Object | value | Value to be set. |
Returns
| Type | Description |
|---|---|
| System.Boolean | Returns |
ValidateProperty(IDynamicMetaObjectProvider, String)
Returns a value that indicates whether specified property is valid.
Declaration
public static bool ValidateProperty(IDynamicMetaObjectProvider dynamic, string propName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Dynamic.IDynamicMetaObjectProvider | dynamic | The dynamic object provider of the property. |
| System.String | propName | Property name. |
Returns
| Type |
|---|
| System.Boolean |