MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeGeneric­ExtensionsWith­Type­Arguments
Open sandboxFocus

GenericExtensions.WithTypeArguments Method

WithTypeArguments(INamedType, IType[])

Constructs a generic instance of an INamedType, with type arguments given as IType.

Declaration
public static INamedType WithTypeArguments(this INamedType type, params IType[] typeArguments)
Parameters
Type Name Description
INamedType type
IType[] typeArguments
Returns
Type Description
INamedType

WithTypeArguments(INamedType, Type[])

Constructs a generic instance of an INamedType, with type arguments given a reflection Type.

Declaration
public static INamedType WithTypeArguments(this INamedType type, params Type[] typeArguments)
Parameters
Type Name Description
INamedType type
Type[] typeArguments
Returns
Type Description
INamedType

WithTypeArguments(INamedType, IReadOnlyList<Type>)

Declaration
public static INamedType WithTypeArguments(this INamedType type, IReadOnlyList<Type> typeArguments)
Parameters
Type Name Description
INamedType type
IReadOnlyList<Type> typeArguments
Returns
Type Description
INamedType

WithTypeArguments(IMethod, Type[])

Constructs a generic instance of an IMethod, with type arguments given as reflection Type.

Declaration
public static IMethod WithTypeArguments(this IMethod type, params Type[] typeArguments)
Parameters
Type Name Description
IMethod type
Type[] typeArguments
Returns
Type Description
IMethod

WithTypeArguments(IMethod, IType[])

Constructs a generic instance of an IMethod, with type arguments given as IType.

Declaration
public static IMethod WithTypeArguments(this IMethod method, params IType[] typeArguments)
Parameters
Type Name Description
IMethod method
IType[] typeArguments
Returns
Type Description
IMethod

WithTypeArguments(IMethod, IReadOnlyList<Type>)

Declaration
public static IMethod WithTypeArguments(this IMethod method, IReadOnlyList<Type> typeArguments)
Parameters
Type Name Description
IMethod method
IReadOnlyList<Type> typeArguments
Returns
Type Description
IMethod

WithTypeArguments(IMethod, IReadOnlyList<IType>)

Declaration
public static IMethod WithTypeArguments(this IMethod method, IReadOnlyList<IType> typeArguments)
Parameters
Type Name Description
IMethod method
IReadOnlyList<IType> typeArguments
Returns
Type Description
IMethod

WithTypeArguments(IMethod, IReadOnlyList<Type>, IReadOnlyList<Type>)

Declaration
public static IMethod WithTypeArguments(this IMethod method, IReadOnlyList<Type> typeTypeArguments, IReadOnlyList<Type> methodTypeArguments)
Parameters
Type Name Description
IMethod method
IReadOnlyList<Type> typeTypeArguments
IReadOnlyList<Type> methodTypeArguments
Returns
Type Description
IMethod

WithTypeArguments(IMethod, Type[], Type[])

Declaration
public static IMethod WithTypeArguments(this IMethod method, Type[] typeTypeArguments, Type[] methodTypeArguments)
Parameters
Type Name Description
IMethod method
Type[] typeTypeArguments
Type[] methodTypeArguments
Returns
Type Description
IMethod