Avro C#

Public Member Functions | List of all members
Avro.Reflect.IAvroFieldConverter Interface Reference

Converters can be added to properties with an AvroField attribute. Converters convert between the property type and the avro type. More...

Inheritance diagram for Avro.Reflect.IAvroFieldConverter:

## Public Member Functions
object | ToAvroType (object o, Schema s)
| Convert from the C# type to the avro type More...
object | FromAvroType (object o, Schema s)
| Convert from the avro type to the C# type More...
Type | GetAvroType ()
| Avro type More...
Type | GetPropertyType ()
| Property type More...

## Detailed Description

Converters can be added to properties with an AvroField attribute. Converters convert between the property type and the avro type.

## Member Function Documentation

## ◆ FromAvroType()

object Avro.Reflect.IAvroFieldConverter.FromAvroType | ( | object | o,
|  | Schema | s
| ) |  |

Convert from the avro type to the C# type

Parameters

  o | Value to convert
  s | Schema

Returns
  Converted value

Implemented in Avro.Reflect.TypedFieldConverter< TAvro, TProperty >, and Avro.Reflect.DateTimeOffsetToLongConverter.

## ◆ GetAvroType()

Type Avro.Reflect.IAvroFieldConverter.GetAvroType | ( |  | ) |

Avro type

Returns

Implemented in Avro.Reflect.TypedFieldConverter< TAvro, TProperty >, and Avro.Reflect.DateTimeOffsetToLongConverter.

## ◆ GetPropertyType()

Type Avro.Reflect.IAvroFieldConverter.GetPropertyType | ( |  | ) |

Property type

Returns

Implemented in Avro.Reflect.TypedFieldConverter< TAvro, TProperty >, and Avro.Reflect.DateTimeOffsetToLongConverter.

## ◆ ToAvroType()

object Avro.Reflect.IAvroFieldConverter.ToAvroType | ( | object | o,
|  | Schema | s
| ) |  |

Convert from the C# type to the avro type

Parameters

  o | Value to convert
  s | Schema

Returns
  Converted value

Implemented in Avro.Reflect.TypedFieldConverter< TAvro, TProperty >, and Avro.Reflect.DateTimeOffsetToLongConverter.

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

- src/apache/main/Reflect/IAvroFieldConverter.cs