| // ------------------------------------------------------------------------------ |
| // <auto-generated> |
| // Generated by avrogen.vshost.exe, version 0.9.0.0 |
| // Changes to this file may cause incorrect behavior and will be lost if code |
| // is regenerated |
| // </auto-generated> |
| // ------------------------------------------------------------------------------ |
| namespace org.apache.avro.test |
| { |
| using System; |
| using System.Collections.Generic; |
| using System.Text; |
| using Avro; |
| using Avro.Specific; |
| |
| public partial class TestRecord : ISpecificRecord |
| { |
| private static Schema _SCHEMA = Avro.Schema.Parse(@"{""type"":""record"",""name"":""TestRecord"",""namespace"":""org.apache.avro.test"",""fields"":[{""name"":""name"",""type"":""string"",""javaAnnotation"":""org.apache.avro.TestAnnotation""},{""name"":""kind"",""type"":{""type"":""enum"",""name"":""Kind"",""namespace"":""org.apache.avro.test"",""symbols"":[""FOO"",""BAR"",""BAZ""],""javaAnnotation"":""org.apache.avro.TestAnnotation""}},{""name"":""hash"",""type"":{""type"":""fixed"",""name"":""MD5"",""namespace"":""org.apache.avro.test"",""size"":16,""javaAnnotation"":""org.apache.avro.TestAnnotation""}}],""javaAnnotation"":""org.apache.avro.TestAnnotation""}"); |
| private string _name; |
| private org.apache.avro.test.Kind _kind; |
| private org.apache.avro.test.MD5 _hash; |
| public virtual Schema Schema |
| { |
| get |
| { |
| return TestRecord._SCHEMA; |
| } |
| } |
| public string name |
| { |
| get |
| { |
| return this._name; |
| } |
| set |
| { |
| this._name = value; |
| } |
| } |
| public org.apache.avro.test.Kind kind |
| { |
| get |
| { |
| return this._kind; |
| } |
| set |
| { |
| this._kind = value; |
| } |
| } |
| public org.apache.avro.test.MD5 hash |
| { |
| get |
| { |
| return this._hash; |
| } |
| set |
| { |
| this._hash = value; |
| } |
| } |
| public virtual object Get(int fieldPos) |
| { |
| switch (fieldPos) |
| { |
| case 0: return this.name; |
| case 1: return this.kind; |
| case 2: return this.hash; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Get()"); |
| }; |
| } |
| public virtual void Put(int fieldPos, object fieldValue) |
| { |
| switch (fieldPos) |
| { |
| case 0: this.name = (System.String)fieldValue; break; |
| case 1: this.kind = (org.apache.avro.test.Kind)fieldValue; break; |
| case 2: this.hash = (org.apache.avro.test.MD5)fieldValue; break; |
| default: throw new AvroRuntimeException("Bad index " + fieldPos + " in Put()"); |
| }; |
| } |
| } |
| } |