Ejemplo n.º 1
0
        /// <summary>
        /// Compares two fixed schemas
        /// </summary>
        /// <param name="obj">fixed schema to compare against this schema</param>
        /// <returns>true if two schemas are the same, false otherwise</returns>
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }

            if (obj != null && obj is FixedSchema)
            {
                FixedSchema that = obj as FixedSchema;
                return(SchemaName.Equals(that.SchemaName) && Size == that.Size && areEqual(that.Props, this.Props));
            }
            return(false);
        }
Ejemplo n.º 2
0
 protected bool InAliases(SchemaName name)
 {
     if (null != aliases)
     {
         foreach (SchemaName alias in aliases)
         {
             if (name.Equals(alias))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Checks equality of two enum schema
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj != null && obj is EnumSchema)
     {
         EnumSchema that = obj as EnumSchema;
         if (SchemaName.Equals(that.SchemaName) && Count == that.Count)
         {
             for (int i = 0; i < Count; i++)
             {
                 if (!Symbols[i].Equals(that.Symbols[i]))
                 {
                     return(false);
                 }
             }
             return(areEqual(that.Props, this.Props));
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
 protected bool InAliases(SchemaName name)
 {
     if (null != aliases)
     {
         foreach (SchemaName alias in aliases)
             if (name.Equals(alias)) return true;
     }
     return false;
 }