Search Results for

    Show / Hide Table of Contents

    Interface ITypeInfo

    The ITypeInfo interface is an abstraction of a .NET Type

    Inherited Members
    IReflectionInfo.GetCustomAttributes<T>(bool)
    IReflectionInfo.IsDefined<T>(bool)
    Namespace: NUnit.Framework.Interfaces
    Assembly: nunit.framework.dll
    Syntax
    public interface ITypeInfo : IReflectionInfo

    Properties

    View Source

    Assembly

    Gets the assembly in which the type is declared

    Declaration
    Assembly Assembly { get; }
    Property Value
    Type Description
    Assembly
    View Source

    BaseType

    Gets the base type of this type as an ITypeInfo

    Declaration
    ITypeInfo? BaseType { get; }
    Property Value
    Type Description
    ITypeInfo
    View Source

    ContainsGenericParameters

    Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types.

    Declaration
    bool ContainsGenericParameters { get; }
    Property Value
    Type Description
    bool
    View Source

    FullName

    Gets the full name of the Type

    Declaration
    string FullName { get; }
    Property Value
    Type Description
    string
    View Source

    IsAbstract

    Gets a value indicating whether the type is abstract.

    Declaration
    bool IsAbstract { get; }
    Property Value
    Type Description
    bool
    View Source

    IsGenericType

    Gets a value indicating whether the Type is a generic Type

    Declaration
    bool IsGenericType { get; }
    Property Value
    Type Description
    bool
    View Source

    IsGenericTypeDefinition

    Gets a value indicating whether the Type is a generic Type definition

    Declaration
    bool IsGenericTypeDefinition { get; }
    Property Value
    Type Description
    bool
    View Source

    IsSealed

    Gets a value indicating whether the type is sealed.

    Declaration
    bool IsSealed { get; }
    Property Value
    Type Description
    bool
    View Source

    IsStaticClass

    Gets a value indicating whether this type is a static class.

    Declaration
    bool IsStaticClass { get; }
    Property Value
    Type Description
    bool
    View Source

    Name

    Gets the name of the Type

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string
    View Source

    Namespace

    Gets the namespace of the Type

    Declaration
    string? Namespace { get; }
    Property Value
    Type Description
    string
    View Source

    Type

    Gets the underlying Type on which this ITypeInfo is based

    Declaration
    Type Type { get; }
    Property Value
    Type Description
    Type

    Methods

    View Source

    Construct(object?[]?)

    Construct an object of this Type, using the specified arguments.

    Declaration
    object Construct(object?[]? args)
    Parameters
    Type Name Description
    object[] args
    Returns
    Type Description
    object
    View Source

    GetConstructor(Type[])

    Gets the public constructor taking the specified argument Types

    Declaration
    ConstructorInfo? GetConstructor(Type[] argTypes)
    Parameters
    Type Name Description
    Type[] argTypes
    Returns
    Type Description
    ConstructorInfo
    View Source

    GetDisplayName()

    Get the display name for this typeInfo.

    Declaration
    string GetDisplayName()
    Returns
    Type Description
    string
    View Source

    GetDisplayName(object?[]?)

    Get the display name for an object of this type, constructed with specific arguments

    Declaration
    string GetDisplayName(object?[]? args)
    Parameters
    Type Name Description
    object[] args
    Returns
    Type Description
    string
    View Source

    GetGenericTypeDefinition()

    Returns a Type representing a generic type definition from which this Type can be constructed.

    Declaration
    Type GetGenericTypeDefinition()
    Returns
    Type Description
    Type
    View Source

    GetMethods(BindingFlags)

    Returns an array of IMethodInfos for methods of this Type that match the specified flags.

    Declaration
    IMethodInfo[] GetMethods(BindingFlags flags)
    Parameters
    Type Name Description
    BindingFlags flags
    Returns
    Type Description
    IMethodInfo[]
    View Source

    GetMethodsWithAttribute<T>(bool)

    Returns all methods declared by this type that have the specified attribute, optionally including base classes. Methods from a base class are always returned before methods from a class that inherits from it.

    Declaration
    IMethodInfo[] GetMethodsWithAttribute<T>(bool inherit) where T : class
    Parameters
    Type Name Description
    bool inherit

    Specifies whether to search the fixture type inheritance chain.

    Returns
    Type Description
    IMethodInfo[]
    Type Parameters
    Name Description
    T
    View Source

    HasConstructor(Type[])

    Returns a value indicating whether this Type has a public constructor taking the specified argument Types.

    Declaration
    bool HasConstructor(Type[] argTypes)
    Parameters
    Type Name Description
    Type[] argTypes
    Returns
    Type Description
    bool
    View Source

    HasMethodWithAttribute(Type)

    Returns a value indicating whether this type has a method with a specified public attribute

    Declaration
    bool HasMethodWithAttribute(Type attrType)
    Parameters
    Type Name Description
    Type attrType
    Returns
    Type Description
    bool
    View Source

    IsType(Type)

    Returns true if the Type wrapped is equal to the argument

    Declaration
    bool IsType(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    bool
    View Source

    MakeGenericType(Type[])

    Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments

    Declaration
    ITypeInfo MakeGenericType(Type[] typeArgs)
    Parameters
    Type Name Description
    Type[] typeArgs
    Returns
    Type Description
    ITypeInfo
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0