<PackageReference Include="Namotion.Reflection" Version="3.2.0" />

CachedType

A cached type object without context.
public CachedType ElementType { get; }

Gets the type's element type (i.e. array type).

public CachedType[] GenericArguments { get; }

Gets the type's generic arguments (Nullable{T} is unwrapped).

public bool IsNullableType { get; }

Gets a value indicating whether this type is wrapped with Nullable{T}.

public string Name { get; }

Gets the type name.

Gets the type's original generic arguments (Nullable{T} is not unwrapped).

public Type OriginalType { get; }

Gets the original type (i.e. without unwrapping Nullable{T}).

public Type Type { get; }

Gets the actual unwrapped type (e.g. gets T of a Nullable{T} type).

public TypeInfo TypeInfo { get; }

Gest the original's type info.

public static void ClearCache()

Clears the cache.

public static Type op_Implicit(CachedType type)

Unwraps the OriginalType as Type from the context type.

protected virtual CachedType GetCachedType(Type type, ref int nullableFlagsIndex)

Gets the cached type for the given type and nullable flags index.

public virtual object[] GetCustomAttributes(bool inherit)

public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)

protected void Initialize(ref int nullableFlagsIndex)

Updates the original generic arguments.

public virtual bool IsDefined(Type attributeType, bool inherit)

Updates the original generic arguments.