Skip to content

Validation: base classes, interfaces, [InheritFrom] and [Mutable] #3378

Backlog

Description

@david-driscoll

Part of #3374. Spec: docs/design/validation.md. Pull request: #3384.

  • Rules declared for a base class or an interface apply to every type that derives from or implements it.
  • [InheritFrom<T>] carries T's attribute and function rules for the copied members, with their dependencies, in the same assembly and from a reference, through the manifest.
  • [Mutable<T>]: whole-value validation as T, and per-member validation (synchronous or asynchronous as the member's rules are).
  • The ZeroAlloc.Validation validator moves out of MutableGenerator (with the removal of that library, Validation: port the samples and remove ZeroAlloc.Validation #3380).
  • The [Mutable] and [InheritFrom] member models are shared source (src/Shared) linked into both analyzer assemblies.
  • Composition at registration when several assemblies have rules for one type.
  • test/Sdk.Tests: rules inherited across an assembly boundary, from packed packages.
  • Include<TOther>() in a Validate function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions