Пример #1
0
			private OpenTagStack(OpenTagStack prev, string name, int indentationLevel)
			{
				this.prev = prev;
				this.Name = name;
				this.IndentationLevel = indentationLevel;
				unchecked {
					this.hashCode = prev.hashCode * 27 + (name.GetHashCode() ^ indentationLevel);
				}
			}
Пример #2
0
 private OpenTagStack(OpenTagStack prev, string name, int indentationLevel)
 {
     this.prev             = prev;
     this.Name             = name;
     this.IndentationLevel = indentationLevel;
     unchecked {
         this.hashCode = prev.hashCode * 27 + (name.GetHashCode() ^ indentationLevel);
     }
 }
Пример #3
0
            public override bool Equals(object obj)
            {
                OpenTagStack o = obj as OpenTagStack;

                if (o != null && hashCode == o.hashCode && IndentationLevel == o.IndentationLevel && Name == o.Name)
                {
                    if (prev == o.prev)
                    {
                        return(true);
                    }
                    if (prev == null || o.prev == null)
                    {
                        return(false);
                    }
                    return(prev.Equals(o.prev));
                }
                return(false);
            }
Пример #4
0
 public void Add(OpenTagStack openTags, ImmutableStack <InternalObject> document, uint cost)
 {
     Add(new Configuration(openTags, document, cost));
 }
Пример #5
0
 public Configuration(OpenTagStack openTags, ImmutableStack <InternalObject> document, uint cost)
 {
     this.OpenTags = openTags;
     this.Document = document;
     this.Cost     = cost;
 }
Пример #6
0
			public void Add(OpenTagStack openTags, ImmutableStack<InternalObject> document, uint cost)
			{
				Add(new Configuration(openTags, document, cost));
			}
Пример #7
0
			public Configuration(OpenTagStack openTags, ImmutableStack<InternalObject> document, uint cost)
			{
				this.OpenTags = openTags;
				this.Document = document;
				this.Cost = cost;
			}