|
|
|
@ -16,6 +16,8 @@ |
|
|
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#nullable enable |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
|
|
|
|
@ -83,13 +85,13 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// Gets the underlying type definition.
|
|
|
|
/// Gets the underlying type definition.
|
|
|
|
/// Can return null for types which do not have a type definition (for example arrays, pointers, type parameters).
|
|
|
|
/// Can return null for types which do not have a type definition (for example arrays, pointers, type parameters).
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
ITypeDefinition GetDefinition(); |
|
|
|
ITypeDefinition? GetDefinition(); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the parent type, if this is a nested type.
|
|
|
|
/// Gets the parent type, if this is a nested type.
|
|
|
|
/// Returns null for top-level types.
|
|
|
|
/// Returns null for top-level types.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
IType DeclaringType { get; } |
|
|
|
IType? DeclaringType { get; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the number of type parameters.
|
|
|
|
/// Gets the number of type parameters.
|
|
|
|
@ -168,7 +170,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// Base.GetNestedTypes() = { Base`1+Nested`1[`0, unbound] }
|
|
|
|
/// Base.GetNestedTypes() = { Base`1+Nested`1[`0, unbound] }
|
|
|
|
/// </code>
|
|
|
|
/// </code>
|
|
|
|
/// </example>
|
|
|
|
/// </example>
|
|
|
|
IEnumerable<IType> GetNestedTypes(Predicate<ITypeDefinition> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IType> GetNestedTypes(Predicate<ITypeDefinition>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
// Note that we cannot 'leak' the additional type parameter as we leak the normal type parameters, because
|
|
|
|
// Note that we cannot 'leak' the additional type parameter as we leak the normal type parameters, because
|
|
|
|
// the index might collide. For example,
|
|
|
|
// the index might collide. For example,
|
|
|
|
@ -193,7 +195,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// and thus 'leaked' to the caller in the same way the GetMembers() method does not specialize members
|
|
|
|
/// and thus 'leaked' to the caller in the same way the GetMembers() method does not specialize members
|
|
|
|
/// from an <see cref="ITypeDefinition"/> and 'leaks' type parameters in member signatures.
|
|
|
|
/// from an <see cref="ITypeDefinition"/> and 'leaks' type parameters in member signatures.
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IType> GetNestedTypes(IReadOnlyList<IType> typeArguments, Predicate<ITypeDefinition> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IType> GetNestedTypes(IReadOnlyList<IType> typeArguments, Predicate<ITypeDefinition>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all instance constructors for this type.
|
|
|
|
/// Gets all instance constructors for this type.
|
|
|
|
@ -209,7 +211,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedMethod"/> will be returned.
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedMethod"/> will be returned.
|
|
|
|
/// </para>
|
|
|
|
/// </para>
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IMethod> GetConstructors(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.IgnoreInheritedMembers); |
|
|
|
IEnumerable<IMethod> GetConstructors(Predicate<IMethod>? filter = null, GetMemberOptions options = GetMemberOptions.IgnoreInheritedMembers); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all methods that can be called on this type.
|
|
|
|
/// Gets all methods that can be called on this type.
|
|
|
|
@ -236,7 +238,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// the ambiguity can be avoided.
|
|
|
|
/// the ambiguity can be avoided.
|
|
|
|
/// </para>
|
|
|
|
/// </para>
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IMethod> GetMethods(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IMethod> GetMethods(Predicate<IMethod>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all generic methods that can be called on this type with the specified type arguments.
|
|
|
|
/// Gets all generic methods that can be called on this type with the specified type arguments.
|
|
|
|
@ -257,7 +259,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// and the other overload's remarks about ambiguous signatures apply here as well.
|
|
|
|
/// and the other overload's remarks about ambiguous signatures apply here as well.
|
|
|
|
/// </para>
|
|
|
|
/// </para>
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IMethod> GetMethods(IReadOnlyList<IType> typeArguments, Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IMethod> GetMethods(IReadOnlyList<IType> typeArguments, Predicate<IMethod>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all properties that can be called on this type.
|
|
|
|
/// Gets all properties that can be called on this type.
|
|
|
|
@ -269,7 +271,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// For properties on parameterized types, type substitution will be performed on the property signature,
|
|
|
|
/// For properties on parameterized types, type substitution will be performed on the property signature,
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedProperty"/> will be returned.
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedProperty"/> will be returned.
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IProperty> GetProperties(Predicate<IProperty> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IProperty> GetProperties(Predicate<IProperty>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all fields that can be accessed on this type.
|
|
|
|
/// Gets all fields that can be accessed on this type.
|
|
|
|
@ -281,7 +283,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// For fields on parameterized types, type substitution will be performed on the field's return type,
|
|
|
|
/// For fields on parameterized types, type substitution will be performed on the field's return type,
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedField"/> will be returned.
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedField"/> will be returned.
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IField> GetFields(Predicate<IField> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IField> GetFields(Predicate<IField>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all events that can be accessed on this type.
|
|
|
|
/// Gets all events that can be accessed on this type.
|
|
|
|
@ -293,7 +295,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// For fields on parameterized types, type substitution will be performed on the event's return type,
|
|
|
|
/// For fields on parameterized types, type substitution will be performed on the event's return type,
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedEvent"/> will be returned.
|
|
|
|
/// and the appropriate <see cref="Implementation.SpecializedEvent"/> will be returned.
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IEvent> GetEvents(Predicate<IEvent> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IEvent> GetEvents(Predicate<IEvent>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all members that can be called on this type.
|
|
|
|
/// Gets all members that can be called on this type.
|
|
|
|
@ -312,7 +314,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// <see cref="GetMethods(Predicate{IMethod}, GetMemberOptions)"/> method apply here as well.
|
|
|
|
/// <see cref="GetMethods(Predicate{IMethod}, GetMemberOptions)"/> method apply here as well.
|
|
|
|
/// </para>
|
|
|
|
/// </para>
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IMember> GetMembers(Predicate<IMember> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IMember> GetMembers(Predicate<IMember>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Gets all accessors belonging to properties or events on this type.
|
|
|
|
/// Gets all accessors belonging to properties or events on this type.
|
|
|
|
@ -323,7 +325,7 @@ namespace ICSharpCode.Decompiler.TypeSystem |
|
|
|
/// <remarks>
|
|
|
|
/// <remarks>
|
|
|
|
/// Accessors are not returned by GetMembers() or GetMethods().
|
|
|
|
/// Accessors are not returned by GetMembers() or GetMethods().
|
|
|
|
/// </remarks>
|
|
|
|
/// </remarks>
|
|
|
|
IEnumerable<IMethod> GetAccessors(Predicate<IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
IEnumerable<IMethod> GetAccessors(Predicate<IMethod>? filter = null, GetMemberOptions options = GetMemberOptions.None); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Flags] |
|
|
|
[Flags] |
|
|
|
|