IKVM.Reflection.Type.BindTypeParameters C# (CSharp) Method

BindTypeParameters() private method

private BindTypeParameters ( IGenericBinder binder ) : Type
binder IGenericBinder
return Type
        internal virtual Type BindTypeParameters(IGenericBinder binder)
        {
            if (IsGenericTypeDefinition)
            {
                Type[] args = GetGenericArguments();
                Type.InplaceBindTypeParameters(binder, args);
                return GenericTypeInstance.Make(this, args, null, null);
            }
            else
            {
                return this;
            }
        }

Usage Example

Ejemplo n.º 1
0
		internal static MethodSignature MakeFromBuilder(Type returnType, Type[] parameterTypes, Type[][][] modifiers, CallingConventions callingConvention, int genericParamCount)
		{
			if (genericParamCount > 0)
			{
				returnType = returnType.BindTypeParameters(Unbinder.Instance);
				parameterTypes = BindTypeParameters(Unbinder.Instance, parameterTypes);
				modifiers = BindTypeParameters(Unbinder.Instance, modifiers);
			}
			return new MethodSignature(returnType, parameterTypes, modifiers, callingConvention, genericParamCount);
		}