Class for union schemas.
More...
List of all members.
Public Member Functions |
| int | MatchingBranch (Schema s) |
| | Returns the index of a branch that can read the data written by the given schema s.
|
| override bool | CanRead (Schema writerSchema) |
| | Checks if this schema can read data written by the given schema. Used for decoding data.
|
| override bool | Equals (object obj) |
| | Compares two union schema objects.
|
| override int | GetHashCode () |
| | Hash code function.
|
Protected Member Functions |
| internal override void | WriteJson (Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace) |
| | Writes union schema in JSON format.
|
Properties |
| IList< Schema > | Schemas [get, set] |
| | List of schemas in the union.
|
| int | Count [get] |
| | Count of schemas in the union.
|
| Schema | this [int index] [get] |
| | Returns the schema at the given branch.
|
Detailed Description
Class for union schemas.
Member Function Documentation
| override bool Avro::UnionSchema::CanRead |
( |
Schema |
writerSchema |
) |
[inline, virtual] |
Checks if this schema can read data written by the given schema. Used for decoding data.
- Parameters:
-
| writerSchema | writer schema |
- Returns:
- true if this and writer schema are compatible based on the AVRO specification, false otherwise
Reimplemented from Avro::Schema.
| override bool Avro::UnionSchema::Equals |
( |
object |
obj |
) |
[inline] |
Compares two union schema objects.
- Parameters:
-
| obj | union schema object to compare against this schema |
- Returns:
- true if objects are equal, false otherwise
| override int Avro::UnionSchema::GetHashCode |
( |
|
) |
[inline] |
Hash code function.
- Returns:
Reimplemented from Avro::Schema.
| int Avro::UnionSchema::MatchingBranch |
( |
Schema |
s |
) |
[inline] |
Returns the index of a branch that can read the data written by the given schema s.
- Parameters:
-
| s | The schema to match the branches against. |
- Returns:
- The index of the matching branch. If non matches a -1 is returned.
| internal override void Avro::UnionSchema::WriteJson |
( |
Newtonsoft.Json.JsonTextWriter |
writer, |
|
|
SchemaNames |
names, |
|
|
string |
encspace | |
|
) |
| | [inline, protected] |
Writes union schema in JSON format.
- Parameters:
-
| writer | JSON writer |
| names | list of named schemas already written |
| encspace | enclosing namespace of the schema |
Property Documentation
int Avro::UnionSchema::Count [get] |
Count of schemas in the union.
IList<Schema> Avro::UnionSchema::Schemas [get, set] |
List of schemas in the union.
Schema Avro::UnionSchema::this[int index] [get] |
Returns the schema at the given branch.
- Parameters:
-
| index | Index to the branch, starting with 0. |
- Returns:
- The branch corresponding to the given index.
The documentation for this class was generated from the following file:
- src/apache/main/Schema/UnionSchema.cs