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 System.Type.

Declaration
public static INamedType WithTypeArguments(this INamedType type, params Type[] typeArguments)
Parameters
Type Name Description
INamedType type
System.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
System.Collections.Generic.IReadOnlyList<System.Type> typeArguments
Returns
Type Description
INamedType

WithTypeArguments(IMethod, Type[])

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

Declaration
public static IMethod WithTypeArguments(this IMethod type, params Type[] typeArguments)
Parameters
Type Name Description
IMethod type
System.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
System.Collections.Generic.IReadOnlyList<System.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
System.Collections.Generic.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
System.Collections.Generic.IReadOnlyList<System.Type> typeTypeArguments
System.Collections.Generic.IReadOnlyList<System.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
System.Type[] typeTypeArguments
System.Type[] methodTypeArguments
Returns
Type Description
IMethod