Avro C#

Public Types | Public Member Functions | Public Attributes | Properties | List of all members
Avro.Field Class Reference

Class for fields defined in a record More...

## Public Types
enum | SortOrder { SortOrder.ascending, SortOrder.descending, SortOrder.ignore }
| Enum for the sorting order of record fields More...

## Public Member Functions
| Field (Schema schema, string name, int pos, IList< string > aliases=null, string doc=null, JToken defaultValue=null, SortOrder sortorder=SortOrder.ignore, PropertyMap customProperties=null)
| Initializes a new instance of the Field class. More...
string | GetProperty (string key)
| Returns the field's custom property value given the property name More...
override bool | Equals (object obj)
| Compares two field objects More...
override int | GetHashCode ()
| Hash code function More...

## Public Attributes
readonly string | Name
| Name of the field. More...

## Properties
IList< string > | Aliases`[get]`
| List of aliases for the field name. More...
int | Pos`[get]`
| Position of the field within its record. More...
string | Documentation`[get]`
| Documentation for the field, if any. Null if there is no documentation. More...
JToken | DefaultValue`[get]`
| The default value for the field stored as JSON object, if defined. Otherwise, null. More...
SortOrder? | Ordering`[get]`
| Order of the field More...
Schema | Schema`[get]`
| Field type's schema More...

## Detailed Description

Class for fields defined in a record

## Member Enumeration Documentation

## ◆ SortOrder

enum Avro.Field.SortOrder
| strong

Enum for the sorting order of record fields

Enumerator
ascending | Ascending order.
descending | Descending order.
ignore | Ignore sort order.

## Constructor & Destructor Documentation

## ◆ Field()

Avro.Field.Field | ( | Schema | schema,
|  | string | name,
|  | int | pos,
|  | IList< string > | aliases = `null`,
|  | string | doc = `null`,
|  | JToken | defaultValue = `null`,
|  | SortOrder | sortorder = `SortOrder.ignore`,
|  | PropertyMap | customProperties = `null`
| ) |  |
| inline

Initializes a new instance of the Field class.

Parameters

  schema | schema for the field type.
  name | name of the field.
  aliases | list of aliases for the name of the field.
  pos | position of the field.
  doc | documentation for the field.
  defaultValue | field's default value if it exists.
  sortorder | sort order of the field.
  customProperties | dictionary that provides access to custom properties.

## Member Function Documentation

## ◆ Equals()

override bool Avro.Field.Equals | ( | object | obj | ) |
| inline

Compares two field objects

Parameters

  obj | field to compare with this field

Returns
  true if two fields are equal, false otherwise

## ◆ GetHashCode()

override int Avro.Field.GetHashCode | ( |  | ) |
| inline

Hash code function

Returns

## ◆ GetProperty()

string Avro.Field.GetProperty | ( | string | key | ) |
| inline

Returns the field's custom property value given the property name

Parameters

  key | custom property name

Returns
  custom property value

## Member Data Documentation

## ◆ Name

readonly string Avro.Field.Name

Name of the field.

## Property Documentation

## ◆ Aliases

IList<string> Avro.Field.Aliases
| get

List of aliases for the field name.

## ◆ DefaultValue

JToken Avro.Field.DefaultValue
| get

The default value for the field stored as JSON object, if defined. Otherwise, null.

## ◆ Documentation

string Avro.Field.Documentation
| get

Documentation for the field, if any. Null if there is no documentation.

## ◆ Ordering

SortOrder? Avro.Field.Ordering
| get

Order of the field

## ◆ Pos

int Avro.Field.Pos
| get

Position of the field within its record.

## ◆ Schema

Schema Avro.Field.Schema
| get

Field type's schema

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

- src/apache/main/Schema/Field.cs