Example #1
0
        public static bool IsSignatureEqual(ProcState a, ProcState b, DbDriver dbDriver)
        {
            if (object.ReferenceEquals(a, b))
            {
                return(true);
            }
            if (a == null || b == null)
            {
                return(false);
            }

            var aFunc = a as FunctionState;
            var bFunc = b as FunctionState;

            if (aFunc != null && bFunc != null)
            {
                // If they're both functions, the return types need to match.
                if (!dbDriver.StringEquals(aFunc.ReturnType, bFunc.ReturnType))
                {
                    return(false);
                }
            }
            else if (aFunc != null || bFunc != null)
            {
                // If one of them is a function but NOT both, they aren't equal.
                return(false);
            }

            return(Enumerable.SequenceEqual(a.Parameters, b.Parameters, ProcParam.GetComparer(dbDriver)));
        }
Example #2
0
 public bool Equals(FieldPair a, FieldPair b)
 {
     return(dbDriver.StringEquals(a.FromFieldName, b.FromFieldName) &&
            dbDriver.StringEquals(a.ToFieldName, b.ToFieldName));
 }
Example #3
0
 protected bool StringEquals(string a, string b)
 {
     return(DbDriver.StringEquals(a, b));
 }
Example #4
0
 public bool Equals(ProcParam a, ProcParam b)
 {
     return(dbDriver.StringEquals(a.Name, b.Name) &&
            dbDriver.StringEquals(a.DataType, b.DataType));
 }