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:

## 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 | ) |
| inline protected

Initializes the base logical type.

Parameters

  name | The 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

  logicalValue | The logical value to convert.
  schema | The 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

  baseValue | The base value to convert.
  schema | The 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

  nullible | A 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

  logicalValue | The 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 | ) |
| inline virtual

Applies logical type validation for a given logical schema.

Parameters

  schema | The 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:

- src/apache/main/Util/LogicalType.cs