Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

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

Declaration
public DynamicParameter()

DynamicParameter(Dictionary<string, object>)

Creates initialized dynamic parameter object

Declaration
public DynamicParameter(Dictionary<string, object> properties)
Parameters
TypeNameDescription
Dictionary<string, object>properties

Properties

Dictionary

Returns dictionary with all properties

Declaration
public IReadOnlyDictionary<string, object> Dictionary { get; }
Property value
TypeDescription
IReadOnlyDictionary<string, object>

this[string]

Indexer for getting property value

Declaration
public object this[string propertyName] { get; set; }
Parameters
TypeNameDescription
stringpropertyNameProperty name
Property value
TypeDescription
object

Methods

TryGetMember(GetMemberBinder, out object)

Declaration
public override bool TryGetMember(GetMemberBinder binder, out object result)
Parameters
TypeNameDescription
GetMemberBinderbinder
objectresult
Returns
TypeDescription
bool

TrySetMember(SetMemberBinder, object)

Declaration
public override bool TrySetMember(SetMemberBinder binder, object value)
Parameters
TypeNameDescription
SetMemberBinderbinder
objectvalue
Returns
TypeDescription
bool

GetProperty(string)

Returns property value

Declaration
public object GetProperty(string propertyName)
Parameters
TypeNameDescription
stringpropertyNameProperty name
Returns
TypeDescription
objectProperty value

SetProperty(string, object)

Sets property value

Declaration
public void SetProperty(string propertyName, object value)
Parameters
TypeNameDescription
stringpropertyNameProperty name
objectvalueProperty value

HasProperty(string, bool)

Checks either property exists in the dynamic parameter object or not.

Declaration
public bool HasProperty(string propertyName, bool ifNullThenNotExists = false)
Parameters
TypeNameDescription
stringpropertyNameProperty name
boolifNullThenNotExists
Returns
TypeDescription
booltrue if property exists in the dynamic parameter object.

SerializeToJson()

Serializes the dynamic parameter object to JSON

Declaration
public string SerializeToJson()
Returns
TypeDescription
stringJSON 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

Declaration
public static object ParseJson(string json)
Parameters
TypeNameDescription
stringjsonJSON string
Returns
TypeDescription
objectDynamic 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

Declaration
public static object ParseJson(JToken jToken)
Parameters
TypeNameDescription
JTokenjTokenNewtonsoft.JSON JToken object
Returns
TypeDescription
objectDynamic parameter object

New()

Creates new DynamicParameter instance

Declaration
public static dynamic New()
Returns
TypeDescription
dynamic

ConvertFrom(object)

Converts from any object to dynamic object

Declaration
public static object ConvertFrom(object value)
Parameters
TypeNameDescription
objectvalue
Returns
TypeDescription
object

Restore<T>()

Declaration
public T Restore<T>()
Returns
TypeDescription
{T}

Restore(Type)

Declaration
public object Restore(Type originalType)
Parameters
TypeNameDescription
TypeoriginalType
Returns
TypeDescription
object

Extension Methods