Avro C#
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Avro.SchemaNames Class Reference

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. More...

Public Member Functions

 SchemaNames ()
 Constructor.
 
bool Contains (SchemaName name)
 Checks if given name is in the map.
 
bool Add (SchemaName name, NamedSchema schema)
 Adds a schema name to the map if it doesn't exist yet.
 
bool Add (NamedSchema schema)
 Adds a named schema to the list.
 
bool TryGetValue (string name, string space, string encspace, string documentation, out NamedSchema schema)
 Tries to get the value for the given name fields.
 
IEnumerator< KeyValuePair< SchemaName, NamedSchema > > GetEnumerator ()
 Returns the enumerator for the map.
 

Properties

IDictionary< SchemaName, NamedSchemaNames [get]
 Map of schema name and named schema objects.
 

Detailed Description

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.

Member Function Documentation

◆ Add() [1/2]

bool Avro.SchemaNames.Add ( NamedSchema  schema)
inline

Adds a named schema to the list.

Parameters
schemaschema object
Returns
true if schema was added to the list, false if schema is already in the list

◆ Add() [2/2]

bool Avro.SchemaNames.Add ( SchemaName  name,
NamedSchema  schema 
)
inline

Adds a schema name to the map if it doesn't exist yet.

Parameters
nameschema name
schemaschema object
Returns
true if schema was added to the list, false if schema is already in the list

◆ Contains()

bool Avro.SchemaNames.Contains ( SchemaName  name)
inline

Checks if given name is in the map.

Parameters
nameschema name
Returns
true or false

◆ GetEnumerator()

IEnumerator< KeyValuePair< SchemaName, NamedSchema > > Avro.SchemaNames.GetEnumerator ( )
inline

Returns the enumerator for the map.

Returns

◆ TryGetValue()

bool Avro.SchemaNames.TryGetValue ( string  name,
string  space,
string  encspace,
string  documentation,
out NamedSchema  schema 
)
inline

Tries to get the value for the given name fields.

Parameters
namename of the schema
spacenamespace of the schema
encspaceenclosing namespace of the schema
documentationdocumentation for the schema
schemaschema object found
Returns
true if name is found in the map, false otherwise

The documentation for this class was generated from the following file: