Class NamedSchema
Base class for all named schemas: fixed, enum, record
Inherited Members
Namespace: Avro
Assembly: Avro.dll
Syntax
public abstract class NamedSchema : Schema
Constructors
| Improve this Doc View SourceNamedSchema(Schema.Type, SchemaName, IList<SchemaName>, PropertyMap, SchemaNames)
Constructor for named schema class
Declaration
protected NamedSchema(Schema.Type type, SchemaName name, IList<SchemaName> aliases, PropertyMap props, SchemaNames names)
Parameters
Type | Name | Description |
---|---|---|
Schema.Type | type | schema type |
SchemaName | name | name |
System.Collections.Generic.IList<SchemaName> | aliases | |
PropertyMap | props | |
SchemaNames | names | list of named schemas already read |
Properties
| Improve this Doc View SourceFullname
Namespace.Name of the schema
Declaration
public string Fullname { get; }
Property Value
Type | Description |
---|---|
System.String |
Name
Name of the schema
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
| Improve this Doc View SourceNamespace
Namespace of the schema
Declaration
public string Namespace { get; }
Property Value
Type | Description |
---|---|
System.String |
SchemaName
Name of the schema, contains name, namespace and enclosing namespace
Declaration
public SchemaName SchemaName { get; }
Property Value
Type | Description |
---|---|
SchemaName |
Methods
| Improve this Doc View SourceGetAliases(JToken, String, String)
Parses the 'aliases' property from the given JSON token
Declaration
protected static IList<SchemaName> GetAliases(JToken jtok, string space, string encspace)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Linq.JToken | jtok | JSON object to read |
System.String | space | namespace of the name this alias is for |
System.String | encspace | enclosing namespace of the name this alias is for |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<SchemaName> | List of SchemaName that represents the list of alias. If no 'aliases' specified, then it returns null. |
GetName(JToken, String)
Parses the name and namespace from the given JSON schema object then creates SchemaName object including the given enclosing namespace
Declaration
protected static SchemaName GetName(JToken jtok, string encspace)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Linq.JToken | jtok | JSON object to read |
System.String | encspace | enclosing namespace |
Returns
Type | Description |
---|---|
SchemaName | new SchemaName object |
InAliases(SchemaName)
Declaration
protected bool InAliases(SchemaName name)
Parameters
Type | Name | Description |
---|---|---|
SchemaName | name |
Returns
Type | Description |
---|---|
System.Boolean |
WriteJson(JsonTextWriter, SchemaNames, String)
Writes named schema in JSON format
Declaration
protected override void WriteJson(JsonTextWriter writer, SchemaNames names, string encspace)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonTextWriter | writer | JSON writer |
SchemaNames | names | list of named schemas already written |
System.String | encspace | enclosing namespace of the named schema |
Overrides
| Improve this Doc View SourceWriteJsonFields(JsonTextWriter, SchemaNames, String)
Writes named schema in JSON format
Declaration
protected override void WriteJsonFields(JsonTextWriter writer, SchemaNames names, string encspace)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonTextWriter | writer | JSON writer |
SchemaNames | names | list of named schemas already written |
System.String | encspace | enclosing namespace of the named schema |