Avro C#
Loading...
Searching...
No Matches
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.UnknownLogicalType Avro.Util.Uuid

Public Member Functions

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

Protected Member Functions

 LogicalType (string name)
 Initializes the base logical type.
 

Properties

string Name [get]
 The logical type name.
 

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()

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

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.

◆ ConvertToLogicalValue()

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

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.

◆ GetCSharpType()

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

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

Parameters
nullibleA flag indicating whether it should be nullible.

◆ IsInstanceOfLogicalType()

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

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

Parameters
logicalValueThe logical value to test.

◆ 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.Decimal, and Avro.Util.Uuid.


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