Méthode | Description | |
---|---|---|
CreateResolvedAttributes ( this |
||
CreateResolvedParameters ( this |
||
CreateResolvedTypeParameters ( this |
||
FindType ( this compilation, FullTypeName fullTypeName ) : IType |
Retrieves the specified type in this compilation. Returns an UnknownType if the type cannot be found in this compilation. There can be multiple types with the same full name in a compilation, as a full type name is only unique per assembly. If there are multiple possible matches, this method will return just one of them. When possible, use IAssembly.GetTypeDefinition instead to retrieve a type from a specific assembly. |
|
GetAllBaseTypeDefinitions ( this type ) : IEnumerable |
Gets all base type definitions. The output is ordered so that base types occur before derived types. This is equivalent to type.GetAllBaseTypes().Select(t => t.GetDefinition()).Where(d => d != null).Distinct(). |
|
GetAllBaseTypes ( this type ) : IEnumerable |
Gets all base types. This is the reflexive and transitive closure of IType.DirectBaseTypes. Note that this method does not return all supertypes - doing so is impossible due to contravariance (and undesirable for covariance as the list could become very large). The output is ordered so that base types occur before derived types. |
|
GetAllTypeDefinitions ( this assembly ) : IEnumerable |
||
GetAllTypeDefinitions ( this file ) : IEnumerable |
Gets all unresolved type definitions from the file. For partial classes, each part is returned.
|
|
GetAttribute ( this entity, FullTypeName attributeType, bool inherit = true ) : IAttribute |
Gets the attribute of the specified attribute type (or derived attribute types).
|
|
GetAttribute ( this entity, IType attributeType, bool inherit = true ) : IAttribute |
Gets the attribute of the specified attribute type (or derived attribute types).
|
|
GetAttributes ( this entity, FullTypeName attributeType, bool inherit = true ) : IEnumerable |
Gets the attributes of the specified attribute type (or derived attribute types).
|
|
GetAttributes ( this entity, IType attributeType, bool inherit = true ) : IEnumerable |
Gets the attributes of the specified attribute type (or derived attribute types).
|
|
GetAttributes ( this entity, bool inherit = true ) : IEnumerable |
Gets the attribute of the specified attribute type (or derived attribute types).
|
|
GetDelegateInvokeMethod ( this type ) : IMethod |
Gets the invoke method for a delegate type. Returns null if the type is not a delegate type; or if the invoke method could not be found. |
|
GetInnermostTypeDefinition ( this file, int line, int column ) : IUnresolvedTypeDefinition |
Gets the type (potentially a nested type) defined at the specified location. Returns null if no type is defined at that location.
|
|
GetMember ( this file, int line, int column ) : IUnresolvedMember |
Gets the member defined at the specified location. Returns null if no member is defined at that location.
|
|
GetNonInterfaceBaseTypes ( this type ) : IEnumerable |
Gets all non-interface base types. When type is an interface, this method will also return base interfaces (return same output as GetAllBaseTypes()). The output is ordered so that base types occur before derived types. |
|
GetSubTypeDefinitions ( this baseType ) : IEnumerable |
||
GetSymbol ( this rr ) : ISymbol | ||
GetTopLevelTypeDefinitons ( this compilation ) : IEnumerable |
Gets all top level type definitions in the compilation. This may include types from referenced assemblies that are not accessible in the main assembly.
|
|
GetTypeDefinition ( this assembly, FullTypeName fullTypeName ) : ITypeDefinition |
Gets the type definition for the specified unresolved type. Returns null if the unresolved type does not belong to this assembly.
|
|
GetTypeDefinition ( this assembly, string namespaceName, string name, int typeParameterCount ) : ITypeDefinition |
Gets the type definition for a top-level type. This method uses ordinal name comparison, not the compilation's name comparer. |
|
Import ( this compilation, IEntity entity ) : IEntity |
Imports an entity from another compilation.
|
|
Import ( this compilation, IEvent ev ) : IEvent |
Imports a member from another compilation.
|
|
Import ( this compilation, IField field ) : IField |
Imports a member from another compilation.
|
|
Import ( this compilation, IMember member ) : IMember |
Imports a member from another compilation.
|
|
Import ( this compilation, IMethod method ) : IMethod |
Imports a member from another compilation.
|
|
Import ( this compilation, INamespace ns ) : INamespace |
Imports a namespace from another compilation. This method may return null if the namespace does not exist in the target compilation. |
|
Import ( this compilation, IProperty property ) : IProperty |
Imports a member from another compilation.
|
|
Import ( this compilation, ISymbol symbol ) : ISymbol |
Imports a symbol from another compilation.
|
|
Import ( this compilation, IType type ) : IType |
Imports a type from another compilation.
|
|
Import ( this compilation, ITypeDefinition typeDefinition ) : ITypeDefinition |
Imports a type from another compilation.
|
|
IsDerivedFrom ( this type, ITypeDefinition baseType ) : bool |
Gets whether this type definition is derived from the base type definition.
|
|
IsDerivedFrom ( this type, KnownTypeCode baseType ) : bool |
Gets whether this type definition is derived from a given known type.
|
|
IsKnownType ( this type, KnownTypeCode knownType ) : bool |
Gets whether the type is the specified known type. For generic known types, this returns true any parameterization of the type (and also for the definition itself).
|
|
IsOpen ( this type ) : bool |
Gets whether the type is an open type (contains type parameters).
|
|
IsUnbound ( this type ) : bool |
Gets whether the type is unbound (is a generic type, but no type arguments were provided). In " |
|
Resolve ( this |
||
Resolve ( this |
||
Resolve ( this reference, ICompilation compilation ) : IType |
Resolves a type reference in the compilation's main type resolve context. Some type references require a more specific type resolve context and will not resolve using this method.
|
Méthode | Description | |
---|---|---|
FindNestedType ( ITypeDefinition typeDef, string name, int typeParameterCount ) : ITypeDefinition | ||
GetAttributes ( IEntity entity, Predicate |
||
GetTypeParameterOwner ( IType type ) : IEntity |
Gets the entity that owns the type parameters occurring in the specified type. If both class and method type parameters are present, the method is returned. Returns null if the specified type is closed.
|
public static CreateResolvedAttributes ( this |
||
attributes | this |
|
context | ITypeResolveContext | |
Résultat | IList |
public static CreateResolvedParameters ( this |
||
parameters | this |
|
context | ITypeResolveContext | |
Résultat | IList |
public static CreateResolvedTypeParameters ( this |
||
typeParameters | this |
|
context | ITypeResolveContext | |
Résultat | IList |
public static FindType ( this compilation, FullTypeName fullTypeName ) : IType | ||
compilation | this | |
fullTypeName | FullTypeName | |
Résultat | IType |
public static GetAllBaseTypeDefinitions ( this type ) : IEnumerable |
||
type | this | |
Résultat | IEnumerable |
public static GetAllBaseTypes ( this type ) : IEnumerable |
||
type | this | |
Résultat | IEnumerable |
public static GetAllTypeDefinitions ( this assembly ) : IEnumerable |
||
assembly | this | |
Résultat | IEnumerable |
public static GetAllTypeDefinitions ( this file ) : IEnumerable |
||
file | this | |
Résultat | IEnumerable |
public static GetAttribute ( this entity, FullTypeName attributeType, bool inherit = true ) : IAttribute | ||
entity | this | The entity on which the attributes are declared. |
attributeType | FullTypeName | The attribute type to look for. |
inherit | bool |
/// Specifies whether attributes inherited from base classes and base members (if the given |
Résultat | IAttribute |
public static GetAttribute ( this entity, IType attributeType, bool inherit = true ) : IAttribute | ||
entity | this | The entity on which the attributes are declared. |
attributeType | IType | The attribute type to look for. |
inherit | bool |
/// Specifies whether attributes inherited from base classes and base members (if the given |
Résultat | IAttribute |
public static GetAttributes ( this entity, FullTypeName attributeType, bool inherit = true ) : IEnumerable |
||
entity | this | The entity on which the attributes are declared. |
attributeType | FullTypeName | The attribute type to look for. |
inherit | bool |
/// Specifies whether attributes inherited from base classes and base members (if the given |
Résultat | IEnumerable |
public static GetAttributes ( this entity, IType attributeType, bool inherit = true ) : IEnumerable |
||
entity | this | The entity on which the attributes are declared. |
attributeType | IType | The attribute type to look for. |
inherit | bool |
/// Specifies whether attributes inherited from base classes and base members (if the given |
Résultat | IEnumerable |
public static GetAttributes ( this entity, bool inherit = true ) : IEnumerable |
||
entity | this | The entity on which the attributes are declared. |
inherit | bool |
/// Specifies whether attributes inherited from base classes and base members (if the given |
Résultat | IEnumerable |
public static GetDelegateInvokeMethod ( this type ) : IMethod | ||
type | this | |
Résultat | IMethod |
public static GetInnermostTypeDefinition ( this file, int line, int column ) : IUnresolvedTypeDefinition | ||
file | this | |
line | int | |
column | int | |
Résultat | IUnresolvedTypeDefinition |
public static GetMember ( this file, int line, int column ) : IUnresolvedMember | ||
file | this | |
line | int | |
column | int | |
Résultat | IUnresolvedMember |
public static GetNonInterfaceBaseTypes ( this type ) : IEnumerable |
||
type | this | |
Résultat | IEnumerable |
public static GetSubTypeDefinitions ( this baseType ) : IEnumerable |
||
baseType | this | |
Résultat | IEnumerable |
public static GetSymbol ( this rr ) : ISymbol | ||
rr | this | |
Résultat | ISymbol |
public static GetTopLevelTypeDefinitons ( this compilation ) : IEnumerable |
||
compilation | this | |
Résultat | IEnumerable |
public static GetTypeDefinition ( this assembly, FullTypeName fullTypeName ) : ITypeDefinition | ||
assembly | this | |
fullTypeName | FullTypeName | |
Résultat | ITypeDefinition |
public static GetTypeDefinition ( this assembly, string namespaceName, string name, int typeParameterCount ) : ITypeDefinition | ||
assembly | this | |
namespaceName | string | |
name | string | |
typeParameterCount | int | |
Résultat | ITypeDefinition |
public static Import ( this compilation, IEntity entity ) : IEntity | ||
compilation | this | |
entity | IEntity | |
Résultat | IEntity |
public static Import ( this compilation, IEvent ev ) : IEvent | ||
compilation | this | |
ev | IEvent | |
Résultat | IEvent |
public static Import ( this compilation, IField field ) : IField | ||
compilation | this | |
field | IField | |
Résultat | IField |
public static Import ( this compilation, IMember member ) : IMember | ||
compilation | this | |
member | IMember | |
Résultat | IMember |
public static Import ( this compilation, IMethod method ) : IMethod | ||
compilation | this | |
method | IMethod | |
Résultat | IMethod |
public static Import ( this compilation, INamespace ns ) : INamespace | ||
compilation | this | |
ns | INamespace | |
Résultat | INamespace |
public static Import ( this compilation, IProperty property ) : IProperty | ||
compilation | this | |
property | IProperty | |
Résultat | IProperty |
public static Import ( this compilation, ISymbol symbol ) : ISymbol | ||
compilation | this | |
symbol | ISymbol | |
Résultat | ISymbol |
public static Import ( this compilation, IType type ) : IType | ||
compilation | this | |
type | IType | |
Résultat | IType |
public static Import ( this compilation, ITypeDefinition typeDefinition ) : ITypeDefinition | ||
compilation | this | |
typeDefinition | ITypeDefinition | |
Résultat | ITypeDefinition |
public static IsDerivedFrom ( this type, ITypeDefinition baseType ) : bool | ||
type | this | |
baseType | ITypeDefinition | |
Résultat | bool |
public static IsDerivedFrom ( this type, KnownTypeCode baseType ) : bool | ||
type | this | |
baseType | KnownTypeCode | |
Résultat | bool |
public static IsKnownType ( this type, KnownTypeCode knownType ) : bool | ||
type | this | |
knownType | KnownTypeCode | |
Résultat | bool |
public static IsUnbound ( this type ) : bool | ||
type | this | |
Résultat | bool |
public static Resolve ( this |
||
typeReferences | this |
|
context | ITypeResolveContext | |
Résultat | IList |
public static Resolve ( this |
||
constantValues | this |
|
context | ITypeResolveContext | |
Résultat | IList |
public static Resolve ( this reference, ICompilation compilation ) : IType | ||
reference | this | |
compilation | ICompilation | |
Résultat | IType |