// override object.Equals
        public override bool Equals(object obj)
        {
            //
            // See the full list of guidelines at
            //   http://go.microsoft.com/fwlink/?LinkID=85237
            // and also the guidance for operator== at
            //   http://go.microsoft.com/fwlink/?LinkId=85238
            //

            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            DefaultRuleConfigurationParameter theObj = (DefaultRuleConfigurationParameter)obj;

            if (ParameterType.Equals(theObj.ParameterType) == false)
            {
                return(false);
            }
            if (Name.Equals(theObj.Name) == false)
            {
                return(false);
            }
            if (Value.Equals(theObj.Value) == false)
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
 public bool Equals(CommandParameterInfo other)
 {
     if (Object.ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Name.Equals(other.Name) && ParameterType.Equals(other.ParameterType));
 }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is CommandParameterInfo))
            {
                return(false);
            }
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }
            var other = (CommandParameterInfo)obj;

            return(Name.Equals(other.Name) && ParameterType.Equals(other.ParameterType));
        }
Ejemplo n.º 4
0
 public void CheckSemantics(ParsingContext context)
 {
     if (InnerExpression is IExpectedTypeExpression)
     {
         (InnerExpression as IExpectedTypeExpression).ExpectedType = context.GetResolvedType(ParameterType);
     }
     InnerExpression.CheckSemantics(context);
     if (InnerExpression.ExpressionType != typeof(double) && ExpressionHelper.IsNumeric(InnerExpression.ExpressionType))
     {
         InnerExpression = new ConvertToDoubleExpression(InnerExpression);
     }
     if (InnerExpression.ExpressionType.IsEnum && ParameterType.Equals(typeof(string)))
     {
         InnerExpression = new ConvertToStringExpression(InnerExpression);
     }
 }