Interface IFlowMessage
This is a customized version of the .NET System.Dynamic.DynamicObject. The object is mainly used to pass data between modules in a flow with the possibility to change/remove/add properties at runtime
Inherited Members
System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression)
Namespace: Crosser.EdgeNode.Common.Abstractions.Models.IFlowMessage
Assembly: Crosser.EdgeNode.Common.Abstractions.dll
Syntax
public interface IFlowMessage : IDynamicMetaObjectProvider
Examples
You can build any object by creating a new IFlowMessage as a dynamic and just set properties
dynamic d = new FlowMessage();
d.name = "Harry The Hippo";
d.age = 35;
You can also build object with dot-notation.
dynamic o = new FlowMessage();
p.person.name = "Harry The Hippo";
d.person.age = 35;
Properties
Item[String]
Declaration
object this[string path] { get; set; }
Parameters
System.String
path
|
Property Value
System.Object
|
Properties
Declaration
Dictionary<string, object> Properties { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.Object>
|
Methods
AddAllProperties<T>(IFlowMessage, String, T, Boolean, Boolean)
Declaration
void AddAllProperties<T>(IFlowMessage message, string path, T value, bool allowConvertToFlowMessage = false, bool autoCreate = true)
Parameters
IFlowMessage
message
|
System.String
path
|
T
value
|
System.Boolean
allowConvertToFlowMessage
|
System.Boolean
autoCreate
|
Type Parameters
T
|
Clone()
GetProperties()
Declaration
IEnumerable<KeyValuePair<string, object>> GetProperties()
Returns
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
|
GetProperty<T>(IFlowMessage, String)
Declaration
T GetProperty<T>(IFlowMessage message, string path)
Parameters
IFlowMessage
message
|
System.String
path
|
Returns
T
|
Type Parameters
T
|
GetValue<T>(String)
Declaration
T GetValue<T>(string path)
Parameters
System.String
path
|
Returns
T
|
Type Parameters
T
|
HasOwnProperty(String)
Declaration
bool HasOwnProperty(string name)
Parameters
System.String
name
|
Returns
System.Boolean
|
HasOwnProperty<T>(String)
Declaration
bool HasOwnProperty<T>(string name)
Parameters
System.String
name
|
Returns
System.Boolean
|
Type Parameters
T
|
RemoveProperty(String)
Declaration
void RemoveProperty(string path)
Parameters
System.String
path
|
SetError(String)
Declaration
void SetError(string message = "")
Parameters
System.String
message
|
SetSuccess()
Declaration
void SetSuccess()
SetValue<T>(String, T, Boolean, Boolean)
Declaration
void SetValue<T>(string path, T value, bool allowConvertToFlowMessage = false, bool autoCreate = true)
Parameters
System.String
path
|
T
value
|
System.Boolean
allowConvertToFlowMessage
|
System.Boolean
autoCreate
|
Type Parameters
T
|