Class SchemaNames
A class that contains a list of named schemas. This is used when reading or writing a schema/protocol. This prevents reading and writing of duplicate schema definitions within a protocol or schema file
Inheritance
Inherited Members
Namespace: Avro
Assembly: Avro.dll
Syntax
public class SchemaNames
Constructors
| Improve this Doc View SourceSchemaNames()
Constructor
Declaration
public SchemaNames()
Properties
| Improve this Doc View SourceNames
Map of schema name and named schema objects
Declaration
public IDictionary<SchemaName, NamedSchema> Names { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<SchemaName, NamedSchema> |
Methods
| Improve this Doc View SourceAdd(NamedSchema)
Adds a named schema to the list
Declaration
public bool Add(NamedSchema schema)
Parameters
Type | Name | Description |
---|---|---|
NamedSchema | schema | schema object |
Returns
Type | Description |
---|---|
System.Boolean | true if schema was added to the list, false if schema is already in the list |
Add(SchemaName, NamedSchema)
Adds a schema name to the map if it doesn't exist yet
Declaration
public bool Add(SchemaName name, NamedSchema schema)
Parameters
Type | Name | Description |
---|---|---|
SchemaName | name | schema name |
NamedSchema | schema | schema object |
Returns
Type | Description |
---|---|
System.Boolean | true if schema was added to the list, false if schema is already in the list |
Contains(SchemaName)
Checks if given name is in the map
Declaration
public bool Contains(SchemaName name)
Parameters
Type | Name | Description |
---|---|---|
SchemaName | name | schema name |
Returns
Type | Description |
---|---|
System.Boolean | true or false |
GetEnumerator()
Returns the enumerator for the map
Declaration
public IEnumerator<KeyValuePair<SchemaName, NamedSchema>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<SchemaName, NamedSchema>> |
TryGetValue(String, String, String, out NamedSchema)
Tries to get the value for the given name fields
Declaration
public bool TryGetValue(string name, string space, string encspace, out NamedSchema schema)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | name of the schema |
System.String | space | namespace of the schema |
System.String | encspace | enclosing namespace of the schema |
NamedSchema | schema | schema object found |
Returns
Type | Description |
---|---|
System.Boolean | true if name is found in the map, false otherwise |