Class AbstractTypeParameter
- Namespace
- ICSharpCode.Decompiler.TypeSystem.Implementation
- Assembly
- ICSharpCode.Decompiler.dll
public abstract class AbstractTypeParameter : ITypeParameter, IType, INamedElement, IEquatable<IType>, ISymbol, ICompilationProvider
- Inheritance
-
AbstractTypeParameter
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
AbstractTypeParameter(ICompilation, SymbolKind, int, string, VarianceModifier)
protected AbstractTypeParameter(ICompilation compilation, SymbolKind ownerType, int index, string name, VarianceModifier variance)
Parameters
compilation
ICompilationownerType
SymbolKindindex
intname
stringvariance
VarianceModifier
AbstractTypeParameter(IEntity, int, string, VarianceModifier)
protected AbstractTypeParameter(IEntity owner, int index, string name, VarianceModifier variance)
Parameters
owner
IEntityindex
intname
stringvariance
VarianceModifier
Properties
Compilation
Gets the parent compilation. This property never returns null.
public ICompilation Compilation { get; }
Property Value
DirectBaseTypes
public IEnumerable<IType> DirectBaseTypes { get; }
Property Value
EffectiveBaseClass
Gets the effective base class of this type parameter.
public IType EffectiveBaseClass { get; }
Property Value
EffectiveInterfaceSet
Gets the effective interface set of this type parameter.
public IReadOnlyCollection<IType> EffectiveInterfaceSet { get; }
Property Value
HasDefaultConstructorConstraint
Gets if the type parameter has the 'new()' constraint.
public abstract bool HasDefaultConstructorConstraint { get; }
Property Value
HasReferenceTypeConstraint
Gets if the type parameter has the 'class' constraint.
public abstract bool HasReferenceTypeConstraint { get; }
Property Value
HasUnmanagedConstraint
Gets if the type parameter has the 'unmanaged' constraint.
public abstract bool HasUnmanagedConstraint { get; }
Property Value
HasValueTypeConstraint
Gets if the type parameter has the 'struct' or 'unmanaged' constraint.
public abstract bool HasValueTypeConstraint { get; }
Property Value
Index
Gets the index of the type parameter in the type parameter list of the owning method/class.
public int Index { get; }
Property Value
IsReferenceType
public bool? IsReferenceType { get; }
Property Value
- bool?
Kind
Gets the type kind.
public TypeKind Kind { get; }
Property Value
Name
Gets the name of the type parameter.
public string Name { get; }
Property Value
NullabilityConstraint
Nullability of the reference type constraint. (e.g. "where T : class?").
Note that the nullability of a use of the type parameter may differ from this. E.g. "T? GetNull<T>() where T : class => null;"
public abstract Nullability NullabilityConstraint { get; }
Property Value
Owner
public IEntity Owner { get; }
Property Value
OwnerType
public SymbolKind OwnerType { get; }
Property Value
ReflectionName
public string ReflectionName { get; }
Property Value
TypeConstraints
public abstract IReadOnlyList<TypeConstraint> TypeConstraints { get; }
Property Value
Variance
Gets the variance of this type parameter.
public VarianceModifier Variance { get; }
Property Value
Methods
AcceptVisitor(TypeVisitor)
public IType AcceptVisitor(TypeVisitor visitor)
Parameters
visitor
TypeVisitor
Returns
ChangeNullability(Nullability)
Creates a new type that is a copy of this type, with the changed nullability annotation.
public IType ChangeNullability(Nullability nullability)
Parameters
nullability
Nullability
Returns
Equals(IType)
public virtual bool Equals(IType other)
Parameters
other
IType
Returns
Equals(object)
public override sealed bool Equals(object obj)
Parameters
obj
object
Returns
GetAccessors(Predicate<IMethod>, GetMemberOptions)
public IEnumerable<IMethod> GetAccessors(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IMethod>options
GetMemberOptions
Returns
GetAttributes()
Gets the attributes declared on this type parameter.
public abstract IEnumerable<IAttribute> GetAttributes()
Returns
GetConstructors(Predicate<IMethod>, GetMemberOptions)
public IEnumerable<IMethod> GetConstructors(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.IgnoreInheritedMembers)
Parameters
filter
Predicate<IMethod>options
GetMemberOptions
Returns
GetEvents(Predicate<IEvent>, GetMemberOptions)
public IEnumerable<IEvent> GetEvents(Predicate<IEvent> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IEvent>options
GetMemberOptions
Returns
GetFields(Predicate<IField>, GetMemberOptions)
public IEnumerable<IField> GetFields(Predicate<IField> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IField>options
GetMemberOptions
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetMembers(Predicate<IMember>, GetMemberOptions)
public IEnumerable<IMember> GetMembers(Predicate<IMember> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IMember>options
GetMemberOptions
Returns
GetMethods(IReadOnlyList<IType>, Predicate<IMethod>, GetMemberOptions)
public IEnumerable<IMethod> GetMethods(IReadOnlyList<IType> typeArguments, Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
typeArguments
IReadOnlyList<IType>filter
Predicate<IMethod>options
GetMemberOptions
Returns
GetMethods(Predicate<IMethod>, GetMemberOptions)
public IEnumerable<IMethod> GetMethods(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IMethod>options
GetMemberOptions
Returns
GetProperties(Predicate<IProperty>, GetMemberOptions)
public IEnumerable<IProperty> GetProperties(Predicate<IProperty> filter = null, GetMemberOptions options = GetMemberOptions.None)
Parameters
filter
Predicate<IProperty>options
GetMemberOptions
Returns
ToString()
public override string ToString()
Returns
VisitChildren(TypeVisitor)
public IType VisitChildren(TypeVisitor visitor)
Parameters
visitor
TypeVisitor