Ejemplo n.º 1
0
        public bool IsGenericExistsMethod(Method method)
        {
            if (method == null) return false;

            if (method.Template != null)
            {
                method = method.Template;
            }

            if (method == ExistsGenericTemplate) return true;

            // by name matching
            if (method.TemplateParameters == null || method.TemplateParameters.Count != 1) return false;

            return method.MatchesContractByName(ExistsName);
        }
Ejemplo n.º 2
0
        public bool IsValueAtReturnMethod(Method method)
        {
            if (method == null) return false;

            if (method.Template != null)
            {
                method = method.Template;
            }

            if (method == ParameterTemplate) return true;

            // by name matching
            return method.MatchesContractByName(ValueAtReturnName);
        }
Ejemplo n.º 3
0
        public bool IsExistsMethod(Method method)
        {
            if (method == null) return false;

            if (method.Template != null)
            {
                method = method.Template;
            }

            if (method == ExistsTemplate) return true;

            // by name matching
            if (method.TemplateParameters != null && method.TemplateParameters.Count > 0) return false;

            return method.MatchesContractByName(ExistsName);
        }
Ejemplo n.º 4
0
        public bool IsOldMethod(Method method)
        {
            if (method == null) return false;

            if (method.Template != null)
            {
                method = method.Template;
            }

            if (method == OldTemplate) return true;

            // by name matching
            return method.MatchesContractByName(OldName);
        }