Show / Hide Table of Contents

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 Source

DataContainer(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 Source

Content

Gets or sets the content.

Declaration
public JToken Content { get; set; }
Property Value
Type Description
JToken

The content.

View Source

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 Source

Get(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/>.

View Source

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 T

Type Parameters
Name Description
T

Type of data

  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.