Class UnknownType
- Namespace
- ICSharpCode.Decompiler.TypeSystem.Implementation
- Assembly
- ICSharpCode.Decompiler.dll
An unknown type where (part) of the name is known.
public class UnknownType : AbstractType, ITypeDefinitionOrUnknown, IType, INamedElement, IEquatable<IType>, ITypeReference
- Inheritance
-
UnknownType
- Implements
- Inherited Members
- Extension Methods
Constructors
UnknownType(FullTypeName, bool?)
Creates a new unknown type.
public UnknownType(FullTypeName fullTypeName, bool? isReferenceType = null)
Parameters
fullTypeName
FullTypeNameFull name of the unknown type.
isReferenceType
bool?
UnknownType(string, string, int, bool?)
Creates a new unknown type.
public UnknownType(string namespaceName, string name, int typeParameterCount = 0, bool? isReferenceType = null)
Parameters
namespaceName
stringNamespace name, if known. Can be null if unknown.
name
stringName of the type, must not be null.
typeParameterCount
intType parameter count, zero if unknown.
isReferenceType
bool?
Properties
FullTypeName
Gets the full name of this type.
public FullTypeName FullTypeName { get; }
Property Value
IsReferenceType
public override bool? IsReferenceType { get; }
Property Value
- bool?
Kind
Gets the type kind.
public override TypeKind Kind { get; }
Property Value
Name
public override string Name { get; }
Property Value
Namespace
Gets the full name of the namespace containing this entity.
public override string Namespace { get; }
Property Value
ReflectionName
public override string ReflectionName { get; }
Property Value
TypeArguments
Gets the type arguments passed to this type.
If this type is a generic type definition that is not parameterized, this property returns the type parameters,
as if the type was parameterized with its own type arguments (class C<T> { C<T> field; }
).
public override IReadOnlyList<IType> TypeArguments { get; }
Property Value
TypeParameterCount
Gets the number of type parameters.
public override int TypeParameterCount { get; }
Property Value
TypeParameters
Gets the type parameters. Returns an empty list if this type is not generic.
public override IReadOnlyList<ITypeParameter> TypeParameters { get; }
Property Value
Methods
ChangeNullability(Nullability)
Creates a new type that is a copy of this type, with the changed nullability annotation.
public override IType ChangeNullability(Nullability nullability)
Parameters
nullability
Nullability
Returns
Equals(IType)
public override bool Equals(IType other)
Parameters
other
IType
Returns
GetDefinitionOrUnknown()
Gets the underlying type definition or UnkownType, if unknown. Can return null for types which do not have a type definition (for example arrays, pointers, type parameters).
public override ITypeDefinitionOrUnknown GetDefinitionOrUnknown()
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()