Home FormatRegistryExtensions Class
FormatRegistryExtensions Class
Cancel

FormatRegistryExtensions Class

Namespace: Json.Schema

Inheritance: FormatRegistryExtensions 🡒 object

Provides extensions for Json.Schema.FormatRegistry to create new registries by adding and removing individual formats

Methods

With(this FormatRegistry registry, IEnumerable<Format> formats)

Creates a new registry with the specified formats added.

Declaration

1
public static FormatRegistry With(this FormatRegistry registry, IEnumerable<Format> formats)
ParameterTypeDescription
registryFormatRegistryThe source registry.
formatsIEnumerable<Format>The formats to add.

Returns

A new registry.

Without(this FormatRegistry registry, IEnumerable<string> formatKeys)

Creates a new registry with the specified formats removed.

Declaration

1
public static FormatRegistry Without(this FormatRegistry registry, IEnumerable<string> formatKeys)
ParameterTypeDescription
registryFormatRegistryThe source registry.
formatKeysIEnumerable<string>The keys of the formats to remove.

Returns

A new registry.

Without(this FormatRegistry registry, IEnumerable<Format> formats)

Creates a new registry with the specified formats removed.

Declaration

1
public static FormatRegistry Without(this FormatRegistry registry, IEnumerable<Format> formats)
ParameterTypeDescription
registryFormatRegistryThe source registry.
formatsIEnumerable<Format>The formats to remove.

Returns

A new registry.

Contents