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
AvroExceptionNo 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
namename of the object to get type of
schemaTypeschema type for the object
Returns
Type
Exceptions
AvroExceptionNo 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
namefully qualified name of the type
schemaTypetype of schema
Returns
new object of the given type
Exceptions
AvroExceptionNo type found matching the given name.

Property Documentation

◆ Instance

ObjectCreator Avro.Specific.ObjectCreator.Instance = new ObjectCreator()
staticget

Shareable instance of the ObjectCreator.


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