AreOfSameGenerity() public static method

public static AreOfSameGenerity ( IMethod lhs, IMethod rhs ) : bool
lhs IMethod
rhs IMethod
return bool
コード例 #1
0
 public static CallableSignature GetOverriddenSignature(IMethod baseMethod, IMethod impl)
 {
     if (baseMethod.GenericInfo != null && GenericsServices.AreOfSameGenerity(baseMethod, impl))
     {
         return(baseMethod.GenericInfo.ConstructMethod(impl.GenericInfo.GenericParameters).CallableType.GetSignature());
     }
     return(baseMethod.CallableType.GetSignature());
 }
コード例 #2
0
        public static bool CheckOverrideSignature(IMethod impl, IMethod baseMethod)
        {
            if (!GenericsServices.AreOfSameGenerity(impl, baseMethod))
            {
                return(false);
            }

            CallableSignature baseSignature = GetOverriddenSignature(baseMethod, impl);

            return(CheckOverrideSignature(impl.GetParameters(), baseSignature.Parameters));
        }