Base:
property
DeclaringType
System.Reflection.MemberInfo.DeclaringType
6 overrides of DeclaringType
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
66public override Type? DeclaringType => _genericType.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
98public override Type? DeclaringType => throw new NotSupportedException(SR.NotSupported_ModifiedType);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
97public sealed override Type DeclaringType => throw new NotSupportedException(SR.NotSupported_SignatureType);
System\RuntimeType.NativeAot.cs (1)
677public override Type? DeclaringType => GetRuntimeTypeInfo().DeclaringType;
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
57public override Type? DeclaringType
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
135public sealed override Type? DeclaringType => GetRoDeclaringType();
122 references to DeclaringType
Aspire.Hosting.RemoteHost (2)
AtsCapabilityScanner.cs (2)
1379for (var current = declaringType; current.DeclaringType is not null; current = current.DeclaringType)
dotnet-svcutil-lib (7)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReference.cs (1)
108currentType = currentType.DeclaringType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (3)
176if (t.DeclaringType != null && t.DeclaringType != t) 178index = GetCSharpName(t.DeclaringType, parameters, index, sb);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (2)
990Type t = type.DeclaringType; 991for (TypeInfo tinfo = t != null ? t.GetTypeInfo() : null; tinfo != null && !tinfo.ContainsGenericParameters && !(tinfo.IsAbstract && tinfo.IsSealed); t = t.DeclaringType)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
1669if (type.DeclaringType == null)
Microsoft.AspNetCore.Diagnostics (3)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
203var parentType = declaringType.DeclaringType;
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Server\BindMethodFinder.cs (1)
80var declaringType = baseType.DeclaringType;
Microsoft.AspNetCore.Hosting (3)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
203var parentType = declaringType.DeclaringType;
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.AspNetCore.Http.Extensions (2)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.AspNetCore.Mvc.Abstractions (2)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
26return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(type.DeclaringType);
Microsoft.AspNetCore.OpenApi (3)
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
26return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(type.DeclaringType);
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.AspNetCore.Routing (1)
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
26return Attribute.IsDefined(type, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(type.DeclaringType);
Microsoft.AspNetCore.Server.IIS (3)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
203var parentType = declaringType.DeclaringType;
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
117offset = type.DeclaringType!.GetGenericArguments().Length; 124ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.CodeAnalysis.CSharp (3)
Symbols\AssemblySymbol.cs (3)
806else if (typeInfo.DeclaringType != null) 821if (currentTypeInfo.DeclaringType == null) 826currentTypeInfo = currentTypeInfo.DeclaringType.GetTypeInfo();
Microsoft.CodeAnalysis.Scripting (5)
Hosting\CommonMemberFilter.cs (1)
43if (type == null || IsTaskAwaiter(type) || IsTaskAwaiter(type.DeclaringType))
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (4)
71if (typeInfo.DeclaringType == null) 81typeInfo = typeInfo.DeclaringType?.GetTypeInfo(); 240if (typeInfo.DeclaringType != null) 246typeInfo = typeInfo.DeclaringType?.GetTypeInfo();
Microsoft.CSharp (8)
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (3)
157if (t1.DeclaringMethod == null && member1.DeclaringType.Equals(t1.DeclaringType)) 159if (!(t2.DeclaringMethod == null && member2.DeclaringType.Equals(t2.DeclaringType))) 164else if (t2.DeclaringMethod == null && member2.DeclaringType.Equals(t2.DeclaringType))
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (5)
367if (t.IsGenericParameter && t.DeclaringType == genericDefinition) 470Type parentType = t.DeclaringType; 486Type nextParent = parentType.DeclaringType; 756for (Type t = callingType; t != null; t = t.DeclaringType) 764foreach (MethodInfo methinfo in t.DeclaringType.GetMethods(EverythingBindingFlags))
Microsoft.Extensions.AI.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (2)
521if (genericParameter.DeclaringType == contextTypeDefinition) 533|| (baseType.IsGenericTypeDefinition ? baseType : baseType.GetGenericTypeDefinition()) != genericParameter.DeclaringType)
Microsoft.Extensions.DependencyInjection (2)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
133offset = type.DeclaringType!.GetGenericArguments().Length; 140ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.Extensions.Diagnostics.Abstractions (2)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
133offset = type.DeclaringType!.GetGenericArguments().Length; 140ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.Extensions.Diagnostics.Testing (2)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (2)
758Type? temp111 = instance.DeclaringType; 939Type? temp151 = instance.DeclaringType;
Microsoft.Extensions.Http (2)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
133offset = type.DeclaringType!.GetGenericArguments().Length; 140ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.Extensions.Logging.Abstractions (2)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
133offset = type.DeclaringType!.GetGenericArguments().Length; 140ProcessGenericType(builder, type.DeclaringType!, genericArguments, offset, options);
Microsoft.TestPlatform.AdapterUtilities (1)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (1)
505outerArity = AppendNestedTypeName(b, type.DeclaringType);
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
603If referringType.DeclaringType Is typ Then
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (3)
475If typ.DeclaringType IsNot Nothing AndAlso typ.DeclaringType.IsGenericType Then 476typeArgsCount = typeArgsCount - typ.DeclaringType.GetGenericArguments().Length
Microsoft\VisualBasic\CompilerServices\Utils.vb (3)
274If t1.DeclaringMethod Is Nothing AndAlso member1.DeclaringType.Equals(t1.DeclaringType) Then 275If Not (t2.DeclaringMethod Is Nothing AndAlso member2.DeclaringType.Equals(t2.DeclaringType)) Then 278ElseIf t2.DeclaringMethod Is Nothing AndAlso member2.DeclaringType.Equals(t2.DeclaringType) Then
Mono.Cecil (4)
Mono.Cecil\Import.cs (4)
195 reference.DeclaringType = ImportType (type.DeclaringType, context, import_kind); 253 if (type.DeclaringType != null) 254 return context.TypeParameter (NormalizeTypeFullName (type.DeclaringType), type.GenericParameterPosition); 267 return NormalizeTypeFullName (type.DeclaringType) + "/" + type.Name;
PresentationBuildTasks (2)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (2)
133type = type.DeclaringType; 154type = type.DeclaringType;
System.CodeDom (1)
src\runtime\src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
86currentType = currentType.DeclaringType!;
System.ComponentModel.Composition (8)
System\ComponentModel\Composition\ContractNameServices.cs (8)
138if (type.DeclaringType != null) 140WriteType(typeName, type.DeclaringType, formatGenericName); 218if (type.DeclaringType != null) 220if (type.DeclaringType.IsGenericType) 222WriteGenericType(typeName, type.DeclaringType, isDefinition, genericTypeArguments, formatGenericName); 226WriteNonGenericType(typeName, type.DeclaringType, formatGenericName); 330if (type.DeclaringType == null) 338int delclaringTypeGenericArguments = type.DeclaringType.GetGenericArguments().Length;
System.Private.CoreLib (7)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
442Type? parentType = declaringType.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
66public override Type? DeclaringType => _genericType.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
275for (Type? t = rootType; t != null; t = t.IsGenericParameter ? null : t.DeclaringType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
531if (genericParameter.DeclaringType == contextTypeDefinition) 543|| (baseType.IsGenericTypeDefinition ? baseType : baseType.GetGenericTypeDefinition()) != genericParameter.DeclaringType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
42public bool IsNested => DeclaringType != null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (1)
126type = type.DeclaringType!;
System.Private.DataContractSerialization (4)
src\runtime\src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
86currentType = currentType.DeclaringType!;
System\Runtime\Serialization\DataContract.cs (2)
1491if (type.DeclaringType == null) 2178? (t.IsNestedPublic || IsTypeVisibleInSerializationModule(t)) && IsTypeVisible(t.DeclaringType!)
System\Runtime\Serialization\SchemaExporter.cs (1)
271if (clrType.DeclaringType == null)
System.Private.Reflection.Execution (1)
Internal\Reflection\Execution\TypeLoader\ConstraintValidatorSupport.cs (1)
212Debug.Assert(type.DeclaringType != null);
System.Private.Xml (6)
System\Xml\Serialization\CodeIdentifier.cs (3)
185if (t.DeclaringType != null && t.DeclaringType != t) 187index = GetCSharpName(t.DeclaringType, parameters, index, sb);
System\Xml\Serialization\Compiler.cs (1)
37Type? declaringType = type.DeclaringType;
System\Xml\Serialization\Types.cs (2)
1006for (Type? t = type.DeclaringType; t != null && !t.ContainsGenericParameters && !(t.IsAbstract && t.IsSealed); t = t.DeclaringType)
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
59get { return _typeInfo.DeclaringType; }
System.Reflection.Emit (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (1)
275for (Type? t = rootType; t != null; t = t.IsGenericParameter ? null : t.DeclaringType)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
708typeHandle = AddTypeReference(GetTypeReferenceOrSpecificationHandle(type.DeclaringType!), null, type.Name);
System\Reflection\Emit\TypeBuilderImpl.cs (2)
951throw new AmbiguousMatchException(SR.Format(SR.AmbiguousMatch_MemberInfo, interfaceType.DeclaringType, interfaceType.Name)); 1154throw new AmbiguousMatchException(SR.Format(SR.AmbiguousMatch_MemberInfo, type.DeclaringType, type.Name));
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\Helpers.cs (1)
335return type.DeclaringType!.IsVisibleOutsideAssembly();
System.Text.Json (14)
System\ReflectionExtensions.cs (14)
355for (Type? s2 = sym2; s2 is not null; s2 = s2.DeclaringType) 386Type? parent1 = s1.DeclaringType; 396for (Type? parent2 = s2.DeclaringType; parent2 is not null; parent2 = parent2.DeclaringType) 408Type? parent2 = s2.DeclaringType; 420Type? parent1 = s1.DeclaringType; 437for (Type? parent2 = s2.DeclaringType; parent2 is not null; parent2 = parent2.DeclaringType) 460if (s2.DeclaringType is Type protectedParent2 && IsAccessibleViaInheritance(parent1, protectedParent2)) 472(s2.DeclaringType is Type privateProtectedParent2 && IsAccessibleViaInheritance(parent1, privateProtectedParent2))) 484s2.DeclaringType is Type protectedOrInternalParent2 && IsAccessibleViaInheritance(parent1, protectedOrInternalParent2)) 500Type? parent1 = s1.DeclaringType; 508for (Type? parent2 = s2.DeclaringType; parent2 is not null; parent2 = parent2.DeclaringType)
System.Xaml (5)
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (2)
133type = type.DeclaringType; 154type = type.DeclaringType;
System\Xaml\Schema\TypeReflector.cs (1)
1120type = type.DeclaringType;
System\Xaml\Schema\XamlNamespace.cs (1)
198currentType = currentType.DeclaringType;
System\Xaml\XamlType.cs (1)
1632typeName = GetTypeName(type.DeclaringType) + KnownStrings.NestedTypeDelimiter + typeName;