Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }