Zum Hauptinhalt springen

IBlueprintSerializer

Namespace: Meshmakers.Octo.ConstructionKit.Contracts.BlueprintCatalogs.Serialization

Interface for serializing blueprint definitions

public interface IBlueprintSerializer

Methods​

SerializeAsync(StreamWriter, BlueprintMetaRootDto)​

Serializes the blueprint metadata to the stream.

Task SerializeAsync(StreamWriter streamWriter, BlueprintMetaRootDto blueprintMetaRoot)

Parameters​

streamWriter StreamWriter
A stream ready to write used for serialization

blueprintMetaRoot BlueprintMetaRootDto
Blueprint metadata to serialize

Returns​

Task

DeserializeBlueprintMetaAsync(Stream, String, OperationResult)​

Deserializes the blueprint metadata from the stream.

Task<BlueprintMetaRootDto> DeserializeBlueprintMetaAsync(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
A operation result object that lists all validation issues.

Returns​

Task<BlueprintMetaRootDto>
The deserialized object. Please check the for validation issues in operationResult.

DeserializeBlueprintMeta(String, String, OperationResult)​

Deserializes the blueprint metadata from a string.

BlueprintMetaRootDto DeserializeBlueprintMeta(string content, string locationReference, OperationResult operationResult)

Parameters​

content String
The string content to deserialize

locationReference String
A reference used in messages to signal the position of a file or resource

operationResult OperationResult
A operation result object that lists all validation issues.

Returns​

BlueprintMetaRootDto
The deserialized object. Please check the for validation issues in operationResult.