IImportRtModelCommand
Namespace: Meshmakers.Octo.Runtime.Contracts.Exchange
Interface for importing a runtime model from a file.
public interface IImportRtModelCommand
Methods
ImportTextAsync(IRuntimeRepository, String, ImportStrategy, Nullable<CancellationToken>)
Imports as text
Task ImportTextAsync(IRuntimeRepository runtimeRepository, string jsonText, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken)
Parameters
runtimeRepository IRuntimeRepository
The runtime repository
jsonText String
Model as JSON text
importStrategy ImportStrategy
Defines the import strategy
cancellationToken Nullable<CancellationToken>
An optional cancellation token
Returns
ImportModelAsync(IRuntimeRepository, RtModelRootTcDto, ImportStrategy, Nullable<CancellationToken>)
Imports a model root
Task ImportModelAsync(IRuntimeRepository runtimeRepository, RtModelRootTcDto rtModelRootTc, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken)
Parameters
runtimeRepository IRuntimeRepository
The runtime repository
rtModelRootTc RtModelRootTcDto
The model root
importStrategy ImportStrategy
Defines the import strategy
cancellationToken Nullable<CancellationToken>
An optional cancellation token
Returns
ImportAsync(IRuntimeRepository, String, String, ImportStrategy, Nullable<CancellationToken>)
Imports from a file
Task ImportAsync(IRuntimeRepository runtimeRepository, string filePath, string contentType, ImportStrategy importStrategy, Nullable<CancellationToken> cancellationToken)
Parameters
runtimeRepository IRuntimeRepository
The runtime repository
filePath String
A file path as ZIP (containing YAML or JSON), JSON or YAML files
contentType String
The content type of the file
importStrategy ImportStrategy
Defines the import strategy
cancellationToken Nullable<CancellationToken>
An optional cancellation token