Zum Hauptinhalt springen

BlueprintApplicationResult

Namespace: Meshmakers.Octo.Runtime.Contracts.Blueprints

Result of applying a blueprint to a tenant

public class BlueprintApplicationResult

Inheritance Object → BlueprintApplicationResult

Properties​

IsSuccess​

Indicates if the blueprint was applied successfully

public bool IsSuccess { get; private set; }

Property Value​

Boolean

BlueprintId​

The blueprint that was applied

public BlueprintId BlueprintId { get; private set; }

Property Value​

BlueprintId

TenantId​

The tenant that the blueprint was applied to

public string TenantId { get; private set; }

Property Value​

String

LoadedCkModels​

List of CK models that were loaded (as version ranges)

public List<CkModelIdVersionRange> LoadedCkModels { get; private set; }

Property Value​

List<CkModelIdVersionRange>

AppliedSeedDataFiles​

List of seed data files that were applied

public List<string> AppliedSeedDataFiles { get; private set; }

Property Value​

List<String>

EntitiesCreated​

Number of entities created from seed data

public int EntitiesCreated { get; private set; }

Property Value​

Int32

OperationResult​

Operation result containing messages and errors

public OperationResult OperationResult { get; private set; }

Property Value​

OperationResult

WasSkipped​

True when the blueprint's requires: preconditions did not match the tenant's variable context, so the apply was a no-op (no seed data was imported, no installation row was recorded). BlueprintApplicationResult.IsSuccess is still true in this case — the apply did not fail, it just had nothing to do.

public bool WasSkipped { get; private set; }

Property Value​

Boolean

SkipReason​

Human-readable reason why the apply was skipped, populated when BlueprintApplicationResult.WasSkipped is true.

public string SkipReason { get; private set; }

Property Value​

String

IsCkUpgradeBlocked​

True when the apply was refused because the CK models it would install or raise break an installed model (tenant upgrade guard). Nothing was changed. BlueprintApplicationResult.CkUpgradeBlockers names what would break; BlueprintApplicationResult.IsSuccess is false.

public bool IsCkUpgradeBlocked { get; private set; }

Property Value​

Boolean

CkUpgradeGuardFailed​

True when the tenant upgrade guard itself could not judge the CK update set. The apply failed closed and nothing was changed.

public bool CkUpgradeGuardFailed { get; private set; }

Property Value​

Boolean

CkUpgradeBlockers​

The installed models the CK update set breaks. With BlueprintApplicationResult.IsCkUpgradeBlocked they are the reason of the refusal; on a successful result they are the blockers the caller forced past (BlueprintCkUpgradeGuardMode.ForceBreakingUpdate). Empty otherwise.

public IReadOnlyList<BlueprintCkUpgradeBlocker> CkUpgradeBlockers { get; private set; }

Property Value​

IReadOnlyList<BlueprintCkUpgradeBlocker>

CkUpdateSet​

The CK models (full ids) that were judged as one set; empty when the guard did not run.

public IReadOnlyList<string> CkUpdateSet { get; private set; }

Property Value​

IReadOnlyList<String>

ArchiveActivations​

The archives of the applied seeds and what the apply did with each - newly created archives activated (or skipped with a reason, or failed), pre-existing archives untouched - and for new rollups whether a backfill was queued. Empty when the seeds carry no archive.

public IReadOnlyList<BlueprintArchiveActivation> ArchiveActivations { get; private set; }

Property Value​

IReadOnlyList<BlueprintArchiveActivation>

Methods​

Success(String, BlueprintId, List<CkModelIdVersionRange>, List<String>, Int32, OperationResult)​

Creates a successful result (six-parameter form kept for consumers compiled against earlier packages)

public static BlueprintApplicationResult Success(string tenantId, BlueprintId blueprintId, List<CkModelIdVersionRange> loadedCkModels, List<string> appliedSeedDataFiles, int entitiesCreated, OperationResult operationResult)

Parameters​

tenantId String
The tenant id

blueprintId BlueprintId
The blueprint id

loadedCkModels List<CkModelIdVersionRange>
List of loaded CK models (as version ranges)

appliedSeedDataFiles List<String>
List of applied seed data files

entitiesCreated Int32
Number of entities created

operationResult OperationResult
Operation result with messages

Returns​

BlueprintApplicationResult
A successful result

Success(String, BlueprintId, List<CkModelIdVersionRange>, List<String>, Int32, OperationResult, IReadOnlyList<BlueprintCkUpgradeBlocker>, IReadOnlyList<String>)​

Creates a successful result

public static BlueprintApplicationResult Success(string tenantId, BlueprintId blueprintId, List<CkModelIdVersionRange> loadedCkModels, List<string> appliedSeedDataFiles, int entitiesCreated, OperationResult operationResult, IReadOnlyList<BlueprintCkUpgradeBlocker> forcedCkUpgradeBlockers, IReadOnlyList<string> ckUpdateSet)

Parameters​

tenantId String
The tenant id

blueprintId BlueprintId
The blueprint id

loadedCkModels List<CkModelIdVersionRange>
List of loaded CK models (as version ranges)

appliedSeedDataFiles List<String>
List of applied seed data files

entitiesCreated Int32
Number of entities created

operationResult OperationResult
Operation result with messages

forcedCkUpgradeBlockers IReadOnlyList<BlueprintCkUpgradeBlocker>
The blockers the caller forced past; none by default

ckUpdateSet IReadOnlyList<String>
The CK models (full ids) the tenant upgrade guard judged as one set; none by default

Returns​

BlueprintApplicationResult
A successful result

Success(String, BlueprintId, List<CkModelIdVersionRange>, List<String>, Int32, OperationResult, IReadOnlyList<BlueprintCkUpgradeBlocker>, IReadOnlyList<String>, IReadOnlyList<BlueprintArchiveActivation>)​

Creates a successful result with the archive activations of the apply

public static BlueprintApplicationResult Success(string tenantId, BlueprintId blueprintId, List<CkModelIdVersionRange> loadedCkModels, List<string> appliedSeedDataFiles, int entitiesCreated, OperationResult operationResult, IReadOnlyList<BlueprintCkUpgradeBlocker> forcedCkUpgradeBlockers, IReadOnlyList<string> ckUpdateSet, IReadOnlyList<BlueprintArchiveActivation> archiveActivations)

Parameters​

tenantId String
The tenant id

blueprintId BlueprintId
The blueprint id

loadedCkModels List<CkModelIdVersionRange>
List of loaded CK models (as version ranges)

appliedSeedDataFiles List<String>
List of applied seed data files

entitiesCreated Int32
Number of entities created

operationResult OperationResult
Operation result with messages

forcedCkUpgradeBlockers IReadOnlyList<BlueprintCkUpgradeBlocker>
The blockers the caller forced past; none by default

ckUpdateSet IReadOnlyList<String>
The CK models (full ids) the tenant upgrade guard judged as one set; none by default

archiveActivations IReadOnlyList<BlueprintArchiveActivation>
What the apply did with the archives of its seeds; none by default

Returns​

BlueprintApplicationResult
A successful result

CkUpgradeBlocked(String, BlueprintId, IReadOnlyList<String>, IReadOnlyList<BlueprintCkUpgradeBlocker>, OperationResult)​

Creates the result of an apply that the tenant upgrade guard refused: nothing was changed.

public static BlueprintApplicationResult CkUpgradeBlocked(string tenantId, BlueprintId blueprintId, IReadOnlyList<string> ckUpdateSet, IReadOnlyList<BlueprintCkUpgradeBlocker> blockers, OperationResult operationResult)

Parameters​

tenantId String
The tenant id

blueprintId BlueprintId
The blueprint id

ckUpdateSet IReadOnlyList<String>
The CK models (full ids) judged as one set

blockers IReadOnlyList<BlueprintCkUpgradeBlocker>
The installed models the set would break

operationResult OperationResult
Operation result with the error message

Returns​

BlueprintApplicationResult
A failed result with BlueprintApplicationResult.IsCkUpgradeBlocked = true

CkUpgradeGuardFailure(OperationResult)​

Creates the result of an apply that failed closed because the tenant upgrade guard could not judge the CK update set: nothing was changed.

public static BlueprintApplicationResult CkUpgradeGuardFailure(OperationResult operationResult)

Parameters​

operationResult OperationResult
Operation result with the error message

Returns​

BlueprintApplicationResult
A failed result with BlueprintApplicationResult.CkUpgradeGuardFailed = true

Failed(OperationResult)​

Creates a failed result

public static BlueprintApplicationResult Failed(OperationResult operationResult)

Parameters​

operationResult OperationResult
Operation result with error messages

Returns​

BlueprintApplicationResult
A failed result

Skipped(String, BlueprintId, String, OperationResult)​

Creates a successful no-op result indicating the blueprint was skipped because its requires: preconditions did not match the tenant's variable context. Callers that loop over multiple blueprints can rely on BlueprintApplicationResult.WasSkipped to distinguish "applied" from "skipped" without re-reading the manifest.

public static BlueprintApplicationResult Skipped(string tenantId, BlueprintId blueprintId, string reason, OperationResult operationResult)

Parameters​

tenantId String
Target tenant identifier.

blueprintId BlueprintId
Blueprint that was evaluated.

reason String
Human-readable reason why the apply was skipped.

operationResult OperationResult
Operation result with informational messages.

Returns​

BlueprintApplicationResult
A skipped result with BlueprintApplicationResult.IsSuccess=true.