Class Field
Class for fields defined in a record
Inheritance
System.Object
Field
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Avro
Assembly: Avro.dll
Syntax
public class Field
Fields
| Improve this Doc View Sourcealiases
List of aliases for the field name
Declaration
public readonly IList<string> aliases
Field Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
Name
Name of the field.
Declaration
public readonly string Name
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceDefaultValue
The default value for the field stored as JSON object, if defined. Otherwise, null.
Declaration
public JToken DefaultValue { get; }
Property Value
Type | Description |
---|---|
Newtonsoft.Json.Linq.JToken |
Documentation
Documentation for the field, if any. Null if there is no documentation.
Declaration
public string Documentation { get; }
Property Value
Type | Description |
---|---|
System.String |
Ordering
Order of the field
Declaration
public Field.SortOrder? Ordering { get; }
Property Value
Type | Description |
---|---|
System.Nullable<Field.SortOrder> |
Pos
Position of the field within its record.
Declaration
public int Pos { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Schema
Field type's schema
Declaration
public Schema Schema { get; }
Property Value
Type | Description |
---|---|
Schema |
Methods
| Improve this Doc View SourceEquals(Object)
Compares two field objects
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | field to compare with this field |
Returns
Type | Description |
---|---|
System.Boolean | true if two fields are equal, false otherwise |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetHashCode()
Hash code function
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
GetProperty(String)
Returns the field's custom property value given the property name
Declaration
public string GetProperty(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | custom property name |
Returns
Type | Description |
---|---|
System.String | custom property value |
writeJson(JsonTextWriter, SchemaNames, String)
Writes the Field class in JSON format
Declaration
protected void writeJson(JsonTextWriter writer, SchemaNames names, string encspace)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonTextWriter | writer | JSON writer |
SchemaNames | names | list of named schemas already written |
System.String | encspace | enclosing namespace for the field |