public static Collection <ParameterDefinition> ResolveGenericTypes(Collection <ParameterDefinition> list, Collection <GenericParameter> gen_params, Collection <TypeReference> gen_args)
        {
            Collection <ParameterDefinition> result;
            bool any_resolved = false;

            result = new Collection <ParameterDefinition> ();
            for (int i = 0; i < list.Count; i++)
            {
                ParameterDefinition p        = list [i];
                TypeReference       resolved = MemberReference.ResolveType(p.ParameterType, gen_params, gen_args);
                if (resolved != p.ParameterType)
                {
                    result.Add(new ParameterDefinition(p.Name, p.Attributes, resolved));
                    any_resolved = true;
                }
                else
                {
                    result.Add(p);
                }
            }

            if (!any_resolved)
            {
                return(list);
            }

            return(result);
        }
        internal MethodReturnType ResolveGenericTypes(Collection <GenericParameter> parameters, Collection <TypeReference> arguments)
        {
            TypeReference    resolved = MemberReference.ResolveType(return_type, parameters, arguments);
            MethodReturnType result;

            if (resolved == return_type)
            {
                return(this);
            }

            result            = new MethodReturnType(method);
            result.ReturnType = resolved;
            if (parameter != null)
            {
                result.MetadataToken = MetadataToken;
                result.MarshalInfo   = MarshalInfo;
                result.Constant      = Constant;
                //TODO: result.m_param.CustomAttributes = CustomAttributes;
            }
            return(result);
        }