28 overrides of DeclaringType
PresentationFramework (1)
MS\Internal\Data\IndexerPropertyInfo.cs (1)
80public override Type DeclaringType
System.Private.CoreLib (11)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ConstructorOnTypeBuilderInstantiation.cs (1)
40public override Type? DeclaringType => _type;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (1)
47public override Type? DeclaringType => _type;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
45public override Type? DeclaringType => _method.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
53public override Type? DeclaringType => _type;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (1)
43public override Type? DeclaringType => null;
System\Reflection\Emit\DynamicMethod.cs (1)
75public override Type DeclaringType
System\Reflection\Runtime\EventInfos\RuntimeEventInfo.cs (1)
46public sealed override Type DeclaringType
System\Reflection\Runtime\FieldInfos\RuntimeFieldInfo.cs (1)
73public sealed override Type DeclaringType
System\Reflection\Runtime\MethodInfos\RuntimeConstructorInfo.cs (1)
33public abstract override Type DeclaringType { get; }
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (1)
92public sealed override Type DeclaringType
System\Reflection\Runtime\PropertyInfos\RuntimePropertyInfo.cs (1)
68public sealed override Type DeclaringType
System.Reflection.Context (7)
System\Reflection\Context\Delegation\DelegatingConstructorInfo.cs (1)
34public override Type? DeclaringType
System\Reflection\Context\Delegation\DelegatingEventInfo.cs (1)
23public override Type? DeclaringType
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
24public override Type? DeclaringType
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (1)
36public override Type? DeclaringType
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
34public override Type? DeclaringType
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
42public sealed override Type? DeclaringType
System\Reflection\Context\Virtual\VirtualPropertyBase.FuncPropertyAccessorBase.cs (1)
29public sealed override Type? DeclaringType
System.Reflection.Emit (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
45public override Type? DeclaringType => _method.DeclaringType;
System\Reflection\Emit\ArrayMethod.cs (1)
56public override Type? DeclaringType => _containingType;
System.Reflection.MetadataLoadContext (5)
System\Reflection\TypeLoading\Constructors\RoConstructor.cs (1)
19public sealed override Type DeclaringType => GetRoDeclaringType();
System\Reflection\TypeLoading\Events\RoEvent.cs (1)
30public sealed override Type DeclaringType => GetRoDeclaringType();
System\Reflection\TypeLoading\Fields\RoField.cs (1)
32public sealed override Type DeclaringType => GetRoDeclaringType();
System\Reflection\TypeLoading\Methods\RoMethod.cs (1)
27public sealed override Type DeclaringType => GetRoDeclaringType();
System\Reflection\TypeLoading\Properties\RoProperty.cs (1)
31public sealed override Type DeclaringType => GetRoDeclaringType();
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\ComAwareEventInfo.cs (1)
74public override Type? DeclaringType => _innerEventInfo.DeclaringType;
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationFieldInfo.cs (1)
35public override Type? DeclaringType => m_field.DeclaringType;
804 references to DeclaringType
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (1)
112var declaringType = propertyInfo.DeclaringType;
Aspire.Hosting.RemoteHost (24)
Ats\CapabilityDispatcher.cs (3)
208prop.DeclaringType!); 273prop.DeclaringType!); 375methodToInvoke.DeclaringType!);
AtsCapabilityScanner.cs (15)
1943var declaringType = property.DeclaringType; 1981var methodLocation = $"{method.DeclaringType?.FullName ?? method.DeclaringType?.Name ?? "Unknown"}.{method.Name}"; 2091(method.DeclaringType is not null && (GetAspireExportAttribute(method.DeclaringType)?.RunSyncOnBackgroundThread ?? false)) 3222(property.DeclaringType is not null && AttributeDataReader.HasAspireExportIgnoreData(property.DeclaringType)); 3231(method.DeclaringType is not null && AttributeDataReader.HasAspireExportIgnoreData(method.DeclaringType)); 3810FieldInfo field when field.DeclaringType is not null => $"F:{GetXmlDocumentationTypeName(field.DeclaringType)}.{field.Name}", 3811PropertyInfo property when property.DeclaringType is not null => $"P:{GetXmlDocumentationTypeName(property.DeclaringType)}.{property.Name}", 3812MethodBase method when method.DeclaringType is not null => GetXmlDocumentationMethodName(method), 3820builder.Append(GetXmlDocumentationTypeName(method.DeclaringType!));
AtsContextFilter.cs (6)
203return IsSelectedAssembly(method.DeclaringType?.Assembly, assemblyNames); 208return IsSelectedAssembly(property.DeclaringType?.Assembly, assemblyNames); 270AddAssemblyName(knownAssemblyNames, method.DeclaringType?.Assembly); 275AddAssemblyName(knownAssemblyNames, property.DeclaringType?.Assembly); 341assemblyName = method.DeclaringType?.Assembly.GetName().Name ?? string.Empty; 347assemblyName = property.DeclaringType?.Assembly.GetName().Name ?? string.Empty;
Aspire.Hosting.Testing (2)
DistributedApplicationEntryPointInvoker.cs (1)
126Name = $"{_entryPoint.DeclaringType?.Assembly.GetName().Name ?? "Unknown"}.EntryPoint"
DistributedApplicationTestingBuilder.cs (1)
662var asm = stackFrame.GetMethod()?.DeclaringType?.Assembly;
Aspire.Hosting.Tests (2)
AtsEventingExportsTests.cs (1)
20var callbackSubscriberType = method.DeclaringType!.GetNestedType("CallbackEventingSubscriber", BindingFlags.NonPublic)!;
ResourceNotificationTests.cs (1)
1702$"{property.DeclaringType}.{property.Name} cannot be dynamically mutated. " +
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (1)
115var declaringType = propertyInfo.DeclaringType!;
dotnet-svcutil-lib (100)
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
637if (methodInfo.IsVirtual && !methodInfo.DeclaringType.GetTypeInfo().IsValueType) 738Type currentType = propertyInfo.DeclaringType.GetTypeInfo().BaseType;
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (3)
1309throw new InvalidOperationException(string.Format(ResXml.XmlSerializableRootDupName, _getSchemaMethod.DeclaringType.FullName, e.Name, elementNs)); 1395throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType.FullName, _getSchemaMethod.Name)); 1405throw new InvalidOperationException(string.Format(ResXml.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (6)
195throw new InvalidOperationException(string.Format(ResXml.XmlSerializerUnsupportedMember, member.DeclaringType.FullName + "." + member.Name, type.FullName), typeDesc.Exception); 204if (fieldInfo.DeclaringType != Type) return null; 216if (propertyInfo.DeclaringType != Type) return null; 282_checkShouldPersistMethodInfo = memberInfo.DeclaringType.GetMethod("ShouldSerialize" + memberInfo.Name, new Type[0]); 285FieldInfo specifiedField = memberInfo.DeclaringType.GetField(memberInfo.Name + "Specified"); 297PropertyInfo specifiedProperty = memberInfo.DeclaringType.GetProperty(memberInfo.Name + "Specified");
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (1)
186SoapAttributes attrs = _attributeOverrides[memberInfo.DeclaringType, memberInfo.Name];
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (5)
854arrayElementType = GetCollectionElementType(type, memberInfo == null ? null : memberInfo.DeclaringType.FullName + "." + memberInfo.Name); 927exception = new NotSupportedException(string.Format(ResXml.XmlUnsupportedInterfaceDetails, memberInfo.DeclaringType.FullName + "." + memberInfo.Name, type.FullName)); 1126throw new InvalidOperationException(string.Format(ResXml.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1213Type typeToBeReplaced = memberInfoToBeReplaced.DeclaringType; 1365if (defaultProp.DeclaringType != t) continue;
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (1)
253XmlAttributes attrs = _attributeOverrides[memberInfo.DeclaringType, memberInfo.Name];
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (18)
370Type declaringType = memberContract.MemberInfo.DeclaringType; 954ThrowInvalidDataContractException(string.Format(SRSerialization.TooManyDataMembers, DataContract.GetClrTypeFullName(member.DeclaringType), member.Name)); 969ThrowInvalidDataContractException(string.Format(SRSerialization.NoGetMethodForProperty, property.DeclaringType, property.Name)); 974ThrowInvalidDataContractException(string.Format(SRSerialization.NoSetMethodForProperty, property.DeclaringType, property.Name)); 978ThrowInvalidDataContractException(string.Format(SRSerialization.IndexedPropertyCannotBeSerialized, property.DeclaringType, property.Name)); 1000DataContract.GetClrTypeFullName(member.DeclaringType), 1019ThrowInvalidDataContractException(string.Format(SRSerialization.TooManyIgnoreDataMemberAttributes, DataContract.GetClrTypeFullName(member.DeclaringType), member.Name)); 1066DataContract.GetClrTypeFullName(member.DeclaringType), 1230DataContract.ThrowInvalidDataContractException(string.Format(SRSerialization.DuplicateCallback, method, currentCallback, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1232DataContract.ThrowInvalidDataContractException(string.Format(SRSerialization.DuplicateAttribute, prevAttributeType, attributeType, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1234DataContract.ThrowInvalidDataContractException(string.Format(SRSerialization.CallbacksCannotBeVirtualMethods, method, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1238DataContract.ThrowInvalidDataContractException(string.Format(SRSerialization.CallbackMustReturnVoid, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1240DataContract.ThrowInvalidDataContractException(string.Format(SRSerialization.CallbackParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfStreamingContext), method.DeclaringType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (14)
594if (methodInfo.IsVirtual && !methodInfo.DeclaringType.GetTypeInfo().IsValueType) 597EmitSourceInstruction("Callvirt " + methodInfo.ToString() + " on type " + methodInfo.DeclaringType.ToString()); 603EmitSourceInstruction("Static Call " + methodInfo.ToString() + " on type " + methodInfo.DeclaringType.ToString()); 609EmitSourceInstruction("Call " + methodInfo.ToString() + " on type " + methodInfo.DeclaringType.ToString()); 617EmitSourceInstruction("Call " + ctor.ToString() + " on type " + ctor.DeclaringType.ToString()); 624EmitSourceInstruction("Newobj " + constructorInfo.ToString() + " on type " + constructorInfo.DeclaringType.ToString()); 696EmitSourceInstruction("Ldsfld " + fieldInfo + " on type " + fieldInfo.DeclaringType); 702EmitSourceInstruction("Ldfld " + fieldInfo + " on type " + fieldInfo.DeclaringType); 714throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.NoGetMethodForProperty, property.DeclaringType, property))); 725throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.CannotLoadMemberType, "Unknown", memberInfo.DeclaringType, memberInfo.Name))); 739EmitSourceInstruction("Stsfld " + fieldInfo + " on type " + fieldInfo.DeclaringType); 745EmitSourceInstruction("Stfld " + fieldInfo + " on type " + fieldInfo.DeclaringType); 756throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.NoSetMethodForProperty, property.DeclaringType, property))); 1448ConvertAddress(GetVariableType(thisObj), methodInfo.DeclaringType);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (1)
2280if (!IsTypeVisibleInSerializationModule(member.DeclaringType))
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (1)
266DataContract.GetClrTypeFullName(dataMemberType), DataContract.GetClrTypeFullName(dataMember.MemberInfo.DeclaringType), dataMember.MemberInfo.Name)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\EnumDataContract.cs (2)
289ThrowInvalidDataContractException(string.Format(SRSerialization.TooManyEnumMembers, DataContract.GetClrTypeFullName(field.DeclaringType), field.Name)); 307ThrowInvalidDataContractException(string.Format(SRSerialization.DataMemberOnEnumField, DataContract.GetClrTypeFullName(field.DeclaringType), field.Name));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (1)
453Type declaringType = memberContract.MemberInfo.DeclaringType;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (2)
64Type declaringType = method.DeclaringType; 325if (methodData.MethodBase.DeclaringType == typeof(System.ServiceModel.ICommunicationObject)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (1)
996if (member.DeclaringType == typeof(Attribute))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (9)
494attrType.Name, method.Name, method.DeclaringType.Name), e)); 503attrType.Name, param.Name, method.Name, method.DeclaringType.Name), e)); 667methodInfo.Name, methodInfo.DeclaringType.Name))); 676methodInfo.Name, methodInfo.DeclaringType.Name))); 790MethodInfo[] endMethods = beginMethod.DeclaringType.GetTypeInfo().GetDeclaredMethods(endMethodName).ToArray(); 793throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.NoEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 797throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.MoreThanOneEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 808throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidAsyncEndMethodSignatureForMethod2, endMethod.Name, endMethod.DeclaringType.FullName))); 841throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.InvalidAsyncBeginMethodSignatureForMethod2, method.Name, method.DeclaringType.FullName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (29)
368type = provider.MethodInfo.DeclaringType; 468opDesc.SyncMethod.DeclaringType, 479opDesc.SyncMethod.DeclaringType, 489opDesc.TaskMethod.DeclaringType, 507if (methodInfo.DeclaringType == type) 976throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.OneWayAndFaultsIncompatible2, methodInfo.DeclaringType.FullName, operationName.EncodedName))); 1190throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SFxMultipleUnknownHeaders, methodInfo, methodInfo.DeclaringType))); 1596_syncOperation.SyncMethod.DeclaringType, 1612_syncOperation.SyncMethod.DeclaringType, 1629_syncOperation.SyncMethod.DeclaringType, 1644_syncOperation.SyncMethod.DeclaringType, 1658_syncOperation.SyncMethod.DeclaringType, 1673_syncOperation.SyncMethod.DeclaringType, 1688_syncOperation.SyncMethod.DeclaringType, 1705_syncOperation.SyncMethod.DeclaringType, 1737_syncOperation.SyncMethod.DeclaringType, 1752_syncOperation.SyncMethod.DeclaringType, 1766_syncOperation.SyncMethod.DeclaringType, 1779_syncOperation.SyncMethod.DeclaringType, 1793_syncOperation.SyncMethod.DeclaringType, 1807_syncOperation.SyncMethod.DeclaringType, 1823_syncOperation.SyncMethod.DeclaringType, 1854_taskOperation.TaskMethod.DeclaringType, 1870_taskOperation.TaskMethod.DeclaringType, 1885_taskOperation.TaskMethod.DeclaringType, 1899_taskOperation.TaskMethod.DeclaringType, 1914_taskOperation.TaskMethod.DeclaringType, 1929_taskOperation.TaskMethod.DeclaringType, 1946_taskOperation.TaskMethod.DeclaringType,
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
271_keyBase = methodInfo.DeclaringType.FullName + ":" + methodInfo.ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
189methodBase.DeclaringType.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (1)
139ServiceModelActivity.Start(activity, string.Format(SRServiceModel.ActivityExecuteMethod, _method.DeclaringType.FullName, _method.Name), ActivityType.ExecuteUserCode);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
199string.Format(SRServiceModel.ActivityExecuteMethod, _taskMethod.DeclaringType.FullName, _taskMethod.Name),
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
GetDocument.Insider (3)
Commands\GetDocumentCommandWorker.cs (2)
59var entryPointType = assembly.EntryPoint?.DeclaringType; 475Resources.FormatMethodReturnedNull(method.Name, method.DeclaringType, method.ReturnType));
src\44e1214b125d320f\HostFactoryResolver.cs (1)
98var programType = assembly?.EntryPoint?.DeclaringType;
Infrastructure.Common (3)
xunit\ConditionAttribute.cs (1)
43Type testMethodDeclaringType = testMethodInfo.DeclaringType;
xunit\WcfTestDiscoverer.cs (2)
92failFastAttribute = testMethodInfo.DeclaringType.GetCustomAttribute<FailFastAfterAttribute>(); 98failFastAttribute = testMethodInfo.DeclaringType.Assembly.GetCustomAttribute<FailFastAfterAttribute>();
Microsoft.AspNetCore (2)
WebHost.cs (2)
48var startupAssemblyName = app.GetMethodInfo().DeclaringType!.Assembly.GetName().Name; 70var startupAssemblyName = routeBuilder.GetMethodInfo().DeclaringType!.Assembly.GetName().Name;
Microsoft.AspNetCore.Components.Endpoints (7)
Forms\ClientValidationCache.cs (1)
248property.DeclaringType!,
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (6)
218if (getMethod.DeclaringType!.IsValueType) 248var typeInput = propertyGetMethod.DeclaringType!; 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType); 290var typeInput = setMethod.DeclaringType!; 426if (propertyHelper.Property.DeclaringType != type) 444var declaringType = propertyHelper.Property.DeclaringType;
Microsoft.AspNetCore.Components.Forms (2)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
171var declaringType = methodInfo.DeclaringType; 302var convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Components.Web (2)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
171var declaringType = methodInfo.DeclaringType; 302var convertExpression = Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType!);
Microsoft.AspNetCore.Connections.Abstractions (1)
src\aspnetcore\src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
158throw new InvalidOperationException($"Unable to resolve service for type '{_parameters[index].ParameterType}' while attempting to activate '{_constructor.DeclaringType}'.");
Microsoft.AspNetCore.Diagnostics (5)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 161var type = method.DeclaringType; 199Debug.Assert(method.DeclaringType != null); 201declaringType = method.DeclaringType; 228declaringType = candidateMethod.DeclaringType;
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Binding\JsonTranscodingServiceMethodProvider.cs (1)
57serviceDescriptor = ServiceDescriptorHelpers.GetServiceDescriptor(bindMethodInfo.DeclaringType!);
Internal\Binding\ReflectionServiceInvokerResolver.cs (1)
74if (baseDefinitionMethod != null && baseDefinitionMethod.DeclaringType == _declaringType)
Microsoft.AspNetCore.Hosting (13)
GenericHost\GenericWebHostBuilder.cs (3)
193var startupAssemblyName = startupFactory.GetMethodInfo().DeclaringType!.Assembly.GetName().Name; 318var startupAssemblyName = configure.GetMethodInfo().DeclaringType!.Assembly.GetName().Name!; 343var startupAssemblyName = configure.GetMethodInfo().DeclaringType!.Assembly.GetName().Name!;
GenericHost\SlimWebHostBuilder.cs (1)
79var startupAssemblyName = configure.GetMethodInfo().DeclaringType!.Assembly.GetName().Name!;
Internal\ConfigureBuilder.cs (1)
52MethodInfo.DeclaringType?.FullName), ex);
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 161var type = method.DeclaringType; 199Debug.Assert(method.DeclaringType != null); 201declaringType = method.DeclaringType; 228declaringType = candidateMethod.DeclaringType;
WebHostBuilderExtensions.cs (3)
41var startupAssemblyName = configureApp.GetMethodInfo().DeclaringType!.Assembly.GetName().Name!; 70var startupAssemblyName = configureApp.GetMethodInfo().DeclaringType!.Assembly.GetName().Name!; 100var startupAssemblyName = startupFactory.GetMethodInfo().DeclaringType!.Assembly.GetName().Name;
Microsoft.AspNetCore.Http.Abstractions (11)
Extensions\UseMiddlewareExtensions.cs (5)
230var declaringType = methodInfo.DeclaringType!; 312methodArguments[i] = GetMethodArgument(parameter, providerArg, parameterType, methodInfo.DeclaringType); 316if (methodInfo.DeclaringType != null && methodInfo.DeclaringType != typeof(T)) 318middlewareInstanceArg = Expression.Convert(middlewareInstanceArg, methodInfo.DeclaringType);
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (6)
218if (getMethod.DeclaringType!.IsValueType) 248var typeInput = propertyGetMethod.DeclaringType!; 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType); 290var typeInput = setMethod.DeclaringType!; 426if (propertyHelper.Property.DeclaringType != type) 444var declaringType = propertyHelper.Property.DeclaringType;
Microsoft.AspNetCore.Http.Extensions (3)
RequestDelegateFactory.cs (3)
233if (methodInfo.DeclaringType is null) 252targetFactory ??= context => Activator.CreateInstance(methodInfo.DeclaringType)!; 254var targetExpression = Expression.Convert(TargetExpr, methodInfo.DeclaringType);
Microsoft.AspNetCore.InternalTesting (6)
LoggedTest\LoggedTestBase.cs (2)
66?? methodInfo.DeclaringType.GetCustomAttribute<LogLevelAttribute>() 67?? methodInfo.DeclaringType.Assembly.GetCustomAttribute<LogLevelAttribute>();
xunit\AspNetTestRunner.cs (4)
143attributeCandidate = methodInfo.DeclaringType.GetCustomAttribute<RepeatAttribute>(); 149return methodInfo.DeclaringType.Assembly.GetCustomAttribute<RepeatAttribute>(); 160attributeCandidate = methodInfo.DeclaringType.GetCustomAttribute<RetryAttribute>(); 166return methodInfo.DeclaringType.Assembly.GetCustomAttribute<RetryAttribute>();
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
EndpointMetadataApiDescriptionProvider.cs (5)
89if (methodInfo.DeclaringType is not null && !TypeHelper.IsCompilerGeneratedType(methodInfo.DeclaringType)) 91controllerName = methodInfo.DeclaringType.Name; 526if (parameterInfo.Member is PropertyInfo propertyInfo && propertyInfo.DeclaringType is not null) 528return new(ModelMetadataIdentity.ForProperty(propertyInfo, type, propertyInfo.DeclaringType));
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
38return Attribute.IsDefined(method, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(method.DeclaringType);
Microsoft.AspNetCore.Mvc.Core (12)
ApiConventionTypeAttribute.cs (1)
72var methodDisplayName = TypeNameHelper.GetTypeDisplayName(method.DeclaringType!) + "." + method.Name;
ApplicationModels\DefaultApplicationModelProvider.cs (3)
219var declaringType = propertyInfo.DeclaringType!; 428if (methodInfo.GetBaseDefinition().DeclaringType == typeof(object)) 689var declaringType = baseMethodInfo.DeclaringType;
Filters\MiddlewareFilterConfigurationProvider.cs (1)
115MethodInfo.DeclaringType!.FullName),
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
179ModelMetadataIdentity.ForProperty(property, modelType, property.DeclaringType!),
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (6)
218if (getMethod.DeclaringType!.IsValueType) 248var typeInput = propertyGetMethod.DeclaringType!; 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType); 290var typeInput = setMethod.DeclaringType!; 426if (propertyHelper.Property.DeclaringType != type) 444var declaringType = propertyHelper.Property.DeclaringType;
Microsoft.AspNetCore.Mvc.RazorPages (10)
ApplicationModels\DefaultPageApplicationModelPartsProvider.cs (5)
112var propertyMetadata = _modelMetadataProvider.GetMetadataForProperty(property.DeclaringType!, property.Name); 119var declaringType = property.DeclaringType!; 158if (methodInfo.GetBaseDefinition().DeclaringType == typeof(object)) 194var declaringType = methodInfo.DeclaringType; 203if (methodInfo.GetBaseDefinition().DeclaringType == typeof(PageModel))
Infrastructure\ExecutorFactory.cs (4)
89Expression.Convert(receiver, method.DeclaringType!), 122Expression.Convert(receiver, method.DeclaringType!), 155Expression.Convert(receiver, method.DeclaringType!), 182Expression.Convert(receiver, method.DeclaringType!),
PageLoggerExtensions.cs (1)
89var declaringTypeName = TypeNameHelper.GetTypeDisplayName(handler.MethodInfo.DeclaringType);
Microsoft.AspNetCore.Mvc.Testing (3)
src\44e1214b125d320f\HostFactoryResolver.cs (1)
98var programType = assembly?.EntryPoint?.DeclaringType;
WebApplicationFactory.cs (2)
255var declaringType = method!.DeclaringType; 347typeof(TEntryPoint).Assembly.EntryPoint!.DeclaringType!.FullName,
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
CachedExpressionCompiler.cs (1)
177Expression.Convert(parameterExpression, memberExpression.Member.DeclaringType);
ExpressionHelper.cs (1)
244var declaringType = methodExpression.Method.DeclaringType;
Filters\SaveTempDataPropertyFilterBase.cs (2)
128Resources.FormatTempDataProperties_PublicGetterSetter(property.DeclaringType.FullName, property.Name, nameof(TempDataAttribute))); 137TypeNameHelper.GetTypeDisplayName(property.DeclaringType),
Microsoft.AspNetCore.OpenApi (4)
Services\OpenApiGenerator.cs (3)
351if (methodInfo.DeclaringType is not null && !TypeHelper.IsCompilerGeneratedType(methodInfo.DeclaringType)) 353controllerName = methodInfo.DeclaringType.Name;
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
38return Attribute.IsDefined(method, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(method.DeclaringType);
Microsoft.AspNetCore.Routing (8)
EndpointRoutingMiddleware.cs (1)
85var declaringAssembly = method.DeclaringType?.Assembly.GetName();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (6)
218if (getMethod.DeclaringType!.IsValueType) 248var typeInput = propertyGetMethod.DeclaringType!; 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType); 290var typeInput = setMethod.DeclaringType!; 426if (propertyHelper.Property.DeclaringType != type) 444var declaringType = propertyHelper.Property.DeclaringType;
src\aspnetcore\src\Shared\RoslynUtils\TypeHelper.cs (1)
38return Attribute.IsDefined(method, typeof(CompilerGeneratedAttribute)) || IsCompilerGeneratedType(method.DeclaringType);
Microsoft.AspNetCore.Routing.Abstractions (6)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (6)
218if (getMethod.DeclaringType!.IsValueType) 248var typeInput = propertyGetMethod.DeclaringType!; 275Debug.Assert(!propertyInfo.DeclaringType!.IsValueType); 290var typeInput = setMethod.DeclaringType!; 426if (propertyHelper.Property.DeclaringType != type) 444var declaringType = propertyHelper.Property.DeclaringType;
Microsoft.AspNetCore.Server.IIS (5)
src\aspnetcore\src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (5)
84var type = method.DeclaringType; 161var type = method.DeclaringType; 199Debug.Assert(method.DeclaringType != null); 201declaringType = method.DeclaringType; 228declaringType = candidateMethod.DeclaringType;
Microsoft.AspNetCore.SignalR.Core (3)
Internal\HubMethodDescriptor.cs (2)
120$"{methodExecutor.MethodInfo.DeclaringType?.Name}.{methodExecutor.MethodInfo.Name}: The {nameof(FromKeyedServicesAttribute)} is not supported on parameters that are also annotated with {nameof(IFromServiceMetadata)}."); 306throw new InvalidOperationException($"Method '{methodInfo.DeclaringType}.{methodInfo.Name}' is not supported with native AOT because it has a parameter of type '{parameterType}'. A ValueType streaming parameter is not supported because the native code to support the ValueType will not be available with native AOT.");
Internal\HubReflectionHelper.cs (1)
22var baseDefinition = methodInfo.GetBaseDefinition().DeclaringType!;
Microsoft.AspNetCore.TestHost (1)
src\44e1214b125d320f\HostFactoryResolver.cs (1)
98var programType = assembly?.EntryPoint?.DeclaringType;
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
Microsoft.CodeAnalysis.Scripting (6)
Hosting\CommonMemberFilter.cs (3)
23if (method.DeclaringType?.FullName.StartsWith("Submission#0").ToThreeState() == ThreeState.True) 33var type = method.DeclaringType; 73info = info.DeclaringType?.GetTypeInfo();
Hosting\ObjectFormatter\CommonObjectFormatter.cs (1)
116var declaringType = method.DeclaringType;
ScriptExecutionState.cs (2)
136Activator.CreateInstance(precedingExecutors[executorIndex++].GetMethodInfo().DeclaringType, submissionCtorArgs); 147Activator.CreateInstance(currentExecutor.GetMethodInfo().DeclaringType, submissionCtorArgs);
Microsoft.CodeAnalysis.Workspaces (5)
CodeActions\CodeAction.cs (2)
123static codeAction => new Func<CancellationToken, Task<IEnumerable<CodeActionOperation>>>(codeAction.ComputeOperationsAsync).Method.DeclaringType != typeof(CodeAction)); 131static codeAction => new Func<CancellationToken, Task<Solution?>>(codeAction.GetChangedSolutionAsync).Method.DeclaringType != typeof(CodeAction));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
Workspace\Solution\FileTextLoader.cs (1)
68GetType(), _ => new StrongBox<bool>(new Func<Stream, Workspace, SourceText>(CreateText).Method.DeclaringType != typeof(FileTextLoader))).Value;
Workspace\Solution\TextLoader.cs (1)
65_ => new StrongBox<bool>(new Func<Workspace, DocumentId, CancellationToken, Task<TextAndVersion>>(LoadTextAndVersionAsync).Method.DeclaringType != typeof(TextLoader))).Value)
Microsoft.CSharp (20)
Microsoft\CSharp\RuntimeBinder\ExpressionTreeCallRewriter.cs (1)
437t = f.DeclaringType;
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (10)
56&& method1.DeclaringType.IsGenericallyEqual(method2.DeclaringType) 66&& ctor1.DeclaringType.IsGenericallyEqual(ctor2.DeclaringType) 73&& prop1.DeclaringType.IsGenericallyEqual(prop2.DeclaringType) 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)) 244return member.DeclaringType.GetGenericArguments()[typeParam.GenericParameterPosition].Equals(typeInst);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (2)
45type = methodInfo.DeclaringType; 116type = ctorInfo.DeclaringType;
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (1)
44type = propertyInfo.DeclaringType;
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (6)
175.Where(member => member.DeclaringType == type && member.Name == name).GetEnumerator(); 1179&& property.DeclaringType?.GetCustomAttribute<DefaultMemberAttribute>() 1347if (m.Name == methodName.Text && m.DeclaringType == t) 1727AggregateSymbol aggregate = ((AggregateType)GetCTypeFromType(baseMethodInfo.DeclaringType)).OwningAggregate; 1742CType t = GetCTypeFromType(baseMemberInfo.DeclaringType); 1828if (conversion.DeclaringType == type && conversion.IsSpecialName && !conversion.IsGenericMethod)
Microsoft.DotNet.Build.Tasks.Workloads (1)
EmbeddedTemplates.cs (1)
66string ns = MethodBase.GetCurrentMethod().DeclaringType.Namespace;
Microsoft.DotNet.HotReload.WebAssembly.Browser (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
295=> $"{method.DeclaringType!.FullName}.{method.Name}";
Microsoft.DotNet.Internal.DependencyInjection.Testing (1)
DependencyInjectionValidation.cs (1)
139msgBuilder.Append(ctor.DeclaringType.FullName);
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
1213Debug.Assert(specializedType.IsGenericType && specializedType.GetGenericTypeDefinition() == genericMethodDefinition.DeclaringType, "generic member definition doesn't match type.");
parent\parent\parent\eng\MSBuild\parent\parent\src\LegacySupport\NullabilityInfoContext\NullabilityInfoContext.cs (2)
59memberInfo = memberInfo.DeclaringType; 429Type? type = member.DeclaringType;
Microsoft.Extensions.AI.Abstractions.Tests (2)
Functions\DelegatingAIFunctionTests.cs (2)
51Assert.True(methodInfo.DeclaringType == typeof(DelegatingAIFunction), $"{methodInfo.Name} not overridden"); 55Assert.True(propertyInfo.DeclaringType == typeof(DelegatingAIFunction), $"{propertyInfo.Name} not overridden");
Microsoft.Extensions.DependencyInjection (3)
ServiceLookup\ConstructorCallSite.cs (3)
20if (!serviceType.IsAssignableFrom(constructorInfo.DeclaringType)) 22throw new ArgumentException(SR.Format(SR.ImplementationTypeCantBeConvertedToServiceType, constructorInfo.DeclaringType, serviceType)); 32public override Type? ImplementationType => ConstructorInfo.DeclaringType;
Microsoft.Extensions.DependencyInjection.Abstractions (3)
ActivatorUtilities.cs (3)
421Expression.Constant(constructor.DeclaringType, typeof(Type)), 448Type declaringType = constructor.DeclaringType!; 869throw new InvalidOperationException(SR.Format(SR.UnableToResolveService, _constructor.Parameters[index].ParameterType, _constructor.Info.DeclaringType));
Microsoft.Extensions.Diagnostics.Testing (7)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\BindingExtensions.g.cs (7)
204Type? temp12 = instance.DeclaringType; 312Type? temp33 = instance.DeclaringType; 394Type? temp49 = instance.DeclaringType; 450Type? temp58 = instance.DeclaringType; 569Type? temp76 = instance.DeclaringType; 654Type? temp88 = instance.DeclaringType; 1209Type? temp214 = instance.DeclaringType;
Microsoft.Extensions.DotNetDeltaApplier (1)
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
295=> $"{method.DeclaringType!.FullName}.{method.Name}";
Microsoft.Extensions.VectorData.Abstractions (14)
ProviderServices\CollectionModelBuilder.cs (2)
202$"Property '{clrProperty.DeclaringType?.Name}.{clrProperty.Name}' has multiple of {nameof(VectorStoreKeyAttribute)}, {nameof(VectorStoreDataAttribute)} or {nameof(VectorStoreVectorAttribute)}. Only one of these attributes can be specified on a property."); 226$"Property '{clrProperty.Name}' is present in the {nameof(VectorStoreCollectionDefinition)} as a {definitionKind} property, but the .NET property on type '{clrProperty.DeclaringType?.Name}' has an incompatible attribute.");
ProviderServices\Filter\FilterTranslatorBase.cs (12)
40when methodCall.Method.DeclaringType == typeof(Enumerable): 51DeclaringType: { IsGenericType: true } declaringType 67when methodCall.Method.DeclaringType == typeof(MemoryExtensions) 93Method: { Name: "op_Implicit", DeclaringType: { IsGenericType: true } implicitCastDeclaringType }, 99Method: { Name: "op_Implicit", DeclaringType: { IsGenericType: true } implicitCastDeclaringType }, 198Method: { Name: "get_Item", DeclaringType: var declaringType }, 357case ConstructorInfo constructor when constructor.DeclaringType == typeof(DateTimeOffset) || constructor.DeclaringType == typeof(DateTime) 359|| constructor.DeclaringType == typeof(DateOnly) || constructor.DeclaringType == typeof(TimeOnly) 387return Expression.Constant(evaluated, constructor.DeclaringType); 398return Expression.Constant(constantValue, constructor.DeclaringType);
Microsoft.Maui.Controls (1)
BindingExpression.cs (1)
141 if (part.LastGetter == null || !part.LastGetter.DeclaringType.GetTypeInfo().IsAssignableFrom(currentType))
Microsoft.Maui.Controls.Xaml (4)
ApplyPropertiesVisitor.cs (3)
723 if (method.IsPrivate && method.DeclaringType == rootElement.GetType()) 725 if ((method.IsAssembly || method.IsFamilyOrAssembly) && method.DeclaringType.AssemblyQualifiedName == rootElement.GetType().AssemblyQualifiedName) 727 if (method.IsFamily && method.DeclaringType.IsAssignableFrom(rootElement.GetType()))
CreateValuesVisitor.cs (1)
319 throw new XamlParseException($"The Property {propname} is required to create a {ctorInfo.DeclaringType.FullName} object.", enode as IXmlLineInfo);
Microsoft.ML.Core (15)
ComponentModel\ComponentCatalog.cs (3)
346Name = attribute.Name ?? string.Join(".", method.DeclaringType.Name, method.Name); 648if (prop.DeclaringType != loaderType) 665if (meth.DeclaringType != loaderType)
Utilities\FuncInstanceMethodInfo1`2.cs (2)
40Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 64Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`3.cs (2)
41Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 65Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo1`4.cs (2)
42Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo2`4.cs (2)
42Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`3.cs (2)
41Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 65Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Utilities\FuncInstanceMethodInfo3`4.cs (2)
42Contracts.CheckParam(GenericMethodDefinition.DeclaringType == typeof(TTarget), nameof(methodInfo), _targetTypeCheckMessage); 66Contracts.CheckParam(methodCallExpression.Method.DeclaringType == typeof(MethodInfo), nameof(expression), "Unexpected expression form");
Microsoft.ML.Core.Tests (1)
UnitTests\TestEntryPoints.cs (1)
342x.Method.DeclaringType,
Microsoft.ML.Tests (1)
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
205wrt.WriteLine("Unknown Exception: {0}!", del != null ? del.GetMethodInfo().DeclaringType : (object)"<null>");
Microsoft.ML.Transforms (2)
CustomMappingTransformer.cs (1)
62_contractAssembly = _mapAction.Method.DeclaringType.Assembly.FullName;
StatefulCustomMappingTransformer.cs (1)
60_contractAssembly = _mapAction.Method.DeclaringType.Assembly.FullName;
Microsoft.TestPlatform.AdapterUtilities (2)
ManagedNameUtilities\ManagedNameHelper.Reflection.cs (2)
229var assembly = method.DeclaringType?.Assembly; 334> 1 => methods.SingleOrDefault(i => i.DeclaringType == type),
Microsoft.VisualBasic.Core (48)
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (1)
792IsGeneric(current.DeclaringType)) AndAlso
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (5)
42If mi(i).DeclaringType.IsSubclassOf(Selected.DeclaringType) Then 1142ThisMember.DeclaringType.IsSubclassOf(mi(j).DeclaringType) Then 1165If (Value Is Nothing) OrElse Member.DeclaringType.IsAssignableFrom(Value.GetType) Then
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (5)
655IsOrInheritsFrom(existing.DeclaringType, newCandidate.DeclaringType), 658If newCandidate.DeclaringType Is existing.DeclaringType Then 669Symbols.IsCollectionInterface(newCandidate.DeclaringType) AndAlso 745Dim currentScope As Type = members(index).DeclaringType 894Loop While index < members.Length AndAlso members(index).DeclaringType Is currentScope
Microsoft\VisualBasic\CompilerServices\Symbols.vb (6)
731Dim declaringType As System.Type = member.DeclaringType 757Dim leftType As Type = left.DeclaringType 758Dim rightType As Type = right.DeclaringType 1378Dim declaringType As System.Type = item.DeclaringType 1403Return _item.DeclaringType 1410Dim declaringType As System.Type = _item.DeclaringType
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
558If Not method.DeclaringType.IsInterface Then 664If Not prop.DeclaringType.IsInterface Then
Microsoft\VisualBasic\CompilerServices\Utils.vb (8)
182method1.DeclaringType.IsGenericallyEqual(method2.DeclaringType) AndAlso 203ctor1.DeclaringType.IsGenericallyEqual(ctor2.DeclaringType) Then 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 340Return member.DeclaringType.GetGenericArguments()(typeParam.GenericParameterPosition).Equals(typeInst)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (21)
225ThisMethod.DeclaringType.IsSubclassOf(match(j).DeclaringType) Then 243ThisMethod.DeclaringType.IsSubclassOf(match(j).DeclaringType) Then 1048(ThisMethod.DeclaringType.IsSubclassOf(match(j).DeclaringType) AndAlso 1581If match(i).DeclaringType.IsSubclassOf(BindToField.DeclaringType) Then 1707If ThisProperty.DeclaringType.IsSubclassOf(match(0).DeclaringType) Then 1714ElseIf match(0).DeclaringType.IsSubclassOf(ThisProperty.DeclaringType) Then 2089DeclaringType = ThisMember.DeclaringType 2096DeclaringType.IsSubclassOf(mi(j).DeclaringType) Then 2126DeclaringType = ThisMember.DeclaringType 2131DeclaringType.IsSubclassOf(mi(j).DeclaringType) Then 2171DeclaringType = ThisMember.DeclaringType 2176DeclaringType.IsSubclassOf(mi(j).DeclaringType) Then 2208DeclaringType = ThisMember.DeclaringType 2213DeclaringType.IsSubclassOf(mi(j).DeclaringType) Then 2266declaringType = member.DeclaringType
Mono.Cecil (6)
Mono.Cecil\Import.cs (6)
261 return NormalizeTypeFullName (method.DeclaringType) + "." + method.Name; 355 var declaring_type = ImportType (field.DeclaringType, context); 357 if (IsGenericInstance (field.DeclaringType)) 387 var declaring_type = ImportType (method.DeclaringType, context); 389 if (IsGenericInstance (method.DeclaringType)) 396 DeclaringType = ImportType (method.DeclaringType, context, ImportGenericKind.Definition),
PresentationBuildTasks (27)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (9)
1821CodeFieldReferenceExpression cfre = new CodeFieldReferenceExpression(new CodeTypeReferenceExpression(desc.MemberInfo.DeclaringType.FullName), desc.MemberInfo.Name); 1839CodeMethodInvokeExpression cmie = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression(desc.MemberInfo.DeclaringType.FullName), desc.MemberInfo.Name); 1856CodeObjectCreateExpression coce = new CodeObjectCreateExpression(desc.MemberInfo.DeclaringType.FullName); 1897FieldInfo fiEvent = miEvent.DeclaringType.GetField(eventName + EVENT, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); 1900ThrowCompilerException(nameof(SR.RoutedEventNotRegistered), miEvent.DeclaringType.FullName, eventName, eventHandler); 1903CodeTypeReferenceExpression ctreEvent = new CodeTypeReferenceExpression(miEvent.DeclaringType.FullName); 1911Type eventTarget = cc != null ? cc.ElementType : miEvent.DeclaringType; 1964if (mei.mi.DeclaringType.IsAssignableFrom(eventTarget)) 3159(memberInfo.DeclaringType.IsAssignableFrom(_ccRoot.ElementType) && (memberInfo is PropertyInfo)));
MS\Internal\MarkupCompiler\ParserExtension.cs (2)
162KnownTypes.Types[(int)KnownElements.Application].IsAssignableFrom(memberInfo.DeclaringType)) 569bool appEvent = KnownTypes.Types[(int)KnownElements.Application].IsAssignableFrom(xamlClrEventNode.EventMember.DeclaringType);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\MarkupExtensionParser.cs (1)
1677declaringType = mi.DeclaringType;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\StyleXamlParser.cs (2)
360dpInfo.DeclaringType, 553_setterOrTriggerValueNode.ValueDeclaringType = _setterOrTriggerPropertyInfo.DeclaringType;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (2)
409dpInfo.DeclaringType, 576_setterOrTriggerValueNode.ValueDeclaringType = _setterOrTriggerPropertyMemberInfo.DeclaringType;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (5)
1091XamlPropertyFullName declaringProp = new XamlPropertyFullName(mi.DeclaringType, propertyName); 1802declaringType = eventMember.DeclaringType; 1856declaringType = mi.DeclaringType; 3203methodInfo = methodInfo.DeclaringType.GetMethod( 3516null != methodInfo.DeclaringType.GetMethod($"Set{methodInfo.Name.Substring("Get".Length)}",
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (5)
1016if (fi.ReflectedType.Assembly == fi.DeclaringType.Assembly) 1073if (mi.ReflectedType.Assembly == mi.DeclaringType.Assembly) 2118validType = memInfo.DeclaringType; 2311if (memberInfo.DeclaringType != targetType) 2313targetType = memberInfo.DeclaringType;
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\TypeConverterHelper.cs (1)
88memberInfo = methodInfo.DeclaringType.GetMethod(
PresentationFramework (18)
MS\Internal\Data\PropertyPathWorker.cs (3)
691Type declaringType = (oldPI != null) ? oldPI.DeclaringType 862Type declaringType = (newPI != null) ? newPI.DeclaringType 1438Type type = pi.DeclaringType;
System\Windows\Markup\Baml2006\WpfKnownMemberInvoker.cs (1)
49Type declaringType = _member.UnderlyingMember.DeclaringType;
System\Windows\Markup\Baml2006\WpfMemberInvoker.cs (1)
69Type declaringType = _member.UnderlyingMember.DeclaringType;
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
105return method.DeclaringType != typeof(ResourceDictionary);
System\Windows\Markup\BamlRecordReader.cs (2)
1546ThrowExceptionWithLine(SR.Format(SR.ParserFailedToCreateFromConstructor, info.DeclaringType.Name), e); 5142return $"{pi.DeclaringType.Name}.{pi.Name}";
System\Windows\Markup\BamlWriter.cs (2)
1137if(mostDerived == null || mostDerived.DeclaringType.IsAssignableFrom(pi.DeclaringType))
System\Windows\Markup\MarkupExtensionParser.cs (1)
1677declaringType = mi.DeclaringType;
System\Windows\Markup\XamlTypeMapper.cs (6)
1124isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 1137isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 1150isPublic = mi != null && mi.IsPublic && ReflectionHelper.IsPublicType(mi.DeclaringType); 2118validType = memInfo.DeclaringType; 2311if (memberInfo.DeclaringType != targetType) 2313targetType = memberInfo.DeclaringType;
System\Windows\PropertyPathConverter.cs (1)
209type = pi.DeclaringType;
ReachFramework (1)
Serialization\Manager\ReachSerializationCacheItems.cs (1)
240DependencyProperty.FromName(propertyInfo.Name, propertyInfo.DeclaringType);
Roslyn.Diagnostics.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105key => key.type.GetRuntimeMethods().FirstOrDefault(method => method.Name == key.name)?.DeclaringType);
System.ComponentModel.Composition (11)
Microsoft\Internal\ReflectionServices.cs (8)
23Debug.Assert(member.DeclaringType != null); 24return member.DeclaringType.Assembly; 29return constructor.DeclaringType!.IsVisible && constructor.IsPublic; 34Debug.Assert(field.DeclaringType != null); 35return field.DeclaringType.IsVisible && field.IsPublic; 40Debug.Assert(method.DeclaringType != null); 41if (!method.DeclaringType.IsVisible) 79return GetDisplayName(member.DeclaringType!, member.Name);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
295if (pi.DeclaringType == CompositionServices.ExportAttributeType || pi.DeclaringType == CompositionServices.AttributeType)
System\ComponentModel\Composition\ReflectionModel\ReflectionMember.cs (1)
18get { return UnderlyingMember.DeclaringType!; }
System.ComponentModel.Composition.Registration (5)
System\ComponentModel\Composition\Registration\PartBuilder.cs (1)
424PropertyInfo declaredPi = pi.DeclaringType.UnderlyingSystemType.GetProperty(pi.Name, pi.PropertyType);
System\ComponentModel\Composition\Registration\RegistrationBuilder.cs (4)
228if (!_memberInfos.TryGetValue(member.DeclaringType.UnderlyingSystemType, out cachedAttributes)) 241GetCustomAttributes(member.DeclaringType, s_emptyList); 264if (!_memberInfos.TryGetValue(parameter.Member.DeclaringType, out cachedAttributes)) 276GetCustomAttributes(parameter.Member.DeclaringType, s_emptyList);
System.ComponentModel.TypeConverter (3)
System\ComponentModel\ReflectTypeDescriptionProvider.cs (3)
1183if ((!(eventInfo.DeclaringType!.IsPublic || eventInfo.DeclaringType.IsNestedPublic)) && (eventInfo.DeclaringType.Assembly == typeof(ReflectTypeDescriptionProvider).Assembly))
System.Composition.Convention (5)
System\Composition\Convention\ConventionBuilder.cs (2)
224if (!(member is TypeInfo) && member.DeclaringType != reflectedType) 245&& !_memberInfos.TryGetValue(member.DeclaringType.GetTypeInfo() as MemberInfo, out cachedAttributes))
System\Composition\Convention\PartConventionBuilder.cs (3)
619MethodInfo underlyingMi = mi.DeclaringType.GetRuntimeMethod(mi.Name, _emptyTypeArray); 678underlyingPi ??= pi.DeclaringType.GetRuntimeProperty(pi.Name); 715underlyingPi ??= pi.DeclaringType.GetRuntimeProperty(pi.Name);
System.Composition.TypedParts (7)
System\Composition\CompositionContextExtensions.cs (1)
57if (ContractHelpers.TryGetExplicitImportInfo(pi.PropertyType, conventions.GetDeclaredAttributes(pi.DeclaringType, pi), site, out importInfo))
System\Composition\TypedParts\ActivationFeatures\OnImportsSatisfiedFeature.cs (1)
39.Where(mi => _attributeContext.GetDeclaredAttribute<OnImportsSatisfiedAttribute>(mi.DeclaringType, mi) != null);
System\Composition\TypedParts\ActivationFeatures\PropertyInjectionFeature.cs (1)
32let attrs = _attributeContext.GetDeclaredAttributes(pi.DeclaringType, pi).ToArray()
System\Composition\TypedParts\ContractHelpers.cs (1)
73.Where(p => p.GetMethod.IsPublic && p.DeclaringType == attrType && p.CanRead))
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (1)
29Expression.Convert(Expression.Call(Expression.Constant(partActivator), s_activatorInvoke, args), _property.DeclaringType),
System\Composition\TypedParts\Discovery\TypeInspector.cs (1)
158.Where(p => p.DeclaringType == attrType && p.CanRead))
System\Composition\TypedParts\Util\DirectAttributeContext.cs (1)
17if (!(member is TypeInfo) && member.DeclaringType != reflectedType)
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationProperty.cs (1)
107validatorAttribute.SetDeclaringType(info.DeclaringType);
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesFilterAndTransform.cs (2)
813if (!RuntimeFeature.IsDynamicCodeSupported && (propertyInfo.DeclaringType!.IsValueType || propertyInfo.PropertyType.IsValueType)) 821propertyInfo.DeclaringType!, propertyInfo.PropertyType);
System.Linq.Expressions (53)
System\Dynamic\DynamicObject.cs (1)
820if (mi.DeclaringType != typeof(DynamicObject) && mi.GetBaseDefinition() == method)
System\Dynamic\Utils\TypeExtensions.cs (1)
65public static Type GetReturnType(this MethodBase mi) => mi.IsConstructor ? mi.DeclaringType! : ((MethodInfo)mi).ReturnType;
System\Dynamic\Utils\TypeUtils.cs (1)
236Type? targetType = member.DeclaringType;
System\Linq\Expressions\BinaryExpression.cs (2)
400MethodInfo? opTrueFalse = TypeUtils.GetBooleanOperator(Method!.DeclaringType!, opName); 827Type? declaringType = method.DeclaringType;
System\Linq\Expressions\Compiler\ILGen.cs (3)
292Debug.Assert(!ci.DeclaringType!.ContainsGenericParameters); 441Type? dt = mb.DeclaringType; 478Type? dt = mb.DeclaringType;
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (6)
492if (mi.DeclaringType!.IsValueType) 626if (node.Constructor.DeclaringType!.IsAbstract) 980EmitMemberAddress(binding.Member, binding.Member.DeclaringType); 984EmitMemberGet(binding.Member, binding.Member.DeclaringType); 998EmitMemberAddress(binding.Member, binding.Member.DeclaringType); 1002EmitMemberGet(binding.Member, binding.Member.DeclaringType);
System\Linq\Expressions\Compiler\LambdaCompiler.Logical.cs (2)
281MethodInfo? opFalse = TypeUtils.GetBooleanOperator(b.Method!.DeclaringType!, "op_False"); 394MethodInfo? opTrue = TypeUtils.GetBooleanOperator(b.Method!.DeclaringType!, "op_True");
System\Linq\Expressions\DebugViewWriter.cs (3)
535Out(member.DeclaringType!.ToString() + "." + member.Name); 772else if (node.Method.DeclaringType != null) 774Out(node.Method.DeclaringType.ToString());
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
401Out(member.DeclaringType!.Name); 758Out(node.Indexer.DeclaringType!.Name); 784if (toString.DeclaringType != typeof(Expression) && !toString.IsStatic)
System\Linq\Expressions\Interpreter\CallInstruction.cs (6)
46if (info.DeclaringType != null && info.DeclaringType.IsArray && (info.Name == "Get" || info.Name == "Set")) 54if (!info.IsStatic && info.DeclaringType!.IsValueType) 121Type arrayType = info.DeclaringType!; 180return target.DeclaringType; 213if (!info.IsStatic) types.Add(info.DeclaringType!);
System\Linq\Expressions\Interpreter\InterpretedFrame.cs (1)
130return method.DeclaringType == typeof(Interpreter) && method.Name == "Run";
System\Linq\Expressions\Interpreter\LightCompiler.cs (2)
1359MethodInfo? opTrue = TypeUtils.GetBooleanOperator(expr.Method!.DeclaringType!, andAlso ? "op_False" : "op_True"); 2408if (node.Constructor.DeclaringType!.IsAbstract)
System\Linq\Expressions\Interpreter\NewInstruction.cs (1)
67public override string ToString() => "New " + _constructor.DeclaringType!.Name + "(" + _constructor + ")";
System\Linq\Expressions\MemberAssignment.cs (1)
89Type? decType = member.DeclaringType;
System\Linq\Expressions\MemberExpression.cs (5)
139if (!TypeUtils.AreReferenceAssignable(field.DeclaringType!, expression.Type)) 141throw Error.FieldInfoNotDefinedForType(field.DeclaringType, field.Name, expression.Type); 310Type? type = mi.DeclaringType; 329throw Error.MethodNotPropertyAccessor(mi.DeclaringType, mi.Name, paramName, index); 343Type type = method.DeclaringType!;
System\Linq\Expressions\MemberMemberBinding.cs (2)
125Type? decType = member.DeclaringType; 160if (!b.Member.DeclaringType!.IsAssignableFrom(type))
System\Linq\Expressions\MethodCallExpression.cs (1)
1265throw Error.InstanceAndMethodTypeMismatch(method, method.DeclaringType, instanceType);
System\Linq\Expressions\NewExpression.cs (11)
33public override Type Type => Constructor!.DeclaringType!; 139ArgumentNullException.ThrowIfNull(constructor.DeclaringType, nameof(constructor)); 140if (constructor.DeclaringType is null) 143throw new ArgumentNullException($"{nameof(constructor)}.{nameof(constructor.DeclaringType)}"); 146TypeUtils.ValidateType(constructor.DeclaringType!, nameof(constructor), allowByRef: true, allowPointer: true); 165if (constructor.DeclaringType is null) 168throw new ArgumentNullException($"{nameof(constructor)}.{nameof(constructor.DeclaringType)}"); 171TypeUtils.ValidateType(constructor.DeclaringType!, nameof(constructor), allowByRef: true, allowPointer: true); 241if (!TypeUtils.AreEquivalent(member.DeclaringType, constructor.DeclaringType)) 243throw Error.ArgumentMemberNotDeclOnType(member.Name, constructor.DeclaringType!.Name, nameof(members), i);
System\Runtime\CompilerServices\CallSiteHelpers.cs (1)
38if (mb.DeclaringType == typeof(UpdateDelegates))
System.Linq.Queryable (3)
System\Linq\EnumerableRewriter.cs (3)
39if ((mInfo.IsStatic || mInfo.DeclaringType!.IsAssignableFrom(obj!.Type)) 45else if (mInfo.DeclaringType == typeof(Queryable)) 55MethodInfo method = FindMethod(mInfo.DeclaringType!, mInfo.Name, args, typeArgs);
System.Private.CoreLib (39)
Internal\Reflection\Augments\ReflectionAugments.cs (3)
124if (methodBase.DeclaringType.IsConstructedGenericType) // For compat with desktop, insist that the caller pass us the declaring type to resolve members of generic types. 125throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGeneric, methodBase, methodBase.DeclaringType.GetGenericTypeDefinition())); 168if (fieldInfo.DeclaringType.IsConstructedGenericType) // For compat with desktop, insist that the caller pass us the declaring type to resolve members of generic types.
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (7)
1032int hierarchyDepth1 = GetHierarchyDepth(m1.DeclaringType!); 1033int hierarchyDepth2 = GetHierarchyDepth(m2.DeclaringType!); 1059int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType!); 1060int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType!); 1082int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType!); 1083int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType!); 1140int currentHierarchyDepth = GetHierarchyDepth(match[i].DeclaringType!);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (1)
628Assembly? caller = stack.GetFrame(i)!.GetMethod()?.DeclaringType?.Assembly;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (4)
394Type? declaringType = mb.DeclaringType; 438Debug.Assert(method.DeclaringType != null); 440declaringType = method.DeclaringType; 484declaringType = candidateMethod.DeclaringType!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (3)
181if (property.DeclaringType!.IsValueType) 216var helper = (TypeHelper)Activator.CreateInstance(typeof(ReferenceTypeHelper<>).MakeGenericType(property.DeclaringType!))!; 228return property.GetMethod!.CreateDelegate(typeof(Func<,>).MakeGenericType(property.DeclaringType!, propertyType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeData.cs (2)
52vsb.Append(Constructor.DeclaringType!.FullName); 82public virtual Type AttributeType => Constructor.DeclaringType!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
45public override Type? DeclaringType => _method.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodOnTypeBuilderInstantiation.cs (1)
43Type t = info.DeclaringType!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (7)
353if (method.DeclaringType == null || !method.DeclaringType.IsGenericTypeDefinition) 358if (type.GetGenericTypeDefinition() != method.DeclaringType) 388if (!constructor.DeclaringType!.IsGenericTypeDefinition) 393if (type.GetGenericTypeDefinition() != constructor.DeclaringType) 421if (!field.DeclaringType!.IsGenericTypeDefinition) 426if (type.GetGenericTypeDefinition() != field.DeclaringType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
54memberInfo = memberInfo.DeclaringType; 431Type? type = member.DeclaringType;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
517string? typeName = _timerCallback.Method.DeclaringType?.FullName;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (1)
691Type? declaringType = memberInfo.DeclaringType;
System\Delegate.cs (1)
284Type? declaringType = mi.DeclaringType;
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (2)
116if (match.DeclaringType.Equals(challenger.DeclaringType) ||
System\Reflection\Runtime\BindingFlagSupport\Shared.cs (1)
159Type type = member.DeclaringType!;
System\Reflection\Runtime\MethodInfos\CustomMethodMapper.cs (1)
19Type declaringType = methodBase.DeclaringType!;
System\Reflection\Runtime\MethodInfos\RuntimeMethodHelpers.cs (1)
33TypeContext typeContext = contextMethod.DeclaringType.ToRuntimeTypeInfo().TypeContext;
System.Private.DataContractSerialization (44)
System\Runtime\Serialization\AccessorBuilder.cs (6)
46Type declaringType = propInfo.DeclaringType!; 91throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name)); 103Type declaringType = propInfo.DeclaringType!; 129var createSetterGeneric = s_createSetterInternal.MakeGenericMethod(propInfo.DeclaringType!, propInfo.PropertyType).CreateDelegate<Func<PropertyInfo, Setter>>(); 143throw new InvalidOperationException(SR.Format(SR.NoSetMethodForProperty, propInfo.DeclaringType, propInfo.Name)); 155throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name));
System\Runtime\Serialization\ClassDataContract.cs (25)
260Type declaringType = memberContract.MemberInfo.DeclaringType!; 828ThrowInvalidDataContractException(SR.Format(SR.TooManyDataMembers, DataContract.GetClrTypeFullName(member.DeclaringType!), member.Name)); 841ThrowInvalidDataContractException(SR.Format(SR.NoGetMethodForProperty, property.DeclaringType, property.Name)); 846_serializationExceptionMessage = SR.Format(SR.NoSetMethodForProperty, property.DeclaringType, property.Name); 850ThrowInvalidDataContractException(SR.Format(SR.IndexedPropertyCannotBeSerialized, property.DeclaringType, property.Name)); 872DataContract.GetClrTypeFullName(member.DeclaringType!), 891ThrowInvalidDataContractException(SR.Format(SR.TooManyIgnoreDataMemberAttributes, DataContract.GetClrTypeFullName(member.DeclaringType!), member.Name)); 942DataContract.GetClrTypeFullName(member.DeclaringType!), 1107Debug.Assert(method.DeclaringType != null); 1110ThrowInvalidDataContractException(SR.Format(SR.DuplicateExtensionDataSetMethod, method, _extensionDataSetMethod, DataContract.GetClrTypeFullName(method.DeclaringType))); 1112DataContract.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetMustReturnVoid, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1114DataContract.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfExtensionDataObject), method.DeclaringType); 1124Debug.Assert(method.DeclaringType != null); 1127DataContract.ThrowInvalidDataContractException(SR.Format(SR.DuplicateCallback, method, currentCallback, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1129DataContract.ThrowInvalidDataContractException(SR.Format(SR.DuplicateAttribute, prevAttributeType, attributeType, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1131DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbacksCannotBeVirtualMethods, method, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1135DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbackMustReturnVoid, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1137DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbackParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfStreamingContext), method.DeclaringType);
System\Runtime\Serialization\CodeGenerator.cs (5)
493if (methodInfo.IsVirtual && !methodInfo.DeclaringType!.IsValueType) 590throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoGetMethodForProperty, property.DeclaringType, property)); 599throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotLoadMemberType, "Unknown", memberInfo.DeclaringType, memberInfo.Name)); 621throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoSetMethodForProperty, property.DeclaringType, property)); 1108ConvertAddress(GetVariableType(thisObj), methodInfo.DeclaringType!);
System\Runtime\Serialization\DataContract.cs (1)
2232if (!IsTypeVisibleInSerializationModule(member.DeclaringType!))
System\Runtime\Serialization\DataContractSet.cs (3)
283(dataMember.MemberInfo.DeclaringType != null) ? DataContract.GetClrTypeFullName(dataMember.MemberInfo.DeclaringType) : dataMember.MemberInfo.DeclaringType,
System\Runtime\Serialization\EnumDataContract.cs (2)
233ThrowInvalidDataContractException(SR.Format(SR.TooManyEnumMembers, DataContract.GetClrTypeFullName(field.DeclaringType!), field.Name)); 252ThrowInvalidDataContractException(SR.Format(SR.DataMemberOnEnumField, DataContract.GetClrTypeFullName(field.DeclaringType!), field.Name));
System\Runtime\Serialization\XPathQueryGenerator.cs (2)
77if (member.MemberInfo.Name == memberNode.Name && member.MemberInfo.DeclaringType!.IsAssignableFrom(memberNode.DeclaringType))
System.Private.Reflection.Execution (4)
Internal\Reflection\Execution\ExecutionEnvironmentImplementation.Runtime.cs (1)
107Type declaringType = methodBase.DeclaringType;
Internal\Reflection\Execution\MethodInvokers\InstanceMethodInvoker.cs (1)
129if (methodInfo.DeclaringType.IsValueType && !methodInfo.IsStatic)
Internal\Reflection\Execution\PayForPlayExperience\MissingMetadataExceptionCreator.cs (1)
20StringBuilder friendlyName = new StringBuilder(memberInfo.DeclaringType.ToString());
Internal\Reflection\Execution\TypeLoader\ConstraintValidator.cs (1)
108Type[] typeArguments = reflectionMethodInfo.DeclaringType.GetGenericArguments();
System.Private.Xml (27)
System\Xml\Serialization\CodeGenerator.cs (3)
308Debug.Assert(ICollection_get_Count.IsVirtual && !ICollection_get_Count.DeclaringType!.IsValueType); 403if (methodInfo.IsVirtual && !methodInfo.DeclaringType!.IsValueType) 500Type? currentType = propertyInfo.DeclaringType!.BaseType;
System\Xml\Serialization\Mappings.cs (5)
1019Type? baseDeclaringType = baseMember.DeclaringType; 1020Type? derivedDeclaringType = derivedMember.DeclaringType; 1280throw new InvalidOperationException(SR.Format(SR.XmlSerializableRootDupName, _getSchemaMethod!.DeclaringType!.FullName, e.Name, elementNs)); 1366throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaInclude, _xsiType.Namespace, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name)); 1376throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaTypeMissing, _getSchemaMethod.DeclaringType!.FullName, _getSchemaMethod.Name, _xsiType.Name, _xsiType.Namespace));
System\Xml\Serialization\Models.cs (6)
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception); 220if (fieldInfo.DeclaringType != Type) return null; 233if (propertyInfo.DeclaringType != Type) return null; 300_checkShouldPersistMethodInfo = memberInfo.DeclaringType!.GetMethod($"ShouldSerialize{memberInfo.Name}", Type.EmptyTypes); 303FieldInfo? specifiedField = memberInfo.DeclaringType.GetField($"{memberInfo.Name}Specified"); 315PropertyInfo? specifiedProperty = memberInfo.DeclaringType.GetProperty($"{memberInfo.Name}Specified");
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
1770member.Source = (value) => throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName)); 1789throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, pi.Name, pi.DeclaringType!.FullName));
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (1)
1613if (declaringType == mi.DeclaringType)
System\Xml\Serialization\SoapReflectionImporter.cs (1)
151SoapAttributes? attrs = _attributeOverrides[memberInfo.DeclaringType!, memberInfo.Name];
System\Xml\Serialization\Types.cs (5)
878arrayElementType = GetCollectionElementType(type, memberInfo == null ? null : $"{memberInfo.DeclaringType!.FullName}.{memberInfo.Name}"); 948exception = new NotSupportedException(SR.Format(SR.XmlUnsupportedInterfaceDetails, $"{memberInfo.DeclaringType!.FullName}.{memberInfo.Name}", type.FullName)); 1145throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1252Type typeToBeReplaced = memberInfoToBeReplaced.DeclaringType!; 1418if (defaultProp.DeclaringType != t) continue;
System\Xml\Serialization\XmlReflectionImporter.cs (1)
261XmlAttributes? attrs = _attributeOverrides[memberInfo.DeclaringType!, memberInfo.Name];
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (3)
1385Type typAgg = methAgg.DeclaringType!; 3633_helper.CallGetEarlyBoundObject(_helper.StaticData.DeclareEarlyBound(ndName.NamespaceUri, extFunc.Method.DeclaringType!), extFunc.Method.DeclaringType!);
System.Reflection.Context (15)
System\Reflection\Context\Custom\CustomType.cs (1)
270Type? declaringType = match.DeclaringType;
System\Reflection\Context\Delegation\DelegatingConstructorInfo.cs (1)
36get { return UnderlyingConstructor.DeclaringType; }
System\Reflection\Context\Delegation\DelegatingEventInfo.cs (1)
25get { return UnderlyingEvent.DeclaringType; }
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
26get { return UnderlyingField.DeclaringType; }
System\Reflection\Context\Delegation\DelegatingMethodInfo.cs (1)
38get { return UnderlyingMethod.DeclaringType; }
System\Reflection\Context\Delegation\DelegatingPropertyInfo.cs (1)
36get { return UnderlyingProperty.DeclaringType; }
System\Reflection\Context\Virtual\InheritedMethodInfo.cs (2)
19Debug.Assert(reflectedType.IsSubclassOf(baseMethod.DeclaringType!)); 23Debug.Assert(baseMethod.ReflectedType!.Equals(baseMethod.DeclaringType));
System\Reflection\Context\Virtual\InheritedPropertyInfo.cs (2)
19Debug.Assert(reflectedType.IsSubclassOf(baseProperty.DeclaringType!)); 23Debug.Assert(baseProperty.ReflectedType!.Equals(baseProperty.DeclaringType));
System\Reflection\Context\Virtual\VirtualMethodBase.cs (5)
48get { return DeclaringType!.Module; } 53get { return DeclaringType; } 123DeclaringType!.Equals(other.DeclaringType) && 130DeclaringType!.GetHashCode() ^
System.Reflection.Emit (15)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilderInstantiation.cs (1)
45public override Type? DeclaringType => _method.DeclaringType;
System\Reflection\Emit\CustomAttributeWrapper.cs (3)
44throw new ArgumentException(SR.Format(SR.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute)); 48throw new ArgumentException(SR.Format(SR.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute)); 88throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute));
System\Reflection\Emit\LocalBuilderImpl.cs (1)
34if (_method.DeclaringType is TypeBuilder typeBuilder && typeBuilder.IsCreated())
System\Reflection\Emit\ModuleBuilderImpl.cs (5)
740Type declaringType = field.DeclaringType!; 754memberHandle = AddMemberReference(ctor.Name, GetTypeHandle(memberInfo.DeclaringType!), MetadataSignatureHelper.GetConstructorSignature(ctor.GetParameters(), this)); 768memberHandle = AddMemberReference(method.Name, GetTypeHandle(memberInfo.DeclaringType!), GetMethodSignature(method, null)); 825Type declaringType = memberInfo.DeclaringType!; 1085if (IsConstructedFromTypeBuilder(member.DeclaringType!))
System\Reflection\Emit\TypeBuilderImpl.cs (5)
305if (!ReferenceEquals(methodInfoBody.DeclaringType, this)) 310Type baseType = methodInfoDeclaration.DeclaringType!; 541throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute)); 860if (match != null && ReferenceEquals(fieldInfo.DeclaringType, match.DeclaringType)) 1067throw new AmbiguousMatchException(SR.Format(SR.AmbiguousMatch_MemberInfo, firstCandidate.DeclaringType, firstCandidate.Name));
System.Reflection.MetadataLoadContext (11)
System\Reflection\DefaultBinder.cs (5)
514int hierarchyDepth1 = GetHierarchyDepth(m1.DeclaringType!); 515int hierarchyDepth2 = GetHierarchyDepth(m2.DeclaringType!); 541int hierarchyDepth1 = GetHierarchyDepth(cur1.DeclaringType!); 542int hierarchyDepth2 = GetHierarchyDepth(cur2.DeclaringType!); 599int currentHierarchyDepth = GetHierarchyDepth(match[i].DeclaringType!);
System\Reflection\Runtime\BindingFlagSupport\QueryResult.cs (2)
114if (match.DeclaringType!.Equals(challenger.DeclaringType))
System\Reflection\TypeLoading\CustomAttributes\CustomAttributeHelpers.cs (1)
110Type attributeType = ci.DeclaringType!;
System\Reflection\TypeLoading\CustomAttributes\RoPseudoCustomAttributeData.cs (1)
38protected sealed override Type? ComputeAttributeType() => _constructor.DeclaringType;
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.DllImport.cs (1)
36Type attributeType = ctor.DeclaringType!;
System\ThrowHelper.cs (1)
21Type? declaringType = memberInfo.DeclaringType;
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordFieldInfoDeserializer.cs (1)
65throw new SerializationException(SR.Format(SR.Serialization_MissingField, field.Name, field.DeclaringType!.Name));
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\ComAwareEventInfo.cs (2)
74public override Type? DeclaringType => _innerEventInfo.DeclaringType; 103object[] comEventInterfaces = eventInfo.DeclaringType!.GetCustomAttributes(typeof(ComEventInterfaceAttribute), inherit: false);
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationFieldInfo.cs (1)
35public override Type? DeclaringType => m_field.DeclaringType;
System.Security.Cryptography (1)
System\Security\Cryptography\CryptoConfig.cs (1)
477if (rci == null || typeof(Delegate).IsAssignableFrom(rci.DeclaringType))
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (1)
326validationMethod.DeclaringType!.FullName,
System.ServiceModel.Primitives (45)
System\ServiceModel\Channels\ServiceChannelProxy.cs (2)
64Type declaringType = method.DeclaringType; 343if (methodData.MethodBase.DeclaringType == typeof(ICommunicationObject)
System\ServiceModel\Description\ServiceReflector.cs (9)
531attrType.Name, method.Name, method.DeclaringType.Name), e)); 540attrType.Name, param.Name, method.Name, method.DeclaringType.Name), e)); 704methodInfo.Name, methodInfo.DeclaringType.Name))); 713methodInfo.Name, methodInfo.DeclaringType.Name))); 827MethodInfo[] endMethods = beginMethod.DeclaringType.GetTypeInfo().GetDeclaredMethods(endMethodName).ToArray(); 830throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.NoEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 834throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.MoreThanOneEndMethodFoundForAsyncBeginMethod3, beginMethod.Name, beginMethod.DeclaringType.FullName, endMethodName))); 845throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidAsyncEndMethodSignatureForMethod2, endMethod.Name, endMethod.DeclaringType.FullName))); 878throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.InvalidAsyncBeginMethodSignatureForMethod2, method.Name, method.DeclaringType.FullName)));
System\ServiceModel\Description\TypeLoader.cs (29)
373type = providerAsMethod.DeclaringType; 481opDesc.SyncMethod.DeclaringType, 492opDesc.SyncMethod.DeclaringType, 502opDesc.TaskMethod.DeclaringType, 520if (methodInfo.DeclaringType == type) 991throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.OneWayAndFaultsIncompatible2, methodInfo.DeclaringType.FullName, operationName.EncodedName))); 1217throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SFxMultipleUnknownHeaders, methodInfo, methodInfo.DeclaringType))); 1653_syncOperation.SyncMethod.DeclaringType, 1669_syncOperation.SyncMethod.DeclaringType, 1686_syncOperation.SyncMethod.DeclaringType, 1701_syncOperation.SyncMethod.DeclaringType, 1715_syncOperation.SyncMethod.DeclaringType, 1730_syncOperation.SyncMethod.DeclaringType, 1745_syncOperation.SyncMethod.DeclaringType, 1762_syncOperation.SyncMethod.DeclaringType, 1794_syncOperation.SyncMethod.DeclaringType, 1809_syncOperation.SyncMethod.DeclaringType, 1823_syncOperation.SyncMethod.DeclaringType, 1836_syncOperation.SyncMethod.DeclaringType, 1850_syncOperation.SyncMethod.DeclaringType, 1864_syncOperation.SyncMethod.DeclaringType, 1880_syncOperation.SyncMethod.DeclaringType, 1911_taskOperation.TaskMethod.DeclaringType, 1927_taskOperation.TaskMethod.DeclaringType, 1942_taskOperation.TaskMethod.DeclaringType, 1956_taskOperation.TaskMethod.DeclaringType, 1971_taskOperation.TaskMethod.DeclaringType, 1986_taskOperation.TaskMethod.DeclaringType, 2003_taskOperation.TaskMethod.DeclaringType,
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
307_keyBase = methodInfo.DeclaringType.FullName + ":" + methodInfo.ToString();
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (1)
174methodBase.DeclaringType.Name)));
System\ServiceModel\Dispatcher\InvokerUtil.cs (1)
149var castTargetParam = Expression.Convert(targetParam, method.DeclaringType);
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (1)
138ServiceModelActivity.Start(activity, SRP.Format(SRP.ActivityExecuteMethod, Method.DeclaringType.FullName, Method.Name), ActivityType.ExecuteUserCode);
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
201SRP.Format(SRP.ActivityExecuteMethod, Method.DeclaringType.FullName, Method.Name),
System.Text.Json (20)
System\Text\Json\Serialization\Converters\FSharp\FSharpUnionConverter.cs (3)
600ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(propertyInfo.DeclaringType!, propertyInfo, fieldType); 608ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid(propertyInfo.DeclaringType!, propertyInfo); 616ThrowHelper.ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible(propertyInfo.DeclaringType!, propertyInfo, fieldType);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
191Type declaringType = memberInfo?.DeclaringType ?? typeToConvert;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (4)
688ThrowHelper.ThrowInvalidOperationException_CannotSerializeInvalidType(typeToConvert, memberInfo.DeclaringType, memberInfo); 703JsonPropertyInfo jsonPropertyInfo = typeInfo.CreatePropertyUsingReflection(typeToConvert, declaringType: memberInfo.DeclaringType); 767Debug.Assert(typeInfo.Converter.ConstructorInfo.DeclaringType != null); 768ThrowHelper.ThrowNotSupportedException_ConstructorContainsNullParameterNames(typeInfo.Converter.ConstructorInfo.DeclaringType);
System\Text\Json\Serialization\Metadata\ReflectionEmitMemberAccessor.cs (8)
76Type? type = constructor.DeclaringType; 186Type? type = constructor.DeclaringType; 246Type? type = constructor.DeclaringType; 420Type? declaringType = propertyInfo.DeclaringType; 463Type? propertyDeclaringType = propertyInfo.DeclaringType; 517Type? declaringType = propertyInfo.DeclaringType; 552Type? declaringType = fieldInfo.DeclaringType; 586Type? declaringType = fieldInfo.DeclaringType;
System\Text\Json\Serialization\Metadata\ReflectionMemberAccessor.cs (3)
50Debug.Assert(constructor.DeclaringType == type && !constructor.IsStatic); 80Debug.Assert(constructor.DeclaringType == type && !constructor.IsStatic); 140Debug.Assert(constructor.DeclaringType == type && !constructor.IsStatic);
System\Text\Json\ThrowHelper.Serialization.cs (1)
590string location = memberInfo is Type type ? type.ToString() : $"{memberInfo.DeclaringType}.{memberInfo.Name}";
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (1)
1994Type expressionType = descriptor.MemberInfo!.DeclaringType!;
System.Xaml (30)
System\Xaml\MS\Impl\XmlNsInfo.cs (5)
168if (LooseTypeExtensions.AssemblyQualifiedNameEquals(cad.Constructor.DeclaringType, typeof(XmlnsDefinitionAttribute))) 259if (LooseTypeExtensions.AssemblyQualifiedNameEquals(cad.Constructor.DeclaringType, typeof(InternalsVisibleToAttribute))) 318if (LooseTypeExtensions.AssemblyQualifiedNameEquals(cad.Constructor.DeclaringType, typeof(XmlnsCompatibleWithAttribute))) 371if (LooseTypeExtensions.AssemblyQualifiedNameEquals(cad.Constructor.DeclaringType, typeof(XmlnsPrefixAttribute))) 421if (LooseTypeExtensions.AssemblyQualifiedNameEquals(cad.Constructor.DeclaringType, typeof(RootNamespaceAttribute)))
System\Xaml\Runtime\DynamicMethodRuntime.cs (3)
329DynamicMethod dynamicMethod = CreateDynamicMethod($"{ctor.DeclaringType.Name}Ctor", 474Type declaringType = instanceMethod.DeclaringType; 503OpCode callType = (method.IsStatic || method.DeclaringType.IsValueType) ? OpCodes.Call : OpCodes.Callvirt;
System\Xaml\Schema\MemberReflector.cs (6)
232if (TypeReflector.IsInternal(method.DeclaringType)) 239method.DeclaringType.Assembly, accessingAssembly); 256if (!derivedType.Equals(method.DeclaringType) && !derivedType.IsSubclassOf(method.DeclaringType)) 268if (TypeReflector.IsInternal(method.DeclaringType)) 275method.DeclaringType.Assembly, derivedType.Assembly);
System\Xaml\Schema\Reflector.cs (3)
521if (TypesAreEqual(_attributeData[i].Constructor.DeclaringType, attributeType)) 535if (TypesAreEqual(_attributeData[i].Constructor.DeclaringType, attributeType)) 545cad.Constructor.DeclaringType, Member, expectedCount, expectedType));
System\Xaml\Schema\TypeReflector.cs (6)
514if (shadowedProp.DeclaringType.IsAssignableFrom(currentProp.DeclaringType)) 568if (shadowedEvent.DeclaringType.IsAssignableFrom(currentEvent.DeclaringType)) 611if (mostDerived is null || mostDerived.DeclaringType.IsAssignableFrom(pi.DeclaringType))
System\Xaml\Schema\XamlMemberInvoker.cs (1)
113Type declaringType = _member.UnderlyingMember.DeclaringType;
System\Xaml\XamlMember.cs (4)
57_declaringType = schemaContext.GetXamlType(propertyInfo.DeclaringType); 80_declaringType = schemaContext.GetXamlType(eventInfo.DeclaringType); 115_declaringType = schemaContext.GetXamlType(accessor.DeclaringType); 142_declaringType = schemaContext.GetXamlType(adder.DeclaringType);
System\Xaml\XamlObjectReader.cs (2)
1242var declaringType = memberInfo.DeclaringType; 3245Type baseDeclaringType = accessor.GetBaseDefinition().DeclaringType;
testhost (2)
src\vstest\src\testhost.x86\TestHostTraceListener.cs (2)
56var declaringType = m?.DeclaringType; 70var methodName = method != null ? $"{method.DeclaringType?.Name}.{method.Name}" : "<method>";
testhost.arm64 (2)
src\vstest\src\testhost.x86\TestHostTraceListener.cs (2)
56var declaringType = m?.DeclaringType; 70var methodName = method != null ? $"{method.DeclaringType?.Name}.{method.Name}" : "<method>";
testhost.x86 (2)
TestHostTraceListener.cs (2)
56var declaringType = m?.DeclaringType; 70var methodName = method != null ? $"{method.DeclaringType?.Name}.{method.Name}" : "<method>";