Пример #1
0
 public bool Equals(ExpressionAdderModel <TFrom> eq)
 {
     return(object.ReferenceEquals((object)this, (object)eq) ||
            Enumerable.Count <ParameterExpression>((IEnumerable <ParameterExpression>) this.Expression.Parameters) ==
            Enumerable.Count <ParameterExpression>((IEnumerable <ParameterExpression>)eq.Expression.Parameters) &&
            this.Expression.Name == eq.Expression.Name &&
            (this.Expression.ReturnType.FullName == eq.Expression.ReturnType.FullName &&
             this.Expression.Body.NodeType == eq.Expression.Body.NodeType) &&
            this.Expression.Body.Type.FullName == eq.Expression.Body.Type.FullName &&
            this.CurrentTypeOfExpression == eq.CurrentTypeOfExpression);
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            ExpressionAdderModel <TFrom> eq = obj as ExpressionAdderModel <TFrom>;

            if (eq == null)
            {
                return(false);
            }
            else
            {
                return(this.Equals(eq));
            }
        }