Avro C#
Public Member Functions | Protected Member Functions | Properties | List of all members
Avro.Util.LogicalType Class Referenceabstract

Base for all logical type implementations. More...

Inheritance diagram for Avro.Util.LogicalType:
Avro.Util.Decimal Avro.Util.LogicalUnixEpochType< T > Avro.Util.Uuid

Public Member Functions

virtual void ValidateSchema (LogicalSchema schema)
 Applies logical type validation for a given logical schema. More...
 
abstract object ConvertToBaseValue (object logicalValue, LogicalSchema schema)
 Converts a logical value to an instance of its base type. More...
 
abstract object ConvertToLogicalValue (object baseValue, LogicalSchema schema)
 Converts a base value to an instance of the logical type. More...
 
abstract Type GetCSharpType (bool nullible)
 Retrieve the .NET type that is represented by the logical type implementation. More...
 
abstract bool IsInstanceOfLogicalType (object logicalValue)
 Determines if a given object is an instance of the logical type. More...
 

Protected Member Functions

 LogicalType (string name)
 Initializes the base logical type. More...
 

Properties

string Name [get]
 The logical type name. More...
 

Detailed Description

Base for all logical type implementations.

Constructor & Destructor Documentation

◆ LogicalType()

Avro.Util.LogicalType.LogicalType ( string  name)
inlineprotected

Initializes the base logical type.

Parameters
nameThe logical type name.

Member Function Documentation

◆ ConvertToBaseValue()

abstract object Avro.Util.LogicalType.ConvertToBaseValue ( object  logicalValue,
LogicalSchema  schema 
)
pure virtual

Converts a logical value to an instance of its base type.

Parameters
logicalValueThe logical value to convert.
schemaThe schema that represents the target of the conversion.
Returns
An object representing the encoded value of the base type.

Implemented in Avro.Util.Decimal, and Avro.Util.Uuid.

◆ ConvertToLogicalValue()

abstract object Avro.Util.LogicalType.ConvertToLogicalValue ( object  baseValue,
LogicalSchema  schema 
)
pure virtual

Converts a base value to an instance of the logical type.

Parameters
baseValueThe base value to convert.
schemaThe schema that represents the target of the conversion.
Returns
An object representing the encoded value of the logical type.

Implemented in Avro.Util.Decimal, and Avro.Util.Uuid.

◆ GetCSharpType()

abstract Type Avro.Util.LogicalType.GetCSharpType ( bool  nullible)
pure virtual

Retrieve the .NET type that is represented by the logical type implementation.

Parameters
nullibleA flag indicating whether it should be nullible.

Implemented in Avro.Util.Decimal, Avro.Util.Uuid, and Avro.Util.LogicalUnixEpochType< T >.

◆ IsInstanceOfLogicalType()

abstract bool Avro.Util.LogicalType.IsInstanceOfLogicalType ( object  logicalValue)
pure virtual

Determines if a given object is an instance of the logical type.

Parameters
logicalValueThe logical value to test.

Implemented in Avro.Util.Decimal, Avro.Util.Uuid, and Avro.Util.LogicalUnixEpochType< T >.

◆ ValidateSchema()

virtual void Avro.Util.LogicalType.ValidateSchema ( LogicalSchema  schema)
inlinevirtual

Applies logical type validation for a given logical schema.

Parameters
schemaThe schema to be validated.

Reimplemented in Avro.Util.Uuid, and Avro.Util.Decimal.

Property Documentation

◆ Name

string Avro.Util.LogicalType.Name
get

The logical type name.


The documentation for this class was generated from the following file: