Show / Hide Table of Contents

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
System.Object
SchemaNames
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Avro
Assembly: Avro.dll
Syntax
public class SchemaNames

Constructors

| Improve this Doc View Source

SchemaNames()

Constructor

Declaration
public SchemaNames()

Properties

| Improve this Doc View Source

Names

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 Source

Add(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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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>>
| Improve this Doc View Source

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

  • Improve this Doc
  • View Source
Back to top Copyright © 2012 The Apache Software Foundation.