Skip to main content
Version: 0.3.x (0.3.0)

Class NullableValueObjectConverter<TSelf>

Namespace: AdCodicem.ValueObjects.EntityFrameworkCore
Assembly: AdCodicem.ValueObjects.EntityFrameworkCore.dll

Stores an optional value object over as its bare text, and a value it rejects as NULL.

[SuppressMessage("Design", "CA1000:Do not declare static members on generic types", Justification = "A compiled model calls the conversions on the converter type it was built from.")]
public sealed class NullableValueObjectConverter<TSelf> : ValueConverter<TSelf?, string?> where TSelf : struct, IValueObject<TSelf, string>

Type Parameters​

TSelf

Value object type.

Inheritance​

object ← ValueConverter ← ValueConverter<TSelf?, string?> ← NullableValueObjectConverter<TSelf>

Inherited Members​

ValueConverter<TSelf?, string?>.ConvertToProvider, ValueConverter<TSelf?, string?>.ConvertFromProvider, ValueConverter<TSelf?, string?>.ConvertToProviderTyped, ValueConverter<TSelf?, string?>.ConvertFromProviderTyped, ValueConverter<TSelf?, string?>.ConvertToProviderExpression, ValueConverter<TSelf?, string?>.ConvertFromProviderExpression, ValueConverter<TSelf?, string?>.ModelClrType, ValueConverter<TSelf?, string?>.ProviderClrType, ValueConverter<TSelf?, string?>.ConstructorExpression, ValueConverter.ComposeWith(ValueConverter?), ValueConverter.ConvertToProvider, ValueConverter.ConvertFromProvider, ValueConverter.ConvertToProviderExpression, ValueConverter.ConvertFromProviderExpression, ValueConverter.ModelClrType, ValueConverter.ProviderClrType, ValueConverter.MappingHints, ValueConverter.ConvertsNulls, ValueConverter.ConstructorExpression, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Remarks​

The convention maps a TSelf? property through it, as it maps one over a value type through , which it writes and reads as. The value object it rejects is an instance equal to default(TSelf), whose text is empty.

validates what it reads.

Constructors​

NullableValueObjectConverter()​

Initializes a new instance of the class.

public NullableValueObjectConverter()