Avro C#

Public Member Functions | Properties | List of all members
Avro.Specific.ObjectCreator Class Reference

Resolves and creates types associated with a schema and/or name. You should generally use the shared Instance to take advantage caching. More...

## Public Member Functions
| ObjectCreator ()
| Initializes a new instance of the ObjectCreator class. More...
Type | GetType (Schema schema)
| Gets the type for the specified schema More...
Type | GetType (string name, Schema.Type schemaType)
| Gets the type of the specified type name More...
object | New (string name, Schema.Type schemaType)
| Creates new instance of the given type More...

## Properties
static ObjectCreator | Instance = new ObjectCreator()`[get]`
| Shareable instance of the ObjectCreator. More...

## Detailed Description

Resolves and creates types associated with a schema and/or name. You should generally use the shared Instance to take advantage caching.

## Constructor & Destructor Documentation

## ◆ ObjectCreator()

Avro.Specific.ObjectCreator.ObjectCreator | ( |  | ) |
| inline

Initializes a new instance of the ObjectCreator class.

## Member Function Documentation

## ◆ GetType() [1/2]

Type Avro.Specific.ObjectCreator.GetType | ( | Schema | schema | ) |
| inline

Gets the type for the specified schema

Parameters

  schema |

Returns

Exceptions

  AvroException | No type found matching the given name.

## ◆ GetType() [2/2]

Type Avro.Specific.ObjectCreator.GetType | ( | string | name,
|  | Schema.Type | schemaType
| ) |  |
| inline

Gets the type of the specified type name

Parameters

  name | name of the object to get type of
  schemaType | schema type for the object

Returns
  Type

Exceptions

  AvroException | No type found matching the given name.

## ◆ New()

object Avro.Specific.ObjectCreator.New | ( | string | name,
|  | Schema.Type | schemaType
| ) |  |
| inline

Creates new instance of the given type

Parameters

  name | fully qualified name of the type
  schemaType | type of schema

Returns
  new object of the given type

Exceptions

  AvroException | No type found matching the given name.

## Property Documentation

## ◆ Instance

ObjectCreator Avro.Specific.ObjectCreator.Instance = new ObjectCreator()
| static get

Shareable instance of the ObjectCreator.

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

- src/apache/main/Specific/ObjectCreator.cs