Class PrimitiveInfo
This abstract class represents metadata properties common to all source generated Primitively types.
Implements
Namespace: Primitively
Assembly: Primitively.Abstractions.dll
Syntax
public abstract record PrimitiveInfo : IEquatable<PrimitiveInfo>
Constructors
PrimitiveInfo(DataType, Type, Type, string?, Func<string?, IPrimitive>)
This abstract class represents metadata properties common to all source generated Primitively types.
Declaration
protected PrimitiveInfo(DataType DataType, Type Type, Type ValueType, string? Example, Func<string?, IPrimitive> CreateFrom)
Parameters
Type | Name | Description |
---|---|---|
DataType | DataType | The DataType enum representation of the Primitively type. |
Type | Type | The .NET type of the Primitively type. |
Type | ValueType | The .NET type of the encapsulated value. |
string | Example | An optional example of the Primitively type in string format. |
Func<string, IPrimitive> | CreateFrom | A function that creates an instance of the Primitively type from a string. |
Properties
CreateFrom
A function that creates an instance of the Primitively type from a string.
Declaration
public Func<string?, IPrimitive> CreateFrom { get; init; }
Property Value
Type | Description |
---|---|
Func<string, IPrimitive> |
DataType
The DataType enum representation of the Primitively type.
Declaration
public DataType DataType { get; init; }
Property Value
Type | Description |
---|---|
DataType |
Example
An optional example of the Primitively type in string format.
Declaration
public string? Example { get; init; }
Property Value
Type | Description |
---|---|
string |
Type
The .NET type of the Primitively type.
Declaration
public Type Type { get; init; }
Property Value
Type | Description |
---|---|
Type |
ValueType
The .NET type of the encapsulated value.
Declaration
public Type ValueType { get; init; }
Property Value
Type | Description |
---|---|
Type |