예제 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (!(obj is RecordData))
            {
                return(false);
            }

            RecordData otherRecord = (RecordData)obj;

            if (this.Count != otherRecord.Count)
            {
                return(false);
            }

            foreach (string key in this.Keys)
            {
                object testValue;
                if (!otherRecord.TryGetValue(key, out testValue) || !Equals(testValue, this[key]))
                {
                    if (testValue.GetType() == typeof(string[]) && this[key].GetType() == typeof(string[]))
                    {
                        bool result = ArraysEqual(testValue as string[], this[key] as string[]);
                        return(result);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
예제 #2
0
 public Record(IEnumerable <FieldMetadata> structure, RecordData data)
 {
     Structure = new List <FieldMetadata>(structure);
     Data      = new RecordData(data);
 }
예제 #3
0
 public RecordData(RecordData dictionary) : base(dictionary)
 {
 }
예제 #4
0
 public Record()
 {
     Structure = new List <FieldMetadata>();
     Data      = new RecordData();
 }