Class for enum type schemas. More...
Public Member Functions | |
int | Ordinal (string symbol) |
Returns the position of the given symbol within this enum. Throws AvroException if the symbol is not found in this enum. | |
bool | Contains (string symbol) |
Checks if given symbol is in the list of enum symbols. | |
IEnumerator< string > | GetEnumerator () |
Returns an enumerator that enumerates the symbols in this enum schema in the order of their definition. | |
override bool | Equals (object obj) |
Checks equality of two enum schema. | |
override int | GetHashCode () |
Hashcode function. | |
override bool | CanRead (Schema writerSchema) |
Checks if this schema can read data written by the given schema. Used for decoding data. | |
Protected Member Functions | |
internal override void | WriteJsonFields (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace) |
Writes enum schema in JSON format. | |
Properties | |
IList< string > | Symbols [get, set] |
List of strings representing the enum symbols. | |
int | Count [get] |
Count of enum symbols. | |
string | this[int index] [get] |
Returns the enum symbol of the given index to the list. |
Class for enum type schemas.
override bool Avro.EnumSchema.CanRead | ( | Schema | writerSchema | ) | [inline, virtual] |
Checks if this schema can read data written by the given schema. Used for decoding data.
writerSchema | writer schema |
Reimplemented from Avro.Schema.
bool Avro.EnumSchema.Contains | ( | string | symbol | ) | [inline] |
Checks if given symbol is in the list of enum symbols.
symbol | symbol to check |
override bool Avro.EnumSchema.Equals | ( | object | obj | ) | [inline] |
Checks equality of two enum schema.
obj |
IEnumerator<string> Avro.EnumSchema.GetEnumerator | ( | ) | [inline] |
Returns an enumerator that enumerates the symbols in this enum schema in the order of their definition.
override int Avro.EnumSchema.GetHashCode | ( | ) | [inline] |
int Avro.EnumSchema.Ordinal | ( | string | symbol | ) | [inline] |
Returns the position of the given symbol within this enum. Throws AvroException if the symbol is not found in this enum.
symbol | name of the symbol to find |
internal override void Avro.EnumSchema.WriteJsonFields | ( | Newtonsoft.Json.JsonTextWriter | writer, |
SchemaNames | names, | ||
string | encspace | ||
) | [inline, protected] |
Writes enum schema in JSON format.
writer | JSON writer |
names | list of named schema already written |
encspace | enclosing namespace of the enum schema |
Reimplemented from Avro.NamedSchema.
int Avro.EnumSchema.Count [get] |
Count of enum symbols.
IList<string> Avro.EnumSchema.Symbols [get, set] |
List of strings representing the enum symbols.
string Avro.EnumSchema.this[int index] [get] |
Returns the enum symbol of the given index to the list.
index | symbol index |