Table of Contents

Class GovernanceMetadataBudgetValidationResult

Namespace
AsiBackbone.Core.Metadata
Assembly
AsiBackbone.Core.dll

Represents the result of optional governance metadata budget validation.

public sealed class GovernanceMetadataBudgetValidationResult
Inheritance
GovernanceMetadataBudgetValidationResult
Inherited Members

Properties

EstimatedSerializedBytes

Gets the estimated UTF-8 serialized metadata size used for budget comparison.

public int EstimatedSerializedBytes { get; }

Property Value

int

IsValid

Gets a value indicating whether the metadata satisfied the supplied budget.

public bool IsValid { get; }

Property Value

bool

NormalizedMetadata

Gets normalized metadata after trimming keys and values and dropping blank keys.

public IReadOnlyDictionary<string, string> NormalizedMetadata { get; }

Property Value

IReadOnlyDictionary<string, string>

Violations

Gets budget validation violations. Empty when IsValid is true.

public IReadOnlyList<string> Violations { get; }

Property Value

IReadOnlyList<string>

Methods

Create(IReadOnlyDictionary<string, string>, IReadOnlyList<string>, int)

Creates a validation result.

public static GovernanceMetadataBudgetValidationResult Create(IReadOnlyDictionary<string, string> normalizedMetadata, IReadOnlyList<string> violations, int estimatedSerializedBytes)

Parameters

normalizedMetadata IReadOnlyDictionary<string, string>
violations IReadOnlyList<string>
estimatedSerializedBytes int

Returns

GovernanceMetadataBudgetValidationResult

ThrowIfInvalid(string?)

Throws an ArgumentException when validation failed.

public void ThrowIfInvalid(string? parameterName = null)

Parameters

parameterName string