Exemplo n.º 1
0
 /// <summary>
 /// Constructor for named schema class
 /// </summary>
 /// <param name="type">schema type</param>
 /// <param name="name">name</param>
 /// <param name="names">list of named schemas already read</param>
 protected NamedSchema(Type type, SchemaName name, IList <SchemaName> aliases, PropertyMap props, SchemaNames names)
     : base(type, props)
 {
     this.SchemaName = name;
     this.aliases    = aliases;
     if (null != name.Name)  // Added this check for anonymous records inside Message
     {
         if (!names.Add(name, this))
         {
             throw new AvroException("Duplicate schema name " + name.Fullname);
         }
     }
 }