Beispiel #1
0
        static bool IsOverride(PropertyInfo deriv_prop, PropertyInfo base_prop)
        {
            if (!MethodGroupExpr.IsAncestralType(base_prop.DeclaringType, deriv_prop.DeclaringType))
            {
                return(false);
            }

            Type [] deriv_pd = TypeManager.GetParameterData(deriv_prop).Types;
            Type [] base_pd  = TypeManager.GetParameterData(base_prop).Types;

            if (deriv_pd.Length != base_pd.Length)
            {
                return(false);
            }

            for (int j = 0; j < deriv_pd.Length; ++j)
            {
                if (deriv_pd [j] != base_pd [j])
                {
                    return(false);
                }
                Type ct = TypeManager.TypeToCoreType(deriv_pd [j]);
                Type bt = TypeManager.TypeToCoreType(base_pd [j]);

                if (ct != bt)
                {
                    return(false);
                }
            }

            return(true);
        }