Пример #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            ReferencedNumber other = obj as ReferencedNumber;

            if (other == null)
            {
                return(false);
            }

            if (this.IsInt == other.IsInt)
            {
                if (this.IsInt)
                {
                    return(this.IntValue == other.IntValue);
                }
                else
                {
                    return(this.DoubleValue == other.DoubleValue);
                }
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 protected void ReplaceNameId(string name, ReferencedNumber nameId)
 {
     if (this.namesAndVarsDictionary.ContainsKey(name))
     {
         this.namesAndVarsDictionary.Remove(name);
         this.namesAndVarsDictionary.AddName(name, nameId);
     }
 }
Пример #3
0
 protected void AddName(string name, ReferencedNumber nameId)
 {
     this.namesAndVarsDictionary.AddName(name, nameId);
 }