IRtRepositorySerializer
Namespace: Meshmakers.Octo.Runtime.Contracts.Serialization
Represents a JSON serializer for runtime repository
public interface IRtRepositorySerializer
Methods
SerializeAsync(StreamWriter, IEnumerable<RtEntity>)
Serializes a list of entities to the stream.
Task SerializeAsync(StreamWriter streamWriter, IEnumerable<RtEntity> collection)
Parameters
streamWriter StreamWriter
A stream ready to write used for serialization
collection IEnumerable<RtEntity>
Model to serialize
Returns
SerializeAsync(StreamWriter, IEnumerable<RtAssociation>)
Serializes a list of associations to the stream.
Task SerializeAsync(StreamWriter streamWriter, IEnumerable<RtAssociation> collection)
Parameters
streamWriter StreamWriter
A stream ready to write used for serialization
collection IEnumerable<RtAssociation>
Model to serialize
Returns
SerializeAsync(StreamWriter, IEnumerable<BinaryInfo>)
Serializes a list of binary info to the stream.
Task SerializeAsync(StreamWriter streamWriter, IEnumerable<BinaryInfo> collection)
Parameters
streamWriter StreamWriter
A stream ready to write used for serialization
collection IEnumerable<BinaryInfo>
Model to serialize
Returns
DeserializeEntitiesAsync(Stream, String, OperationResult)
Deserializes the runtime model entities from the stream.
Task<IEnumerable<RtEntity>> DeserializeEntitiesAsync(Stream stream, string locationReference, OperationResult operationResult)
Parameters
stream Stream
The stream to read
locationReference String
A reference used in messages to signal the position of a file or resource
operationResult OperationResult
An operation result object that lists all validation issues.
In case of exceptions, this object contains the
validation errors too.
Returns
DeserializeAssociationsAsync(Stream, String, OperationResult)
Deserializes the runtime model associations from the stream.
Task<IEnumerable<RtAssociation>> DeserializeAssociationsAsync(Stream stream, string locationReference, OperationResult operationResult)
Parameters
stream Stream
The stream to read
locationReference String
A reference used in messages to signal the position of a file or resource
operationResult OperationResult
An operation result object that lists all validation issues.
In case of exceptions, this object contains the
validation errors too.
Returns
Task<IEnumerable<RtAssociation>>
DeserializeBinaryInfosAsync(Stream, String, OperationResult)
Deserializes the runtime model of binaries from the stream.
Task<IEnumerable<BinaryInfo>> DeserializeBinaryInfosAsync(Stream stream, string locationReference, OperationResult operationResult)
Parameters
stream Stream
The stream to read
locationReference String
A reference
used in messages to signal the position of a file or resource
operationResult OperationResult
An operation result object that lists all validation issues.
In case of exceptions, this object contains the
validation errors too.