Esempio n. 1
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <param name="other">An object to compare with this object.</param>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.
 /// </returns>
 public Boolean Equals(KeyDeclaration other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(String.Equals(Value, other.Value));
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="KeyValueDeclaration"/> class.
        /// </summary>
        public KeyValueDeclaration(KeyDeclaration key, ValueDeclaration value, TextRange textRange)
            : base(textRange)
        {
            Assume.NotNull(key, nameof(key));
            Assume.NotNull(value, nameof(value));

            this.key   = key;
            this.value = value;

            children = new Node[2];
            updateChildren(key, value);
        }
Esempio n. 3
0
 private void updateChildren(KeyDeclaration keyDeclaration, ValueDeclaration valueDeclaration)
 {
     children[0] = keyDeclaration;
     children[1] = valueDeclaration;
 }