[ 
https://issues.apache.org/jira/browse/AVRO-3453?focusedWorklogId=753830&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753830
 ]

ASF GitHub Bot logged work on AVRO-3453:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Apr/22 03:59
            Start Date: 07/Apr/22 03:59
    Worklog Time Spent: 10m 
      Work Description: KyleSchoonover commented on PR #1605:
URL: https://github.com/apache/avro/pull/1605#issuecomment-1091054008

   ```
   // 
------------------------------------------------------------------------------
   // <auto-generated>
   //    Generated by avrogen, version 1.12.0-SNAPSHOT
   //    Changes to this file may cause incorrect behavior and will be lost if 
code
   //    is regenerated
   // </auto-generated>
   // 
------------------------------------------------------------------------------
   namespace AvroSample
   {
        using System;
        using System.Collections.Generic;
        using System.Text;
        using global::Avro;
        using global::Avro.Specific;
        
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("avrogen", 
"1.12.0-SNAPSHOT")]
        public partial class User : global::Avro.Specific.ISpecificRecord
        {
                public static global::Avro.Schema _SCHEMA = 
global::Avro.Schema.Parse("{\"type\":\"record\",\"name\":\"User\",\"namespace\":\"AvroSample\",\"fields\":[{\"name\":\"name\","
 +
                                
"\"type\":\"string\"},{\"name\":\"favorite_number\",\"type\":[\"int\",\"null\"]},{\"name\":\"favor"
 +
                                
"ite_color\",\"type\":[\"string\",\"null\"]}]}");
                private string _name;
                private System.Nullable<System.Int32> _favorite_number;
                private string _favorite_color;
                public virtual global::Avro.Schema Schema
                {
                        get
                        {
                                return User._SCHEMA;
                        }
                }
                public string name
                {
                        get
                        {
                                return this._name;
                        }
                        set
                        {
                                this._name = value;
                        }
                }
                public System.Nullable<System.Int32> favorite_number
                {
                        get
                        {
                                return this._favorite_number;
                        }
                        set
                        {
                                this._favorite_number = value;
                        }
                }
                public string favorite_color
                {
                        get
                        {
                                return this._favorite_color;
                        }
                        set
                        {
                                this._favorite_color = value;
                        }
                }
                public virtual object Get(int fieldPos)
                {
                        switch (fieldPos)
                        {
                        case 0: return this.name;
                        case 1: return this.favorite_number;
                        case 2: return this.favorite_color;
                        default: throw new 
global::Avro.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.favorite_number = 
(System.Nullable<System.Int32>)fieldValue; break;
                        case 2: this.favorite_color = 
(System.String)fieldValue; break;
                        default: throw new 
global::Avro.AvroRuntimeException("Bad index " + fieldPos + " in Put()");
                        };
                }
        }
   }
   
   ```




Issue Time Tracking
-------------------

    Worklog Id:     (was: 753830)
    Time Spent: 6h 50m  (was: 6h 40m)

> C# Avrogen Add Generated Code Attribute
> ---------------------------------------
>
>                 Key: AVRO-3453
>                 URL: https://issues.apache.org/jira/browse/AVRO-3453
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.11.1
>            Reporter: Kyle Schoonover
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> Development environments that use Code Analysis or something similar attempt 
> to exclude auto generated code.  By adding this attribute to generated 
> classes, code analysis will skip over evaluating the code.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to