public BoundMethod BuildMethod(InfrastructureRuntimicModelMask_I model, BoundTypeDefinition_I input, MethodInfo method)
        {
            BoundMethod boundMethod;

            if (method.GetGenericArguments().Length > 0)
            {
                boundMethod = new BoundGenericInstanceMethod
                {
                    DeclaringType    = input,
                    MethodAttributes = method.Attributes,
                    Name             = method.Name,
                    UnderlyingMethod = method
                };
            }
            else
            {
                boundMethod = new BoundNonGenericInstanceMethod
                {
                    DeclaringType    = input,
                    MethodAttributes = method.Attributes,
                    Name             = method.Name,
                    UnderlyingMethod = method
                };
            }

            return(boundMethod);
        }
Beispiel #2
0
        public BoundMethod BuildMethod(RuntimicSystemModel model, BoundTypeDefinition_I input, MethodInfo method, MethodReference methodReference)
        {
            BoundMethod boundMethod;

            if (method.GetGenericArguments().Length > 0)
            {
                boundMethod = new BoundGenericInstanceMethod
                {
                    DeclaringType    = input,
                    MethodAttributes = method.Attributes,
                    Name             = method.Name,
                    UnderlyingMethod = method,
                    MethodReference  = methodReference,
                };
            }
            else
            {
                boundMethod = new BoundNonGenericInstanceMethod
                {
                    DeclaringType    = input,
                    MethodAttributes = method.Attributes,
                    Name             = method.Name,
                    UnderlyingMethod = method,
                    MethodReference  = methodReference,
                };
            }

            return(boundMethod);
        }