Class DynamicParameter
Dynamic parameter, properties can be accessed two ways de["propertyName"] or (de as dynamic).propertyName Property names are case sensitive
Inheritance
↳ object
↳ DynamicObject
↳ DynamicParameter
Implements
IDynamicMetaObjectProvider
Inherited Members
GetDynamicMemberNames()
GetMetaObject(Expression)
TryBinaryOperation(BinaryOperationBinder, object, out object)
TryConvert(ConvertBinder, out object)
TryCreateInstance(CreateInstanceBinder, object[], out object)
TryDeleteIndex(DeleteIndexBinder, object[])
TryDeleteMember(DeleteMemberBinder)
TryGetIndex(GetIndexBinder, object[], out object)
TryInvoke(InvokeBinder, object[], out object)
TryInvokeMember(InvokeMemberBinder, object[], out object)
TrySetIndex(SetIndexBinder, object[], object)
TryUnaryOperation(UnaryOperationBinder, out object)
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model
Assembly: OptimaJet.Workflow.Core.dll
Syntax[JsonConverter(typeof(DynamicParameterConverter))]
public sealed class DynamicParameter : DynamicObject, IDynamicMetaObjectProvider
Constructors
DynamicParameter()
Creates empty dynamic parameter object
Declarationpublic DynamicParameter()
DynamicParameter(Dictionary<string, object>)
Creates initialized dynamic parameter object
Declarationpublic DynamicParameter(Dictionary<string, object> properties)
| Type | Name | Description |
|---|---|---|
| Dictionary<string, object> | properties |
Properties
Dictionary
Returns dictionary with all properties
Declarationpublic IReadOnlyDictionary<string, object> Dictionary { get; }
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> |
this[string]
Indexer for getting property value
Declarationpublic object this[string propertyName] { get; set; }
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name |
| Type | Description |
|---|---|
| object |
Methods
TryGetMember(GetMemberBinder, out object)
Declarationpublic override bool TryGetMember(GetMemberBinder binder, out object result)
| Type | Name | Description |
|---|---|---|
| GetMemberBinder | binder | |
| object | result |
| Type | Description |
|---|---|
| bool |
TrySetMember(SetMemberBinder, object)
Declarationpublic override bool TrySetMember(SetMemberBinder binder, object value)
| Type | Name | Description |
|---|---|---|
| SetMemberBinder | binder | |
| object | value |
| Type | Description |
|---|---|
| bool |
GetProperty(string)
Returns property value
Declarationpublic object GetProperty(string propertyName)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name |
| Type | Description |
|---|---|
| object | Property value |
SetProperty(string, object)
Sets property value
Declarationpublic void SetProperty(string propertyName, object value)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name |
| object | value | Property value |
HasProperty(string, bool)
Checks either property exists in the dynamic parameter object or not.
Declarationpublic bool HasProperty(string propertyName, bool ifNullThenNotExists = false)
| Type | Name | Description |
|---|---|---|
| string | propertyName | Property name |
| bool | ifNullThenNotExists |
| Type | Description |
|---|---|
| bool | true if property exists in the dynamic parameter object. |
SerializeToJson()
Serializes the dynamic parameter object to JSON
Declarationpublic string SerializeToJson()
| Type | Description |
|---|---|
| string | JSON string |
ParseJson(string)
Deserializes JSON the result can be casted as dynamic. The result can be simple value (string, int, double etc) or instance of DynamicParameter class
Declarationpublic static object ParseJson(string json)
| Type | Name | Description |
|---|---|---|
| string | json | JSON string |
| Type | Description |
|---|---|
| object | Dynamic parameter object |
ParseJson(JToken)
Deserializes JSON the result can be casted as dynamic. The result can be simple value (string, int, double etc) or instance of DynamicParameter class
Declarationpublic static object ParseJson(JToken jToken)
| Type | Name | Description |
|---|---|---|
| JToken | jToken | Newtonsoft.JSON JToken object |
| Type | Description |
|---|---|
| object | Dynamic parameter object |
New()
Creates new DynamicParameter instance
Declarationpublic static dynamic New()
| Type | Description |
|---|---|
| dynamic |
ConvertFrom(object)
Converts from any object to dynamic object
Declarationpublic static object ConvertFrom(object value)
| Type | Name | Description |
|---|---|---|
| object | value |
| Type | Description |
|---|---|
| object |
Restore<T>()
Declarationpublic T Restore<T>()
| Type | Description |
|---|---|
| {T} |
Restore(Type)
Declarationpublic object Restore(Type originalType)
| Type | Name | Description |
|---|---|---|
| Type | originalType |
| Type | Description |
|---|---|
| object |