Class DynamicHelper
Helper class to reflect dynamic objects and also maintains cache for faster reflection.
Inheritance
Implements
Namespace: Syncfusion.Maui.DataSource.Extensions
Assembly: Syncfusion.Maui.DataSource.dll
Syntax
public class DynamicHelper : Object, IDisposable
Constructors
DynamicHelper()
Initializes a new instance of the DynamicHelper class.
Declaration
public DynamicHelper()
Methods
CheckIsDynamicObject(Type)
Determines whether the specified type contains dynamic object.
Declaration
public static bool CheckIsDynamicObject(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | Represents the specified type. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |
Dispose()
Disposes all the allocated resource.
Declaration
public void Dispose()
Dispose(Boolean)
Dispose the instances, if parameter is true.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Represents the boolean value for disposing objects. |
GetValue(Object, String)
Helper method to get the value from the specified property name.
Declaration
public object GetValue(object dynamicMetaObject, string propName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dynamicMetaObject | Represents the dynamic meta object. |
System.String | propName | Represents the property name. |
Returns
Type | Description |
---|---|
System.Object | Returns the value. |
IsComplexCollection(IDynamicMetaObjectProvider, String)
Determines whether the obtained collection is complex or not.
Declaration
public static bool IsComplexCollection(IDynamicMetaObjectProvider dynamicMetaObjectProvider, string propName)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.IDynamicMetaObjectProvider | dynamicMetaObjectProvider | Represents the System.Dynamic.IDynamicMetaObjectProvider object. |
System.String | propName | Represents the property name. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |
IsPythonType(String)
Determines whether the obtained property name is python type or not.
Declaration
public static bool IsPythonType(string propName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propName | Represents the property name. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |
SetValue(Object, String, Object)
Helper method to set the value for the specified property name.
Declaration
public void SetValue(object dynamicMetaObject, string propName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | dynamicMetaObject | Represents the dynamic meta object. |
System.String | propName | Represents the property name. |
System.Object | value | Represents the value to be set. |
ValidateProperty(IDynamicMetaObjectProvider, String)
Determines whether the meta data contains the specified property name.
Declaration
public static bool ValidateProperty(IDynamicMetaObjectProvider dynamicMetaObjectProvider, string propName)
Parameters
Type | Name | Description |
---|---|---|
System.Dynamic.IDynamicMetaObjectProvider | dynamicMetaObjectProvider | Represents the System.Dynamic.IDynamicMetaObjectProvider object. |
System.String | propName | Represents the property name. |
Returns
Type | Description |
---|---|
System.Boolean | Returns the boolean value accordingly. |