Zum Hauptinhalt springen

IRepositoryManagementService

Namespace: Meshmakers.Octo.ConstructionKit.Contracts.Services

Interface of the management service for repositories

public interface IRepositoryManagementService

Methods​

IsExistingAsync(CkModelId, Object)​

Returns true if the model with the given id and version exists

Task<bool> IsExistingAsync(CkModelId ckModelId, object sourceIdentifier)

Parameters​

ckModelId CkModelId
The construction kit model id

sourceIdentifier Object
An object that describes the source which the catalog should search set it to null to use default

Returns​

Task<Boolean>
The task that returns true if the model exists

IsExistingAsync(CkModelIdVersionRange, Object)​

Returns information if the model with the given id and version range exists

Task<ModelExistingResult> IsExistingAsync(CkModelIdVersionRange ckModelIdVersionRange, object sourceIdentifier)

Parameters​

ckModelIdVersionRange CkModelIdVersionRange
The construction kit model id with optional version range

sourceIdentifier Object
An object that describes the source which the catalog should search set it to null to use default

Returns​

Task<ModelExistingResult>
The task that returns an object describing if the model exists

CustomizeCkEnumAsync(CkId<CkEnumId>, ICollection<CkEnumUpdate>, Object, Nullable<CancellationToken>)​

Customizes CkEnum values in the repository

Task CustomizeCkEnumAsync(CkId<CkEnumId> ckEnumId, ICollection<CkEnumUpdate> ckEnumUpdates, object sourceIdentifier, Nullable<CancellationToken> cancellationToken)

Parameters​

ckEnumId CkId<CkEnumId>
Construction kit enum id

ckEnumUpdates ICollection<CkEnumUpdate>
Describes the updates to the enum

sourceIdentifier Object
An object that describes the source which the repository should search set it to null to use default

cancellationToken Nullable<CancellationToken>
A cancellation token that can be used to cancel the operation

Returns​

Task

UpdateModelAsync(CkCompiledModelRoot, Object, Nullable<CancellationToken>)​

Updates a model to a repository

Task UpdateModelAsync(CkCompiledModelRoot ckCompiledModel, object sourceIdentifier, Nullable<CancellationToken> cancellationToken)

Parameters​

ckCompiledModel CkCompiledModelRoot
The validated construction kit model

sourceIdentifier Object
An object that describes the source which the catalog should search set it to null to use default

cancellationToken Nullable<CancellationToken>
A cancellation token that can be used to cancel the operation

Returns​

Task

TryLookupCkModelAsync(CkModelId, OperationResult, Object, Nullable<CancellationToken>)​

Tries to look up a model by its id

Task<CkCompiledModelRoot> TryLookupCkModelAsync(CkModelId ckModelId, OperationResult operationResult, object sourceIdentifier, Nullable<CancellationToken> cancellationToken)

Parameters​

ckModelId CkModelId
The construction kit model id

operationResult OperationResult
Operation results that contain validation messages occured during deserialization.

sourceIdentifier Object
An object that describes the source which the repository should search set it to null to use default

cancellationToken Nullable<CancellationToken>
A cancellation token that can be used to cancel the operation

Returns​

Task<CkCompiledModelRoot>
If existing the deserialized and validated construction kit model