Show / Hide Table of Contents

Class PrimitiveSchema

Class for schemas of primitive types

Inheritance
System.Object
Schema
UnnamedSchema
PrimitiveSchema
Inherited Members
UnnamedSchema.Name
Schema.Tag
Schema.Parse(String)
Schema.ToString()
Schema.GetTypeString(Schema.Type)
Schema.WriteJsonFields(JsonTextWriter, SchemaNames, String)
Schema.GetProperty(String)
Schema.areEqual(Object, Object)
Schema.getHashCode(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Avro
Assembly: Avro.dll
Syntax
public sealed class PrimitiveSchema : UnnamedSchema

Methods

| Improve this Doc View Source

CanRead(Schema)

Checks if this schema can read data written by the given schema. Used for decoding data.

Declaration
public override bool CanRead(Schema writerSchema)
Parameters
Type Name Description
Schema writerSchema

writer schema

Returns
Type Description
System.Boolean

true if this and writer schema are compatible based on the AVRO specification, false otherwise

Overrides
Schema.CanRead(Schema)
| Improve this Doc View Source

Equals(Object)

Function to compare equality of two primitive schemas

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

other primitive schema

Returns
Type Description
System.Boolean

true two schemas are equal, false otherwise

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

GetHashCode()

Hashcode function

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
Schema.GetHashCode()
| Improve this Doc View Source

NewInstance(String, PropertyMap)

Static function to return new instance of primitive schema

Declaration
public static PrimitiveSchema NewInstance(string type, PropertyMap props = null)
Parameters
Type Name Description
System.String type

primitive type

PropertyMap props
Returns
Type Description
PrimitiveSchema
| Improve this Doc View Source

WriteJson(JsonTextWriter, SchemaNames, String)

Writes primitive schema in JSON format

Declaration
protected override void WriteJson(JsonTextWriter w, SchemaNames names, string encspace)
Parameters
Type Name Description
Newtonsoft.Json.JsonTextWriter w
SchemaNames names
System.String encspace
Overrides
Schema.WriteJson(JsonTextWriter, SchemaNames, String)
  • Improve this Doc
  • View Source
Back to top Copyright © 2012 The Apache Software Foundation.