Table of Contents

Interface IMetricViewValidationRule

Namespace
TabularEditor.SemanticBridge.Platforms.Databricks.Interfaces
Assembly
SemanticBridge.dll

Interface for validation rules that can be applied to metric view objects. ValidMetricViewRules encapsulate a specific validation check that produces diagnostic messages when validation fails.

public interface IMetricViewValidationRule
Extension Methods

Properties

Category

Gets the category of the validation rule for organizational purposes. Categories help group related rules (e.g., "Names", "Structure", "Expressions").

string Category { get; }

Property Value

Type Description
string

Name

Gets the unique name of the validation rule. Names should be descriptive and indicate what the rule validates.

string Name { get; }

Property Value

Type Description
string

TargetType

Gets the type of object this rule is designed to validate. This allows for efficient filtering and application of rules.

Type TargetType { get; }

Property Value

Type Description
Type

Methods

Validate(IMetricViewObject, IReadOnlyValidationContext)

Validates the target object using the provided read-only context. ValidMetricViewRules receive a read-only view to prevent accidental mutation of validation state.

IEnumerable<DiagnosticMessage> Validate(IMetricViewObject target, IReadOnlyValidationContext context)

Parameters

Type Name Description
IMetricViewObject target

The object to validate

IReadOnlyValidationContext context

Read-only validation context with state information including path tracking and uniqueness collections

Returns

Type Description
IEnumerable<DiagnosticMessage>

Collection of diagnostic messages for any validation failures, or an empty collection if validation passes