Class DataContainer
General purpose serializable data container
Inheritance
System.Object
DataContainer
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public class DataContainer : object
Constructors
View SourceDataContainer(Object, ISerializationContext)
Initializes a new instance of the DataContainer class.
Declaration
public DataContainer(object data, ISerializationContext serializationContext = null)
Parameters
Type | Name | Description |
---|---|---|
System.Object | data | The application data (must be serializable to JSON). |
ISerializationContext | serializationContext | The serialization context. |
Properties
View SourceContent
Gets or sets the content.
Declaration
public JToken Content { get; set; }
Property Value
Type | Description |
---|---|
JToken | The content. |
ContentType
Gets or sets the type of the content.
Declaration
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
System.String | The type of the content. |
Methods
View SourceGet(ISerializationContext)
Gets or sets the data.
Declaration
public object Get(ISerializationContext serializationContext = null)
Parameters
Type | Name | Description |
---|---|---|
ISerializationContext | serializationContext | The serialization Context. |
Returns
Type | Description |
---|---|
System.Object | The data/>. |
Get<T>(ISerializationContext)
Gets this instance.
Declaration
public T Get<T>(ISerializationContext serializationContext = null)
where T : class
Parameters
Type | Name | Description |
---|---|---|
ISerializationContext | serializationContext | The serialization Context. |
Returns
Type | Description |
---|---|
T | Data as |
Type Parameters
Name | Description |
---|---|
T | Type of data |