3436 references to GetType
ApiExplorerWebSite (3)
ApiExplorerDataFilter.cs (3)
77ConstraintTypes = parameter.RouteInfo.Constraints?.Select(c => c.GetType().Name).ToArray(), 90FormatterType = request.Formatter?.GetType().FullName, 108FormatterType = responseFormat.Formatter?.GetType().FullName,
ApplicationModelWebSite (1)
Conventions\FromHeaderConvention.cs (1)
15if (param.Attributes.Any(p => p.GetType() == typeof(FromHeaderAttribute)))
AssemblyStripper (15)
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Cil\CodeWriter.cs (1)
195 instr.Operand.GetType ().FullName));
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil.Signatures\SignatureWriter.cs (1)
490 elem.FieldOrPropType = GetElementTypeFromTypeCode (Type.GetTypeCode (elem.Value.GetType ()));
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\DefaultImporter.cs (1)
111 throw new ReflectionException ("Unknown element type: {0}", original.GetType ().Name);
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\GenericContext.cs (1)
47 get { return m_type != null && m_type.GetType () == typeof (TypeReference); }
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\MetadataResolver.cs (4)
215 if (a.GetType () != b.GetType ()) 222 if (a.GetType () != b.GetType ())
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ReflectionHelper.cs (4)
121 SR.PropertyInfo pi = o.GetType ().GetProperty (prop); 307 return (Type []) mi.GetType ().GetMethod ("GetGenericArguments").Invoke (mi, null); 312 return (int) mi.GetType ().GetProperty ("MetadataToken").GetValue (mi, null); 317 SR.MethodInfo gmd = (SR.MethodInfo) mi.GetType ().GetMethod ("GetGenericMethodDefinition").Invoke (mi, null);
.packages\microsoft.dotnet.cilstrip.sources\9.0.0-beta.24256.1\contentFiles\cs\netstandard2.0\Mono.Cecil\ReflectionWriter.cs (3)
722 Type t = hc.Constant.GetType (); 733 GetCorrespondingType (hc.Constant.GetType ().FullName); 1381 Type t = o.GetType ();
BasicTestApp (3)
FormsTest\CustomFieldCssClassProvider.cs (1)
18var propertyInfo = fieldIdentifier.Model.GetType().GetProperty(fieldIdentifier.FieldName);
InteropTest\JavaScriptInterop.cs (2)
463ThisTypeName = GetType().Name, 479ThisTypeName = GetType().Name,
FilesWebSite (3)
Controllers\EmbeddedFilesController.cs (3)
16FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"), 26FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"), 35FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"),
GetDocument.Insider (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
180var buildMethod = builder.GetType().GetMethod("Build"); 190var hostType = host.GetType();
Identity.DefaultUI.WebSite (1)
StartupBase.cs (1)
112throw new InvalidOperationException($"Unknown provider '{currentProvider.GetType().Name}'");
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
illink (23)
ILLink.RoslynAnalyzer (8)
DataFlow\LocalDataFlowVisitor.cs (3)
104 $"{OwningSymbol.GetType ()}: {branchValueOperation.Syntax.GetLocation ().GetLineSpan ()}"); 112 $"{OwningSymbol.GetType ()}: {branchValueOperation.Syntax.GetLocation ().GetLineSpan ()}"); 205 $"{local.ContainingSymbol.GetType ()}: {localReference.Syntax.GetLocation ().GetLineSpan ()}");
DataFlow\UnexpectedOperationHandler.cs (1)
47 throw new NotImplementedException ($"Unexpected operation type {operation.GetType ()}: {operation.Syntax.GetLocation ().GetLineSpan ()}");
DataFlowAnalyzerContext.cs (1)
20 throw new System.ArgumentException ($"Analyzer {analyzer.GetType ().Name} is not in the cache");
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
26 /// <see cref="object.GetType()"/>
src\tools\illink\src\ILLink.Shared\TrimAnalysis\ValueExtensions.cs (1)
22 sb.Append (value.GetType ().Name);
TrimAnalysis\ArrayValue.cs (1)
43 return HashUtils.Combine (GetType ().GetHashCode (), Size);
InMemory.FunctionalTests (5)
Http2\Http2ConnectionTests.cs (2)
252var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 270var contentTypeValue2 = (StringValues)headerReferences2.GetType().GetField("_ContentType").GetValue(headerReferences2);
Http3\Http3ConnectionTests.cs (2)
470var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 477var contentTypeValue2 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences2);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
19var type = startup.GetType();
LocalizationSample (1)
Startup.cs (1)
89await context.Response.WriteAsync($"<tr><th>Winning provider:</th><td>{requestCultureFeature.Provider.GetType().Name}</td></tr>");
Microsoft.Arcade.Common (2)
MSBuildTaskBase.cs (2)
70return GetType().GetMethod(ExecuteMethodName).GetParameters().Select(p => p.ParameterType).ToArray(); 90return GetType().GetMethod(ExecuteMethodName);
Microsoft.Arcade.Test.Common (2)
AssertEx.cs (2)
64if (x.GetType() != y.GetType())
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
37var project = DiagnosticProject.Create(GetType().Assembly, sources);
DiagnosticVerifier.cs (1)
165foreach (var defaultCompileLibrary in DependencyContext.Load(GetType().Assembly).CompileLibraries)
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
84authenticatedIdentity?.GetType() ?? typeof(ClaimsIdentity),
Microsoft.AspNetCore.App.Analyzers.Test (7)
Infrastructure\WellKnownTypesTests.cs (1)
63var project = TestDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, source.Source);
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (2)
39var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods() 49var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods()
TestDiagnosticAnalyzer.cs (4)
31var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 48var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 70var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 109var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources);
Microsoft.AspNetCore.App.CodeFixes (1)
RouteParameterUnusedParameterFixer.cs (1)
94_ => throw new InvalidOperationException($"Unexpected method syntax: {methodSyntax.GetType().FullName}")
Microsoft.AspNetCore.Authentication (2)
AuthenticationHandler.cs (2)
119Logger = logger.CreateLogger(this.GetType().FullName!); 136Logger = logger.CreateLogger(this.GetType().FullName!);
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationService.cs (2)
283var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for SignInAsync. "; 322var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for {nameof(SignOutAsync)}. ";
Microsoft.AspNetCore.Authentication.OpenIdConnect (7)
OpenIdConnectHandler.cs (7)
219Logger.EnteringOpenIdAuthenticationHandlerHandleSignOutAsync(GetType().FullName!); 382Logger.EnteringOpenIdAuthenticationHandlerHandleUnauthorizedAsync(GetType().FullName!); 525Logger.EnteringOpenIdAuthenticationHandlerHandleRemoteAuthenticateAsync(GetType().FullName!); 1302Logger.InvalidSecurityTokenType(validatedToken?.GetType().ToString()); 1303throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.ValidatedSecurityTokenNotJwt, validatedToken?.GetType())); 1363Logger.InvalidSecurityTokenTypeFromHandler(validatedToken?.GetType()); 1364throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.ValidatedSecurityTokenNotJsonWebToken, validatedToken?.GetType()));
Microsoft.AspNetCore.Authorization (1)
DefaultAuthorizationPolicyProvider.cs (1)
77public virtual bool AllowsCachingPolicies => GetType() == typeof(DefaultAuthorizationPolicyProvider);
Microsoft.AspNetCore.Components (29)
CascadingParameterState.cs (3)
30var componentType = componentState.Component.GetType(); 68throw new InvalidOperationException($"'{info.Attribute.GetType()}' is flagged with SingleDelivery, but the selected supplier '{supplier.GetType()}' is not flagged with {nameof(ICascadingValueSupplier.IsFixed)}");
CascadingValue.cs (1)
105throw new ArgumentException($"Missing required parameter '{nameof(Value)}' for component '{GetType().Name}'.");
CascadingValueSource.cs (1)
88throw new InvalidOperationException($"Cannot notify about changes because the {GetType()} is configured as fixed.");
ChangeDetection.cs (2)
18var oldValueType = oldValue!.GetType(); 19var newValueType = newValue!.GetType();
ComponentFactory.cs (2)
76if (component.GetType() == componentType) 94var componentTypeInfo = GetComponentTypeInfo(instance.GetType());
NavigationManager.cs (5)
167throw new NotImplementedException($"The type {GetType().FullName} does not support supplying {nameof(NavigationOptions)}. To add support, that type should override {nameof(NavigateToCore)}(string uri, {nameof(NavigationOptions)} options)."); 192throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 464=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 473=> throw new NotSupportedException($"To support navigation locks, {GetType().Name} must override {nameof(SetNavigationLockState)}"); 515throw new InvalidOperationException($"'{GetType().Name}' has not been initialized.");
NavigationManagerExtensions.cs (1)
222var valueType = value.GetType();
Reflection\ComponentProperties.cs (2)
28var targetType = target.GetType(); 173$"type '{target.GetType().FullName}'. The error was: {ex.Message}", ex);
Rendering\ComponentState.cs (1)
323return $"ComponentId = {ComponentId}, Type = {Component.GetType().Name}, Disposed = {_componentWasDisposed}";
Rendering\RenderQueueEntry.cs (1)
22return $"ComponentId = {ComponentState.ComponentId}, Type = {ComponentState.Component.GetType().Name}";
Rendering\RenderTreeBuilder.cs (1)
783throw new InvalidOperationException($"Render output is invalid for component of type '{component.GetType().FullName}'. A frame of type '{invalidFrame.FrameType}' was left unclosed. Do not use try/catch inside rendering logic, because partial output cannot be undone.");
RenderTree\Renderer.cs (1)
315=> GetRequiredRootComponentState(componentId).Component.GetType();
RenderTree\Renderer.Log.cs (7)
25InitializingRootComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 29InitializingChildComponent(logger, componentState.ComponentId, componentState.Component.GetType(), parentComponentState.ComponentId, parentComponentState.Component.GetType()); 41RenderingComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 52DisposingComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 63HandlingEvent(logger, eventHandlerId, eventArgs?.GetType().Name ?? "null"); 74SkippingEventOnDisposedComponent(logger, componentId, eventHandlerId, eventArgs?.GetType().Name ?? "null");
src\Http\Routing\src\RouteConstraintBuilder.cs (1)
145_inlineConstraintResolver.GetType().Name));
Microsoft.AspNetCore.Components.Analyzers.Tests (3)
AnalyzerTestBase.cs (2)
21var filePath = Path.Combine(ProjectDirectory, "TestFiles", GetType().Name, source); 39return DiagnosticProject.Create(GetType().Assembly, new[] { read.Source, });
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Endpoints (11)
Builder\RazorComponentEndpointDataSource.cs (1)
136throw new InvalidOperationException($"Unable to find a provider for the render mode: {renderMode.GetType().FullName}. This generally " +
Rendering\EndpointComponentState.cs (1)
22var streamRenderingAttribute = _streamRenderingAttributeByComponentType.GetOrAdd(component.GetType(),
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
201static string GetName(ComponentState current) => current.Component.GetType().Name;
Rendering\SSRRenderModeBoundary.cs (6)
89throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 125var valueType = value.GetType(); 128throw new InvalidOperationException($"Cannot pass RenderFragment<T> parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. Templated content can't be passed across a rendermode boundary, because it is arbitrary code and cannot be serialized."); 137throw new InvalidOperationException($"Cannot pass the parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. This is because the parameter is of the delegate type '{value.GetType()}', which is arbitrary code and cannot be serialized."); 170_ => throw new UnreachableException($"Unknown render mode {RenderMode.GetType().FullName}"),
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
RazorComponentsServiceCollectionExtensionsTest.cs (2)
124{ ImplementationInstance: { } instance } => instance.GetType(), 125{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(),
TypeNameHashTest.cs (2)
42var type = new { Foo = "bar" }.GetType(); 58var type = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).GetType();
Microsoft.AspNetCore.Components.Forms (8)
DataAnnotationsValidator.cs (1)
39throw new InvalidOperationException($"{GetType()} does not support changing the " +
EditContextDataAnnotationsExtensions.cs (1)
157var cacheKey = (ModelType: fieldIdentifier.Model.GetType(), fieldIdentifier.FieldName);
FieldIdentifier.cs (4)
48if (model.GetType().IsValueType) 137throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 149throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 164accessor = cache.GetOrAdd((value.GetType(), member.Member), CreateAccessor);
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
38var providerType = queryable.Provider?.GetType();
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (3)
AnalyzerTestBase.cs (2)
21var filePath = Path.Combine(ProjectDirectory, "TestFiles", GetType().Name, source); 39return DiagnosticProject.Create(GetType().Assembly, new[] { read.Source, });
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Server (8)
Circuits\CircuitHost.cs (1)
908handler.GetType(),
Circuits\RemoteRenderer.cs (1)
79GetComponentState(componentId).Component.GetType();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (2)
33throw new PlatformNotSupportedException($"{GetType()} cannot be used when running in a browser."); 155=> $"{GetType().FullName}:{_storeName}:{key}";
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (2)
419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 503Serialize(ref writer, argument.GetType(), argument);
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Utilities.cs (1)
41throw new InvalidOperationException("The underlying IBufferWriter<byte>.GetMemory(int) method returned an empty memory block, which is not allowed. This is a bug in " + bufferWriter.GetType().FullName);
Microsoft.AspNetCore.Components.Server.Tests (9)
Circuits\RenderBatchWriterTest.cs (2)
320var expectedEntry = expectedEntryIterationVar.GetType().IsEnum 349throw new InvalidOperationException($"Unsupported type: {expectedEntry.GetType().FullName}");
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestBinder.cs (4)
21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 27_returnType = s.Item?.GetType() ?? typeof(object); 30_returnType = c.Result?.GetType() ?? typeof(object);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestHubMessageEqualityComparer.cs (3)
20if (!Equals(x.GetType(), y.GetType())) 47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
Microsoft.AspNetCore.Components.Tests (20)
ParameterViewTest.Assignment.cs (1)
769cascadingParameters.Add(new CascadingParameterState(new(null, name, value.GetType()), new TestCascadingValueProvider(value)));
ParameterViewTest.cs (3)
98new CascadingParameterState(new(null, "attribute 2", attribute2Value.GetType()), new TestCascadingValue(attribute2Value)), 99new CascadingParameterState(new(null, "attribute 3", attribute3Value.GetType()), new TestCascadingValue(attribute3Value)), 309new CascadingParameterState(new(null, "my entry", myEntryValue.GetType()), new TestCascadingValue(myEntryValue)),
Routing\RouteKeyTest.cs (7)
60var key1 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 61var key2 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 72var key1 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 73var key2 = new RouteKey(typeof(string).Assembly, new[] { GetType().Assembly, typeof(ComponentBase).Assembly }); 84var key1 = new RouteKey(typeof(string).Assembly, new[] { GetType().Assembly }); 85var key2 = new RouteKey(typeof(ComponentBase).Assembly, new[] { GetType().Assembly, }); 97var key2 = new RouteKey(typeof(ComponentBase).Assembly, new[] { GetType().Assembly, });
Routing\RouteTableFactoryTests.cs (9)
28var routes1 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 31var routes2 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 42var routes1 = routeTableFactory.Create(new RouteKey(typeof(object).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly, }), _serviceProvider); 45var routes2 = routeTableFactory.Create(new RouteKey(typeof(object).Assembly, new[] { GetType().Assembly, typeof(ComponentBase).Assembly, }), _serviceProvider); 56var routes1 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 59var routes2 = routeTableFactory.Create(new RouteKey(GetType().Assembly, new[] { typeof(object).Assembly }), _serviceProvider); 70var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, new[] { GetType().Assembly }), _serviceProvider); 83var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, Array.Empty<Assembly>()), _serviceProvider);
Microsoft.AspNetCore.Components.Web (17)
Forms\Editor.cs (1)
49throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " +
Forms\InputBase.cs (2)
235throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 263throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\InputDate.cs (1)
62throw new InvalidOperationException($"Unsupported {GetType()} type param '{type}'.");
Forms\InputExtensions.cs (1)
48throw new InvalidOperationException($"{input.GetType()} does not support the type '{typeof(TValue)}'.", ex);
Forms\InputNumber.cs (1)
114throw new InvalidOperationException($"Unsupported type {value.GetType()}");
Forms\InputRadio.cs (1)
55throw new InvalidOperationException($"{GetType()} must have an ancestor {typeof(InputRadioGroup<TValue>)} " +
Forms\Mapping\FormMappingValidator.cs (1)
48throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\Mapping\SupplyParameterFromFormValueProvider.cs (1)
63throw new InvalidOperationException($"Received an unexpected attribute type {parameterInfo.Attribute.GetType()}");
Forms\ValidationMessage.cs (3)
44throw new InvalidOperationException($"{GetType()} requires a cascading parameter " + 45$"of type {nameof(EditContext)}. For example, you can use {GetType()} inside " + 51throw new InvalidOperationException($"{GetType()} requires a value for the " +
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Virtualization\Virtualize.cs (3)
141$"{GetType()} requires a positive value for parameter '{nameof(ItemSize)}'."); 154$"{GetType()} can only accept one item source from its parameters. " + 175$"{GetType()} requires either the '{nameof(Items)}' or '{nameof(ItemsProvider)}' parameters to be specified " +
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoSynchronizationContext.cs (1)
50_uiThreadId = (int)_window.GetType()
Microsoft.AspNetCore.Connections.Abstractions (1)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
Microsoft.AspNetCore.DataProtection (1)
src\Shared\TrimmingAttributes.cs (1)
297/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Abstractions (1)
src\Shared\TrimmingAttributes.cs (1)
297/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Extensions (1)
src\Shared\TrimmingAttributes.cs (1)
297/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Tests (3)
ServiceCollectionTests.cs (2)
45services1.GetRequiredService<ILoggerFactory>().GetType(), 46services2.GetRequiredService<ILoggerFactory>().GetType());
XmlAssert.cs (1)
124throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, "Node of type '{0}' is not supported.", node.GetType().Name));
Microsoft.AspNetCore.Diagnostics (5)
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (2)
1345WriteAttributeValue("", 17075, metadata.GetType().FullName ?? string.Empty, 17075, 46, false); 1354Write(metadata.GetType().Name);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
178handler = exceptionHandler.GetType().FullName; 200handler = _problemDetailsService.GetType().FullName;
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
DatabaseErrorPageMiddleware.cs (1)
170_localDiagnostic.Value?.Hold(contextErrorEventData.Exception, contextErrorEventData.Context!.GetType());
MigrationsEndPointMiddleware.cs (1)
71var dbName = db.GetType().FullName!;
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionDetailsProviderTest.cs (1)
109GetType().Assembly,
Microsoft.AspNetCore.Grpc.JsonTranscoding (9)
Internal\Json\AnyConverter.cs (3)
89JsonSerializer.Serialize(writer, wrappedValue, wrappedValue.GetType(), options); 93JsonSerializer.Serialize(writer, valueMessage, valueMessage.GetType(), options); 118JsonSerializer.Serialize(writer, value, value.GetType(), options);
Internal\Json\ListValueConverter.cs (1)
30JsonSerializer.Serialize(writer, list, list.GetType(), options);
Internal\Json\StructConverter.cs (1)
41JsonSerializer.Serialize(writer, v, v.GetType(), options);
Internal\Json\ValueConverter.cs (1)
80JsonSerializer.Serialize(writer, v, v.GetType(), options);
Internal\Json\WrapperConverter.cs (1)
31JsonSerializer.Serialize(writer, innerValue, innerValue.GetType(), options);
Internal\JsonRequestHelpers.cs (1)
392responseType = message.GetType();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
379var enumType = value.GetType();
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
379var enumType = value.GetType();
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostBuilder.cs (1)
208UseStartup(instance.GetType(), context, services, instance);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
WebHostBuilderExtensions.cs (1)
122return new ConventionBasedStartup(StartupLoader.LoadMethods(serviceProvider, instance.GetType(), hostingEnvironment.EnvironmentName, instance));
Microsoft.AspNetCore.Hosting.Tests (3)
ConfigureBuilderTests.cs (1)
15var methodInfo = GetType().GetMethod(nameof(InjectedMethod), BindingFlags.NonPublic | BindingFlags.Static);
Fakes\StartupThrowTypeLoadException.cs (1)
14classes: new Type[] { GetType() },
HostingApplicationDiagnosticsTests.cs (1)
822var property = o.GetType().GetTypeInfo().GetProperty(name, BindingFlags.Instance | BindingFlags.Public);
Microsoft.AspNetCore.Http (1)
Builder\ApplicationBuilder.cs (1)
141return middleware.Target.GetType().FullName + "." + middleware.Method.Name;
Microsoft.AspNetCore.Http.Abstractions (4)
Extensions\UseMiddlewareExtensions.cs (1)
182throw new InvalidOperationException(Resources.FormatException_UseMiddlewareUnableToCreateMiddleware(middlewareFactory.GetType(), _middlewareType));
Routing\RouteValueDictionary.cs (1)
891var type = Value.GetType();
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
RouteValueDictionaryTests.cs (1)
347$"The type '{obj.GetType().FullName}' defines properties 'controller' and 'Controller' which differ " +
Microsoft.AspNetCore.Http.Connections.Client (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.AspNetCore.Http.Extensions (5)
DefaultProblemDetailsWriter.cs (1)
63var problemDetailsType = context.ProblemDetails.GetType();
RequestDelegateFactory.cs (1)
183object => Expression.Convert(TargetExpr, handler.Target.GetType()),
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Http.Extensions.Tests (4)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
236Assert.Equal("Microsoft.AspNetCore.Http.ProblemDetailsJsonContext", jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[1].GetType().FullName);
PropertyAsParameterInfoTests.cs (2)
120a => typeof(TestAttribute).IsAssignableFrom(a.GetType())); 123a => typeof(SampleAttribute).IsAssignableFrom(a.GetType()));
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (1)
518m => m.GetType().Name != "NullableContextAttribute" &&
Microsoft.AspNetCore.Http.Results (2)
HttpResultsHelper.cs (1)
41Type? runtimeType = value.GetType();
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
335var type = value.GetType(); 363var type = value.GetType();
Microsoft.AspNetCore.Identity (3)
SecurityStampValidator.cs (2)
35Logger = logger.CreateLogger(GetType()); 54Logger = logger.CreateLogger(GetType());
SignInManager.cs (1)
952if (GetType() == typeof(SignInManager<TUser>))
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Infrastructure\ServerFactory.cs (2)
145if (!manager.ApplicationParts.Any(p => p.GetType() == part.GetType() &&
Microsoft.AspNetCore.Identity.Test (3)
SignInManagerTest.cs (3)
1049new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType()) 1080new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType()) 1112new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType())
Microsoft.AspNetCore.InternalTesting (6)
LoggedTest\LoggedTestBase.cs (3)
55return AssemblyTestLog.ForAssembly(GetType().GetTypeInfo().Assembly).StartTestLog(TestOutputHelper, GetType().FullName, out loggerFactory, minLogLevel, testName); 64var classType = GetType();
xunit\AspNetTestMethodRunner.cs (2)
36if (testCase.GetType() == typeof(XunitTestCase)) 53if (testCase.GetType() == typeof(XunitTheoryTestCase))
xunit\ConditionalTheoryDiscoverer.cs (1)
54var type = obj.GetType();
Microsoft.AspNetCore.InternalTesting.Tests (3)
TestContextTest.cs (3)
18Assert.Equal(GetType().FullName, Context.FileOutput.TestClassName); 43Assert.Equal(GetType().Name, Context.FileOutput.TestClassName); 69Assert.Equal(GetType().Name, Context.FileOutput.TestClassName);
Microsoft.AspNetCore.JsonPatch (22)
Adapters\AdapterFactory.cs (1)
28var jsonContract = contractResolver.ResolveContract(target.GetType());
Adapters\ObjectAdapter.cs (1)
187var copyResult = ConversionResultProvider.CopyTo(propertyValue, propertyValue?.GetType());
Internal\ConversionResultProvider.cs (3)
27else if (typeToConvertTo.IsAssignableFrom(value.GetType())) 65else if (typeToConvertTo.IsAssignableFrom(value.GetType())) 68targetType = value.GetType();
Internal\DictionaryAdapterOfTU.cs (6)
24var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 51var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 79var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 106var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 140var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 187var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType());
Internal\DynamicObjectAdapter.cs (9)
68if (property.GetType().IsValueType 69&& Nullable.GetUnderlyingType(property.GetType()) == null) 71value = Activator.CreateInstance(property.GetType()); 95if (!TryConvertValue(value, property.GetType(), contractResolver, out var convertedValue)) 127if (!TryConvertValue(value, property.GetType(), contractResolver, out var convertedValue)) 172var jsonDynamicContract = (JsonDynamicContract)contractResolver.ResolveContract(target.GetType()); 179target.GetType(), 208var jsonDynamicContract = (JsonDynamicContract)contractResolver.ResolveContract(target.GetType()); 215target.GetType(),
Internal\ListAdapter.cs (1)
270var listType = list.GetType();
Internal\PocoAdapter.cs (1)
209if (contractResolver.ResolveContract(target.GetType()) is JsonObjectContract jsonObjectContract)
Microsoft.AspNetCore.JsonPatch.Tests (9)
Adapters\AdapterFactoryTests.cs (4)
28Assert.Equal(typeof(ListAdapter), adapter.GetType()); 41Assert.Equal(typeof(DictionaryAdapter<string, string>), adapter.GetType()); 57Assert.Equal(typeof(PocoAdapter), adapter.GetType()); 70Assert.Equal(typeof(DynamicObjectAdapter), adapter.GetType());
IntegrationTests\NestedObjectIntegrationTest.cs (1)
253Assert.Equal(typeof(InheritedObject), targetObject.SimpleObject.GetType());
Internal\ListAdapterTest.cs (2)
27Assert.Equal($"The type '{targetObject.GetType().FullName}' which is an array is not supported for json patch operations as it has a fixed size.", message); 45Assert.Equal($"The type '{targetObject.GetType().FullName}' which is a non generic list is not supported for json patch operations. Only generic list types are supported.", message);
Internal\ObjectVisitorTest.cs (2)
90Assert.Equal(typeof(DictionaryAdapter<string, string>), adapter.GetType()); 120Assert.Same(typeof(DictionaryAdapter<string, object>), adapter.GetType());
Microsoft.AspNetCore.Localization (2)
RequestLocalizationMiddleware.cs (2)
78_logger.UnsupportedCultures(provider.GetType().Name, cultures); 91_logger.UnsupportedUICultures(provider.GetType().Name, uiCultures);
Microsoft.AspNetCore.MiddlewareAnalysis (1)
AnalysisMiddleware.cs (1)
35middlewareName = next.Target!.GetType().FullName!;
Microsoft.AspNetCore.Mvc (1)
HotReloadService.cs (1)
38if (modelMetadataProvider.GetType() == typeof(DefaultModelMetadataProvider))
Microsoft.AspNetCore.Mvc.Abstractions (2)
Formatters\FormatterCollection.cs (1)
49if (formatter.GetType() == formatterType)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
DefaultApiDescriptionProviderTest.cs (4)
2142var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2168var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2191var methodInfo = GetType().GetMethod(nameof(AcceptsId_Query), BindingFlags.Instance | BindingFlags.NonPublic); 2323action.MethodInfo = GetType().GetMethod(
Microsoft.AspNetCore.Mvc.Core (65)
ApiConventionTypeAttribute.cs (1)
87attribute.GetType().FullName == "System.Runtime.CompilerServices.NullableContextAttribute";
ApplicationModels\AuthorizationApplicationModelProvider.cs (1)
74if (policyProvider.GetType() == typeof(DefaultAuthorizationPolicyProvider))
ControllerContext.cs (1)
91private string DebuggerToString() => ActionDescriptor?.DisplayName ?? $"{{{GetType().FullName}}}";
Controllers\ControllerActivatorProvider.cs (1)
31if (controllerActivator.GetType() != typeof(DefaultControllerActivator))
Controllers\ControllerFactoryProvider.cs (1)
28if (controllerFactory.GetType() != typeof(DefaultControllerFactory))
Controllers\DefaultControllerPropertyActivator.cs (1)
19var controllerType = controller.GetType();
DependencyInjection\ApplicationModelConventionExtensions.cs (1)
40if (applicationModelConvention.GetType() == type)
Filters\DisableRequestSizeLimitFilter.cs (2)
39Log.NotMostEffectiveFilter(_logger, GetType(), effectivePolicy.GetType(), typeof(IRequestSizePolicy));
Filters\OutputCacheFilter.cs (3)
23_logger = loggerFactory.CreateLogger(GetType()); 35Log.NotMostEffectiveFilter(_logger, GetType(), effectivePolicy.GetType(), typeof(IOutputCacheFilter));
Filters\RequestFormLimitsFilter.cs (2)
30Log.NotMostEffectiveFilter(_logger, GetType(), effectivePolicy.GetType(), typeof(IRequestFormLimitsPolicy));
Filters\RequestSizeLimitFilter.cs (2)
41Log.NotMostEffectiveFilter(_logger, GetType(), effectivePolicy.GetType(), typeof(IRequestSizePolicy));
Filters\ResponseCacheFilter.cs (3)
25_logger = loggerFactory.CreateLogger(GetType()); 91Log.NotMostEffectiveFilter(_logger, GetType(), effectivePolicy.GetType(), typeof(IResponseCacheFilter));
Formatters\FormatFilter.cs (1)
33_logger = loggerFactory.CreateLogger(GetType());
Formatters\InputFormatter.cs (2)
44GetType().FullName, 126GetType().FullName,
Formatters\OutputFormatter.cs (2)
39GetType().FullName, 100GetType().FullName,
Formatters\SystemTextJsonOutputFormatter.cs (1)
79var runtimeType = context.Object?.GetType();
Formatters\TextOutputFormatter.cs (1)
117throw new InvalidOperationException(Resources.FormatOutputFormatterNoMediaType(GetType().FullName));
Infrastructure\ActionSelectionTable.cs (1)
88return e.GetType() == typeof(Endpoint);
Infrastructure\AsyncEnumerableReader.cs (1)
91value.GetType()));
Infrastructure\ClientErrorResultFilter.cs (2)
54Log.TransformingClientError(_logger, context.Result.GetType(), result.GetType(), clientError.StatusCode);
Infrastructure\FileContentResultExecutor.cs (1)
81var fileResultType = fileResult.GetType().Name;
Infrastructure\FileStreamResultExecutor.cs (1)
93var fileResultType = fileResult.GetType().Name;
Infrastructure\ObjectResultExecutor.cs (3)
76objectType = result.Value?.GetType(); 151var objectResultType = result.GetType().Name; 152var valueType = value == null ? "null" : value.GetType().FullName;
Infrastructure\PhysicalFileResultExecutor.cs (1)
169var fileResultType = fileResult.GetType().Name;
Infrastructure\ResourceInvoker.Log.cs (2)
87BeforeExecutingActionResult(logger, actionResult.GetType()); 95AfterExecutingActionResult(logger, actionResult.GetType());
Infrastructure\SystemTextJsonResultExecutor.cs (2)
61var objectType = value?.GetType() ?? typeof(object); 140var type = value == null ? "null" : value.GetType().FullName;
Infrastructure\VirtualFileResultExecutor.cs (1)
151var fileResultType = fileResult.GetType().Name;
ModelBinding\Binders\CollectionModelBinder.cs (1)
61Logger = loggerFactory.CreateLogger(GetType());
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
466if (metadata?.GetType() != typeof(DefaultModelMetadata))
ModelBinding\Metadata\MetadataDetailsProviderExtensions.cs (1)
38if (metadataDetailsProvider.GetType() == type)
ModelBinding\ModelBinderProviderExtensions.cs (1)
38if (modelBinderProvider.GetType() == type)
ModelBinding\ModelBindingHelper.cs (7)
224if (!modelType.IsAssignableFrom(model.GetType())) 227model.GetType().FullName, 621if (type.IsAssignableFrom(value.GetType())) 678if (value == null || destinationType.IsAssignableFrom(value.GetType())) 693var canConvertFrom = converter.CanConvertFrom(value.GetType()); 696converter = TypeDescriptor.GetConverter(value.GetType()); 715Resources.FormatValueProviderResult_NoConverterExists(value.GetType(), destinationType));
ModelBinding\ObjectModelValidator.cs (1)
51var metadata = model == null ? null : _modelMetadataProvider.GetMetadataForType(model.GetType());
ModelBinding\ParameterBinder.cs (2)
46Logger = loggerFactory.CreateLogger(GetType()); 248var modelType = modelBindingResult.Model.GetType();
ModelBinding\Validation\ModelValidatorProviderExtensions.cs (1)
38if (modelValidatorProvider.GetType() == type)
ModelBinding\ValueProviderFactoryExtensions.cs (1)
38if (valueProviderFactory.GetType() == type)
MvcCoreLoggerExtensions.cs (2)
270filterList.Add($"{filter.GetType()} (Order: {orderedFilter.Order})"); 274filterList.Add(filter.GetType().ToString());
Routing\ActionConstraintMatcherPolicy.cs (2)
58if (actionConstraint.GetType() == typeof(HttpMethodActionConstraint)) 62else if (actionConstraint.GetType() == typeof(ConsumesAttribute))
Routing\KnownRouteValueConstraint.cs (1)
84actionDescriptorsProvider.GetType()));
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
TypeFilterAttribute.cs (1)
66var argumentTypes = Arguments?.Select(a => a.GetType())?.ToArray();
Microsoft.AspNetCore.Mvc.Core.Test (120)
ApiConventionMethodAttributeTest.cs (1)
69var attributeType = a.GetType();
ControllerBaseTest.cs (3)
2925await controller.TryUpdateModelAsync(model, model.GetType(), modelName, valueProvider, propertyFilter); 2953var result = await controller.TryUpdateModelAsync(model, model.GetType(), modelName); 2981var result = await controller.TryUpdateModelAsync(model, model.GetType(), modelName);
Formatters\SystemTextJsonOutputFormatterTest.cs (2)
103asyncEnumerable.GetType(), 132asyncEnumerable.GetType(),
Infrastructure\ActionMethodExecutorTest.cs (15)
33Assert.Equal("VoidResultExecutor", actionMethodExecutor.GetType().Name); 59Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 85Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 112Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 141Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 170Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 197Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 222Assert.Equal("TaskResultExecutor", actionMethodExecutor.GetType().Name); 248Assert.Equal("AwaitableResultExecutor", actionMethodExecutor.GetType().Name); 274Assert.Equal("TaskOfIActionResultExecutor", actionMethodExecutor.GetType().Name); 300Assert.Equal("TaskOfActionResultExecutor", actionMethodExecutor.GetType().Name); 327Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 356Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 383Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 410Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name);
Infrastructure\ActionResultTypeMapperTest.cs (2)
36var result = mapper.Convert(returnValue, returnValue.GetType()); 52var result = mapper.Convert(returnValue, returnValue.GetType());
Infrastructure\AsyncEnumerableReaderTest.cs (16)
38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 175var expected = $"'AsyncEnumerableReader' reached the configured maximum size of the buffer when enumerating a value of type '{enumerable.GetType()}'. " + 177$"consider ways to reduce the collection size, or consider manually converting '{enumerable.GetType()}' into a list rather than increasing the limit."; 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (25)
601var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 603var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 666var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 668var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithDataMemberIsRequired.Age)); 703var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 707var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 737var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 739var property = GetMetadataForProperty(model.GetType(), nameof(BindingOptionalProperty.ValueTypeRequired)); 760var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 762var property = GetMetadataForProperty(model.GetType(), nameof(NullableValueTypeProperty.NullableValueType)); 783var containerMetadata = GetMetadataForType(model.GetType()); 787var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 808var containerMetadata = GetMetadataForType(model.GetType()); 812var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 838var containerMetadata = GetMetadataForType(model.GetType()); 866var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 888var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 912var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 936var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 978var type = model.GetType(); 1002var modelMetadata = GetMetadataForType(model.GetType()); 1003var propertyMetadata = GetMetadataForProperty(model.GetType(), nameof(CollectionContainer.ReadOnlyList)); 1023var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1047var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1067var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (26)
782var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 784var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 816var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 820var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithDataMemberIsRequired.Age)); 850var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 856var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 881var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 885var property = GetMetadataForProperty(model.GetType(), nameof(BindingOptionalProperty.ValueTypeRequired)); 901var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 905var property = GetMetadataForProperty(model.GetType(), nameof(NullableValueTypeProperty.NullableValueType)); 921var containerMetadata = GetMetadataForType(model.GetType()); 927var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 943var containerMetadata = GetMetadataForType(model.GetType()); 949var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 970var containerMetadata = GetMetadataForType(model.GetType()); 1003var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithPropertyInitializedInConstructor.NameContainer)); 1028var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1050var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1074var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1098var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1140var type = model.GetType(); 1164var modelMetadata = GetMetadataForType(model.GetType()); 1165var propertyMetadata = GetMetadataForProperty(model.GetType(), nameof(CollectionContainer.ReadOnlyList)); 1185var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1209var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1229var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model);
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (3)
268var parameter = GetType() 319var parameter = GetType() 336var parameter = GetType()
ModelBinding\Metadata\DefaultModelMetadataTest.cs (3)
990var parameter = GetType() 1009var property = GetType() 1011var modelIdentity = ModelMetadataIdentity.ForProperty(property, property.PropertyType, GetType());
ModelBinding\ModelBindingHelperTest.cs (6)
468model.GetType(), 523model.GetType(), 551modelType: model.GetType(), 591model.GetType(), 614var modelName = model.GetType().FullName; 1261var expectedMessage = $"The parameter conversion from type '{value.GetType()}' to type " +
ModelBinding\ParameterBinderTest.cs (2)
307var method = GetType().GetMethod(nameof(TestMethodWithoutAttributes), BindingFlags.NonPublic | BindingFlags.Instance); 362var method = GetType().GetMethod(nameof(TestMethodWithAttributes), BindingFlags.NonPublic | BindingFlags.Instance);
MvcCoreLoggerExtensionsTest.cs (15)
208$"{authFilter.GetType()}, {asyncAuthFilter.GetType()}, {orderedAuthFilter.GetType()} (Order: -100)", 254$"{resourceFilter.GetType()}, {asyncResourceFilter.GetType()}, {orderedResourceFilter.GetType()} (Order: -100)", 300$"{actionFilter.GetType()}, {asyncActionFilter.GetType()}, {orderedActionFilter.GetType()} (Order: -100)", 346$"{exceptionFilter.GetType()}, {asyncExceptionFilter.GetType()}, {orderedExceptionFilter.GetType()} (Order: -100)", 392$"{resultFilter.GetType()}, {asyncResultFilter.GetType()}, {orderedResultFilter.GetType()} (Order: -100)",
Routing\KnownRouteValueConstraintTests.cs (1)
198var providerName = actionDescriptorCollectionProvider.GetType().FullName;
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
SimpleValueProvider.cs (1)
40if (rawValue != null && rawValue.GetType().IsArray)
Microsoft.AspNetCore.Mvc.Cors (1)
CorsAuthorizationFilter.cs (1)
49_logger = loggerFactory.CreateLogger(GetType());
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
DataAnnotationsMetadataProvider.cs (1)
220else if (dataTypeAttribute.GetType() != typeof(DataTypeAttribute))
ValidatableObjectAdapter.cs (1)
24model.GetType());
ValidationAttributeAdapterProvider.cs (1)
24var type = attribute.GetType();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
DataAnnotationsModelValidatorProviderTest.cs (3)
25var metadata = _metadataProvider.GetMetadataForType(mockValidatable.GetType()); 99var metadata = _metadataProvider.GetMetadataForType(mockValidatable.Object.GetType()); 118var result = provider.HasValidators(mockValidatable.GetType(), Array.Empty<object>());
DataAnnotationsModelValidatorTest.cs (1)
535var json = Newtonsoft.Json.JsonConvert.SerializeObject(values) + " " + attribute.GetType().Name;
Microsoft.AspNetCore.Mvc.Formatters.Xml (11)
SerializableErrorWrapperProvider.cs (1)
25original.GetType().Name),
XmlDataContractSerializerInputFormatter.cs (1)
90if (GetType() == typeof(XmlDataContractSerializerInputFormatter))
XmlDataContractSerializerOutputFormatter.cs (4)
85_logger = loggerFactory.CreateLogger(GetType()); 230if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 235valueType = value.GetType(); 316BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName!);
XmlSerializerInputFormatter.cs (1)
72if (GetType() == typeof(XmlSerializerInputFormatter))
XmlSerializerOutputFormatter.cs (4)
82_logger = loggerFactory.CreateLogger(GetType()); 208if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 213valueType = value.GetType(); 305BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName!);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (34)
ProblemDetailsWrapperProviderFactoryTest.cs (3)
28var context = new WrapperProviderContext(instance.GetType(), isSerialization: true); 45var context = new WrapperProviderContext(instance.GetType(), isSerialization: true); 62var context = new WrapperProviderContext(instance.GetType(), isSerialization: true);
ProblemDetailsWrapperTest.cs (1)
86var dataContractSerializer = new DataContractSerializer(wrapper.GetType());
ValidationProblemDetailsWrapperTest.cs (2)
175var dataContractSerializer = new DataContractSerializer(wrapper.GetType()); 213var dataContractSerializer = new DataContractSerializer(wrapper.GetType());
XmlDataContractSerializerOutputFormatterTest.cs (15)
102var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 160var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 226var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 251var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 282var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType(), 313var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 334var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 352var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 487var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 524var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 618var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 707var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 733asyncEnumerable.GetType()); 771asyncEnumerable.GetType());
XmlSerializerOutputFormatterTest.cs (13)
56var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 91var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 111var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 164var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 224var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 247var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 277GetOutputFormatterContext(sampleInput, sampleInput.GetType(), "application/xml; charset=utf-16"); 304var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 323var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 406var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 515asyncEnumerable.GetType()); 553asyncEnumerable.GetType());
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
ErrorPageTests.cs (2)
34_assemblyTestLog = AssemblyTestLog.ForAssembly(GetType().Assembly); 36var loggerProvider = _assemblyTestLog.CreateLoggerFactory(testOutputHelper, GetType().Name);
Microsoft.AspNetCore.Mvc.IntegrationTests (14)
ComplexTypeIntegrationTestBase.cs (1)
45Assert.Equal(ExpectedModelBinderType, modelBinder.GetType());
NullableReferenceTypeIntegrationTest.cs (1)
166var method = GetType().GetMethod(nameof(NonNullableParameter), BindingFlags.NonPublic | BindingFlags.Instance);
ProductValidatorAttribute.cs (1)
38+ value.GetType() + " instance");
TryUpdateModelIntegrationTest.cs (2)
1160Assert.Equal($"TryUpdateModelAsync cannot update a record type model. If a '{model.GetType()}' must be updated, include it in an object type.", ex.Message); 1362model.GetType(),
ValidationIntegrationTests.cs (5)
2020var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_NoValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2072var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_ValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2142var parameterInfo = GetType().GetMethod(nameof(Validation_CollectionOfType_ValidatorOnElementTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2466var parameterInfo = GetType().GetMethod(nameof(Validation_InifnitelyRecursiveModel_ValidationOnTopLevelParameterMethod), BindingFlags.NonPublic | BindingFlags.Static) 2511var parameterInfo = GetType().GetMethod(nameof(Validation_ModelWithNonNullableReferenceTypes_DoesNotValidateNonNullablePropertiesOnFrameworkTypesAction), BindingFlags.NonPublic | BindingFlags.Static)
ValidationWithRecordIntegrationTests.cs (4)
1811var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_NoValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 1863var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_ValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 1933var parameterInfo = GetType().GetMethod(nameof(Validation_CollectionOfType_ValidatorOnElementTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2252var parameterInfo = GetType().GetMethod(nameof(Validation_InifnitelyRecursiveModel_ValidationOnTopLevelParameterMethod), BindingFlags.NonPublic | BindingFlags.Static)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (12)
BsonTempDataSerializer.cs (1)
156var itemType = item.GetType();
DependencyInjection\MvcNewtonsoftJsonOptionsExtensions.cs (2)
44var contractResolverName = options.SerializerSettings.ContractResolver.GetType().Name; 76var contractResolverName = options.SerializerSettings.ContractResolver.GetType().Name;
JsonPatchExtensions.cs (1)
51var affectedObjectName = jsonPatchError.AffectedObject.GetType().Name;
NewtonsoftJsonInputFormatter.cs (1)
76if (GetType() == typeof(NewtonsoftJsonInputFormatter))
NewtonsoftJsonOutputFormatter.cs (2)
153if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 240BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName);
NewtonsoftJsonPatchInputFormatter.cs (1)
52if (GetType() == typeof(NewtonsoftJsonPatchInputFormatter))
NewtonsoftJsonResultExecutor.cs (3)
105if (value != null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 175BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName); 186var type = value == null ? "null" : value.GetType().FullName;
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
91value.GetType()));
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (19)
NewtonsoftJsonOutputFormatterTest.cs (3)
451asyncEnumerable.GetType(), 496asyncEnumerable.GetType(), 530asyncEnumerable.GetType(),
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (16)
38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 175var expected = $"'AsyncEnumerableReader' reached the configured maximum size of the buffer when enumerating a value of type '{enumerable.GetType()}'. " + 177$"consider ways to reduce the collection size, or consider manually converting '{enumerable.GetType()}' into a list rather than increasing the limit."; 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
Microsoft.AspNetCore.Mvc.Razor (9)
DefaultTagHelperFactory.cs (1)
57tagHelper.GetType(),
RazorHotReload.cs (2)
36if (razorViewEngine.GetType() == typeof(RazorViewEngine)) 41if (razorPageActivator.GetType() == typeof(RazorPageActivator))
RazorPageActivator.cs (1)
69var pageType = page.GetType();
RazorPagePropertyActivator.cs (1)
66else if (context.ViewData.GetType() != _viewDataDictionaryType)
TagHelpers\TagHelperComponentPropertyActivator.cs (1)
33tagHelperComponent.GetType(),
TagHelpers\TagHelperComponentTagHelper.cs (3)
40_logger = loggerFactory.CreateLogger(GetType()); 72Log.TagHelperComponentInitialized(_logger, component.GetType().FullName!); 86Log.TagHelperComponentProcessed(_logger, component.GetType().FullName!);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
AssemblyPartExtensionTest.cs (1)
15var assembly = GetType().Assembly;
Microsoft.AspNetCore.Mvc.Razor.Test (1)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (1)
148Assert.Contains(typeof(RouteAttribute), item.Item.Metadata.Select(m => m.GetType())); // Verify we pick up new attributes
Microsoft.AspNetCore.Mvc.RazorPages (4)
ApplicationModels\PageConventionCollection.cs (1)
242if (pageConvention.GetType() == pageConventionType)
Filters\PageResponseCacheFilter.cs (1)
26_logger = loggerFactory.CreateLogger(GetType());
Infrastructure\DefaultPageFactoryProvider.cs (1)
47_pageActivator.GetType().FullName,
PageContext.cs (1)
123private string DebuggerToString() => ActionDescriptor?.DisplayName ?? $"{{{GetType().FullName}}}";
Microsoft.AspNetCore.Mvc.RazorPages.Test (23)
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (11)
79var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 107var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 134var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 165var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 196var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 227var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 262var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 263var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 296var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 297var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 327var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic);
Infrastructure\DefaultPageActivatorProviderTest.cs (4)
118PageTypeInfo = page.GetType().GetTypeInfo() 139PageTypeInfo = page.GetType().GetTypeInfo() 160PageTypeInfo = page.GetType().GetTypeInfo() 181PageTypeInfo = page.GetType().GetTypeInfo()
Infrastructure\DefaultPageFactoryProviderTest.cs (1)
37$"Page created by '{pageActivator.GetType()}' must be an instance of '{typeof(PageBase)}'.",
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (4)
623MethodInfo = GetType().GetMethod(nameof(Post)), 629MethodInfo = GetType().GetMethod(nameof(PostAsync)), 675MethodInfo = GetType().GetMethod(nameof(Post)), 682MethodInfo = GetType().GetMethod(nameof(PostAsync)),
Infrastructure\DefaultPageModelActivatorProviderTest.cs (3)
164ModelTypeInfo = model.GetType().GetTypeInfo() 185ModelTypeInfo = model.GetType().GetTypeInfo() 206ModelTypeInfo = model.GetType().GetTypeInfo()
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
InputTagHelperTest.cs (1)
167possibleBool.GetType().FullName,
Microsoft.AspNetCore.Mvc.Test (4)
MvcServiceCollectionExtensionsTest.cs (4)
276{ ImplementationInstance: { } instance } => instance.GetType(), 277{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(), 658implementations.Add(service.ImplementationInstance.GetType()); 663implementations.Add(instance.GetType());
Microsoft.AspNetCore.Mvc.Testing (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
180var buildMethod = builder.GetType().GetMethod("Build"); 190var hostType = host.GetType();
Microsoft.AspNetCore.Mvc.ViewFeatures (30)
DefaultDisplayTemplates.cs (2)
85"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 117itemMetadata = metadataProvider.GetMetadataForType(item.GetType());
DefaultEditorTemplates.cs (2)
67"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 99itemMetadata = metadataProvider.GetMetadataForType(item.GetType());
DefaultHtmlGenerator.cs (2)
989var valueType = value.GetType(); 1509value.GetType().FullName,
ExpressionMetadataProvider.cs (3)
169viewDataInfo.Container.GetType(), 176var containerMetadata = metadataProvider.GetMetadataForType(viewDataInfo.Container.GetType()); 185var valueMetadata = metadataProvider.GetMetadataForType(viewDataInfo.Value.GetType());
Filters\SaveTempDataPropertyFilterBase.cs (1)
136tempDataSerializer.GetType().FullName,
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
20_logger = loggerFactory.CreateLogger(GetType());
HtmlHelper.cs (1)
168foreach (var helper in HtmlAttributePropertyHelper.GetProperties(htmlAttributes.GetType()))
HtmlHelperOfT.cs (1)
82viewContext.ViewData.GetType().FullName,
Infrastructure\DefaultTempDataSerializer.cs (2)
148if (!CanSerializeType(value.GetType())) 153value.GetType()));
ModelExplorer.cs (1)
162return Model.GetType();
ModelExplorerExtensions.cs (1)
70if (!stringResult.Equals(modelExplorer.Model.GetType().FullName, StringComparison.Ordinal))
Rendering\ViewContext.cs (1)
218private string DebuggerToString() => View?.Path ?? $"{{{GetType().FullName}}}";
ViewComponents\DefaultViewComponentFactory.cs (1)
54viewComponent.GetType(),
ViewComponents\DefaultViewComponentHelper.cs (1)
117if (descriptor.Parameters.Count == 1 && descriptor.Parameters[0].ParameterType.IsAssignableFrom(arguments.GetType()))
ViewDataDictionary.cs (4)
195var modelType = model?.GetType(); 442var modelType = value?.GetType(); 498message = Resources.FormatViewData_WrongTModelType(value.GetType(), _declaredModelType); 516return _declaredModelType.IsAssignableFrom(value.GetType());
ViewDataDictionaryControllerPropertyActivator.cs (1)
40var controllerType = controller.GetType();
ViewDataEvaluator.cs (2)
167var tryDelegate = TryGetValueProvider.CreateInstance(indexableObject.GetType()); 200var propertyInfo = container.GetType().GetRuntimeProperty(propertyName);
ViewExecutor.cs (3)
134throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ViewOptions), GetType().Name)); 139throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(TempDataFactory), GetType().Name)); 144throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ModelMetadataProvider), GetType().Name));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (16)
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
28var controllerType = controller.GetType(); 73var controllerType = controller.GetType(); 117var controllerType = controller.GetType(); 156var controllerType = controller.GetType();
HtmlAttributePropertyHelperTest.cs (8)
16var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 31var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 46var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 61var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 78var helpers1 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 79var helpers2 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 94var helpers1 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 95var helpers2 = PropertyHelper.GetProperties(anonymous.GetType());
Infrastructure\DefaultTempDataSerializerTest.cs (2)
52Assert.Equal($"The '{testProvider.GetType()}' cannot serialize an object of type '{value.GetType()}'.", ex.Message);
Rendering\DefaultTemplatesUtilities.cs (1)
330var modelExplorer = helper.MetadataProvider.GetModelExplorerForType(model.GetType(), model);
ViewDataDictionaryTest.cs (1)
143$"The model item passed into the ViewDataDictionary is of type '{ model.GetType() }', but this " +
Microsoft.AspNetCore.OpenApi (8)
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (7)
77Type? converterType = converter?.GetType(); 102Type converterType = converter.GetType(); 271converter.GetType().Assembly == typeof(JsonConverter).Assembly; 317Type attrType = attr.GetType(); 321return (byte[])attr?.GetType().GetField("NullableFlags")?.GetValue(attr)!; 332Type attrType = attr.GetType(); 336return (byte?)attr?.GetType().GetField("Flag")?.GetValue(attr)!;
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
185action.MethodInfo = GetType().GetMethod(
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
346if (key.IsAssignableFrom(GetType()))
Microsoft.AspNetCore.Routing (7)
EndpointDataSource.cs (1)
49throw new NotSupportedException(Resources.FormatMapGroup_CustomEndpointUnsupported(endpoint.GetType()));
Matching\JumpTable.cs (1)
15return GetType().Name;
Matching\PolicyJumpTable.cs (1)
21return GetType().Name;
RouteConstraintBuilder.cs (1)
145_inlineConstraintResolver.GetType().Name));
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Routing.Tests (6)
Patterns\RoutePatternParserTest.cs (2)
699if (x.GetType() != y.GetType())
Tree\TreeRouterTest.cs (4)
1812Assert.Equal(next.Object.GetType(), nestedRouters[0].GetType()); 1854Assert.Equal(next.Object.GetType(), nestedRouters[0].GetType());
Microsoft.AspNetCore.Server.IIS (2)
Core\IISServerSetupFilter.cs (1)
18if (server?.GetType() != typeof(IISHttpServer))
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Deployers\ApplicationDeployer.cs (1)
25Logger = LoggerFactory.CreateLogger(GetType().FullName);
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
79throw new ObjectDisposedException(GetType().Name, "This instance of deployer has already been disposed.");
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
279using (var stream = GetType().Assembly.GetManifestResourceStream("Microsoft.AspNetCore.Server.IntegrationTesting.IIS.Http.config"))
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\TransportManager.cs (2)
62throw new InvalidOperationException($"No registered {nameof(IConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}"); 88throw new InvalidOperationException($"No registered {nameof(IMultiplexedConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
HttpRequestHeadersTests.cs (1)
144var methodValue = (StringValues)headerReferences.GetType().GetField("_Method").GetValue(headerReferences);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeTransportFactory.cs (1)
41throw new NotSupportedException($"{endpoint.GetType()} is not supported.");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
45throw new InvalidOperationException($"QUIC doesn't support listening on the configured endpoint type. Expected {nameof(IPEndPoint)} but got {endpoint.GetType().Name}.");
Microsoft.AspNetCore.Shared.Tests (30)
PropertyActivatorTest.cs (6)
17var typeInfo = instance.GetType().GetTypeInfo(); 40var typeInfo = instance.GetType().GetTypeInfo(); 56var typeInfo = instance.GetType().GetTypeInfo(); 80var typeInfo = instance.GetType().GetTypeInfo(); 104var typeInfo = instance.GetType().GetTypeInfo(); 123var typeInfo = instance.GetType().GetTypeInfo();
PropertyHelperTest.cs (21)
19var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 34var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 49var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 66instance.GetType()).First(prop => prop.Name == "PropA"); 82instance.GetType()).First(prop => prop.Name == "PropA"); 97var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 114var helpers1 = PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()); 115var helpers2 = PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()); 130var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 141var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 152var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 164var helper = Assert.Single(PropertyHelper.GetProperties(obj.GetType().GetTypeInfo())); 179var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 219var helper1 = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()).Where(prop => prop.Name == "IntProp")); 220var helper2 = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()).Where(prop => prop.Name == "StringProp")); 232var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 252var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 272var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 438var typeInfo = instance.GetType().GetTypeInfo(); 458var typeInfo = instance.GetType().GetTypeInfo(); 474var typeInfo = instance.GetType().GetTypeInfo();
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (1)
339foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.SignalR.Client.Core (15)
HubConnection.cs (7)
764if (arg is not null && ReflectionHelper.IsStreamingType(arg.GetType())) 828if (ReflectionHelper.IsIAsyncEnumerable(reader.GetType())) 831.MakeGenericMethod(reader.GetType().GetInterface("IAsyncEnumerable`1")!.GetGenericArguments()) 836if (ReflectionHelper.TryGetStreamType(reader.GetType(), out var channelGenericType)) 845throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}."); 1153throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); 2096Log.DroppingMessage(_logger, ((HubInvocationMessage)message).GetType().Name, ((HubInvocationMessage)message).InvocationId);
HubConnection.Log.cs (6)
31var argsList = args == null ? string.Empty : string.Join(", ", args.Select(a => a?.GetType().FullName ?? "(null)")); 42SendingMessage(logger, message.GetType().Name, invocationMessage.InvocationId); 46SendingMessageGeneric(logger, message.GetType().Name); 63MessageSent(logger, message.GetType().Name, invocationMessage.InvocationId); 67MessageSentGeneric(logger, message.GetType().Name); 88var argsList = args == null ? string.Empty : string.Join(", ", args.Select(a => a?.GetType().FullName ?? "(null)"));
HubConnectionBuilder.cs (1)
89return base.GetType();
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.AspNetCore.SignalR.Common.Tests (9)
Internal\Protocol\JsonHubProtocolTests.cs (2)
254Assert.Equal(expected.GetType(), actual.GetType());
Internal\Protocol\TestBinder.cs (4)
21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 27_returnType = s.Item?.GetType() ?? typeof(object); 30_returnType = c.Result?.GetType() ?? typeof(object);
Internal\Protocol\TestHubMessageEqualityComparer.cs (3)
20if (!Equals(x.GetType(), y.GetType())) 47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Core (7)
HubLifetimeManager.cs (2)
149throw new NotImplementedException($"{GetType().Name} does not support client return values."); 160throw new NotImplementedException($"{GetType().Name} does not support client return values.");
HubOptionsSetup.cs (1)
35if (hubProtocol.GetType().CustomAttributes.Where(a => a.AttributeType.FullName == "Microsoft.AspNetCore.SignalR.Internal.NonDefaultHubProtocolAttribute").Any())
Internal\DefaultHubDispatcher.cs (3)
135Log.DroppingMessage(_logger, hubMessage.GetType().Name, (hubMessage as HubInvocationMessage)?.InvocationId ?? "(null)"); 210Log.UnsupportedMessageReceived(_logger, hubMessage.GetType().FullName!); 660descriptor.OriginalParameterTypes[parameterPointer].IsAssignableFrom(hubMethodInvocationMessage.Arguments[hubInvocationArgumentPointer]?.GetType())))
Internal\DefaultHubProtocolResolver.cs (1)
26Log.RegisteredSignalRProtocol(_logger, protocol.Name, protocol.GetType());
Microsoft.AspNetCore.SignalR.Microbenchmarks (5)
HubConnectionReceiveBenchmark.cs (1)
88_hubConnection.On(MethodName, arguments.Select(v => v.GetType()).ToArray(), OnInvoke);
TestBinder.cs (4)
18_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_returnType = s.Item?.GetType() ?? typeof(object); 27_returnType = c.Result?.GetType() ?? typeof(object);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
567throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Protocol\MessagePackHubProtocolWorker.cs (2)
419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 503Serialize(ref writer, argument.GetType(), argument);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
564throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Tests (8)
HubConnectionHandlerTests.cs (3)
2309Assert.Equal(typeof(MethodHub), resource.Hub.GetType()); 2787Assert.True(false, "Unexpected message type: " + message.GetType().Name); 3931Assert.Equal(typeof(CompletionMessage), response.GetType());
HubConnectionHandlerTestUtils\Utils.cs (1)
52throw new InvalidOperationException($"Unsupported Hub Message type {expected.GetType()}");
Internal\DefaultHubProtocolResolverTests.cs (3)
25protocol.GetType(), 38protocol.GetType(), 51protocol.GetType(),
Internal\ReflectionHelperTests.cs (1)
45streamAsObject.GetType(),
Microsoft.AspNetCore.TestHost (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\9.0.0-preview.5.24265.2\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
180var buildMethod = builder.GetType().GetMethod("Build"); 190var hostType = host.GetType();
WebHostBuilderExtensions.cs (1)
80if (webHostBuilder.GetType().Name.Equals("GenericWebHostBuilder", StringComparison.Ordinal))
Microsoft.Build (70)
BackEnd\Client\MSBuildClient.cs (1)
582throw new InvalidOperationException($"Unexpected packet type {packet.GetType().Name}");
BackEnd\Components\BuildRequestEngine\FullyQualifiedBuildRequest.cs (2)
118return GetType() == obj.GetType() && InternalEquals((FullyQualifiedBuildRequest)obj);
BackEnd\Components\Logging\LoggingService.cs (7)
721loggerTypes.Add(logger.GetType().FullName); 936buildEvent?.GetType().Name ?? string.Empty); 1410InternalLoggerException.Throw(e, null, "FatalErrorDuringLoggerShutdown", false, logger.GetType().Name); 1492ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName); 1719using var assemblyLoadTracker = AssemblyLoadsTracker.StartTracking(this, AssemblyLoadingContext.LoggerInitialization, UnwrapLoggerType(logger).GetType()); 1733InternalLoggerException.Throw(e, null, "FatalErrorWhileInitializingLogger", true, logger.GetType().Name); 1774_ => innerLogger.GetType().FullName == "Microsoft.Build.Logging.TerminalLogger.TerminalLogger"
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
213pluginTypeName = projectCacheDescriptor.PluginInstance.GetType().Name;
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (1)
80ErrorUtilities.ThrowInternalError("Unhandled intrinsic task type {0}", taskInstance.GetType().GetTypeInfo().BaseType);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
245else if (parameterValue.GetType().IsValueType)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
657using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(taskLoggingContext, AssemblyLoadingContext.TaskRun, _taskExecutionHost?.TaskInstance?.GetType());
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
1118if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1121_taskLoggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
376catch (Exception e) when ((e is FileNotFoundException || e is FileLoadException) && sdkResolver.GetType().GetTypeInfo().Name.Equals("NuGetSdkResolver", StringComparison.Ordinal))
BackEnd\Shared\BuildRequestConfiguration.cs (2)
865if (GetType() != obj.GetType())
BackEnd\Shared\ConfigurationMetadata.cs (2)
129if (GetType() != obj.GetType())
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
335string realTaskAssemblyLoaction = TaskInstance.GetType().Assembly.Location;
BuildCheck\Infrastructure\BuildCheckConnectorLogger.cs (1)
106if (_eventHandlers.TryGetValue(e.GetType(), out Action<BuildEventArgs>? handler))
BuildCheck\Infrastructure\CustomConfigurationData.cs (2)
53if (obj.GetType() != this.GetType())
Construction\ProjectElement.cs (6)
354ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 507if (!clone.GetType().IsEquivalentTo(GetType())) 509ErrorUtilities.ThrowInternalError("{0}.Clone() returned an instance of type {1}.", GetType().Name, clone.GetType().Name);
Construction\ProjectElementContainer.cs (2)
355ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
Construction\ProjectExtensionsElement.cs (2)
165ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
Evaluation\Evaluator.cs (1)
1854using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(_evaluationLoggingContext, AssemblyLoadingContext.SdkResolution, _sdkResolverService.GetType());
Evaluation\Expander.cs (7)
3390functionBuilder.ReceiverType = propertyValue.GetType(); 3421var receiverType = propertyValue?.GetType() ?? typeof(string); 3523_receiverType = objectInstance.GetType(); 3527args[0] = Convert.ChangeType(args[0], objectInstance.GetType(), CultureInfo.InvariantCulture); 4465if (args[i].GetType() != type) 4890? string.Join(", ", args.Select(a => a?.GetType().Name ?? "null")) 4893File.AppendAllText(logFile, $"ReceiverType={_receiverType?.FullName}; ObjectInstanceType={objectInstance?.GetType().FullName}; MethodName={_methodMethodName}({argSignature})\n");
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
138throw new InvalidOperationException(fragment.GetType().ToString());
Instance\ProjectItemGroupTaskInstance.cs (1)
130var typeName = this.GetType().FullName;
Instance\ProjectOnErrorInstance.cs (1)
119var typeName = this.GetType().FullName;
Instance\ProjectPropertyGroupTaskInstance.cs (1)
129var typeName = this.GetType().FullName;
Instance\ProjectTaskInstance.cs (1)
362var typeName = this.GetType().FullName;
Instance\ProjectTaskOutputItemInstance.cs (1)
140var typeName = this.GetType().FullName;
Instance\ProjectTaskOutputPropertyInstance.cs (1)
140var typeName = this.GetType().FullName;
Instance\TaskFactoryLoggingHost.cs (2)
343if (!e.GetType().GetTypeInfo().IsSerializable && 348_loggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 468string assemblyLocation = _buildEvent.GetType().GetTypeInfo().Assembly.Location; 502Type eventDerivedType = _buildEvent.GetType(); 669Type eventType = eventArg.GetType();
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
TaskLoader.cs (1)
138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskLoggingHelper.cs (3)
53TaskName = taskInstance.GetType().Name; 274Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?"); 469Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?");
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
Utilities\EngineFileUtilities.cs (2)
285throw new InternalErrorException($"Logging type {loggingMechanism.GetType()} is not understood by {nameof(GetFileList)}."); 323throw new InternalErrorException($"Logging type {loggingMechanism.GetType()} is not understood by {nameof(GetFileList)}.");
Utilities\Utilities.cs (2)
665Debug.Fail($"In {nameof(EnumerateProperties)}(): Unexpected property {item} of type {item?.GetType().ToString()}"); 719Debug.Fail($"In {nameof(EnumerateItems)}(): Unexpected {nameof(item)} {item} of type {item?.GetType().ToString()}");
Microsoft.Build.BuildCheck.UnitTests (2)
BuildCheckManagerProviderTests.cs (2)
45_logger.AllBuildEvents.Where(be => be.GetType() == typeof(BuildMessageEventArgs)).Select(be => be.Message).ToArray() 55var mockedField = _testedInstance.GetType().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance);
Microsoft.Build.CommandLine.UnitTests (2)
ValidateAssemblyLoadContext.cs (2)
26if (thisLoadContext.GetType().FullName == typeof(MSBuildLoadContext).FullName) 39Log.LogError($"Load context was a {thisLoadContext.GetType().AssemblyQualifiedName} instead of an {typeof(MSBuildLoadContext).AssemblyQualifiedName}");
Microsoft.Build.Engine (28)
Caching\BuildItemCacheEntry.cs (2)
65if ((other == null) || (other.GetType() != this.GetType()))
Caching\BuildResultCacheEntry.cs (2)
64if ((other == null) || (other.GetType() != this.GetType()))
Caching\CacheEntryCustomSerializer.cs (1)
25Type entryType = entry.GetType();
Caching\PropertyCacheEntry.cs (2)
63if ((other == null) || (other.GetType() != this.GetType()))
Engine\Engine.cs (2)
1075InternalLoggerException.Throw(e, null, "FatalErrorWhileInitializingLogger", false, logger.GetType().Name); 1239InternalLoggerException.Throw(e, null, "FatalErrorDuringLoggerShutdown", false, logger.GetType().Name);
Engine\EngineProxy.cs (10)
149if (parentModule.IsRunningMultipleNodes && !e.GetType().IsSerializable) 151loggingServices.LogWarning(buildEventContext, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name); 183if (e.GetType().Equals(BuildErrorEventArgsType)) 218if (parentModule.IsRunningMultipleNodes && !e.GetType().IsSerializable) 220loggingServices.LogWarning(buildEventContext, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name); 224if (e.GetType().Equals(BuildWarningEventArgsType)) 295if (parentModule.IsRunningMultipleNodes && !e.GetType().IsSerializable) 297loggingServices.LogWarning(buildEventContext, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name); 312if (parentModule.IsRunningMultipleNodes && !e.GetType().IsSerializable) 314loggingServices.LogWarning(buildEventContext, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
Engine\Expander.cs (3)
586Type valueType = valueToConvert.GetType(); 1121objectType = propertyValue.GetType(); 1191args[0] = Convert.ChangeType(args[0], objectInstance.GetType(), CultureInfo.InvariantCulture);
Engine\NodeLoggingEvent.cs (4)
92Type eventType = eventArg.GetType(); 193Type eventType = e.GetType(); 211writer.Write(e.GetType().Assembly.Location); 224Type eventType = e.GetType();
Engine\TaskEngine.cs (1)
506Type taskType = task.GetType();
LocalProvider\LocalCallDescriptor.cs (1)
457if (nodeEvent.GetType() == typeof(NodeLoggingEvent))
Microsoft.Build.Engine.OM.UnitTests (13)
Construction\ElementLocationPublic_Tests.cs (1)
125foreach (var property in element.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
Construction\ProjectRootElement_Tests.cs (2)
2007object cache = document.GetType().InvokeMember("StringCache", bindingFlags, null, document, Array.Empty<object>()); 2008return (int)cache.GetType().InvokeMember("DocumentCount", bindingFlags, null, cache, Array.Empty<object>());
Definition\ProjectCollection_Tests.cs (1)
1446Version expectedVersion = new Version(this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version);
ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
275throw new NotImplementedException($"Unknown type:{view.GetType().Name}");
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (1)
107var implType = xml.GetType();
ObjectModelRemoting\RemoteProjectsProviderMock\LinkedObjectsMap.cs (2)
110throw new ObjectDisposedException(GetType().Name); 188throw new ObjectDisposedException(GetType().Name);
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
Microsoft.Build.Engine.UnitTests (28)
BackEnd\BinaryTranslator_Tests.cs (2)
890if (obj.GetType() != this.GetType())
BackEnd\EventSourceSink_Tests.cs (1)
297if (buildEventToRaise.GetType() != typeof(GenericBuildStatusEventArgs))
BackEnd\FailingTask.cs (1)
17BuildEngine.GetType().GetProperty("AllowFailureWithoutError").SetValue(BuildEngine, AllowFailureWithoutError.Equals("True"));
BackEnd\NodePackets_Tests.cs (1)
333.WithTracing(), "Roundtrip deserialization of message type {0} should be equivalent", args.GetType().Name);
BackEnd\SdkResolverLoader_Tests.cs (1)
49resolvers.Select(i => i.GetType().FullName).ShouldBe(new[] { typeof(DefaultSdkResolver).FullName });
BackEnd\TaskBuilderTestTask.cs (2)
1240return GetType().GetProperty(property.Name).GetValue(this, null); 1253GetType().GetProperty(property.Name).SetValue(this, value, null);
BackEnd\TaskHost_Tests.cs (4)
460string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 479string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 499string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 519string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name);
BuildEventArgsSerialization_Tests.cs (1)
1175Assert.Equal(typeof(T), deserializedArgs.GetType());
Construction\ElementLocation_Tests.cs (11)
45Assert.Contains("RegularElementLocation", location.GetType().FullName); 58Assert.Contains("RegularElementLocation", location.GetType().FullName); 71Assert.Contains("RegularElementLocation", location.GetType().FullName); 172Assert.Contains("RegularElementLocation", location.GetType().FullName); 190Assert.Contains("SmallElementLocation", deserializedLocation.GetType().FullName); 203Assert.Contains("SmallElementLocation", location.GetType().FullName); 248Assert.Contains("SmallElementLocation", location.GetType().FullName); 261Assert.Contains("SmallElementLocation", location.GetType().FullName); 274Assert.Contains("SmallElementLocation", location.GetType().FullName); 292Assert.Contains("SmallElementLocation", location.GetType().FullName); 432foreach (var property in node.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
Evaluation\EvaluationLogging_Tests.cs (2)
131allBuildEvents[0].GetType().ShouldBe(typeof(ProjectEvaluationStartedEventArgs)); 132allBuildEvents[1].GetType().ShouldBe(typeof(ProjectEvaluationFinishedEventArgs));
Instance\ProjectPropertyInstance_Internal_Tests.cs (2)
67Assert.Equal(typeof(ProjectPropertyInstance), property.GetType()); 86Assert.Equal("Microsoft.Build.Execution.ProjectPropertyInstance+ProjectPropertyInstanceImmutable", property.GetType().ToString());
Microsoft.Build.Framework (11)
BinaryTranslator.cs (1)
484Type enumType = value.GetType();
BuildEventContext.cs (2)
244if (GetType() != obj.GetType())
ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
LazyFormattedBuildEventArgs.cs (2)
183if (param != null && param.ToString() == param.GetType().FullName) 185throw new InvalidOperationException(string.Format("Invalid type for message formatting argument, was {0}", param.GetType().FullName));
SegmentedArray.cs (1)
135if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
SegmentedDictionary`2.cs (1)
117if (dictionary.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
Traits.cs (3)
586if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 587param.GetType() != typeof(string)) 590param.GetType().FullName);
Microsoft.Build.Framework.UnitTests (3)
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
Microsoft.Build.Tasks.Core (18)
AssignProjectConfiguration.cs (1)
244Log.LogErrorWithCodeFromResources("General.ErrorExecutingTask", GetType().Name, e.Message);
ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
GenerateManifestBase.cs (1)
464if (manifestType != _manifest.GetType())
GenerateResource.cs (1)
3813_logger.LogErrorWithCodeFromResources(null, fileName, 0, 0, 0, 0, "GenerateResource.OnlyStringsSupported", key, v?.GetType().FullName);
ManifestUtil\ManifestReader.cs (2)
195if (m.GetType() == typeof(ApplicationManifest)) 211n = m.GetType().Name;
ManifestUtil\ManifestWriter.cs (3)
26var s = new XmlSerializer(manifest.GetType()); 100n = manifest.GetType().Name; 117if (manifest.GetType() == typeof(ApplicationManifest))
ResolveNonMSBuildProjectOutput.cs (1)
148Log.LogErrorWithCodeFromResources("General.ErrorExecutingTask", this.GetType().Name, e.Message);
ResourceHandling\LiveObjectResource.cs (2)
24public string TypeAssemblyQualifiedName => Value.GetType().AssemblyQualifiedName; 26public string TypeFullName => Value.GetType().FullName;
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
System.Design.cs (1)
101_resources = new MainAssemblyFallbackResourceManager("System.Design", this.GetType().Assembly);
system.design\stronglytypedresourcebuilder.cs (1)
125? new ResourceData(liveObject.Value.GetType(), liveObject.Value.ToString())
Microsoft.Build.Tasks.UnitTests (1)
ResourceHandling\GenerateResource_Tests.cs (1)
4175return o.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
Microsoft.Build.UnitTests.Shared (2)
BuildEventArgsExtension.cs (2)
38if (args.GetType() != other.GetType())
Microsoft.Build.Utilities.Core (10)
ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
TaskLoggingHelper.cs (3)
53TaskName = taskInstance.GetType().Name; 274Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?"); 469Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?");
ToolTask.cs (2)
643LogPrivate.LogWarningWithCodeFromResources("ToolTask.CommandTooLong", GetType().Name); 1352LogPrivate.LogErrorWithCodeFromResources("ToolTask.ValidateParametersFailed", this.GetType().FullName);
Microsoft.Cci.Extensions (6)
Differs\Differences.cs (1)
36return obj.GetType().Name;
Extensions\DocIdExtensions.cs (1)
83Contract.Assert(false, string.Format("Fell through cases in TypeExtensions.RefDocId() Type of reference: {0}", reference.GetType()));
Extensions\TypeExtensions.cs (3)
151throw new NotSupportedException(string.Format("Unknown IReference '{0}' so we cannot get assembly reference!", reference.GetType().FullName)); 263Contract.Assert(false, String.Format("Fell through cases in TypeExtensions.FullName() Type of reference: {0}", reference.GetType())); 417string.Format("Unexpected type reference that we may need to unwrap {0}", (reference != null ? reference.GetType().FullName : "null")));
Writers\CSharp\CSDeclarationWriter.Enums.cs (1)
186throw new ArgumentException($"Unsupported type {value.GetType()}", nameof(value));
Microsoft.CSharp (9)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
55tempForIncrement = Expression.Variable(value != null ? value.GetType() : typeof(object), "t0"); 118Expression.Assign(tempForIncrement, Expression.Convert(arg0.Expression, arg0.Value.GetType())),
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (3)
71this.type = value == null ? "<null>" : value.GetType().ToString(); 190delegateSignatureTypes[i + 1] = args[i].GetType(); 213Delegate target = (Delegate)site.GetType().GetField("Target").GetValue(site);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
506arg.RuntimeObjectActualType = SymbolTable.GetCTypeFromType(argument.Value.GetType());
Microsoft\CSharp\RuntimeBinder\Semantics\ConstVal.cs (1)
90Type.GetTypeCode(o.GetType()) switch
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (2)
1511Debug.Assert(Type.GetTypeCode(defValue.GetType()) != TypeCode.Decimal); // Handled above 1512switch (Type.GetTypeCode(defValue.GetType()))
Microsoft.DotNet.ApiCompat (4)
ApiCompatRunner.cs (3)
107foreach (var rule in rules.OrderBy(r => r.GetType().Name, StringComparer.OrdinalIgnoreCase)) 109string ruleName = rule.GetType().Name; 384rule.GetType().GetTypeInfo().GetCustomAttribute<ExportDifferenceRuleAttribute>().OptionalRule;
Rules\Compat\TypeCannotChangeClassification.cs (1)
58throw new System.NotSupportedException(string.Format("Only support types that are class, struct, or interface. {0}", type.GetType()));
Microsoft.DotNet.Arcade.Sdk.Tests (3)
Utilities\TestProjectFixture.cs (3)
34_logOutputDir = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "LogOutputDir").Value; 51var nugetRoot = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "NuGetPackageRoot").Value; 52var pkgVersion = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "PackageVersion").Value;
Microsoft.DotNet.AsmDiff (1)
DiffApiDefinition.cs (1)
58throw new NotImplementedException("Unknown CCI object type: " + obj.GetType());
Microsoft.DotNet.Build.Tasks.Feed (1)
src\Common\Internal\EnumExtensions.cs (1)
16Type type = value.GetType();
Microsoft.DotNet.Build.Tasks.Packaging (3)
PackageIndex.cs (2)
739throw new JsonSerializationException($"Expected {nameof(InboxFrameworks)} but got {value.GetType()}"); 853throw new JsonSerializationException($"Expected {nameof(MetaPackages)} but got {value.GetType()}");
PackageReport.cs (1)
103throw new JsonSerializationException($"Expected {nameof(NuGetFramework)} but got {value.GetType()}");
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\BaseAnalyzer.cs (1)
28if (StringComparer.OrdinalIgnoreCase.Equals(line.ToString(), GetType().Name))
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\AssertEx.cs (2)
64if (x.GetType() != y.GetType())
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
536Type targetType = d.Target.GetType();
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
ServiceClientCodeFactory.cs (1)
90HelperFactory.RegisterAllForType(hb, language.GetType(), language);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (2)
67&& _backendCache.GetType() == typeof(MemoryDistributedCache) 68&& _localCache.GetType() == typeof(MemoryCache))
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (36)
RedisCacheSetAndRemoveTests.cs (10)
22var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 32var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 45var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 62var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 79var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 95var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 105var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 119var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 136var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 159var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
TimeExpirationAsyncTests.cs (13)
40var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 58var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 79var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 92var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 108var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 124var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 144var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 157var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 170var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 186var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 204var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 217var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 242var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
TimeExpirationTests.cs (13)
23var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 41var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 62var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 75var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 91var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 108var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 128var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 141var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 154var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 171var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 189var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 202var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 227var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
Microsoft.Extensions.Configuration (1)
ConfigurationProvider.cs (1)
125public override string ToString() => GetType().Name;
Microsoft.Extensions.Configuration.Binder (4)
BindingPoint.cs (1)
47return _initialValue?.GetType() is { } initialValueType
ConfigurationBinder.cs (3)
144BindInstance(instance.GetType(), bindingPoint, configuration, options, false); 225List<PropertyInfo> modelProperties = GetAllProperties(instance.GetType()); 244nameof(options.ErrorOnUnknownConfiguration), nameof(BinderOptions), instance.GetType(),
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
54string s = GetType().Name;
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
54=> $"{GetType().Name} for '{Source.Path}' ({(Source.Optional ? "Optional" : "Required")})";
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
117=> $"{GetType().Name} for files in '{GetDirectoryName()}' ({(Source.Optional ? "Optional" : "Required")})";
Microsoft.Extensions.DependencyInjection (7)
DependencyInjectionEventSource.cs (1)
267builder.Append(instance.GetType());
ServiceLookup\CallSiteFactory.cs (1)
583if (parameterType != serviceIdentifier.ServiceKey.GetType())
ServiceLookup\CallSiteVisitor.cs (1)
54throw new NotSupportedException(SR.Format(SR.CallSiteTypeNotSupported, callSite.GetType()));
ServiceLookup\ConstantCallSite.cs (2)
18throw new ArgumentException(SR.Format(SR.ConstantCantBeConvertedToServiceType, defaultValue.GetType(), serviceType)); 25public override Type ImplementationType => DefaultValue?.GetType() ?? _serviceType;
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
94owner: GetType(),
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.DependencyInjection.Abstractions (6)
ActivatorUtilities.cs (2)
182argumentTypes[i] = parameters[i]?.GetType(); 822Type? givenType = givenParameters[givenIndex]?.GetType();
ServiceDescriptor.cs (4)
302return ImplementationInstance.GetType(); 306Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 321return KeyedImplementationInstance.GetType(); 325Type[]? typeArguments = KeyedImplementationFactory.GetType().GenericTypeArguments;
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.FileProviders.Embedded.Tests (11)
EmbeddedFileProviderTests.cs (11)
26var provider = new EmbeddedFileProvider(GetType().Assembly); 42var provider = new EmbeddedFileProvider(GetType().Assembly); 62var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".SubNamespace"); 76var provider = new EmbeddedFileProvider(GetType().Assembly); 109var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".Resources"); 147var provider = new EmbeddedFileProvider(GetType().Assembly); 185var provider = new EmbeddedFileProvider(GetType().Assembly); 206var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".Resources"); 226var provider = new EmbeddedFileProvider(GetType().Assembly, "Unknown.Namespace"); 243var provider = new EmbeddedFileProvider(GetType().Assembly); 258var provider = new EmbeddedFileProvider(GetType().Assembly);
Microsoft.Extensions.Http (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.Logging (1)
LoggerInformation.cs (1)
76ProviderType = provider.GetType();
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.ObjectPool (1)
DisposableObjectPool.cs (1)
34throw new ObjectDisposedException(GetType().Name);
Microsoft.Extensions.Options (2)
OptionsCache.cs (1)
55if (GetType() != typeof(OptionsCache<TOptions>))
OptionsServiceCollectionExtensions.cs (1)
244Type configureType = configureInstance.GetType();
Microsoft.Extensions.Options.DataAnnotations (2)
DataAnnotationValidateOptions.cs (2)
62if (TryValidateOptions(options, options.GetType().Name, validationResults, ref errors, ref visited)) 96foreach (PropertyInfo propertyInfo in options.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public))
Microsoft.JSInterop (5)
Infrastructure\DotNetDispatcher.cs (2)
125else if (syncResult?.GetType() is { IsGenericType: true } syncResultType 383var type = objectReference.Value.GetType();
Infrastructure\TaskGenericsUtil.cs (2)
28var getter = _cachedResultGetters.GetOrAdd(task.GetType(), taskInstanceType => 106return _cachedResultSetters.GetOrAdd(taskCompletionSource.GetType(), tcsType =>
JSRuntime.cs (1)
313throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
Microsoft.JSInterop.Tests (1)
DotNetObjectReferenceTest.cs (1)
50var expected = $"{objRef.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}. A common cause is caching an instance of {nameof(DotNetObjectReference<string>)}" +
Microsoft.VisualBasic.Core (84)
Microsoft\VisualBasic\Collection.vb (2)
470If obj1.GetType() Is obj2.GetType() Then
Microsoft\VisualBasic\CompilerServices\ConversionResolution.vb (1)
150Debug.Assert(GetTypeCode(Result.GetType()) = tc, "Widest type is invalid")
Microsoft\VisualBasic\CompilerServices\Conversions.vb (7)
2457Debug.Assert(IsIntrinsicType(Expression.GetType) OrElse IsEnum(Expression.GetType), "this function converts between intrinsic types only") 2516Dim SourceType As Type = Expression.GetType 2581Dim SourceType As Type = Expression.GetType 2639InvocationResult.GetType().Equals(TargetType.GetGenericArguments()(0))) Then 2641Dim PostConversion As ConversionClass = ClassifyPredefinedConversion(TargetType, InvocationResult.GetType) 2676Dim SourceType As Type = Expression.GetType
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (2)
1461CType(c.GetType().GetField("Target").GetValue(c), System.Delegate) 1488CType(c.GetType().GetField("Target").GetValue(c), System.Delegate)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (11)
80objType = o.GetType() 279objType = o.GetType() 398indexTypes(i) = oArg.GetType() 505objType = o.GetType() 722If RValueBase AndAlso o.GetType().IsValueType Then 723Throw New Exception(SR.Format(SR.RValueBaseForValueType, o.GetType().Name, o.GetType().Name)) 741objType = o.GetType() 767If Not NewValue.GetType() Is elemType Then 963objType = o.GetType() 1165If (Value Is Nothing) OrElse Member.DeclaringType.IsAssignableFrom(Value.GetType) Then
Microsoft\VisualBasic\CompilerServices\ObjectFlowControl.vb (12)
25If Expression IsNot Nothing AndAlso Expression.GetType.IsValueType() Then 27SR.Format(SR.SyncLockRequiresReferenceType1, VBFriendlyName(Expression.GetType))) 155Dim startType As Type = Start.GetType() 156Dim limitType As Type = Limit.GetType() 157Dim stepType As Type = StepValue.GetType() 269Dim counterTypeCode As TypeCode = Counter.GetType.GetTypeCode 290Counter = ConvertLoopElement("Start", Counter, Counter.GetType(), loopFor._widestType) 293loopFor._limit = ConvertLoopElement("Limit", loopFor._limit, loopFor._limit.GetType(), loopFor._widestType) 294loopFor._stepValue = ConvertLoopElement("Step", loopFor._stepValue, loopFor._stepValue.GetType(), loopFor._widestType) 301Dim resultTypeCode As TypeCode = loopFor._counter.GetType.GetTypeCode ' CType(LoopFor.Counter, IConvertible).GetTypeCode() 324If loopFor._counter.GetType() IsNot loopFor._widestType Then 325loopFor._counter = ConvertLoopElement("Start", loopFor._counter, loopFor._counter.GetType(), loopFor._widestType)
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (11)
1145Type1 = obj.GetType() 1153Type1 = obj.GetType() 1161Type1 = obj.GetType() 1169Type1 = obj.GetType() 1216Type1 = obj1.GetType() 1220Type2 = obj2.GetType() 1313Type1 = obj1.GetType() 1317Type2 = obj2.GetType() 1410Type1 = obj1.GetType() 1414Type2 = obj2.GetType() 3529fromType = obj.GetType()
Microsoft\VisualBasic\CompilerServices\Operators.Resolution.vb (3)
140rightType = arguments(1).GetType 144leftType = arguments(0).GetType 148rightType = arguments(1).GetType
Microsoft\VisualBasic\CompilerServices\Operators.vb (15)
47Return o.GetType.GetTypeCode 56Debug.Assert(left Is Nothing OrElse right Is Nothing OrElse left.GetType.GetTypeCode = right.GetType.GetTypeCode, 65Return left.GetType 68Dim leftType As Type = left.GetType 69If leftType Is right.GetType Then 78Return right.GetType 1143Return NotSByte(Convert.ToSByte(Operand), Operand.GetType()) 1146Return NotByte(Convert.ToByte(Operand), Operand.GetType()) 1149Return NotInt16(Convert.ToInt16(Operand), Operand.GetType()) 1152Return NotUInt16(Convert.ToUInt16(Operand), Operand.GetType()) 1155Return NotInt32(Convert.ToInt32(Operand), Operand.GetType()) 1158Return NotUInt32(Convert.ToUInt32(Operand), Operand.GetType()) 1161Return NotInt64(Convert.ToInt64(Operand), Operand.GetType()) 1164Return NotUInt64(Convert.ToUInt64(Operand), Operand.GetType())
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (1)
2139Return argument.GetType
Microsoft\VisualBasic\CompilerServices\StructUtils.vb (1)
35typ = oStruct.GetType()
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
788_type = instance.GetType
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
338Return VBFriendlyName(obj.GetType, obj) 525Dim defaultValueType As System.Type = defaultValue.GetType
Microsoft\VisualBasic\CompilerServices\VB6File.vb (3)
872Return VTFromComType(VarName.GetType()) 2157typ = obj.GetType() 2251CurrentType = value.GetType()
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (2)
206typ = Value.GetType 445typ = Value.GetType
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
528ArgTypes(ArgIndex) = args(ArgIndex).GetType()
Microsoft\VisualBasic\CompilerServices\Versioned.vb (1)
114typ = Expression.GetType()
Microsoft\VisualBasic\Conversion.vb (2)
167Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_NotNumericType2, NameOf(Number), Number.GetType().FullName)), vbErrors.TypeMismatch) 240Throw VbMakeException(New ArgumentException(SR.Format(SR.Argument_NotNumericType2, NameOf(Number), Number.GetType().FullName)), vbErrors.TypeMismatch)
Microsoft\VisualBasic\Information.vb (2)
255Return VarTypeFromComType(VarName.GetType()) 434typ = VarName.GetType()
Microsoft\VisualBasic\Strings.vb (4)
1242If (Expression Is Nothing) OrElse (Expression.GetType() Is Nothing) Then 1364typ = Expression.GetType() 1441typ = Expression.GetType() 1803typ = Expression.GetType()
MSBuild (15)
ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 471string assemblyName = _buildEvent.GetType().GetTypeInfo().Assembly.FullName; 502Type eventDerivedType = _buildEvent.GetType(); 669Type eventType = eventArg.GetType();
OutOfProcTaskAppDomainWrapperBase.cs (2)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskHostNode.cs (2)
1188if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1193LogWarningFromResource("ExpectedEventToBeSerializable", e.GetType().Name);
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
XMake.cs (1)
1327Type t1 = loggers[0].GetType();
MSBuildTaskHost (19)
BinaryTranslator.cs (1)
484Type enumType = value.GetType();
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (2)
102if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 104ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName);
LogMessagePacketBase.cs (4)
422Type eventDerivedType = _buildEvent.GetType(); 468string assemblyLocation = _buildEvent.GetType().GetTypeInfo().Assembly.Location; 502Type eventDerivedType = _buildEvent.GetType(); 669Type eventType = eventArg.GetType();
OutOfProcTaskAppDomainWrapperBase.cs (2)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskHostNode.cs (2)
1188if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1193LogWarningFromResource("ExpectedEventToBeSerializable", e.GetType().Name);
ResourceUtilities.cs (3)
240if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 241param.GetType() != typeof(string)) 244param.GetType().FullName);
TaskLoader.cs (1)
138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
Traits.cs (3)
586if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 587param.GetType() != typeof(string)) 590param.GetType().FullName);
Mvc.Api.Analyzers.Test (24)
ActualApiResponseMetadataFactoryTest.cs (6)
69var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 364var testSource = MvcTestSource.Read(GetType().Name, "TryGetActualResponseMetadataTests"); 365var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source }); 405var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 424var testSource = MvcTestSource.Read(GetType().Name, test); 425var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (2)
84return MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource }); 89return MvcTestSource.Read(GetType().Name, fileName)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest.cs (2)
52var testSource = MvcTestSource.Read(GetType().Name, testMethod); 66var testSource = MvcTestSource.Read(GetType().Name, testMethod);
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (2)
49return MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource }); 54return MvcTestSource.Read(GetType().Name, fileName)
ApiControllerFactsTest.cs (3)
34var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 128var testSource = MvcTestSource.Read(GetType().Name, testFile); 129var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
ApiConventionAnalyzerIntegrationTest.cs (2)
263var testSource = MvcTestSource.Read(GetType().Name, testMethod); 282var testSource = MvcTestSource.Read(GetType().Name, testMethod);
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (1)
22var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, source);
MvcFactsTest.cs (2)
222var testSource = MvcTestSource.Read(GetType().Name, test); 223var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiConventionMatcherTest.cs (2)
555var testSource = MvcTestSource.Read(GetType().Name, test); 556var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiResponseMetadataProviderTest.cs (2)
476var testSource = MvcTestSource.Read(GetType().Name, test); 477var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
Mvc.RoutingWebSite (1)
Controllers\RouteDataController.cs (1)
38var routers = RouteData.Routers.Select(r => r.GetType().FullName).ToArray();
PresentationBuildTasks (7)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (2)
4709|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4752KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (1)
1759_previousXamlParser.GetType() != typeof(StyleXamlParser); }
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
1193baseType = dynamicObject.GetType(); 5254_xmlReader.GetType().FullName);
src\Microsoft.DotNet.Wpf\src\WindowsBase\System\IO\Packaging\CompoundFile\VersionPair.cs (2)
252if (obj.GetType() != GetType())
PresentationCore (235)
MS\Internal\Ink\ExtendedProperty.cs (5)
51if (obj == null || obj.GetType() != GetType()) 60Type type1 = this.Value.GetType(); 61Type type2 = that.Value.GetType(); 186Type type = _value.GetType();
MS\Internal\Ink\ExtendedPropertyCollection.cs (2)
40if (o == null || o.GetType() != GetType())
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (10)
74interopTypeInfo = SerializationHelper.ConvertToVarEnum(attribute.Value.GetType(), true); 803if (!(value.GetType() == typeof(int))) 811if (value.GetType() != typeof(DrawingFlags)) 818Type valueType = value.GetType(); 836Type t = value.GetType(); 860if ( value.GetType() != typeof(bool)) 867if ( value.GetType() != typeof(double) ) 891if ( value.GetType() != typeof(byte) ) 904if ( value.GetType() != typeof(byte[]) ) 912VarEnum varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\StrokeFIndices.cs (2)
100if (obj == null || GetType() != obj.GetType())
MS\Internal\Ink\StrokeIntersection.cs (2)
114if (obj == null || GetType() != obj.GetType())
MS\Internal\Media\VisualTreeUtils.cs (3)
184Debug.Fail(String.Format("Unhandled HitTestResult type '{0}'", result.GetType().Name)); 260throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType())); 290element != null ? element.GetType() : null));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (5)
147method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 179method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 233method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 285fieldInfo = obj.GetType().GetField(fieldName); 388Type type = obj.GetType();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
49Type type = key.GetType();
System\Windows\dataobject.cs (4)
1544|| (data != null && data.GetType().IsSerializable)) 2089|| (data != null && data.GetType().IsSerializable); 2464SetData(data.GetType(), data); 3449SetData(data.GetType(), data);
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
115if (obj is string || obj.GetType().IsValueType)
System\Windows\FreezableCollection.cs (3)
524throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 667throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T"));
System\Windows\Generated\ContentElement.cs (6)
80throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 88throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 99throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 149throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 156throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 166throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Generated\TextDecorationCollection.cs (3)
425throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 514throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration"));
System\Windows\Generated\UIElement.cs (6)
80throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 88throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 99throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 149throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 156throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 166throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Ink\DrawingAttributes.cs (3)
512if (o == null || o.GetType() != this.GetType()) 717Type t = propertyData.GetType();
System\Windows\Input\Command\CommandManager.cs (3)
329Type classType = targetElement.GetType(); 378Type classType = targetElement.GetType(); 555Type senderType = sender.GetType();
System\Windows\Input\Command\RoutedCommand.cs (2)
134throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); 170throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType()));
System\Windows\Input\FocusChangedEventArgs.cs (2)
35throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); 38throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType()));
System\Windows\Input\KeyboardDevice.cs (3)
147throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); 442throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 468throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType()));
System\Windows\Input\MouseDevice.cs (2)
334throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); 584throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (5)
551throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 577throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 642throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 671throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 807throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (1)
577throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispLogic.cs (5)
2084throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 2113throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 2172throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 2201throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 2441throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
279throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 1194throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\TouchDevice.cs (1)
344throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), "element");
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
1134Type type = rootVisual?.GetType();
System\Windows\Media\Animation\AnimationStorage.cs (3)
500target.GetType().FullName, 501((AnimationClock)sender).Timeline.GetType().FullName), 999d.GetType().FullName));
System\Windows\Media\Animation\Clock.cs (2)
599timeline.GetType().Name)); 4347builder.Append(GetType().Name);
System\Windows\Media\Animation\Generated\Animatable.cs (6)
86throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 94throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 105throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 155throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 162throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 172throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\TimelineCollection.cs (3)
435throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 524throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline"));
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
327this.GetType(), 338this.GetType(),
System\Windows\Media\Animation\Timeline.cs (1)
1083builder.Append(GetType().Name);
System\Windows\Media\CharacterMetricsDictionary.cs (3)
217Type elementType = array.GetType().GetElementType(); 518throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), "key"); 535throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\CultureSpecificStringDictionary.cs (3)
183Type elementType = array.GetType().GetElementType(); 327throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), "value"); 340throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), "key");
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (3)
431throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 520throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect"));
System\Windows\Media\Effects\Generated\ShaderEffect.cs (1)
169return (Freezable)Activator.CreateInstance(this.GetType());
System\Windows\Media\Effects\ShaderEffect.cs (2)
886Type t = value.GetType(); 968Type t = value.GetType();
System\Windows\Media\FamilyMapCollection.cs (2)
106Type elementType = array.GetType().GetElementType(); 380throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap)));
System\Windows\Media\FamilyTypefaceCollection.cs (2)
373throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); 385Type elementType = array.GetType().GetElementType();
System\Windows\Media\FontFamilyConverter.cs (1)
89if ((o != null) && (o.GetType() == typeof(string)))
System\Windows\Media\Generated\DoubleCollection.cs (3)
397throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 470throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double"));
System\Windows\Media\Generated\DrawingCollection.cs (3)
447throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 536throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Drawing"));
System\Windows\Media\Generated\GeneralTransformCollection.cs (3)
433throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 522throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform"));
System\Windows\Media\Generated\GeometryCollection.cs (3)
447throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 536throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Geometry"));
System\Windows\Media\Generated\GradientStopCollection.cs (3)
433throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 522throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop"));
System\Windows\Media\Generated\Int32Collection.cs (3)
397throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 470throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int"));
System\Windows\Media\Generated\PathFigureCollection.cs (3)
434throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 523throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure"));
System\Windows\Media\Generated\PathSegmentCollection.cs (3)
433throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 522throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment"));
System\Windows\Media\Generated\PointCollection.cs (3)
397throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 470throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point"));
System\Windows\Media\Generated\TextEffectCollection.cs (3)
433throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 522throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect"));
System\Windows\Media\Generated\TransformCollection.cs (3)
447throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 536throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform"));
System\Windows\Media\Generated\VectorCollection.cs (3)
397throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 470throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector"));
System\Windows\Media\Imaging\BitmapMetadata.cs (2)
1286if (rating != null && rating.GetType() == typeof(ushort)) 1337if (fileTime != null && fileTime.GetType() == typeof(System.Runtime.InteropServices.ComTypes.FILETIME))
System\Windows\Media\Imaging\PropVariant.cs (2)
255Type type = value.GetType(); 342Type type = value.GetType();
System\Windows\Media\Imaging\WriteableBitmap.cs (2)
1108elementType = exemplar.GetType(); 1134elementType = exemplar.GetType();
System\Windows\Media\Visual.cs (2)
2007hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (3)
429throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D"));
System\Windows\Media3D\Generated\MaterialCollection.cs (3)
443throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 532throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material"));
System\Windows\Media3D\Generated\Model3DCollection.cs (3)
443throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 532throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D"));
System\Windows\Media3D\Generated\Point3DCollection.cs (3)
393throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 466throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D"));
System\Windows\Media3D\Generated\Transform3DCollection.cs (3)
443throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 532throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D"));
System\Windows\Media3D\Generated\Vector3DCollection.cs (3)
393throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 466throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D"));
System\Windows\Media3D\Generated\Visual3D.cs (6)
86throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 94throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 105throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 155throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 162throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 172throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media3D\ModelVisual3D.cs (3)
96throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, typeof(Visual3D).Name)); 109throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name));
System\Windows\Media3D\Viewport3DVisual.cs (1)
515throw new NotSupportedException(SR.Format(SR.HitTest_Invalid, typeof(GeometryHitTestParameters).Name, this.GetType().Name));
System\Windows\Media3D\Visual3D.cs (2)
667hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Visual3DCollection.cs (2)
466throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D"));
System\Windows\PresentationSource.cs (5)
131throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); 175throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 197throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e)); 256throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 733throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType()));
System\Windows\RoutedEvent.cs (1)
89Type handlerType = handler.GetType();
System\Windows\UIElement.cs (6)
682throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); 686throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); 812(parent == null ? "" : parent.GetType().FullName), 813this.GetType().FullName)); 1916throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); 1953throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType()));
PresentationFramework (487)
MS\Internal\Annotations\Anchoring\AttachedAnnotation.cs (2)
246_selectionProcessor = _locatorManager.GetSelectionProcessor(attachedAnchor.GetType()); 256Debug.Assert(_selectionProcessor != null, SR.Format(SR.NoProcessorForSelectionType, attachedAnchor.GetType()));
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
461throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 467throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 487throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
MS\Internal\Annotations\Anchoring\LocatorManager.cs (3)
363SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 731SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 1058SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType());
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
82throw new ArgumentException(SR.WrongSelectionType, $"anchor1: type = {anchor1.GetType()}"); 85throw new ArgumentException(SR.WrongSelectionType, $"Anchor2: type = {anchor2.GetType()}");
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (1)
516Type type = component.GetType();
MS\Internal\AppModel\Journaling.cs (3)
548throw new Exception(SR.Format(SR.InvalidPageFunctionType, contentObject.GetType())); 627string typeName = pageFunction.GetType().AssemblyQualifiedName; 659Debug.Assert(contentObject.GetType().AssemblyQualifiedName == this._typeName.Value,
MS\Internal\AppModel\ReturnEventSaver.cs (3)
78returnDelegate.GetType().AssemblyQualifiedName, 79returnDelegate.Target.GetType().AssemblyQualifiedName, 122if (string.Compare(_returnList[i]._targetTypeName, caller.GetType().AssemblyQualifiedName, StringComparison.Ordinal) != 0)
MS\Internal\Data\BindingCollection.cs (1)
122throw new NotSupportedException(SR.Format(SR.BindingCollectionContainsNonBinding, binding.GetType().Name));
MS\Internal\Data\ClrBindingWorker.cs (1)
201ParentBindingExpression.SetupDefaultValueConverter(item.GetType());
MS\Internal\Data\DefaultValueConverter.cs (3)
327((o != null && destinationType.IsAssignableFrom(o.GetType())) || 585if (o != null && _sourceType.IsAssignableFrom(o.GetType())) 623if ((o != null && _targetType.IsAssignableFrom(o.GetType())) ||
MS\Internal\Data\DynamicValueConverter.cs (2)
49Type sourceType = value.GetType(); 74Type targetType = value.GetType();
MS\Internal\Data\EnumerableCollectionView.cs (1)
590TraceData.CollectionChangedWithoutNotification(SourceCollection.GetType().FullName));
MS\Internal\Data\IndexedEnumerable.cs (1)
491Type srcType = collection.GetType();
MS\Internal\Data\PropertyPathWorker.cs (4)
1626throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pi.Name)); 1631throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pd.Name)); 1636throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dp.Name)); 1641throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dpa.PropertyName));
MS\Internal\Data\ValueTable.cs (1)
227pd = TypeDescriptor.GetProperties(item.GetType())[name];
MS\Internal\Data\ViewManager.cs (3)
599collectionViewType.Name, collection.GetType()), e); 843Type cachedViewType = (cvp == null) ? cv.GetType() : cvp.ProxiedView.GetType();
MS\Internal\Data\XDeferredAxisSource.cs (1)
79MemberInfo[] aryMembers = xda.GetType().GetDefaultMembers();
MS\Internal\Data\XmlBindingWorker.cs (2)
554return $"{node.GetType().Name} ({node.Name})"; 562return string.Create(TypeConverterHelper.InvariantEnglishUS, $"{nodeList.GetType().Name} (hash={AvTrace.GetHashCodeHelper(nodeList)} Count={nodeList.Count})");
MS\Internal\DataStreams.cs (1)
234DependencyProperty dp = DependencyProperty.FromName(subStream._propertyName, element.GetType());
MS\Internal\FrameworkObject.cs (1)
69object arg = (d != null) ? (object)d.GetType() : (object)"NULL";
MS\Internal\Helper.cs (10)
301throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 593Type targetType = targetObject.GetType(); 675!memberType.IsAssignableFrom(markupExtension.GetType())) 678markupExtension.GetType().Name, 695if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 696!typeof(Collection<BindingBase>).IsAssignableFrom(targetProperty.GetType())) 699markupExtension.GetType().Name, 700targetProperty.GetType().Name)); 719if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 723markupExtension.GetType().Name,
MS\Internal\Ink\EraserBehavior.cs (2)
185|| _cachedStylusShape.GetType() != InkCanvas.EraserShape.GetType()) )
MS\Internal\Ink\PenCursorManager.cs (1)
69if (stylusShape.GetType() == typeof(RectangleStylusShape))
MS\Internal\Interop\InternalDispatchObject.cs (1)
132throw new MissingMethodException(GetType().Name, name);
MS\Internal\IO\Packaging\ContentDescriptor.cs (2)
40if (other.GetType() != GetType())
MS\Internal\LayoutDump.cs (15)
208writer.WriteStartElement(visual.GetType().Name); 245writer.WriteStartElement(element.GetType().Name); 267Type t = element.GetType(); 300writer.WriteAttributeString("Type", page.GetType().FullName); 316Type t = page.GetType(); 741writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 763writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 781writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 799writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 816writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 863writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 903Type paragraphResultType = paragraph.GetType(); 906Type paraClientType = paraClient.GetType(); 948Type paragraphResultType = paragraph.GetType(); 963Type typeOfCell = cell.GetType();
MS\Internal\Markup\StaticExtension.cs (1)
91throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlTypeResolver"));
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1042throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowedInThisContext, Element.GetType().Name));
MS\Internal\Text\TypographyProperties.cs (2)
695if (this.GetType() != other.GetType())
MS\Internal\TraceData.cs (7)
109traceBuilder.Append(o.GetType().Name); 197traceBuilder.AppendFormat("'{0}' (Name='{1}')", fe.GetType().Name, fe.Name); 201traceBuilder.AppendFormat("'{0}' (HashCode={1})", o.GetType().Name, o.GetHashCode()); 254Type type = o.GetType(); 286DependencyProperty dp => $"{dp.GetType().Name}({dp.Name})", 287PropertyInfo pi => $"{pi.GetType().Name}({pi.Name})", 288PropertyDescriptor pd => $"{pd.GetType().Name}({pd.Name})",
MS\Internal\Utility\TraceLog.cs (1)
62return string.Create(CultureInfo.InvariantCulture, $"{o.GetType().Name}.{o.GetHashCode()}");
MS\Internal\WeakHashtable.cs (1)
56Debug.Assert(!key.GetType().IsValueType, "WeakHashtable doesn't support value-type keys. Use WeakObjectHashtable instead.");
MS\Internal\WeakObjectHashtable.cs (1)
52if (key != null && !key.GetType().IsValueType)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (5)
73Type type = o.GetType(); 114var interfaces = obj.GetType().GetInterfaces(); 143IID = GuidGenerator.GetIID(obj.GetType()), 144Vtable = (IntPtr)obj.GetType().GetHelperType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 165Type type = obj.GetType();
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
826if (value.GetType() == HelperType)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (5)
147method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 179method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 233method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 285fieldInfo = obj.GetType().GetField(fieldName); 388Type type = obj.GetType();
System\Windows\Application.cs (5)
460if (bamlStream == null || bamlStream.Assembly != component.GetType().Assembly) 462throw new Exception(SR.Format(SR.UriNotMatchWithRootType, component.GetType( ), resourceLocator)); 1642throw new InvalidOperationException(SR.Format(SR.CannotCallRunMultipleTimes, this.GetType().FullName)); 1649throw new ArgumentException(SR.Format(SR.WindowPassedShouldBeOnApplicationThread, window.GetType().FullName, this.GetType().FullName));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
178return this.Owner.GetType().Name;
System\Windows\Automation\Peers\CalendarButtonAutomationPeer.cs (1)
59return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
77return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
51return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeaderAutomationPeer.cs (1)
50return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
50return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridDetailsPresenterAutomationPeer.cs (1)
37return this.Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowAutomationPeer.cs (1)
51return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowHeaderAutomationPeer.cs (1)
50return Owner.GetType().Name;
System\Windows\Automation\Peers\DatePickerAutomationPeer.cs (1)
112return Owner.GetType().Name;
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (1)
46return Owner.GetType().Name;
System\Windows\Automation\Peers\ItemAutomationPeer.cs (1)
670if (value != null && !value.GetType().IsValueType &&
System\Windows\Automation\Peers\UserControlAutomationPeer.cs (1)
24return Owner.GetType().Name;
System\Windows\ColorConvertedBitmapExtension.cs (1)
100throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IUriContext" ));
System\Windows\Condition.cs (1)
141value.GetType().Name));
System\Windows\Controls\AdornedElementPlaceholder.cs (3)
67throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"); 70throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ComboBox.cs (1)
738undoManager.OpenedUnit.GetType() != typeof(TextParentUndoUnit))
System\Windows\Controls\DataErrorValidationRule.cs (1)
104idei.GetType().FullName,
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (2)
111typeof(PropertyDescriptor).IsAssignableFrom(value.GetType()) || 112typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\Decorator.cs (3)
71throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"); 76throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\FlowDocumentReader.cs (1)
1962throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1608if(scrollInfo.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter)) 1859throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\Frame.cs (1)
1215Debug.Assert(JournalEntry.GetType().IsSerializable);
System\Windows\Controls\Grid.cs (1)
89throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"));
System\Windows\Controls\GridView.cs (1)
90return SR.Format(SR.ToStringFormatString_GridView, this.GetType(), Columns.Count);
System\Windows\Controls\GridViewColumn.cs (1)
63return SR.Format(SR.ToStringFormatString_GridViewColumn, this.GetType(), Header);
System\Windows\Controls\GridViewColumnHeader.cs (1)
761System.Reflection.Assembly assembly = this.GetType().Assembly;
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1180Type headerType = (srcHeader != null ? srcHeader.GetType() : typeof(GridViewColumnHeader));
System\Windows\Controls\GridViewRowPresenter.cs (3)
40this.GetType(), 93Type oldType = (e.OldValue != null) ? e.OldValue.GetType() : null; 94Type newType = (e.NewValue != null) ? e.NewValue.GetType() : null;
System\Windows\Controls\GroupItem.cs (1)
198throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name));
System\Windows\Controls\HeaderedContentControl.cs (1)
391string typeText = this.GetType().ToString();
System\Windows\Controls\HeaderedItemsControl.cs (1)
338string typeText = this.GetType().ToString();
System\Windows\Controls\InkCanvas.cs (2)
778|| oldShape.Rotation != _eraserShape.Rotation || oldShape.GetType() != _eraserShape.GetType())
System\Windows\Controls\ItemContainerGenerator.cs (4)
119string.Create(CultureInfo.InvariantCulture, $"ItemContainerGenerator for {Host.GetType().Name} {label} - {_itemsGenerated} items")); 336_containerType = container.GetType(); 338else if (_containerType != container.GetType()) 1114Type sourceType = source.GetType();
System\Windows\Controls\ItemsControl.cs (2)
3517throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, container.GetType().Name)); 4007return SR.Format(SR.ToStringFormatString_ItemsControl, this.GetType(), itemsCount);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
161throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ItemsPresenter", templatedParent.GetType().Name));
System\Windows\Controls\ItemsPresenter.cs (1)
329if (oldPanel != null && oldPanel.GetType() == type)
System\Windows\Controls\MenuItem.cs (1)
2119throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\PageRanges.cs (1)
173if (obj == null || obj.GetType() != typeof(PageRange))
System\Windows\Controls\Panel.cs (1)
99throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\PasswordTextContainer.cs (1)
889Invariant.Assert(false, $"Unexpected type: {strongReference.GetType()}");
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (1)
40this.GetType(),
System\Windows\Controls\Primitives\MenuBase.cs (1)
514throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\Popup.cs (1)
1294throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\Primitives\RangeBase.cs (1)
377string typeText = this.GetType().ToString();
System\Windows\Controls\Primitives\Selector.cs (2)
610Type selectedType = (value != null) ? value.GetType() : null; 638Type itemType = itemValue.GetType();
System\Windows\Controls\Primitives\StatusBar.cs (1)
127throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(StatusBarItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\ToggleButton.cs (1)
297string typeText = this.GetType().ToString();
System\Windows\Controls\RichTextBox.cs (3)
158throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value"); 163throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ScrollViewer.cs (1)
2262if(isi.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter))
System\Windows\Controls\TextBlock.cs (3)
140throw new ArgumentException(SR.Format(SR.TextPanelIllegalParaTypeForIAddChild, "value", value.GetType())); 145Type parentType = _complexContent.TextContainer.Parent.GetType(); 147Type valueType = value.GetType();
System\Windows\Controls\ToolBar.cs (3)
476Type feType = fe.GetType(); 612throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarPanel, child.GetType())); 635throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarOverflowPanel, child.GetType()));
System\Windows\Controls\ToolBarTray.cs (1)
281throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), "value");
System\Windows\Controls\UIElementCollection.cs (3)
41throw new ArgumentNullException(SR.Format(SR.Panel_NoNullVisualParent, "visualParent", this.GetType())); 396throw new System.ArgumentException(SR.Format(SR.Collection_BadType, "UIElementCollection", value.GetType().Name, "UIElement")); 526throw new ArgumentNullException(SR.Format(SR.Panel_NoNullChildren, this.GetType()));
System\Windows\Controls\ViewPort3D.cs (1)
237throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Visual3D)), "value");
System\Windows\Controls\VirtualizingStackPanel.cs (3)
6593Debug.Fail($"Unexpected container type: {((container == null) ? "null" : container.GetType().Name)}"); 8946if (this.GetType().Name != "RibbonMenuItemsPanel") 12257for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Controls\WebBrowser.cs (1)
437Type t = value.GetType();
System\Windows\ControlTemplate.cs (1)
71throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, _targetType.Name, templatedParent.GetType().Name));
System\Windows\CornerRadiusConverter.cs (1)
142throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), "value");
System\Windows\Data\BindingExpression.cs (4)
1332&& !targetType.IsAssignableFrom(value.GetType())) 1672string name = String.IsNullOrEmpty(stringFormat) ? converter.GetType().Name : "StringFormat"; 1688converter.GetType().Name, 2205if (sourceType.IsAssignableFrom(value.GetType()))
System\Windows\Data\BindingExpressionBase.cs (4)
143Type type = parent.GetType(); 945target.GetType().FullName, dp.Name, AvTrace.GetHashCodeHelper(target)), 1329undoManager.OpenedUnit.GetType() != typeof(System.Windows.Documents.TextParentUndoUnit)) 2198if (converter != null && converter.CanConvertFrom(value.GetType()))
System\Windows\Data\BindingGroup.cs (1)
585TraceData.BindingGroupWrongProperty(name, context.GetType().FullName));
System\Windows\Data\CollectionView.cs (2)
72if (this.GetType() == typeof(CollectionView)) 1515Type collectionType = SourceCollection.GetType();
System\Windows\Data\MultiBinding.cs (2)
62throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\MultiBindingExpression.cs (3)
538Converter.GetType().Name, 566traceParameters: new object[] { Converter.GetType().Name, count, values.Length, TraceData.DescribeTarget(target, TargetProperty) }); 596Converter.GetType().Name,
System\Windows\Data\ObjectDataProvider.cs (2)
164Debug.Assert((_objectInstance == null) ? (_objectType == null) : (_objectType == _objectInstance.GetType())); 359SetObjectType((value != null) ? value.GetType() : null);
System\Windows\Data\PriorityBinding.cs (2)
58throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\XmlNamespaceMapping.cs (6)
48throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Prefix", this.GetType().Name)); 50throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Prefix", this.GetType().Name)); 67throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Uri", this.GetType().Name)); 69throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Uri", this.GetType().Name)); 145throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Prefix", this.GetType().Name)); 149throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Uri", this.GetType().Name));
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
54throw new ArgumentException(SR.Format(SR.RequiresXmlNamespaceMapping, value.GetType().FullName), "value");
System\Windows\DataTemplate.cs (1)
193throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ContentPresenter", templatedParent.GetType().Name));
System\Windows\DataTrigger.cs (1)
81value.GetType().Name));
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (2)
380if (result.Requester.GetType() == typeof(StaticResourceExtension)) 430if (result.Requester.GetType() == typeof(StaticResourceExtension))
System\Windows\Documents\DocumentSequence.cs (1)
113throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), "value");
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
81throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 126throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(), 164throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), "value"); 213throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value)); 255throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 308throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), "value"); 350throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value)); 393throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value)); 437throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\DocumentStructures\StoryFragments.cs (2)
58throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), "value"); 118throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType6, value.GetType(),
System\Windows\Documents\FixedDocument.cs (1)
147throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PageContent)), "value");
System\Windows\Documents\FixedLineResult.cs (2)
50if (o.GetType() != typeof(FixedLineResult)) 52throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o");
System\Windows\Documents\FixedNode.cs (2)
152if (o.GetType() != typeof(FixedNode)) 154throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedNode)), "o");
System\Windows\Documents\FixedPage.cs (1)
194throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Documents\FixedSOMContainer.cs (1)
42throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMContainer)), "comparedObj");
System\Windows\Documents\FixedSOMGroup.cs (1)
44throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMGroup)), "comparedObj");
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
99throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedSOMSemanticBox)), "o");
System\Windows\Documents\FixedTextPointer.cs (1)
540return e.IsTextElement ? e.Type : ((ITextContainer)_flowPosition.TextContainer).Parent.GetType();
System\Windows\Documents\FlowDocument.cs (3)
1640if (!TextSchema.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType())) 1642throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, _typeofThis.Name, value.GetType().Name)); 1648throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, value.GetType().Name));
System\Windows\Documents\FlowNode.cs (3)
93if (o == null || this.GetType() != o.GetType()) 117throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowNode)), "o");
System\Windows\Documents\FlowPosition.cs (1)
74throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowPosition)), "o");
System\Windows\Documents\InlineCollection.cs (4)
167if (!TextSchema.IsValidChildOfContainer(this.Parent.GetType(), child.GetType())) 169throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.Parent.GetType().Name, child.GetType().Name));
System\Windows\Documents\PageContent.cs (2)
191throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), "value"); 626throw new ApplicationException(SR.Format(SR.PageContentUnsupportedPageType, o.GetType()));
System\Windows\Documents\Serialization\SerializerDescriptor.cs (1)
97Type factoryType = factoryInstance.GetType();
System\Windows\Documents\Span.cs (2)
127throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name)); 131throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name));
System\Windows\Documents\Speller.cs (1)
865Document = {start.TextContainer.Parent.GetType().Name}
System\Windows\Documents\Table.cs (1)
85throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroup)), "value"));
System\Windows\Documents\TableCell.cs (1)
102throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRow.cs (2)
81throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCell)), "value")); 105throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRowGroup.cs (2)
96throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRow)), "value")); 321throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TextElement.cs (12)
805Type valueType = value.GetType(); 824throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name)); 836throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name)); 852throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 859throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 899throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowed, this.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (6)
251throw new InvalidOperationException(SR.Format(SR.TextElementCollection_PreviousSiblingDoesNotBelongToThisCollection, previousSibling.GetType().Name)); 256throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 290throw new InvalidOperationException(SR.Format(SR.TextElementCollection_NextSiblingDoesNotBelongToThisCollection, nextSibling.GetType().Name)); 295throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 466throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 602Type elementType = array.GetType().GetElementType();
System\Windows\Documents\TextPointer.cs (8)
1425Type containerType = this.TextContainer.Parent.GetType(); 1437throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, ancestor.GetType().Name)); 1619TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1729while (ancestor != null && TextSchema.IsMergeableInline(ancestor.GetType())) 2426return element != null ? element.GetType() : null; 3546bool isValidChild = TextSchema.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 3573Invariant.Assert(TextSchema.IsValidChild(position, /*childType*/inline.GetType())); 3624return element != null ? element.GetType() : null;
System\Windows\Documents\TextRange.cs (1)
812throw new ArgumentException(SR.Format(SR.TextEditorTypeOfParameterIsNotAppropriateForFormattingProperty, value == null ? "null" : value.GetType().Name, formattingProperty.Name), "value");
System\Windows\Documents\TextRangeBase.cs (2)
1831while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType())) 1873while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType()))
System\Windows\Documents\TextRangeEdit.cs (32)
33TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 58Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 174while (inline != null && inline.IsEmpty && !TextSchema.IsFormattingType(inline.GetType())) 187(inline.GetType() == typeof(Run) || inline.GetType() == typeof(Span)) && 198((inline.NextInline != null && TextSchema.IsFormattingType(inline.NextInline.GetType())) || 199(inline.PreviousInline != null && TextSchema.IsFormattingType(inline.PreviousInline.GetType())))) 266TextSchema.IsMergeableInline(position.Parent.GetType())) 271TextSchema.IsMergeableInline(position.Parent.GetType())) 285if (TextSchema.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty) 290else if (TextSchema.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty) 295else if (TextSchema.IsKnownType(firstInline.GetType()) && TextSchema.IsKnownType(secondInline.GetType()) && 297TextSchema.IsMergeableInline(firstInline.GetType()) && TextSchema.IsMergeableInline(secondInline.GetType()) 330TextSchema.IsMergeableInline(inline.Parent.GetType()) && 331TextSchema.IsKnownType(inline.Parent.GetType()) && 434else if (parent is Span && TextSchema.IsKnownType(parent.GetType())) 594Invariant.Assert(position.TextContainer.Parent == null || TextSchema.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph))); 792if (TextSchema.IsParagraphOrBlockUIContainer(block.GetType())) 1281TextSchema.IsMergeableInline(position.Parent.GetType())) 1286TextSchema.IsMergeableInline(position.Parent.GetType())) 1301TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1310TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1446if (parent is Inline || TextSchema.AllowsParagraphMerging(parent.GetType())) 1768while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 2024if (TextSchema.IsMergeableInline(topmostSpan.GetType()) && TextSchema.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan)) 2039parent != null && TextSchema.IsMergeableInline(parent.GetType()); 2121TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2269if (!TextSchema.IsMergeableInline(parent.GetType())) 2280if (!TextSchema.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (4)
82Invariant.Assert(TextSchema.AllowsParagraphMerging(parentBlock.GetType())); 112Invariant.Assert(TextSchema.AllowsParagraphMerging(previousBlock.GetType())); 638if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 658if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (1)
636if (ancestor is List || ancestor is Inline && !TextSchema.IsMergeableInline(ancestor.GetType()))
System\Windows\Documents\TextRangeSerialization.cs (11)
243TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(nextElement.GetType(), typeof(TextElementEditingBehaviorAttribute)); 623string complexPropertyName = $"{table.GetType().Name}.Columns"; 1121Type elementTypeStandardized = TextSchema.GetStandardElementType(element.GetType(), reduceElement); 1421TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1426TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1522Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1524Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1531Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1534Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1579if (TextSchema.IsBlock(propertyBag.GetType())) 1628else if (targetType.IsAssignableFrom(element.GetType()))
System\Windows\Documents\TextSchema.cs (13)
111bool isValidChild = IsValidChild(parent.GetType(), child.GetType()); 115throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, child.GetType().Name)); 142bool isValidChild = IsValidChild(parent.GetType(), childType); 146throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 165return (leftElement == null || IsValidSibling(leftElement.GetType(), childType)) && 166(rightElement == null || IsValidSibling(rightElement.GetType(), childType)); 174bool isValidChild = IsValidChild(parent.GetType(), childType); 178throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 624if (value1.GetType() != value2.GetType()) 904throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, nextElement.GetType()));
System\windows\Documents\TextSelection.cs (1)
1489TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(element.GetType(), typeof(TextElementEditingBehaviorAttribute));
System\Windows\Documents\TextStore.cs (1)
4854for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
278container = new ElementContentContainer(elementNode.TextElement.GetType(), 464base(table.GetType(), localValues, table.Resources, childContainer)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
30_type = elementNode.TextElement.GetType();
System\Windows\Documents\ValidationHelper.cs (4)
108if (!TextSchema.IsValidChild(/*position:*/position, /*childType:*/child.GetType())) 110throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name)); 118throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, child.GetType().Name));
System\Windows\EventSetter.cs (1)
103if (_handler.GetType() != _event.HandlerType)
System\Windows\EventSetterHandlerConverter.cs (1)
62if (typeDescriptorContext.GetType() != s_ServiceProviderContextType)
System\Windows\EventTrigger.cs (1)
61throw new ArgumentException(SR.Format(SR.EventTriggerBadAction, value.GetType().Name));
System\Windows\FrameworkContentElement.cs (3)
534object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 601string TypeAndName = $"[{GetType().Name}]{dp.Name}"; 723PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElement.cs (3)
1882object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 1998string TypeAndName = string.Create(CultureInfo.InvariantCulture, $"[{GetType().Name}]{dp.Name}({base.GetHashCode()})"); 2085PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElementFactory.cs (7)
235throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, dp.Name, GetType().Name)); 321if (handler.GetType() != routedEvent.HandlerType) 357if (handler.GetType() != routedEvent.HandlerType) 662parent.GetType().Name)); 917parent.GetType().Name)); 963frameworkObject.DO.GetType().Name)); 1123parent.GetType().Name));
System\Windows\FrameworkTemplate.cs (2)
1140throw new InvalidOperationException(SR.Format(SR.TemplateMustBeFE, new object[] { rootObject.GetType().FullName })); 1154rootObject.GetType(), feResult != null, feResult, fceResult);
System\Windows\Input\Command\CommandValueSerializer.cs (4)
80throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 87throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name )); 137throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 144throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name ));
System\Windows\Interop\ActiveXHost.cs (1)
680throw new TargetInvocationException(SR.Format(SR.AXNohWnd, GetType().Name), e);
System\Windows\Interop\DynamicScriptObject.cs (2)
351Type argType = args[i].GetType(); 616Type type = value.GetType();
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1135Type rootType = _root.GetType();
System\Windows\Markup\BamlReader.cs (1)
1082TypeConverter converter = TypeDescriptor.GetConverter(value.GetType());
System\Windows\Markup\BamlRecordReader.cs (23)
1019flags = GetFlagsFromType(element.GetType()); 1302short elementId = BamlMapTable.GetKnownTypeIdFromType(parent.GetType()); 1608paramInfo.ParameterType != param.GetType()) 1620converter.GetType(), 1642if (!paramInfo.ParameterType.IsAssignableFrom(param.GetType())) 1674converter.GetType(), 2681ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.Name, valueType.Name), e); 2923ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.AttributeInfo.Name, attribValue), e); 3060expectedType = CurrentContext.ObjectData.GetType(); 3399element.GetType().ToString(), holder.PropertyDefinition.Name), e); 3501parent.GetType().FullName, 3745ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, currentTarget.GetType().FullName, attribInfo.Name, o), e); 3771o.GetType().FullName); 3790if (genericType != o.GetType()) 3884ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, parentObject.GetType().FullName, memberInfo.Name, o), e); 4781ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4799ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4820return parent.GetType(); 4881elementType = element == null ? null : element.GetType(); 5023value.GetType().Name, 5024container.GetType().Name), 5116currentParentType = currentParent.GetType(); 5772Type currentParentType = currentParent.GetType();
System\Windows\Markup\BamlRecords.cs (2)
4709|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4752KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
System\Windows\Markup\Primitives\ElementMarkupObject.cs (6)
60get { return _instance.GetType(); } 246if (!TryGetShouldSerializeMethod(new ShouldSerializeKey(instance.GetType(), pd.Name), out shouldSerializeMethod)) 248Type instanceType = instance.GetType(); 494(!PropertyIsAttached(PropertyDescriptor) && PropertyType == value.GetType() && 696Type type = value.GetType(); 944string typeName = typeSerializer.ConvertToString(enumValue.GetType(), context);
System\Windows\Markup\Primitives\MarkupWriter.cs (2)
698throw new InvalidOperationException(SR.Format(SR.UnserializableKeyValue, property.Value.GetType().FullName)); 1038Type tagType = property.Value.GetType();
System\Windows\Markup\XamlTypeMapper.cs (2)
607else if (typeConvert.GetType() == typeof(TypeConverter)) 636if(!propType.IsAssignableFrom(obj.GetType()))
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
326this.GetType(), 337this.GetType(),
System\Windows\Media\Animation\Storyboard.cs (11)
279SR.Format(SR.Storyboard_NameNotFound, targetName, nameScopeUsed.GetType().ToString())); 321SR.Format(SR.Storyboard_NameNotFound, targetName, nameScope.GetType().ToString())); 330SR.Format(SR.Storyboard_NameNotFound, targetName, fe.GetType().ToString())); 339SR.Format(SR.Storyboard_NameNotFound, targetName, fce.GetType().ToString())); 447throw new InvalidOperationException(SR.Format(SR.Storyboard_NoTarget, currentTimeline.GetType().ToString() )); 455throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetPropertyRequired, currentTimeline.GetType().ToString() )); 577$"Internal error - clockMappings table contains an unexpected object {((mappedObject == null) ? "" : mappedObject.GetType().ToString())}"); 618$"Internal error - clockMappings table contains unexpected object of type{value.GetType()}"); 726throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathFrozenCheckFailed, AccessorName(path, i-1), path.Path, intermediateFreezable.GetType().ToString() )); 798throw new InvalidOperationException(SR.Format(SR.Storyboard_AnimationMismatch, animationClock.Timeline.GetType(), targetProperty.Name, targetProperty.PropertyType)); 947throw new InvalidOperationException(SR.Format(SR.Storyboard_ComplexPathNotSupported, targetObject.GetType().ToString()));
System\Windows\Navigation\Journal.cs (1)
476Debug.Assert(je.GetType().IsSerializable);
System\Windows\Navigation\NavigationService.cs (3)
1460_bp != null ? _bp.GetType().ToString() : "null")); 3292Type type = ccs.GetType(); 3971Debug.Fail($"Unhandled scenario: PageFunction returning to {parentEntry.GetType().Name}");
System\Windows\PropertyPath.cs (3)
565(accessor != null) ? accessor.GetType().FullName : "null")); 643accessor = SystemCoreHelper.NewDynamicPropertyAccessor(item.GetType(), propertyName); 731args[i].type = value.GetType();
System\Windows\PropertyPathConverter.cs (3)
112throw new ArgumentException(SR.Format(SR.CannotConvertType, source.GetType().FullName, typeof(PropertyPath))); 149throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), "value"); 235type = pathPart.GetType();
System\Windows\ResourceDictionary.cs (1)
555valueType = value.GetType();
System\Windows\Setter.cs (2)
80throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, property.Name, GetType().Name)); 125value.GetType().Name));
System\Windows\Standard\Utilities.cs (2)
271DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType()); 284DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType());
System\Windows\Standard\Verify.cs (1)
300foreach (var ifaceType in parameter.GetType().GetInterfaces())
System\Windows\StaticResourceExtension.cs (2)
207throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlSchemaContextProvider")); 213throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IAmbientProvider"));
System\Windows\Style.cs (4)
417throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), "value"); 487Type elementType = element.GetType(); 683"Unsupported SetterBase subclass in style triggers ({0})", setterBase.GetType().ToString()); 821throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInStyle, trigger.GetType().Name));
System\Windows\StyleHelper.cs (14)
993throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1010throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1607throw new InvalidOperationException(SR.Format(SR.CrossThreadAccessOfUnshareableFreezable, freezable.GetType().FullName)); 1838$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 1878$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 2084if( walkNode.GetType() == container.GetType() ) 2091SR.Format(SR.TemplateCircularReferenceFound, name, walkNode.GetType())); 2348throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 4354$"Internal data structure error: The FrugalMap [Style/Template].PropertyTriggersWithActions is expected to hold a single TriggerBase or a List<T> of them. An object of type {candidateTrigger.GetType()} is not expected. Where did this object come from?"); 5065$"FrugalMap for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5111$"HybridDictionary for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5284$"Internal data structure error: The HybridDictionary [Style/Template].DataTriggersWithActions is expected to hold a single TriggerBase or a List<T> of them. An object of type {candidateTrigger.GetType()} is not expected. Where did this object come from?"); 5895Type stateType = (state != null) ? state.GetType() : null;
System\Windows\SystemResources.cs (2)
1797return _keyOrValue != null ? _keyOrValue.GetType() : null; 2010return value != null ? value.GetType() : null;
System\Windows\TemplateContent.cs (5)
698if (staticResource.GetType() == typeof(StaticResourceExtension)) 704else if (staticResource.GetType() == typeof(StaticResourceHolder)) 849Type typeofValue = xamlReader.Value.GetType(); 981if (xamlReader.Value != null && typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Value.GetType())) 1078if (value != null && !IsTypeShareable(value.GetType()))
System\Windows\TemplateKey.cs (6)
53throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "DataType", this.GetType().Name)); 72throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "DataType", this.GetType().Name)); 74throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "DataType", this.GetType().Name)); 122? string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}({DataType})") 123: string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}(null)"); 166result = new ArgumentException(SR.Format(SR.MustBeTypeOrString, dataType.GetType().Name), argName);
System\Windows\ThemeDictionaryExtension.cs (1)
81throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IProvideValueTarget" ));
System\Windows\ThicknessConverter.cs (1)
139throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), "value");
System\Windows\Trigger.cs (2)
87value.GetType().Name)); 188throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), "o");
System\Windows\TriggerBase.cs (1)
310throw new InvalidOperationException(SR.Format(SR.VisualTriggerSettersIncludeUnsupportedSetterType, setters[i].GetType().Name));
PresentationFramework-SystemData (6)
SystemDataExtension.cs (6)
71s_DataTablePropertyDescriptorType = pdc["Table1"].GetType(); 74s_DataRelationPropertyDescriptorType = pdc["IDRelation"].GetType(); 77Type pdType = pd.GetType(); 121if (pd.GetType() == s_DataTablePropertyDescriptorType) 130else if (pd.GetType() == s_DataRelationPropertyDescriptorType) 146if (useFollowParent && pd.GetType() == s_DataRelationPropertyDescriptorType)
PresentationFramework-SystemXmlLinq (6)
SystemXmlLinqExtension.cs (6)
24s_XElementElementsPropertyDescriptorType = pdc["Elements"].GetType(); 25s_XElementDescendantsPropertyDescriptorType = pdc["Descendants"].GetType(); 26s_XElementAttributePropertyDescriptorType = pdc["Attribute"].GetType(); 27s_XElementElementPropertyDescriptorType = pdc["Element"].GetType(); 48Type pdType = pd.GetType(); 62Type pdType = pd.GetType();
PresentationUI (6)
MS\Internal\Documents\Application\ChainOfDependencies.cs (2)
81member.GetType(), 114member.GetType(),
MS\Internal\Documents\Application\ChainOfResponsibility.cs (4)
71member.GetType().Name, 72subject.GetType().Name); 81member.GetType().Name, 82subject.GetType().Name);
ReachFramework (69)
AlphaFlattener\BrushProxy.cs (3)
389str = str + _brush.GetType(); 679Debug.Assert(false, "IsOpaque(" + _brush.GetType() + ") not handled"); 775Debug.Assert(false, "IsTransparent not handled " + _brush.GetType());
AlphaFlattener\Primitive.cs (1)
538Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
AlphaFlattener\PrimitiveList.cs (1)
98string typ = p.GetType().ToString();
AlphaFlattener\Utility.cs (1)
938Type typ = segment.GetType();
Packaging\XpsFixedDocumentReaderWriter.cs (1)
319if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (1)
247if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedPageReaderWriter.cs (1)
518if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsInterleavingPolicy.cs (3)
286if (!_flushOrderItems.ContainsKey(node.GetType()) || 588FlushItem xOrder = (FlushItem)_orderTable[x.Node.GetType()]; 589FlushItem yOrder = (FlushItem)_orderTable[y.Node.GetType()];
PrintSystemExceptions\PrintSystemException.cs (3)
816committedAttributes = (Collection<String>)(info.GetValue("CommittedAttributes", committedAttributes.GetType())); 817failedAttributes = (Collection<String>)(info.GetValue("FailedAttributes", failedAttributes.GetType())); 818printObjectName = (String)(info.GetValue("ObjectName", printObjectName.GetType()));
Serialization\ColorTypeConverter.cs (1)
112if (!IsSupportedType(value.GetType()))
Serialization\FontTypeConverter.cs (1)
109if (!IsSupportedType(value.GetType()))
Serialization\ImageSourceTypeConverter.cs (1)
119if (!IsSupportedType(value.GetType()))
Serialization\Manager\MetroSerializationManager.cs (3)
163return TypeDescriptor.GetConverter(serializedObject.GetType()); 707Type type = serializableObject.GetType(); 766Type type = serializableObject.GetType();
Serialization\Manager\NGCSerializationManager.cs (2)
669Type serializedObjectType = serializedObject.GetType(); 702Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\NGCSerializationManagerAsync.cs (6)
168if(objectOnStack.GetType() == 176else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 291if(objectOnStack.GetType() == 299else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 939Type serializedObjectType = serializedObject.GetType(); 1000Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\ReachFixedPageSerializer.cs (1)
162String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachFixedPageSerializerAsync.cs (1)
187String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachObjectContext.cs (1)
199serializableObjectContext.Name = serializableObjectContext.TargetObject.GetType().Name;
Serialization\Manager\ReachSerializableProperties.cs (2)
439Type valueType = Value.GetType(); 784Type valueType = Value.GetType();
Serialization\Manager\ReachSerializationUtils.cs (10)
314if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 315(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 316&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 323else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 348else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType())) 366if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 367(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 368&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 372else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 377else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType()))
Serialization\Manager\XpsOMFixedPageSerializer.cs (1)
152String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\XpsOMSerializationManager.cs (5)
84serializedObject.GetType().ToString().Contains("FixedDocumentPaginator")) 90serializedObject.GetType().ToString().Contains("FixedDocumentSequencePaginator")) 221if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 225else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 229else if (typeof(Color).IsAssignableFrom(serializedObject.GetType()))
Serialization\Manager\XpsOMSerializationManagerAsync.cs (4)
132if (objectOnStack.GetType() == 140else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 229if (objectOnStack.GetType() == 237else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\Manager\XpsSerializationManager.cs (8)
120serializedObject.GetType().ToString().Contains( "FixedDocumentPaginator") ) 126serializedObject.GetType().ToString().Contains( "FixedDocumentSequencePaginator") ) 382if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 386else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 390else if (typeof(Color).IsAssignableFrom(serializedObject.GetType())) 769TypeSerializableDependencyProperties[serializableObject.GetType()]; 820TypeNoneSerializableClrProperties[serializableObject.GetType()]; 1075Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\XpsSerializationManagerAsync.cs (4)
157if(objectOnStack.GetType() == 165else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 276if(objectOnStack.GetType() == 284else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\VisualSerializer.cs (1)
829WriteBrushHeader(brush.GetType().ToString(), brush);
Serialization\VisualTreeFlattener.cs (2)
455_dcf.Comment(visual.GetType().ToString()); 772Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
StaticFilesAuth (1)
Startup.cs (1)
61throw new InvalidOperationException($"Unknown resource type '{context.Resource.GetType()}'");
System.Collections.Immutable (2)
System\Collections\Immutable\ImmutableExtensions.Minimal.cs (1)
117if (sequence.GetType() == typeof(T[]))
Validation\Requires.cs (1)
145throw new ObjectDisposedException(disposed!.GetType().FullName);
System.ComponentModel.Annotations (12)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
151(value != null ? value.GetType().ToString() : "null"),
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (2)
43Type valueType = value.GetType(); 69Debug.Assert(valueType == value.GetType(), "The valueType should equal the Type of the value");
System\ComponentModel\DataAnnotations\LengthAttribute.cs (1)
67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType()));
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (2)
84throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType())); 127PropertyInfo? property = value.GetType().GetRuntimeProperty("Count");
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (1)
67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType()));
System\ComponentModel\DataAnnotations\RangeAttribute.cs (3)
202Type operandType = minimum.GetType(); 239conversion = value => value.GetType() == type 245conversion = value => value.GetType() == type ? value : converter.ConvertFrom(value);
System\ComponentModel\DataAnnotations\ValidationContext.cs (1)
120public Type ObjectType => ObjectInstance.GetType();
System\ComponentModel\DataAnnotations\Validator.cs (1)
519var properties = TypeDescriptor.GetProperties(instance.GetType());
System.ComponentModel.Composition (36)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (1)
27if (typeof(IList).IsAssignableFrom(collectionObject.GetType()))
Microsoft\Internal\GenerationServices.cs (6)
85Type valueType = value.GetType(); 91valueType = rawValue.GetType(); 156SR.Format(SR.InvalidMetadataValue, value.GetType().FullName)); 222if (ReflectionServices.TryGetGenericInterfaceType(enumerable.GetType(), GenerationServices.s_iEnumerableTypeofT, out Type? closedType)) 252ilGenerator.Emit(OpCodes.Box, value!.GetType()); 269return value.GetType().IsValueType;
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (2)
41ReflectionComposablePartDefinition definition = AttributedModelDiscovery.CreatePartDefinition(attributedPart.GetType(), PartCreationPolicyAttribute.Shared, true, (ICompositionElement?)null); 52var mappedType = reflectionContext.MapType(IntrospectionExtensions.GetTypeInfo(attributedPart.GetType()));
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (1)
269if (exportAttribute.GetType() == CompositionServices.InheritedExportAttributeType)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
49throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType());
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
32return new ObjectDisposedException(instance.GetType().ToString());
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (1)
174$"{GetType().Name} (Path=\"{AppDomain.CurrentDomain.BaseDirectory}\") (PrivateProbingPath=\"{AppDomain.CurrentDomain.RelativeSearchPath}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (1)
541$"{GetType().Name} (Assembly=\"{Assembly.FullName}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
398throw new ObjectDisposedException(GetType().Name);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (4)
281Type attrType = attr.GetType(); 308if (value != null && !IsValidAttributeType(value.GetType())) 310throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_MetadataContainsValueWithInvalidType, pi.GetDisplayName(), value.GetType().GetDisplayName()); 385itemType = item.GetType();
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
725$"{GetType().Name} (Path=\"{_path}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
361GetType().Name,
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
158if ((defaultAttribute.Value != null) && (defaultAttribute.Value.GetType().IsValueType)) 160IL.Emit(OpCodes.Box, defaultAttribute.Value.GetType());
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (3)
198collection!.GetType().FullName), 228collection.GetType().FullName), 245collection.GetType().FullName),
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (10)
24throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 37throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 51SR.Format(SR.ReflectionModel_InvalidExportDefinition, exportDefinition.GetType()), 66SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, importDefinition.GetType()), 81SR.Format(SR.ReflectionModel_InvalidParameterImportDefinition, importDefinition.GetType()), 97SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 119SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 310throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 420SR.Format(SR.ReflectionModel_InvalidExportDefinition, export.GetType())); 446SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, import.GetType()));
System.ComponentModel.Composition.Registration (1)
System\ComponentModel\Composition\Registration\PartBuilder.cs (1)
239Type attrType = attr.GetType();
System.ComponentModel.Primitives (6)
System\ComponentModel\Component.cs (2)
127return GetType().FullName!; 130return s.Name + " [" + GetType().FullName + "]";
System\ComponentModel\Design\Serialization\DesignerSerializerAttribute.cs (1)
77_typeId = GetType().FullName + baseType;
System\ComponentModel\DesignerAttribute.cs (1)
108_typeId = GetType().FullName + baseType;
System\ComponentModel\DesignerCategoryAttribute.cs (1)
67public override object TypeId => GetType().FullName + Category;
System\ComponentModel\EditorAttribute.cs (1)
91_typeId = GetType().FullName + baseType;
System.ComponentModel.TypeConverter (104)
System\ComponentModel\ArrayConverter.cs (2)
22return SR.Format(SR.UsingResourceKeys() ? "{0} Array" : SR.Array, value.GetType().Name); 47Type arrayType = value.GetType();
System\ComponentModel\AttributeCollection.cs (2)
176Type aType = attribute.GetType(); 212Attribute? attr = this[attribute.GetType()];
System\ComponentModel\ComponentResourceManager.cs (2)
70ApplyResources(value, value.GetType(), objectName, culture); 85Type typeFromValue = value.GetType();
System\ComponentModel\Design\DesignerOptionService.cs (2)
478public override Type ComponentType => _option.GetType(); 482public override Type PropertyType => _option.GetType();
System\ComponentModel\Design\Serialization\RootDesignerSerializerAttribute.cs (1)
88_typeId = string.Concat(GetType().FullName, baseType);
System\ComponentModel\Design\ServiceContainer.cs (2)
83if (!(serviceInstance is ServiceCreatorCallback) && !serviceInstance.GetType().IsCOMObject && !serviceType.IsInstanceOfType(serviceInstance)) 193if (service != null && !service.GetType().IsCOMObject && !serviceType!.IsInstanceOfType(service))
System\ComponentModel\LicenseException.cs (1)
33public LicenseException(Type? type, object? instance) : this(type, null, SR.Format(SR.LicExceptionTypeAndInstance, type?.FullName, instance?.GetType().FullName))
System\ComponentModel\LicenseManager.cs (1)
104Type providerType = provider.GetType();
System\ComponentModel\LicenseProviderAttribute.cs (1)
84return GetType().FullName + typeName;
System\ComponentModel\MarshalByValueComponent.cs (2)
165return s.Name + " [" + GetType().FullName + "]"; 167return GetType().FullName;
System\ComponentModel\MaskedTextProvider.cs (2)
461if (GetType() == typeof(MaskedTextProvider)) 483clonedProvider = (Activator.CreateInstance(GetType(), parameters) as MaskedTextProvider)!;
System\ComponentModel\MemberDescriptor.cs (2)
254if (obj.GetType() != GetType())
System\ComponentModel\NullableConverter.cs (1)
60if (value == null || value.GetType() == UnderlyingType)
System\ComponentModel\ProvidePropertyAttribute.cs (1)
64public override object TypeId => GetType().FullName + PropertyName;
System\ComponentModel\ReflectEventDescriptor.cs (1)
193if (EventType != value.GetType())
System\ComponentModel\ReflectPropertyDescriptor.cs (6)
202if (_defaultValue != null && PropertyType.IsEnum && PropertyType.GetEnumUnderlyingType() == _defaultValue.GetType()) 302bool storedAsUnderlyingType = defaultValue != null && PropertyType.IsEnum && PropertyType.GetEnumUnderlyingType() == defaultValue.GetType(); 903Debug.WriteLine($"[{Name}]: GetValue({component?.GetType().Name ?? "(null)"})"); 931name ??= component.GetType().FullName; 1080Debug.WriteLine($"[{Name}]: SetValue({component?.GetType().Name ?? "(null)"}, {value?.GetType().Name ?? "(null)"})");
System\ComponentModel\ReflectTypeDescriptionProvider.cs (8)
263argTypes[idx] = arg.GetType(); 492return GetClassName(instance.GetType()); 511return GetConverter(instance.GetType(), instance); 537return GetEditor(instance.GetType(), instance, editorBaseType); 564Type componentType = instance.GetType(); 815return GetPropertyOwner(instance.GetType(), instance); 1273Type providerType = provider.GetType(); 1646return (converter.GetType() != typeof(TypeConverter));
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
376Debug.Fail($"Editor {editor.GetType().FullName} is not an instance of {editorBaseType.FullName} but it is in that base types table.");
System\ComponentModel\RefreshEventArgs.cs (1)
18TypeChanged = componentChanged?.GetType();
System\ComponentModel\ToolboxItemFilterAttribute.cs (1)
81public override object TypeId => _typeId ??= GetType().FullName + FilterString;
System\ComponentModel\TypeConverter.cs (5)
194string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 195throw new NotSupportedException(SR.Format(SR.ConvertFromException, GetType().Name, valueTypeName)); 204string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 205throw new NotSupportedException(SR.Format(SR.ConvertToException, GetType().Name, valueTypeName, destinationType.FullName)); 315if (value == null || CanConvertFrom(context, value.GetType()))
System\ComponentModel\TypeDescriptionProvider.cs (3)
196return GetReflectionType(instance.GetType(), instance); 270return GetTypeDescriptor(instance.GetType(), instance); 334return GetTypeDescriptorFromRegisteredType(instance.GetType(), instance);
System\ComponentModel\TypeDescriptor.cs (56)
1737Type type = instance.GetType(); 1848Type keyType = key as Type ?? key.GetType(); 2315Type type = component.GetType(); 2729Attribute? memberAttribute = member.Attributes[attribute.GetType()]; 2784throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance)); 3292Type type = instance.GetType(); 3441if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3443if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3464if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3465string? name = desc.GetClassName() ?? _instance.GetType().FullName; 3486if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3507if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3509if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3525return rp.GetConverterFromRegisteredType(_instance.GetType(), _instance); 3529if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3531if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3552if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3572if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3594if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3614if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3616if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3635if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3637if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3662if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3664if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3684if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3686if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3705if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3707if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3732if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3734if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3756if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3804throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3807throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3831throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3856throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3882throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3885throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3909throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3912throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3937throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3963throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3991throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4016throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4019throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4043throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4046throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4071throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4074throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4099throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4103throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4127throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4132throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4157throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4160throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4184throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor"));
System.Composition.Convention (1)
System\Composition\Convention\PartConventionBuilder.cs (1)
478Type attrType = attr.GetType();
System.Composition.TypedParts (5)
System\Composition\CompositionContextExtensions.cs (2)
60var objType = objectWithLooseImports.GetType(); 81var importsSatisfiedMethods = objectWithLooseImports.GetType().GetRuntimeMethods().Where(m =>
System\Composition\TypedParts\ContractHelpers.cs (1)
66var attrType = attr.GetType();
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
112var valueType = ema.Value?.GetType() ?? typeof(object); 150var attrType = attribute.GetType();
System.Data.Common (161)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
312return Argument(SR.Format(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 328return InvalidCast(SR.Format(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 398return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 402return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
src\libraries\Common\src\System\Data\Common\DbConnectionPoolKey.cs (1)
44if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey))
System\Data\ColumnTypeConverter.cs (1)
113if (value != null && value.GetType() == typeof(string))
System\Data\Common\AdapterUtil.Common.cs (2)
368return CollectionIndexInt32(index, collection.GetType(), collection.Count); 408return CollectionIndexInt32(index, collection.GetType(), collection.Count);
System\Data\Common\BigIntegerStorage.cs (11)
64if (value.GetType() == typeof(BigInteger)) { return (BigInteger)value; } 65else if (value.GetType() == typeof(string)) { return BigInteger.Parse((string)value, formatProvider); } 66else if (value.GetType() == typeof(long)) { return (long)value; } 67else if (value.GetType() == typeof(int)) { return (int)value; } 68else if (value.GetType() == typeof(short)) { return (short)value; } 69else if (value.GetType() == typeof(sbyte)) { return (sbyte)value; } 70else if (value.GetType() == typeof(ulong)) { return (ulong)value; } 71else if (value.GetType() == typeof(uint)) { return (uint)value; } 72else if (value.GetType() == typeof(ushort)) { return (ushort)value; } 73else if (value.GetType() == typeof(byte)) { return (byte)value; } 74else { throw ExceptionBuilder.ConvertFailed(value.GetType(), typeof(System.Numerics.BigInteger)); }
System\Data\Common\DataAdapter.cs (1)
207DataAdapter clone = (DataAdapter)Activator.CreateInstance(GetType())!;
System\Data\Common\DbConnectionStringBuilder.cs (9)
316if ((GetType() != connectionStringBuilder.GetType()) || (CurrentValues.Count != connectionStringBuilder.CurrentValues.Count)) 437GetType(); 481vtype = value.GetType(); 524GetType(), vtype, false, useAttributes!); 564Attribute? attr = property.Attributes[attribute.GetType()]; 593GetType(); 602GetType(); 647GetType();
System\Data\Common\DbConnectionStringCommon.cs (1)
21throw ADP.ConvertFailed(value.GetType(), typeof(string), e);
System\Data\Common\DbProviderFactories.cs (1)
129string factoryTypeAssemblyQualifiedName = factory.GetType().AssemblyQualifiedName!;
System\Data\Common\ObjectStorage.cs (9)
74if (value!.GetType() == valueNo1.GetType()) 127Families Family1 = GetFamily(valueNo1.GetType()); 128Families Family2 = GetFamily(valueNo2.GetType()); 246Type valType = value.GetType(); 474if (!IsTypeCustomType(value.GetType())) 479if (Type.GetTypeCode(value.GetType()) != TypeCode.Object) 494XmlSerializer serializerWithOutRootAttribute = ObjectStorage.GetXmlSerializer(value.GetType()); 509XmlSerializer serializerWithRootAttribute = ObjectStorage.GetXmlSerializer(value.GetType(), xmlAttrib);
System\Data\Common\SQLConvert.cs (17)
19Type valueType = value.GetType(); 37Type valueType = value.GetType(); 56Type valueType = value.GetType(); 79Type valueType = value.GetType(); 104Type valueType = value.GetType(); 137Type valueType = value.GetType(); 167Type valueType = value.GetType(); 198Type valueType = value.GetType(); 228Type valueType = value.GetType(); 246Type valueType = value.GetType(); 264Type valueType = value.GetType(); 282Type valueType = value.GetType(); 300Type valueType = value.GetType(); 318Type valueType = value.GetType(); 334Type valueType = value.GetType(); 409Type valueType = value.GetType(); 563Type valueType = value.GetType();
System\Data\Common\SQLTypes\SQLBinaryStorage.cs (1)
117Debug.Assert((value.GetType() == typeof(SqlBinary)), "wrong input type");
System\Data\Common\SQLTypes\SQlBooleanStorage.cs (1)
151Debug.Assert((value.GetType() == typeof(SqlBoolean)), "wrong input type");
System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
115Debug.Assert((value.GetType() == typeof(SqlBytes)), "wrong input type");
System\Data\Common\SQLTypes\SQLByteStorage.cs (1)
227Debug.Assert((value.GetType() == typeof(SqlByte)), "wrong input type");
System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
118Debug.Assert((value.GetType() == typeof(SqlChars)), "wrong input type");
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (1)
153Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type");
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (1)
225Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type");
System\Data\Common\SQLTypes\SQLDoubleStorage.cs (1)
226Debug.Assert((value.GetType() == typeof(SqlDouble)), "wrong input type");
System\Data\Common\SQLTypes\SQLGuidStorage.cs (1)
118Debug.Assert((value.GetType() == typeof(SqlGuid)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt16Storage.cs (1)
226Debug.Assert((value.GetType() == typeof(SqlInt16)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt32Storage.cs (1)
226Debug.Assert((value.GetType() == typeof(SqlInt32)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
227Debug.Assert((value.GetType() == typeof(SqlInt64)), "wrong input type");
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (1)
226Debug.Assert((value.GetType() == typeof(SqlMoney)), "wrong input type");
System\Data\Common\SQLTypes\SQLSingleStorage.cs (1)
224Debug.Assert((value.GetType() == typeof(SqlSingle)), "wrong input type");
System\Data\Common\SQLTypes\SQLStringStorage.cs (1)
179Debug.Assert((value.GetType() == typeof(SqlString)), "wrong input type");
System\Data\Common\SqlUDTStorage.cs (1)
213XmlSerializer serializerWithOutRootAttribute = ObjectStorage.GetXmlSerializer(value.GetType());
System\Data\Common\TimeSpanStorage.cs (1)
186Type typeofValue = value.GetType();
System\Data\DataColumn.cs (8)
536throw ExceptionBuilder.DefaultValueDataType(ColumnName, DefaultValue.GetType(), value, ex); 540throw ExceptionBuilder.DefaultValueDataType(ColumnName, DefaultValue.GetType(), value, ex); 690throw ExceptionBuilder.DefaultValueColumnDataType(ColumnName, newDefaultValue.GetType(), DataType, ex); 1483Type leftType = value.GetType(); 1484Type rightType = _storage!.Get(record1).GetType(); 1522DataColumn clone = (DataColumn)Activator.CreateInstance(GetType())!; 1630(DataStorage.IsTypeCustomType(value.GetType()) && !(value is Type)); 1959Debug.Assert(null != value && DataColumn.IsAutoIncrementType(value.GetType()) && !(value is BigInteger), "unexpected value for autoincrement");
System\Data\DataRowComparer.cs (5)
33return (a.Equals(b) || (a.GetType().IsArray && CompareArray((Array)a, b as Array))); 65if (a.GetType() == b.GetType() && (0 == index1) && (0 == index2)) 67switch (Type.GetTypeCode(a.GetType().GetElementType())) 192Type valueType = value.GetType();
System\Data\DataRowExtensions.cs (1)
192Type valueType = value.GetType();
System\Data\DataSet.cs (3)
1127return (DataSet)Activator.CreateInstance(GetType(), true)!; 2244if (root.ChildNodes.Count == 0 || ((root.ChildNodes.Count == 1) && root.FirstChild!.GetType() == typeof(System.Xml.XmlText))) 3462if (GetType() == typeof(DataSet))
System\Data\DataTable.cs (3)
1045_isTypedDataTable = (byte)((GetType() != typeof(DataTable)) ? 1 : 2); 2320protected virtual DataTable CreateInstance() => (DataTable)Activator.CreateInstance(GetType(), true)!; 6676if (GetType() == typeof(DataTable))
System\Data\DefaultValueTypeConverter.cs (1)
43if (value != null && value.GetType() == typeof(string))
System\Data\Filter\BinaryNode.cs (16)
242if (((vLeft.GetType() == typeof(SqlBoolean)) && ((vRight.GetType() == typeof(SqlBoolean)) || (vRight.GetType() == typeof(bool)))) || 243((vRight.GetType() == typeof(SqlBoolean)) && ((vLeft.GetType() == typeof(SqlBoolean)) || (vLeft.GetType() == typeof(bool))))) 278SetTypeMismatchError(op, vLeft.GetType(), vRight.GetType()); 301Type typeofLeft = vLeft.GetType(); 302Type typeofRight = vRight.GetType(); 1112resultType = DataStorage.GetStorageType(vLeft.GetType()); 1132SetTypeMismatchError(op, vLeft.GetType(), vRight.GetType()); 1545SetTypeMismatchError(_op, vLeft.GetType(), vRight.GetType()); 1568SetTypeMismatchError(_op, vLeft.GetType(), typeof(string));
System\Data\Filter\ExpressionParser.cs (3)
349if (nodebefore == null || nodebefore.GetType() != typeof(NameNode)) 415Debug.Assert(_topNode > 0 && NodePeek()!.GetType() == typeof(FunctionNode), "The function node should be created on '('"); 529if (before != null && before.GetType() == typeof(NameNode))
System\Data\Filter\FunctionNode.cs (13)
98if (_arguments[1].GetType() == typeof(NameNode)) 153if (argumentValues[i].GetType() != s_funcs[_info]._parameters[i]) 157if (s_funcs[_info]._parameters[i] == typeof(int) && ExpressionNode.IsInteger(DataStorage.GetStorageType(argumentValues[i].GetType()))) 163if ((typeof(string) != (argumentValues[i].GetType())) && (typeof(SqlString) != (argumentValues[i].GetType()))) 282Type nodeType = node.GetType(); 323storageType = DataStorage.GetStorageType(argumentValues[0].GetType()); 334storageType = DataStorage.GetStorageType(argumentValues[0].GetType()); 341_ => throw ExprException.DatatypeConversion(argumentValues[0].GetType(), typeof(bool)), 424Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[_info]._name}"); 425Debug.Assert(argumentValues[1] is int, $"Invalid second argument {argumentValues[1].GetType().FullName} in {s_funcs[_info]._name}"); 426Debug.Assert(argumentValues[2] is int, $"Invalid third argument {argumentValues[2].GetType().FullName} in {s_funcs[_info]._name}"); 488storageType = DataStorage.GetStorageType(argumentValues[0].GetType());
System\Data\Filter\UnaryNode.cs (2)
61storageType = DataStorage.GetStorageType(vl.GetType()); 70storageType = DataStorage.GetStorageType(vl.GetType());
System\Data\Merger.cs (2)
480SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName), 506SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
System\Data\PrimaryKeyTypeConverter.cs (1)
28Array.Empty<DataColumn>().GetType().Name :
System\Data\ProviderBase\SchemaMapping.cs (2)
702Type fieldType = chapterValue.GetType(); 1049Type fieldType = chapterValue.GetType();
System\Data\Select.cs (4)
666StorageType leftType = DataStorage.GetStorageType(vLeft.GetType()); 675StorageType rightType = DataStorage.GetStorageType(vRight.GetType()); 687BinaryNode.SetTypeMismatchError(expr._op, vLeft.GetType(), vRight.GetType());
System\Data\SQLTypes\SQLBinary.cs (1)
341throw ADP.WrongType(value!.GetType(), typeof(SqlBinary));
System\Data\SQLTypes\SQLBoolean.cs (1)
448throw ADP.WrongType(value!.GetType(), typeof(SqlBoolean));
System\Data\SQLTypes\SQLByte.cs (1)
457throw ADP.WrongType(value!.GetType(), typeof(SqlByte));
System\Data\SQLTypes\SQLDateTime.cs (1)
599throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime));
System\Data\SQLTypes\SQLDecimal.cs (1)
3283throw ADP.WrongType(value!.GetType(), typeof(SqlDecimal));
System\Data\SQLTypes\SQLDouble.cs (1)
373throw ADP.WrongType(value!.GetType(), typeof(SqlDouble));
System\Data\SQLTypes\SQLGuid.cs (1)
264throw ADP.WrongType(value!.GetType(), typeof(SqlGuid));
System\Data\SQLTypes\SQLInt16.cs (1)
458throw ADP.WrongType(value!.GetType(), typeof(SqlInt16));
System\Data\SQLTypes\SQLInt32.cs (1)
473throw ADP.WrongType(value!.GetType(), typeof(SqlInt32));
System\Data\SQLTypes\SQLInt64.cs (1)
532throw ADP.WrongType(value!.GetType(), typeof(SqlInt64));
System\Data\SQLTypes\SQLMoney.cs (1)
527throw ADP.WrongType(value!.GetType(), typeof(SqlMoney));
System\Data\SQLTypes\SQLSingle.cs (1)
383throw ADP.WrongType(value!.GetType(), typeof(SqlSingle));
System\Data\SQLTypes\SQLString.cs (1)
848throw ADP.WrongType(value!.GetType(), typeof(SqlString));
System\Data\TypeLimiter.cs (1)
214throw new ObjectDisposedException(GetType().FullName);
System\Data\xmlsaver.cs (9)
1442if (col.GetType() != typeof(DataColumn)) 1862if (colTxt.GetType() != typeof(DataColumn)) 2568if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(columnValue) || (typeof(IXmlSerializable).IsAssignableFrom(columnValue.GetType()))) 2573Type valuesType = columnValue.GetType(); 2592if (!startElementSkipped && columnValue.GetType() != col.DataType) 2603if (columnValue.GetType() != col.DataType) 2999if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(value) || (typeof(IXmlSerializable).IsAssignableFrom(value.GetType()))) 3006Type valuesType = value.GetType(); 3033if (value.GetType() != col.DataType)
System.Diagnostics.DiagnosticSource (8)
System\Diagnostics\DiagnosticSourceEventSource.cs (2)
1031Type argType = args.GetType(); 1257Type? objType = obj?.GetType();
System\Diagnostics\Metrics\AggregationManager.cs (2)
289Type aggregatorType = createAggregatorFunc.GetType().GenericTypeArguments[0]; 296Type type = instrument.GetType();
System\Diagnostics\Metrics\Meter.cs (1)
474if (instrument.GetType() == instrumentType && instrument.Unit == unit &&
System\Diagnostics\Metrics\MetricsEventSource.cs (3)
440i => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 442i => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 444i => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description,
System.Diagnostics.Process (1)
System\Diagnostics\Process.cs (1)
99if (GetType() == typeof(Process))
System.Diagnostics.TraceSource (1)
System\Diagnostics\TraceUtils.cs (1)
34throw new ArgumentException(SR.Format(SR.AttributeNotSupported, key, parent.GetType().FullName));
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
40WriteEnumeratedValue(tag?.AsPrimitive() ?? Asn1Tag.Enumerated, value.GetType(), value);
System\Formats\Asn1\AsnWriter.NamedBitList.cs (1)
44WriteNamedBitList(tag, value.GetType(), value);
System.IO.Compression (16)
System\IO\Compression\DeflateZLib\DeflateStream.cs (6)
244if (GetType() != typeof(DeflateStream)) 376if (GetType() != typeof(DeflateStream)) 477if (GetType() != typeof(DeflateStream)) 492if (GetType() != typeof(DeflateStream)) 715return GetType() == typeof(DeflateStream) ? 783if (GetType() != typeof(DeflateStream))
System\IO\Compression\GZipStream.cs (6)
88if (GetType() != typeof(GZipStream)) 116if (GetType() != typeof(GZipStream)) 132if (GetType() != typeof(GZipStream)) 170if (GetType() != typeof(GZipStream)) 195if (GetType() != typeof(GZipStream)) 217if (GetType() != typeof(GZipStream))
System\IO\Compression\ZipArchiveEntry.cs (1)
1209throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System\IO\Compression\ZipCustomStreams.cs (3)
72throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 275throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 480throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (1)
221GetType() != typeof(IsolatedStorageFileStream) ? base.DisposeAsync() :
System.IO.Pipelines (1)
System\IO\Pipelines\PipeAwaitable.cs (1)
132if (sc != null && sc.GetType() != typeof(SynchronizationContext))
System.Linq (2)
System\Linq\Enumerable.cs (2)
50if (source.GetType() == typeof(TSource[])) 54else if (source.GetType() == typeof(List<TSource>))
System.Linq.Expressions (25)
System\Dynamic\DynamicMetaObject.cs (2)
87return Value?.GetType(); 294throw System.Linq.Expressions.Error.InvalidMetaObjectCreated(ido.GetType());
System\Dynamic\DynamicMetaObjectBinder.cs (2)
103throw System.Linq.Expressions.Error.DynamicObjectResultNotAssignable(body.Type, target.Value.GetType(), this, expectedResult); 118throw System.Linq.Expressions.Error.DynamicBindingNeedsRestrictions(target.Value!.GetType(), this);
System\Dynamic\DynamicObject.cs (3)
588this.Value.GetType(), 589binder.GetType(), 816MemberInfo[] methods = Value.GetType().GetMember(method.Name, MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance);
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (2)
568EmitConstant(value, value.GetType()); 594Type siteType = site.GetType();
System\Linq\Expressions\ConstantExpression.cs (2)
33return Value.GetType(); 113Type valueType = value.GetType();
System\Linq\Expressions\DebugViewWriter.cs (1)
1129Out($".Extension<{node.GetType()}>");
System\Linq\Expressions\DynamicExpression.cs (1)
24Debug.Assert(delegateType.GetInvokeMethod().GetReturnType() == typeof(object) || GetType() != typeof(DynamicExpression));
System\Linq\Expressions\Error.cs (1)
1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
361else if (sValue == node.Value.GetType().ToString()) 783MethodInfo toString = node.GetType().GetMethod("ToString", Type.EmptyTypes)!; 793Out(node.NodeType == ExpressionType.Extension ? node.GetType().FullName : node.NodeType.ToString());
System\Linq\Expressions\Interpreter\Instruction.cs (1)
35o!.GetType();
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
121Type exceptionType = unwrappedException.GetType();
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
108frame.Push((object?)obj?.GetType() == type); 303Type valueType = value.GetType();
System\Linq\Expressions\MethodCallExpression.cs (1)
1363!(TypeUtils.IsSameOrSubclass(typeof(LambdaExpression), pType) && pType.IsAssignableFrom(arg.GetType())))
System\Linq\Expressions\TypeBinaryExpression.cs (1)
148return Utils.Constant(TypeOperand.GetNonNullableType() == ce.Value.GetType());
System\Runtime\CompilerServices\CallSiteHelpers.cs (2)
14private static readonly Type s_knownNonDynamicMethodType = typeof(object).GetMethod(nameof(ToString))!.GetType(); 32if (mb.Name == CallSite.CallSiteTargetMethodName && mb.GetType() != s_knownNonDynamicMethodType)
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (1)
207Type t = GetPublicType(sq.Enumerable.GetType());
System\Linq\Queryable.cs (1)
36Type? enumType = TypeHelper.FindGenericType(typeof(IEnumerable<>), source.GetType());
System.Memory.Data (4)
System\BinaryData.cs (4)
85/// <param name="type">The type to use when serializing the data. If not specified, <see cref="object.GetType"/> will 91JsonSerializer.SerializeToUtf8Bytes(jsonSerializable, type ?? jsonSerializable?.GetType() ?? typeof(object), options), 104/// <param name="type">The type to use when serializing the data. If not specified, <see cref="object.GetType"/> will 108JsonSerializer.SerializeToUtf8Bytes(jsonSerializable, type ?? jsonSerializable?.GetType() ?? typeof(object), context),
System.Net.Http (36)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Http\ByteArrayContent.cs (2)
49GetType() == typeof(ByteArrayContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 68GetType() == typeof(ByteArrayContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System\Net\Http\FormUrlEncodedContent.cs (2)
92GetType() == typeof(FormUrlEncodedContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 96GetType() == typeof(FormUrlEncodedContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System\Net\Http\Headers\HttpHeaders.cs (10)
420Debug.Assert(parsedValue.GetType() == value.GetType(), 436Debug.Assert(item.GetType() == value.GetType(), 498Debug.Assert(parsedValue.GetType() == value.GetType(), 510Debug.Assert(item.GetType() == value.GetType(), 530Debug.Assert(GetType() == sourceHeaders.GetType(), "Can only copy headers from an instance of the same type.");
System\Net\Http\Headers\NameValueHeaderValue.cs (1)
146if (GetType() != typeof(NameValueHeaderValue))
System\Net\Http\HttpContent.cs (1)
338throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpContent), nameof(SerializeToStream)));
System\Net\Http\HttpMessageHandler.cs (1)
24throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpMessageHandler), nameof(Send)));
System\Net\Http\HttpRequestMessage.cs (1)
163sb.Append(_content == null ? "<null>" : _content.GetType().ToString());
System\Net\Http\HttpResponseMessage.cs (1)
192sb.Append(_content == null ? "<null>" : _content.GetType().ToString());
System\Net\Http\MultipartContent.cs (2)
197GetType() == typeof(MultipartContent) ? SerializeToStreamAsyncCore(stream, context, cancellationToken) : 246GetType() == typeof(MultipartContent) ? CreateContentReadStreamAsyncCore(async: true, cancellationToken).AsTask() :
System\Net\Http\MultipartFormDataContent.cs (1)
69GetType() == typeof(MultipartFormDataContent) ? SerializeToStreamAsyncCore(stream, context, cancellationToken) :
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
407if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, $"Exception from {_proxy.GetType().Name}.GetProxy({request.RequestUri}): {ex}");
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (1)
44Debug.Fail($"DrainAsync should not be called for this response stream: {GetType()}");
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
565throw new NotSupportedException(SR.Format(SR.net_http_http2_sync_not_supported, GetType()));
System\Net\Http\StreamContent.cs (2)
62GetType() == typeof(StreamContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 114GetType() == typeof(StreamContent) ? new ReadOnlyStream(_content) : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System\Net\Http\StringContent.cs (2)
84GetType() == typeof(StringContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 88GetType() == typeof(StringContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System.Net.Http.Json (3)
System\Net\Http\Json\JsonContent.cs (3)
28Debug.Assert(inputValue is null || jsonTypeInfo.Type.IsAssignableFrom(inputValue.GetType())); 159if (inputValue is not null && !inputType.IsAssignableFrom(inputValue.GetType())) 161throw new ArgumentException(SR.Format(SR.SerializeWrongType, inputType, inputValue.GetType()));
System.Net.HttpListener (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.Mail (7)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.NameResolution (6)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\NameResolutionTelemetry.cs (1)
130Debug.Assert(host is not null, $"Unknown hostNameOrAddress type: {hostNameOrAddress.GetType().Name}");
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.cs (2)
39if (GetType() == typeof(Ping)) 102throw new ObjectDisposedException(GetType().FullName);
System.Net.Primitives (8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\IPEndPoint.cs (3)
160throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 166throw new ArgumentException(SR.Format(SR.net_InvalidSocketAddressSize, socketAddress.GetType().FullName, GetType().FullName), nameof(socketAddress));
System.Net.Quic (9)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Quic\QuicConnection.cs (3)
306throw new ArgumentException(SR.Format(SR.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options)); 565Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed == 1 ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException()); 731_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicListener.cs (1)
433_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System.Net.Requests (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.Security (8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Security\SslStream.Protocol.cs (1)
282if (certificate.GetType() == typeof(X509Certificate2))
System.Net.Sockets (11)
src\libraries\Common\src\System\Net\DebugSafeHandleMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Sockets\NetworkStream.cs (2)
240if (GetType() != typeof(NetworkStream)) 306if (GetType() != typeof(NetworkStream))
System\Net\Sockets\Socket.Unix.cs (1)
154throw new ObjectDisposedException(GetType().FullName);
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
2229public static string IdOf(object o) => o == null ? "(null)" : $"{o.GetType().Name}#{o.GetHashCode():X2}";
System\Net\Sockets\SocketPal.Unix.cs (1)
1849throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList));
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
60if (GetType() == typeof(WebClient))
System.Net.WebSockets.Client (2)
System\Net\WebSockets\ClientWebSocket.cs (2)
111throw new ObjectDisposedException(GetType().FullName); 141throw new ObjectDisposedException(GetType().FullName);
System.Numerics.Tensors (6)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (3)
92if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 182if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 226if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
System\Numerics\Tensors\netcore\TensorSpan.cs (3)
95if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 186if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 230if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
System.Private.CoreLib (286)
src\libraries\System.Private.CoreLib\src\System\Array.cs (2)
1092if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 1122if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (8)
26if (this.GetType() != obj.GetType()) 29Type thisType = this.GetType(); 57Type type = GetType(); 72if (fieldValue != null && !fieldValue.GetType().IsArray) 97Type thisValueType = thisValue.GetType(); 102if (!thisValueType.Equals(thatValue.GetType())) 138public virtual object TypeId => GetType();
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (2)
22if (src.GetType() != typeof(byte[])) 33if (dst.GetType() != typeof(byte[]))
src\libraries\System.Private.CoreLib\src\System\CodeDom\Compiler\IndentedTextWriter.cs (1)
68GetType() != typeof(IndentedTextWriter) ? FlushAsync() :
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (1)
2564_isArrayList = (list.GetType() == typeof(ArrayList));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Comparer.cs (12)
71obj != null && GetType() == obj.GetType(); 74GetType().GetHashCode(); 106obj != null && GetType() == obj.GetType(); 109GetType().GetHashCode(); 124obj != null && GetType() == obj.GetType(); 127GetType().GetHashCode(); 142obj != null && GetType() == obj.GetType(); 145GetType().GetHashCode();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (2)
117if (enumerable.GetType() == typeof(Dictionary<TKey, TValue>)) 162else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (15)
137obj != null && GetType() == obj.GetType(); 140GetType().GetHashCode(); 177obj != null && GetType() == obj.GetType(); 180GetType().GetHashCode(); 206obj != null && GetType() == obj.GetType(); 209GetType().GetHashCode(); 227obj != null && GetType() == obj.GetType(); 230GetType().GetHashCode(); 260obj != null && GetType() == obj.GetType(); 263GetType().GetHashCode();
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
209Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
139Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
174if (ReferenceEquals(value.GetType(), targetType)) 219throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); 244if (value.GetType() == conversionType)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
87argTypes[i] = args[i]!.GetType(); 221if (argTypes[index] == null || !CanChangePrimitive(args[index]!.GetType(), pCls)) 259if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) 467valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs (1)
21/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
421Type underlyingType = Enum.GetUnderlyingType(data.GetType());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (6)
695Type myType = this.GetType(); 2048if ((arg != null && !pType.IsAssignableFrom(arg.GetType())) 2804m_rawManifest = CreateManifestAndDescriptors(this.GetType(), Name, this); 3097if (source?.GetType() == typeof(NativeRuntimeEventSource)) 4078if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) 4096if (eventSource.GetType() == typeof(NativeRuntimeEventSource))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\XplatEventLogger.cs (1)
171if (eventData.EventSource.GetType() == typeof(NativeRuntimeEventSource))
src\libraries\System.Private.CoreLib\src\System\Enum.cs (18)
405if (GetType() != flag.GetType() && !GetType().IsEquivalentTo(flag.GetType())) 406throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1152Type valueType = value.GetType(); 1200if (this.GetType() != obj.GetType()) 1290if (GetType() != target.GetType()) 1291throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1358RuntimeType enumType = (RuntimeType)GetType(); 1406RuntimeType enumType = (RuntimeType)GetType(); 1633Type valueType = value.GetType(); 1691RuntimeType enumType = (RuntimeType)GetType(); 2215Type valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
202public new Type GetType() => base.GetType();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
176_isInherited = GetType() != typeof(CultureInfo); 223_isInherited = GetType() != typeof(CultureInfo);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
1168if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
2159if (Calendar.GetType() != typeof(JapaneseCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
3971if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
95throw new TypeInitializationException(this.GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
51throw new TypeInitializationException(GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
52throw new TypeInitializationException(GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
58_isMemoryStream = _stream.GetType() == typeof(MemoryStream);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (2)
87if (GetType() == typeof(BinaryWriter)) 386if (GetType() == typeof(BinaryWriter))
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
347if (GetType() != typeof(MemoryStream)) 442if (GetType() != typeof(MemoryStream)) 477if (GetType() != typeof(MemoryStream)) 623if (GetType() != typeof(MemoryStream))
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
39=> fileStream.GetType() == typeof(FileStream)
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (3)
61ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 95ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 1007ThrowHelper.ThrowObjectDisposedException_StreamClosed(destination.GetType().Name);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (9)
363GetType() == typeof(StreamReader) ? ReadSpan(buffer) : 445if (GetType() != typeof(StreamReader)) 892if (GetType() != typeof(StreamReader)) 1020if (GetType() != typeof(StreamReader)) 1064if (GetType() != typeof(StreamReader)) 1080if (GetType() != typeof(StreamReader)) 1275if (GetType() != typeof(StreamReader)) 1291if (GetType() != typeof(StreamReader)) 1407void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_ReaderClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (27)
165Debug.Assert(GetType() == typeof(NullStreamWriter)); 247GetType() != typeof(StreamWriter) ? 254Debug.Assert(GetType() == typeof(StreamWriter)); 388if (GetType() == typeof(StreamWriter)) 490if (GetType() == typeof(StreamWriter)) 519if (GetType() == typeof(StreamWriter)) 531if (GetType() == typeof(StreamWriter)) 544if (GetType() == typeof(StreamWriter)) 557if (GetType() == typeof(StreamWriter)) 578if (GetType() == typeof(StreamWriter)) 590if (GetType() == typeof(StreamWriter)) 602if (GetType() == typeof(StreamWriter)) 615if (GetType() == typeof(StreamWriter)) 628if (GetType() == typeof(StreamWriter)) 646if (GetType() == typeof(StreamWriter)) 662if (GetType() != typeof(StreamWriter)) 710if (GetType() != typeof(StreamWriter)) 746if (GetType() != typeof(StreamWriter)) 762if (GetType() != typeof(StreamWriter)) 824if (GetType() != typeof(StreamWriter)) 844if (GetType() != typeof(StreamWriter)) 869if (GetType() != typeof(StreamWriter)) 898if (GetType() != typeof(StreamWriter)) 914if (GetType() != typeof(StreamWriter)) 935if (GetType() != typeof(StreamWriter)) 950if (GetType() != typeof(StreamWriter)) 1018void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_WriterClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (1)
117if (GetType() != typeof(StringReader))
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (6)
108if (GetType() != typeof(StringWriter)) 142if (GetType() != typeof(StringWriter)) 160if (GetType() != typeof(StringWriter)) 179if (GetType() != typeof(StringWriter)) 229if (GetType() != typeof(StringWriter)) 264if (GetType() != typeof(StringWriter))
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
344if (GetType() == typeof(UnmanagedMemoryStream)) 612if (GetType() == typeof(UnmanagedMemoryStream))
src\libraries\System.Private.CoreLib\src\System\Memory.cs (4)
47if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 65if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 97if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 286if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (3)
35if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 57if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 84if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Object.cs (1)
42return GetType().ToString();
src\libraries\System.Private.CoreLib\src\System\Random.cs (2)
33_impl = GetType() == typeof(Random) ? new XoshiroImpl() : new Net5CompatDerivedImpl(this); 44_impl = GetType() == typeof(Random) ? new Net5CompatSeedImpl(Seed) : new Net5CompatDerivedImpl(this, Seed);
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
208if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (2)
404Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 429else if (!ReferenceEquals(arg.GetType(), sigType))
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
31_argumentType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
370else if (!ReferenceEquals(value.GetType(), _fieldInfo.FieldType)) 481throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, fieldInfo.Name, fieldInfo.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
108Debug.Assert(dstObject.GetType() == dstType);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (3)
339Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 380else if (!ReferenceEquals(arg.GetType(), sigType)) 401ReferenceEquals(sigElementType, arg.GetType()))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (2)
457Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 482else if (!ReferenceEquals(arg.GetType(), sigType))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
99throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, method.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionContext.cs (1)
18return MapType(value.GetType().GetTypeInfo());
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
87if (graph.GetType() != type) 88throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
93Type stateMachineType = stateMachine.GetType();
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (2)
233AsyncMethodBuilderCore.LogTraceOperationBegin(box, stateMachine.GetType()); 342Debug.Assert(m_stateObject is null or ExecutionContext, $"Expected {nameof(m_stateObject)} to be null or an ExecutionContext but was {(m_stateObject is object o ? o.GetType().ToString() : "(null)")}.");
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
507provider.GetType() != typeof(CultureInfo) && // optimization to avoid GetFormat in the majority case
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
36if (typeof(T[]) == array.GetType()) 53dest = Unsafe.As<T[]>(Array.CreateInstanceFromArrayType(array.GetType(), length));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (2)
86if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext)) 130if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
37Debug.Assert(typeof(T[]) == list._items.GetType(), "Implementation depends on List<T> always using a T[] and not U[] where U : T.");
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
133if (target.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
94return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true); 101return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
280(typeof(T) == typeof(char) && obj.GetType() == typeof(string)) 611if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (1)
118Internal.Console.WriteLine($"{Environment.NewLine}*** #{count} {GetType()} (0x{handle.ToInt64():x}) finalized! Ctor stack:{Environment.NewLine}{_ctorStackTrace}{Environment.NewLine}");
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
270public override string ToString() => $"\"{Name}\" {GetType()} #{_id}"; 407if (stream.GetType() == typeof(MemoryStream) && ((MemoryStream)stream).TryGetBuffer(out ArraySegment<byte> memoryStreamBuffer))
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
149AddValue(name, value, value.GetType());
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (5)
102RuntimeType valueType = (RuntimeType)value.GetType(); 209RuntimeType valueType = (RuntimeType)value.GetType(); 804throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 875throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 895Debug.Assert(type.IsEquivalentTo(value.GetType()));
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.T.cs (1)
54string display = $"{GetType().Name}, Count = {values.Length}";
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
42if (children.GetType() == typeof(int[]))
src\libraries\System.Private.CoreLib\src\System\Span.cs (2)
49if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 78if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
910if (values.GetType() == typeof(List<string?>)) // avoid accidentally bypassing a derived type's reimplementation of IEnumerable<T>
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
243throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (3)
1099SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes"); 1127SR.Format(SR.Argument_EncodingConversionOverflowChars, _codePage, DecoderFallback.GetType()), "chars"); 1439_encoder.Encoding.EncodingName, _encoder.Fallback!.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (1)
465ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (3)
373throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 656throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 1747GetType() != typeof(UnicodeEncoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UnicodeEncoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (3)
366throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 501throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 1123GetType() != typeof(UTF32Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF32Encoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
873GetType() != typeof(UTF8Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF8Encoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
105Debug.Assert(asyncLocalValueMap == Empty || asyncLocalValueMap.GetType() != typeof(EmptyAsyncLocalValueMap));
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
305return Task.FromException(new ObjectDisposedException(GetType().FullName, SR.CancellationTokenSource_Disposed));
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
139if (userData.GetType() == typeof(object[])) 165if (userData.GetType() == typeof(object[]))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
551if (m_pair.CompletionRequested) throw new InvalidOperationException(GetType().ToString());
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
136sc.GetType() != typeof(SynchronizationContext))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
2501if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 2574if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 6669if (tasks.GetType() == typeof(List<TTask>))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (1)
611if (ctx != null && ctx.GetType() != typeof(SynchronizationContext)) return false;
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (1)
133if (objArray != null && objArray.GetType() == typeof(object[]))
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 464throw new ObjectDisposedException(instance?.GetType().FullName);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (4)
21public new Type GetType() => base.GetType(); 468return o.GetType().TypeHandle; 480cls[i] = args[i].GetType(); 593public virtual bool IsInstanceOfType([NotNullWhen(true)] object? o) => o == null ? false : IsAssignableFrom(o.GetType());
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (2)
28Type valueType = value.GetType(); 73Type valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (1)
27RuntimeType targetType = (RuntimeType)target.GetType();
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
223Debug.Assert(this.GetType() != typeof(WeakReference));
src\System\Array.CoreCLR.cs (5)
45if (sourceArray.GetType() != destinationArray.GetType() && sourceArray.Rank != destinationArray.Rank) 65if (sourceArray.GetType() == destinationArray.GetType() || IsSimpleCopy(sourceArray, destinationArray)) 643RuntimeType arrayType = (RuntimeType)GetType();
src\System\Attribute.CoreCLR.cs (5)
257Type objType = objAttr[i]!.GetType(); 285Type objType = objAttr[i]!.GetType(); 351Type objType = objAttr[i].GetType(); 373Type attrType = attributes[i].GetType(); 401Type attrType = attributes[i].GetType();
src\System\Delegate.CoreCLR.cs (10)
48if (!BindToMethodName(target, (RuntimeType)target.GetType(), method, 83RuntimeMethodInfo invoke = (RuntimeMethodInfo)RuntimeType.GetMethodBase((RuntimeType)this.GetType(), method)!; 152return (_target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode(); 154return GetType().GetHashCode(); 181Type? currentType = _target!.GetType(); 197Debug.Assert(currentType != null || _target.GetType().IsCOMObject, "The class hierarchy should declare the method"); 202MethodInfo invoke = this.GetType().GetMethod("Invoke")!; 235if (!d.BindToMethodName(target, (RuntimeType)target.GetType(), method, 450if (a.GetType() == b.GetType())
src\System\Enum.CoreCLR.cs (2)
106Debug.Assert(values!.GetType() == typeof(TStorage[])); 107Debug.Assert(!getNames || names!.GetType() == typeof(string[]));
src\System\MulticastDelegate.CoreCLR.cs (1)
527RuntimeType reflectedType = (RuntimeType)GetType();
src\System\Reflection\Emit\CustomAttributeBuilder.cs (6)
112VerifyTypeAndPassedObjectType(paramTypes[i], constructorArg.GetType(), $"{nameof(constructorArgs)}[{i}]"); 175VerifyTypeAndPassedObjectType(propType, propertyValue.GetType(), $"{nameof(propertyValues)}[{i}]"); 229VerifyTypeAndPassedObjectType(fldType, fieldValue.GetType(), $"{nameof(fieldValues)}[{i}]"); 434throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 502Type ot = value == null ? typeof(string) : value is Type ? typeof(Type) : value.GetType(); 517typename = value.GetType().ToString();
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
188Type type = value.GetType();
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
400Type type = pca.GetType(); 1573type = (RuntimeType)value.GetType();
src\System\Runtime\CompilerServices\CastHelpers.cs (1)
432if (array.GetType() == typeof(object[]))
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (2)
20throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 30throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType));
src\System\RuntimeType.CoreCLR.cs (2)
3679RuntimeType srcType = pointer != null ? pointer.GetPointerType() : (RuntimeType)value.GetType(); 3816argsType[i] = arg.GetType();
src\System\StubHelpers.cs (6)
916Type elementType = pManagedHome.GetType().GetElementType()!; 1102int allocSize = Marshal.SizeOfHelper((RuntimeType)pManagedHome.GetType(), false); 1114layoutType = pManagedHome.GetType(); 1131if (pManagedHome.GetType().IsArray) 1148else if (pManagedHome.GetType().IsLayoutSequential || pManagedHome.GetType().IsExplicitLayout)
src\System\ValueType.cs (4)
34if (GetType() != obj.GetType()) 49FieldInfo[] thisFields = GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 170return this.GetType().ToString();
System.Private.DataContractSerialization (52)
System\Runtime\Serialization\CodeGenerator.cs (3)
187return var.GetType(); 696throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CanOnlyStoreIntoArgOrLocGot0, DataContract.GetClrTypeFullName(var.GetType()))); 800Type valueType = o.GetType();
System\Runtime\Serialization\DataContract.cs (4)
171throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 178throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 185throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 190throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType)));
System\Runtime\Serialization\DataContractSerializer.cs (3)
374Type graphType = (graph == null) ? declaredType : graph.GetType(); 515return (graph == null) ? _rootType : graph.GetType(); 531objType = obj != null ? obj.GetType() : Globals.TypeOfObject;
System\Runtime\Serialization\ExtensionDataReader.cs (1)
635type = dataNode.Value.GetType();
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (2)
425return (graph == null) ? _rootType : graph.GetType(); 498Type graphType = (graph == null) ? declaredType : graph.GetType();
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
223Type traditionalDataContractType = traditionalDataContract.GetType();
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
81ReflectionJsonClassWriter.ReflectionWriteValue(jsonWriter, context, dictionaryValueType ?? value.GetType(), value, false, primitiveContractForParamType: null);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
1430else if (value.GetType().IsArray)
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (3)
316SR.Format(SR.JsonDuplicateMemberInInput, DataContract.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex])); 337SR.JsonOneRequiredMemberNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString())); 342SR.JsonRequiredMembersNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()));
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (5)
312DataContract dc = GetDataContract(dataNode.Value.GetType()); 322Type contractType = contract.GetType(); 325throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.XmlObjectAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 330throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CollectionAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 339Type objType = obj.GetType();
System\Runtime\Serialization\PrimitiveDataContract.cs (2)
128Type thisType = GetType(); 129Type otherType = other.GetType();
System\Runtime\Serialization\ReflectionClassWriter.cs (4)
62ReflectionInternalSerialize(xmlWriter, context, memberValue, memberValue.GetType().TypeHandle.Equals(memberType.TypeHandle), writeXsiType, memberType); 77memberType = memberValue.GetType(); 102ReflectionInternalSerialize(xmlWriter, context, memberValue!, memberValue!.GetType().TypeHandle.Equals(memberType.TypeHandle), writeXsiType, memberType, originValueIsNullableOfT); 154Type type = obj.GetType();
System\Runtime\Serialization\ReflectionReader.cs (2)
441Type objType = obj.GetType(); 584Type collectionType = resultCollectionObject.GetType();
System\Runtime\Serialization\XmlObjectSerializer.cs (1)
465return graph?.GetType();
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
367string oldType = (oldObj != null) ? DataContract.GetClrTypeFullName(oldObj.GetType()) : SR.UnknownNullType; 368string newType = (newObj != null) ? DataContract.GetClrTypeFullName(newObj.GetType()) : SR.UnknownNullType;
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (11)
100SerializeWithXsiType(xmlWriter, obj, obj.GetType().TypeHandle, null/*type*/, -1, declaredType.TypeHandle, declaredType); 109RuntimeTypeHandle objTypeHandle = obj.GetType().TypeHandle; 383throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotSerializeObjectWithCycles, DataContract.GetClrTypeFullName(obj.GetType()))); 446return obj.GetType().TypeHandle.Equals(memberType.TypeHandle); 499throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownXmlType, DataContract.GetClrTypeFullName(obj.GetType()))); 517Type objType = obj.GetType(); 606throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedFalse, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 616throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 621throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 731InternalSerialize(xmlWriter, o, false /*isDeclaredType*/, false /*writeXsiType*/, -1, o.GetType().TypeHandle); 748Type declaredType = (dataNode.DataContractName == null) ? o.GetType() : Globals.TypeOfObject;
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
223RuntimeTypeHandle objTypeHandle = isDeclaredType ? declaredTypeHandle : obj.GetType().TypeHandle;
System\Runtime\Serialization\XmlSerializableWriter.cs (3)
27throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableMissingEndElements, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 56throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 64throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType()))));
System\Runtime\Serialization\XmlWriterDelegator.cs (1)
279WriteAnyType(value, value.GetType());
System\Xml\XmlBaseWriter.cs (1)
1225else if (value.GetType().IsArray)
System.Private.Uri (7)
System\Uri.cs (2)
1599throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 2631throw new UriFormatException(SR.Format(SR.net_uri_PortOutOfRange, _syntax.GetType(), portStr));
System\UriExt.cs (1)
427throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));
System\UriScheme.cs (3)
74throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, uri._syntax.GetType())); 101throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType())); 144throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));
System\UriSyntax.cs (1)
232Type type = this.GetType();
System.Private.Xml (171)
System\Xml\Core\XmlReaderSettings.cs (1)
400throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
System\Xml\Core\XmlWriterSettings.cs (1)
494throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
System\Xml\Dom\XmlDocument.cs (1)
156if (imp.NameTable.GetType() == typeof(NameTable))
System\Xml\Dom\XmlElement.cs (2)
430if (GetType() == typeof(XmlElement)) 462if (e != null && e.GetType() == typeof(XmlElement))
System\Xml\Dom\XmlLoader.cs (1)
27if (reader.GetType() == typeof(System.Xml.XmlTextReader))
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
66Assembly asm = GetType().Assembly;
System\Xml\Schema\DataTypeImplementation.cs (3)
431Type derivedType = this.GetType(); 432Type baseType = datatype.GetType(); 583if (value.GetType() != this.ValueType)
System\Xml\Schema\Inference\Infer.cs (3)
971if (((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem].GetType() != typeof(XmlSchemaElement)) 1038if (ct.Particle!.GetType() == typeof(XmlSchemaSequence)) 1054if (xss.Items[0].GetType() == typeof(XmlSchemaChoice))
System\Xml\Schema\Preprocessor.cs (1)
350Type returnType = obj.GetType();
System\Xml\Schema\XmlSchemaDataType.cs (1)
174Type t = value.GetType();
System\Xml\Schema\XmlValueConverter.cs (49)
514throw CreateInvalidClrMappingException(value.GetType(), destinationType); 906Type sourceType = value.GetType(); 931Type sourceType = value.GetType(); 956Type sourceType = value.GetType(); 996Type sourceType = value.GetType(); 1078Type sourceType = value.GetType(); 1124Type sourceType = value.GetType(); 1172Type sourceType = value.GetType(); 1216Type sourceType = value.GetType(); 1245Type sourceType = value.GetType(); 1294Type sourceType = value.GetType(); 1358Type sourceType = value.GetType(); 1398Type sourceType = value.GetType(); 1477Type sourceType = value.GetType(); 1526Type sourceType = value.GetType(); 1574Type sourceType = value.GetType(); 1638Type sourceType = value.GetType(); 1684Type sourceType = value.GetType(); 1723Type sourceType = value.GetType(); 1804Type sourceType = value.GetType(); 1920Type sourceType = value.GetType(); 1952Type sourceType = value.GetType(); 1983Type sourceType = value.GetType(); 2036Type sourceType = value.GetType(); 2058Type sourceType = value.GetType(); 2080Type sourceType = value.GetType(); 2101Type sourceType = value.GetType(); 2123Type sourceType = value.GetType(); 2145Type sourceType = value.GetType(); 2167Type sourceType = value.GetType(); 2189Type sourceType = value.GetType(); 2237Type sourceType = value.GetType(); 2364Type sourceType = value.GetType(); 2464Type sourceType = value.GetType(); 2486Type sourceType = value.GetType(); 2548Type sourceType = value.GetType(); 2564Type sourceType = value.GetType(); 2579Type sourceType = value.GetType(); 2595Type sourceType = value.GetType(); 2611Type sourceType = value.GetType(); 2627Type sourceType = value.GetType(); 2643Type sourceType = value.GetType(); 2659Type sourceType = value.GetType(); 2754Type sourceType = value.GetType(); 2834Type sourceType = value.GetType(); 2880if (!(value is IEnumerable) || value.GetType() == StringType || value.GetType() == ByteArrayType) 2945Type sourceType = value.GetType(); 3177Type sourceType = value.GetType();
System\Xml\Serialization\CodeGenerator.cs (2)
168return var.GetType(); 769Type valueType = o.GetType();
System\Xml\Serialization\Compilation.cs (2)
621_methods[mapping.Key!].readMethod = GetMethodFromType(reader.GetType(), methodName); 648_methods[mapping.Key!].writeMethod = GetMethodFromType(writer.GetType(), methodName);
System\Xml\Serialization\ImportContext.cs (5)
74string key = $"{item.GetType().Name}:{qname}"; 94Warnings.Add(SR.Format(SR.XmlMismatchSchemaObjects, item.GetType().Name, qname.Name, qname.Namespace)); 107if (o1.GetType() != o2.GetType()) 259Type t = item.GetType();
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (7)
451Type = refObj.GetType(), 627Type type = o.GetType(); 636MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveSetInfo(o.GetType(), memberName); 653MethodInfo getSetMemberValueDelegateWithTypeMi = getSetMemberValueDelegateWithTypeGenericMi.MakeGenericMethod(o.GetType(), memberType); 1721MethodInfo? specifiedMethodInfo = o!.GetType().GetMethod($"set_{specifiedMemberName}"); 1786MemberInfo[] memberInfos = o!.GetType().GetMember(member.Mapping.Name); 2000if (memberType == value.GetType())
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (9)
225if (o != null && o.GetType() == element.Mapping!.TypeDesc!.Type) 234if (o!.GetType() == td.Type) 531&& o.GetType() != mapping.TypeDesc!.Type) 601MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!; 633MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!; 667MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveGetInfo(o.GetType(), memberName); 675Type objType = o.GetType(); 922Type t = o.GetType(); 1324WritePotentiallyReferencingElement(null, null, p[i], p[i].GetType(), true, false);
System\Xml\Serialization\SchemaObjectWriter.cs (4)
37return string.Compare($"{f1.GetType().Name}:{f1.Value}", $"{f2.GetType().Name}:{f2.Value}", StringComparison.Ordinal); 336System.Type t = o.GetType(); 1054System.Type t = o.GetType();
System\Xml\Serialization\SoapReflectionImporter.cs (5)
750if (fieldTypeDesc != _typeScope.GetTypeDesc(a.SoapDefaultValue.GetType())) 751throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName)); 752string strValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "G").Replace(",", " "); 753string numValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "D"); 755throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
System\Xml\Serialization\TypeExtensions.cs (1)
28Type sourceType = data.GetType();
System\Xml\Serialization\Xmlcustomformatter.cs (1)
40Type type = value.GetType();
System\Xml\Serialization\XmlReflectionImporter.cs (2)
2135throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2174throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (4)
681throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 1074throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
348if (!(desiredMappingType.IsAssignableFrom(mapping.GetType()))) 349throw new InvalidOperationException(SR.Format(SR.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 404if (mapping != null && desiredMappingType.IsAssignableFrom(mapping.GetType()))
System\Xml\Serialization\XmlSchemas.cs (8)
233if (ret == null || !type.IsAssignableFrom(ret.GetType())) 393throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 528item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType() == typeof(XmlSchemaSimpleType) ? "simpleType" : "complexType", ((XmlSchemaType)o).Name, null); 555string itemType = o is XmlSchemaImport ? "import" : o is XmlSchemaInclude ? "include" : o is XmlSchemaRedefine ? "redefine" : o.GetType().Name; 564item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType().Name, null, details); 576XmlSerializer s = new XmlSerializer(o.GetType()); 599Type type = o.GetType(); 605if (item.GetType() == type && name == ItemName(item))
System\Xml\Serialization\XmlSerializationReader.cs (4)
1328return new InvalidCastException(SR.Format(SR.XmlInvalidCast, value.GetType().FullName, type.FullName)); 1330return new InvalidCastException(SR.Format(SR.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id)); 1545throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1718Type currItemType = currItem.GetType();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3658WriteSourceEnd(source, value == null ? typeof(object) : value.GetType());
System\Xml\Serialization\XmlSerializationWriter.cs (12)
262Type t = o.GetType(); 498if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 656if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 780if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 812return CreateUnknownTypeException(o.GetType()); 853return CreateInvalidAnyTypeException(o.GetType()); 1334Type t = o.GetType(); 1385Type t = o.GetType(); 2454if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 4264Type type = value.GetType(); 4353Writer.Write(((DateTimeOffset)value).Offset.GetType().FullName);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
208if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2152else if (value.GetType().IsPrimitive) 2160Type valueType = value.GetType();
System\Xml\XPath\Internal\BaseAxisQuery.cs (1)
116if (qyInput.GetType() != typeof(ContextQuery))
System\Xml\XPath\XPathNavigator.cs (1)
968if (n1.GetType().ToString() != "Microsoft.VisualStudio.Modeling.StoreNavigator")
System\Xml\Xsl\ListBase.cs (6)
136if (!IsCompatibleType(value!.GetType())) 145if (!IsCompatibleType(value!.GetType())) 159if (!IsCompatibleType(value!.GetType())) 167if (!IsCompatibleType(value!.GetType())) 175if (!IsCompatibleType(value!.GetType())) 183if (IsCompatibleType(value!.GetType()))
System\Xml\Xsl\QIL\QilTypeChecker.cs (2)
1002Type clrType = ((QilLiteral)node).Value!.GetType(); 1009Check(clrTypeClass.IsAssignableFrom(node.GetType()), node, $"Node must be instance of {clrTypeClass.Name}");
System\Xml\Xsl\QIL\WhitespaceRule.cs (1)
77Debug.Assert(this.GetType() == typeof(WhitespaceRule), "Serialization of WhitespaceRule subclasses is not implemented");
System\Xml\Xsl\Runtime\XmlQueryContext.cs (4)
200throw new XslTransformException(SR.XmlIl_CantResolveEntity, uriRelative, dataSource.GetType().ToString()); 247return new XmlExtensionFunction(name, namespaceUri, -1, instance.GetType(), XmlQueryRuntime.LateBoundFlags).CanBind(); 272XmlExtensionFunction extFunc = _extFuncsLate.Bind(name, namespaceUri, args.Length, instance.GetType(), XmlQueryRuntime.LateBoundFlags); 307if (xmlTypeFormalArg.TypeCode == XmlTypeCode.Item || !clrTypeFormalArg.IsAssignableFrom(objActualArgs[i].GetType()))
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (9)
480Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), 483Debug.Assert(destinationType == typeof(object) || !destinationType.IsAssignableFrom(value.GetType()), 558Debug.Assert(destinationType.IsAssignableFrom(value.GetType()), $"ChangeType from type {value.GetType().Name} to type {destinationType.Name} failed"); 582if (value.GetType() == typeof(DateTime)) 587if (value.GetType() != typeof(double)) 629Type sourceType = value.GetType(); 680Debug.Assert(XmlILTypeHelper.GetStorageType(xmlType).IsAssignableFrom(value.GetType()), $"Xml type {xmlType} is not represented in ILGen as {value.GetType().Name}");
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
302Debug.Fail($"Unexpected type: {o.GetType()}");
System\Xml\Xsl\XmlQueryTypeFactory.cs (4)
1174if (type.GetType() == typeof(ItemType)) 1176else if (type.GetType() == typeof(ChoiceType)) 1178else if (type.GetType() == typeof(SequenceType)) 1182Debug.Fail($"Don't know how to serialize {type.GetType()}");
System\Xml\Xsl\Xslt\XsltLoader.cs (1)
222throw new XslLoadException(SR.Xslt_CannotLoadStylesheet, uri.ToString(), input == null ? "null" : input.GetType().ToString());
System\Xml\Xsl\XsltOld\NumberAction.cs (1)
372if (Type.GetTypeCode(value.GetType()) == TypeCode.Object)
System\Xml\Xsl\XsltOld\XsltCompileContext.cs (2)
193MethodInfo? method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/true, /*publicOnly:*/false, name, argTypes); 204MethodInfo? method = FindBestMethod(extension.GetType().GetMethods(bindingFlags), /*ignoreCase:*/false, /*publicOnly:*/true, name, argTypes);
System.Private.Xml.Linq (5)
System\Xml\Linq\XHelper.cs (1)
15return o != null && type.IsAssignableFrom(o.GetType());
System\Xml\Linq\XObject.cs (2)
151if (annotations.GetType() == type) return annotations; 159if (obj.GetType() == type) return obj;
System\Xml\XPath\XNodeNavigator.cs (2)
875if (!(result is T)) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedEvaluation, result.GetType())); 885if (!(r is T)) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_UnexpectedEvaluation, r.GetType()));
System.Reflection.Context (5)
System\Reflection\Context\Custom\AttributeUtils.cs (2)
158Type attributeType = newAttribute.GetType(); 170declaredAttributes.FindIndex((obj) => obj.GetType() == attributeType) < 0))
System\Reflection\Context\CustomReflectionContext.Projector.cs (1)
140throw new InvalidOperationException(SR.Format(SR.InvalidOperation_InvalidMethodType, value.GetType()));
System\Reflection\Context\Projection\ProjectingType.cs (1)
165Type? objectType = _projector.ProjectType(o?.GetType());
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (1)
50throw new ArgumentException(SR.Format(SR.Argument_ObjectArgumentMismatch, value.GetType(), ReturnType));
System.Reflection.Emit (2)
System\Reflection\Emit\FieldBuilderImpl.cs (1)
60Type sourceType = defaultValue.GetType();
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
883Type type = defaultValue.GetType();
System.Reflection.Metadata (20)
System\Reflection\Internal\Utilities\ExceptionUtilities.cs (2)
10if (value?.GetType().FullName != null) 12return new InvalidOperationException(SR.Format(SR.UnexpectedValue, value, value.GetType().FullName));
System\Reflection\Metadata\BlobBuilder.cs (1)
538throw new InvalidOperationException(SR.Format(SR.ReturnedBuilderSizeTooSmall, GetType(), nameof(AllocateChunk)));
System\Reflection\Metadata\BlobWriterImpl.cs (2)
156var type = value.GetType(); 229var type = value.GetType();
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (15)
19Debug.Assert(!value.GetType().GetTypeInfo().IsEnum); 24if (value.GetType() == typeof(int)) 29if (value.GetType() == typeof(string)) 34if (value.GetType() == typeof(bool)) 39if (value.GetType() == typeof(char)) 44if (value.GetType() == typeof(byte)) 49if (value.GetType() == typeof(long)) 54if (value.GetType() == typeof(double)) 59if (value.GetType() == typeof(short)) 64if (value.GetType() == typeof(ushort)) 69if (value.GetType() == typeof(uint)) 74if (value.GetType() == typeof(sbyte)) 79if (value.GetType() == typeof(ulong)) 84if (value.GetType() == typeof(float)) 89throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, value.GetType()), nameof(value));
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\CustomAttributes\RoCustomAttributeData.cs (1)
25public sealed override string ToString() => GetType().ToString(); // Does not match .NET Framework output - however, doing so can prematurely
System.Resources.Extensions (7)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
443Type type = value.GetType(); 602if (sw.Stream.GetType() == typeof(MemoryStream))
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
200_defaultReader = reader as DeserializingResourceReader ?? throw new ArgumentException(SR.Format(SR.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader));
System\Resources\Extensions\DeserializingResourceReader.cs (3)
142type = value.GetType(); 225if (value.GetType() != type) 226throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, value.GetType().FullName));
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
109Debug.Assert(primitiveValue.GetType() == primitiveType);
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
443Type type = value.GetType(); 602if (sw.Stream.GetType() == typeof(MemoryStream))
System.Runtime.Caching (2)
System\Runtime\Caching\MemoryCache.cs (1)
899string cacheName = $"{this.GetType().FullName}({_name})";
System\Runtime\Caching\MemoryMonitor.cs (1)
85Dbg.Trace("MemoryCacheStats", this.GetType().Name + ".Update: last=" + pressure
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (1)
96else if (managed is not null && StrategyBasedComWrappers.DefaultIUnknownInterfaceDetailsStrategy.GetComExposedTypeDetails(managed.GetType().TypeHandle) is not null)
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (1)
79if (GetOrCreateInterfaceDetailsStrategy().GetComExposedTypeDetails(obj.GetType().TypeHandle) is { } details)
System.Runtime.Serialization.Formatters (16)
System\Runtime\Serialization\Formatter.cs (1)
98Type varType = data.GetType();
System\Runtime\Serialization\Formatters\Binary\BinaryObjectInfo.cs (2)
85_objectType = obj.GetType(); 732throw new SerializationException(SR.Format(SR.Serialization_SerMemberInfo, objMember.GetType()));
System\Runtime\Serialization\Formatters\Binary\BinaryObjectReader.cs (1)
114if (HasSurrogate(TopObject.GetType()) && _topId != 0)//Not yet resolved
System\Runtime\Serialization\Formatters\Binary\BinaryObjectWriter.cs (1)
1005private Type GetType(object obj) => obj.GetType();
System\Runtime\Serialization\ObjectManager.cs (9)
187throw new SerializationException(SR.Format(SR.Serialization_NotCyclicallyReferenceableSurrogate, surrogate.GetType().FullName)); 446si.UpdateValue((string)fixupInfo, holderValue, holderValue.GetType()); 682obj.GetType() : 783Type t = obj.GetType(); 934throw new SerializationException(SR.Format(SR.Serialization_InvalidType, member.GetType())); 991SerializationEvents cache = SerializationEventsCache.GetSerializationEventsForType(obj.GetType()); 998SerializationEvents cache = SerializationEventsCache.GetSerializationEventsForType(obj.GetType()); 1006SerializationEvents cache = SerializationEventsCache.GetSerializationEventsForType(obj.GetType()); 1304(_surrogate == null || _surrogate.GetType() != typeof(SurrogateForCyclicalReference));
System\Runtime\Serialization\SerializationObjectManager.cs (2)
28SerializationEvents cache = SerializationEventsCache.GetSerializationEventsForType(obj.GetType()); 49SerializationEvents cache = SerializationEventsCache.GetSerializationEventsForType(obj.GetType());
System.Security.Cryptography (7)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
880$"Unexpected cipher characteristics by {cipher.GetType().FullName}, KeySize={cipher.KeySize}, BlockSize={cipher.BlockSize}");
System\Security\Cryptography\CryptoStream.cs (2)
198if (GetType() != typeof(CryptoStream)) 802return GetType() != typeof(CryptoStream) ?
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
530Debug.Fail($"Key was of no known type: {_key?.GetType().FullName ?? "null"}");
System\Security\Cryptography\X509Certificates\FindPal.cs (1)
166if (findValue.GetType() != typeof(T))
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
516return GetType().ToString();
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1297Debug.Assert(rawSAN.GetType() == typeof(X509Extension));
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
304_ => throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType()), nameof(key))
System.Text.Encoding.CodePages (5)
System\Text\DBCSCodePageEncoding.cs (2)
541throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType())); 657throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType()));
System\Text\EncodingByteBuffer.cs (1)
42throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, _encoder.Encoding.EncodingName, _encoder.Fallback.GetType()));
System\Text\EncodingNLS.cs (2)
351throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes"); 359throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowChars, EncodingName, DecoderFallback.GetType()), "chars");
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (1)
490if (GetType() == typeof(OptimizedInboxTextEncoder)) { /* intentionally left blank */ }
System\Text\Encodings\Web\TextEncoderSettings.cs (1)
219if (GetType() == typeof(TextEncoderSettings))
System.Text.Json (20)
System\ReflectionExtensions.cs (1)
63if (attribute.GetType().FullName == fullName)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
44throw new InvalidOperationException(SR.Format(SR.NodeUnableToConvert, Value!.GetType(), typeof(T)));
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (1)
55Type runtimeType = value.GetType();
System\Text\Json\Serialization\JsonConverter.cs (1)
19IsInternalConverter = GetType().Assembly == typeof(JsonConverter).Assembly;
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (2)
72Debug.Assert(value != null && Type!.IsAssignableFrom(value.GetType())); 83Type runtimeType = value.GetType();
System\Text\Json\Serialization\JsonConverterFactory.cs (2)
47ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(GetType()); 50ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactorty(GetType());
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (2)
76Type runtimeType = value.GetType(); 128ThrowHelper.ThrowInvalidCastException_DeserializeUnableToAssignValue(typeOfValue: value.GetType(), declaredType: typeof(T));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
567referenceId, value.GetType(), typeof(T));
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (1)
31string objTypeName = obj?.GetType().FullName ?? "<null>";
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (1)
169Type runtimeType = rootValue.GetType();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
166ThrowHelper.ThrowInvalidOperationException_SerializationConverterNotCompatible(converter.GetType(), typeToConvert);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (1)
125=> _modifiers is null or { Count: 0 } && GetType() == typeof(DefaultJsonTypeInfoResolver);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (1)
217Type attributeType = attr.GetType();
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
830string jtiTypeName = GetType().Name;
System\Text\Json\ThrowHelper.Serialization.cs (3)
21throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); 45throw new NotSupportedException(SR.Format(SR.DictionaryKeyTypeNotSupported, keyType, converter.GetType())); 377throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType));
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexCompiler.cs (1)
6222Call(MakeUnsafeAs(list[index].GetType())); // provide JIT with details necessary to devirtualize calls on this instance
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
234if (sc != null && sc.GetType() != typeof(SynchronizationContext))
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\TimerAwaitable.cs (1)
114throw new ObjectDisposedException(GetType().FullName);
System.Threading.Tasks.Dataflow (1)
Internal\Common.cs (1)
125string blockName = block.GetType().Name;
System.Transactions.Local (23)
System\Transactions\EnlistmentState.cs (8)
59Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 65Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 71Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 77Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 83Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 89Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 95Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 101Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}");
System\Transactions\TransactionsEtwProvider.cs (1)
227public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance;
System\Transactions\TransactionState.cs (14)
185Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 299Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 311Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 323Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 335Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 347Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 359Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 371Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 383Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 395Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 411Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 417Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 423Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 2023serializationInfo.FullTypeName = serializableTx.GetType().FullName!;
System.Windows.Controls.Ribbon (25)
Microsoft\Windows\Automation\Peers\RibbonAutomationPeer.cs (1)
45return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextMenuAutomationPeer.cs (1)
42return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextualTabGroupAutomationPeer.cs (1)
68return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlAutomationPeer.cs (1)
38return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlGroupAutomationPeer.cs (1)
43return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupAutomationPeer.cs (1)
59return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupHeaderAutomationPeer.cs (1)
51return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (1)
88return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuItemAutomationPeer.cs (1)
63return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonQuickAccessToolBarAutomationPeer.cs (1)
78return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonSeparatorAutomationPeer.cs (1)
41return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabAutomationPeer.cs (1)
62return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabHeaderAutomationPeer.cs (1)
39return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTitleAutomationPeer.cs (1)
46return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTwoLineTextAutomationPeer.cs (1)
43return Owner.GetType().Name;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
244throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
79throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
77throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
518throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1901object clone = Activator.CreateInstance(original.GetType()); 1972return (FrameworkElement)Activator.CreateInstance(original.GetType()); 2045if (clone.GetType().IsInstanceOfType(original))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (2)
561throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer)); 1488Debug.Assert(GetType().IsSubclassOf(type)); // RibbonMenuButton is a subclass of MenuBase
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
523throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
System.Xaml (55)
System\Windows\Markup\ArrayExtension.cs (1)
47Type = elements.GetType().GetElementType();
System\Windows\Markup\StaticExtension.cs (1)
86throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\TypeExtension.cs (1)
73throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\ValueSerializer.cs (5)
140if (converter.GetType() == typeof(DateTimeConverter2)) 247text = value.GetType().FullName; 249return new NotSupportedException(SR.Format(SR.ConvertToException, base.GetType().Name, text, destinationType.FullName)); 264text = value.GetType().FullName; 266return new NotSupportedException(SR.Format(SR.ConvertFromException, base.GetType().Name, text));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (12)
305_context.CurrentInstance = inst ?? throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.GetObjectNull, parentInstance.GetType(), parentProperty.Name))); 372XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); 766XamlType valueXamlType = GetXamlType(value.GetType()); 777XamlType valueXamlType = GetXamlType(value.GetType()); 1067SchemaContext.GetType(), clrType)); 1175XamlType instType = GetXamlType(inst.GetType()); 1713ctx.CurrentType = GetXamlType(value.GetType()); 1776if(me != null && !Logic_WillParentCollectionAdd(ctx, value.GetType(), true)) 1789currentType = value == null ? collectionType.ItemType : GetXamlType(value.GetType()); 2189Type rootInstanceType = (curInstance != null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType; 2219childThatHasUnresolvedChildren.GetType(), property, namesString))); 2576pendingAdd.ItemType = (item != null) ? GetXamlType(item.GetType()) : null;
System\Xaml\Runtime\ClrObjectRuntime.cs (6)
183throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex); 199throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex); 378if (genericIEnumerator.IsAssignableFrom(enumerator.GetType())) 499throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e); 635if (_ignoreCanConvert && value.GetType() == typeof(string)) 641if (typeConverter.CanConvertFrom(value.GetType()))
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
181Type targetType = target.GetType();
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (3)
429return xamlType.Invoker.GetType() == typeof(XamlTypeInvoker); 435return xamlMember.Invoker.GetType() == typeof(XamlMemberInvoker); 442return converter.GetType() == typeof(XamlValueConverter<TConverterBase>);
System\Xaml\Schema\BuiltInValueConverter.cs (2)
196s_Uri = new BuiltInValueConverter<TypeConverter>(stdConverter.GetType(), () => TypeDescriptor.GetConverter(typeof(Uri))); 214s_StringSerializer = new BuiltInValueConverter<ValueSerializer>(stringSerializer.GetType(), () => stringSerializer);
System\Xaml\Schema\XamlTypeInvoker.cs (2)
83itemType = _xamlType.SchemaContext.GetXamlType(item.GetType()); 115itemType = _xamlType.SchemaContext.GetXamlType(item.GetType());
System\Xaml\XamlObjectReader.cs (18)
57var context = new SerializerContext(schemaContext, this.settings) { RootType = instance?.GetType() }; 447actualKeyType = context.GetXamlType(entry.Key.GetType()); 481XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); 1295else if (!parameterInfo.ParameterType.IsAssignableFrom(argument.GetType())) 1297throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, argument.GetType(), parameterInfo.ParameterType)); 1433var valueType = value.GetType(); 1588AddFactoryMethodAndValidateArguments(value.GetType(), member, arguments, context, out methodParams); 1698throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType())); 1700throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType())); 1767var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); 1805var type = context.LocalAssemblyAwareGetXamlType(value.GetType()); 1931XamlType valueType = context.GetXamlType(value.GetType()); 2017XamlType xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType()); 2059var xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType()); 2509string ns = GetXamlType(obj.GetType()).PreferredXamlNamespace; 2633schemaContext.GetType(), clrType)); 2691XamlType valueXamlType = context.GetXamlType(value.GetType()); 2733XamlType type = GetXamlType(objectToName.GetType());
System\Xaml\XamlSchemaContext.cs (2)
979typeof(object).Assembly.GetType().IsAssignableFrom(assembly.GetType());
System\Xaml\XamlType.cs (1)
1560Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties");
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
UIAutomationClient (4)
System\Windows\Automation\ItemContainerPattern.cs (1)
142|| (value != null && !expectedType.IsAssignableFrom(value.GetType()))))
System\Windows\Automation\PropertyCondition.cs (1)
139|| (val != null && !expectedType.IsAssignableFrom(val.GetType()))))
System\Windows\Automation\Text\TextRange.cs (2)
190if (value.GetType() != ai.Type) 192throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), "value");
UIAutomationClientSideProviders (119)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (55)
410return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 417new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 425return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 439return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 445return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 451return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 467return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 474bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 486bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 507new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 514new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 521new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 540new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 551new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 562new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 585new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 596new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 607new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 632return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 644return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 656return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 691return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 709return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 727return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 753return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 760bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 773bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 794return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 801new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 809return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 835return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 842bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 855bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 876return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 884Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 891return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 917return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 924bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 937bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 958return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 964return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 970return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 992Marshal.SizeOf(hitTestInfo.GetType()), XSendMessage.ErrorValue.Zero)) 1001Marshal.SizeOf(hitTestInfo32.GetType()), XSendMessage.ErrorValue.Zero)) 1010Marshal.SizeOf(hitTestInfo64.GetType()), XSendMessage.ErrorValue.Zero)) 1029return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1037Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1044return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1070return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1077bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1090bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1128Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1136Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1145Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1173int cMem = Marshal.SizeOf(rectW32.GetType());
MS\Internal\AutomationProxies\Misc.cs (3)
1088gui.cbSize = Marshal.SizeOf(gui.GetType()); 1188ti.cbSize = Marshal.SizeOf(ti.GetType()); 1204ti.cbSize = Marshal.SizeOf(ti.GetType());
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
348throw new InvalidOperationException(SR.Format(SR.EditControlsHaveNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
44throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1072throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1084throw new InvalidOperationException(SR.Format(SR.InvalidRangeEndpoint, GetType().FullName)); 1118throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1149throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (3)
219bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 402return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 499bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
MS\Internal\AutomationProxies\WindowsListView.cs (7)
1276if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1426result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1497if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1670scrollBarInfo.cbSize = Marshal.SizeOf(scrollBarInfo.GetType()); 1681si.cbSize = Marshal.SizeOf (si.GetType ()); 1798if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType())))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (1)
309XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
388while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 705new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 816sbi.cbSize = Marshal.SizeOf(sbi.GetType());
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
77XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
137if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType())))
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (1)
57si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsMenu.cs (6)
510mbi.cbSize = Marshal.SizeOf(mbi.GetType()); 1895menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 1910menuItemInfo.cbSize = Marshal.SizeOf (menuItemInfo.GetType ()); 1954menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2561menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2602int readSize = Marshal.SizeOf(msaaMenuInfo.GetType());
MS\Internal\AutomationProxies\WindowsRebar.cs (3)
208return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 401if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 435if (XSendMessage.XSend(_hwnd, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
265throw new InvalidOperationException(SR.Format(SR.RichEditTextPatternHasNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsScroll.cs (6)
132sbi.cbSize = Marshal.SizeOf(sbi.GetType()); 148si.cbSize = Marshal.SizeOf (si.GetType ()); 199si.cbSize = Marshal.SizeOf (si.GetType ()); 254si.cbSize = Marshal.SizeOf (si.GetType ()); 293si.cbSize = Marshal.SizeOf(si.GetType ()); 367si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsScrollBar.cs (8)
142sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 438si.cbSize = Marshal.SizeOf (si.GetType ()); 452sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 526sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 577si.cbSize = Marshal.SizeOf (si.GetType ()); 628si.cbSize = Marshal.SizeOf (si.GetType ()); 714sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 729sbi.cbSize = Marshal.SizeOf(sbi.GetType());
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (3)
209si.cbSize = Marshal.SizeOf (si.GetType ()); 227sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 544si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsSlider.cs (2)
464XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 476XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (2)
168index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 578result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
MS\Internal\AutomationProxies\WindowsTab.cs (3)
281index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 661result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1280if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsTreeView.cs (3)
562if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 942if (Marshal.SizeOf(_hItem.GetType()) > sizeof(int)) 1599int readSize = Marshal.SizeOf(ent.GetType());
WasmAppBuilder (1)
WasmAppBuilder.cs (1)
402throw new LogAsErrorException($"Unsupported value '{valueObject}' of type '{valueObject?.GetType()?.FullName}' for extra config 'diagnosticTracing'.");
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
161throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName)); 202return SourceObject.GetType().GetProperty(propertyName, Type.EmptyTypes);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
111PropertyInfo propertyInfo = childControl.GetType().GetProperty("RightToLeftLayout", memberAccess);
XmlFileLogger (1)
LogProcessNode.cs (1)
96var type = childNode.GetType();