The default type used by GenericReader and GenericWriter for RecordSchema.
More...
|
| GenericRecord (RecordSchema schema) |
| Initializes a new instance of the GenericRecord class. More...
|
|
void | Add (string fieldName, object fieldValue) |
| Sets the value for a field. You may call this method multiple times with the same field name to change its value. The given field name must exist in the schema. More...
|
|
bool | TryGetValue (string fieldName, out object result) |
| Gets the value the specified field name. More...
|
|
object | GetValue (int fieldPos) |
| Returns the value of the field with the given position. More...
|
|
void | Add (int fieldPos, object fieldValue) |
| Adds the value in the specified field position. More...
|
|
bool | TryGetValue (int fieldPos, out object result) |
| Gets the value in the specified field position. More...
|
|
override bool | Equals (object obj) |
|
bool | Equals (GenericRecord other) |
|
override int | GetHashCode () |
|
override string | ToString () |
|
◆ GenericRecord()
Avro.Generic.GenericRecord.GenericRecord |
( |
RecordSchema |
schema | ) |
|
|
inline |
Initializes a new instance of the GenericRecord class.
- Parameters
-
◆ Add() [1/2]
void Avro.Generic.GenericRecord.Add |
( |
int |
fieldPos, |
|
|
object |
fieldValue |
|
) |
| |
Adds the value in the specified field position.
- Parameters
-
fieldPos | Position of the field. |
fieldValue | The value to add. |
- Exceptions
-
IndexOutOfRangeException | fieldPos . |
◆ Add() [2/2]
void Avro.Generic.GenericRecord.Add |
( |
string |
fieldName, |
|
|
object |
fieldValue |
|
) |
| |
|
inline |
Sets the value for a field. You may call this method multiple times with the same field name to change its value. The given field name must exist in the schema.
- Parameters
-
fieldName | Name of the field. |
fieldValue | Value of the field. |
- Exceptions
-
◆ GetValue()
object Avro.Generic.GenericRecord.GetValue |
( |
int |
fieldPos | ) |
|
|
inline |
Returns the value of the field with the given position.
- Parameters
-
fieldPos | The position of the field. |
- Returns
- Value of the field with the given position.
- Exceptions
-
IndexOutOfRangeException | fieldPos |
◆ TryGetValue() [1/2]
bool Avro.Generic.GenericRecord.TryGetValue |
( |
int |
fieldPos, |
|
|
out object |
result |
|
) |
| |
|
inline |
Gets the value in the specified field position.
- Parameters
-
fieldPos | Position of the field. |
result | When this method returns true, contains the value of the specified field; otherwise, null. |
- Returns
- True if the field position is valid.
◆ TryGetValue() [2/2]
bool Avro.Generic.GenericRecord.TryGetValue |
( |
string |
fieldName, |
|
|
out object |
result |
|
) |
| |
|
inline |
Gets the value the specified field name.
- Parameters
-
fieldName | Name of the field. |
result | When this method returns true, contains the value of the specified field; otherwise, null. |
- Returns
- True if the field was found in the record. This method will only return true if Add(string, object) has been called for the given field name.
◆ Schema
◆ this[string fieldName]
object Avro.Generic.GenericRecord.this[string fieldName] |
|
get |
Returns the value of the field with the given name.
- Parameters
-
fieldName | Name of the field. |
- Returns
- Value of the field with the given name.
- Exceptions
-
ArgumentNullException | fieldName is null. |
KeyNotFoundException | fieldName does not exist in this record. |
The documentation for this class was generated from the following file:
- src/apache/main/Generic/GenericRecord.cs