5948 references to GetType
aspire (2)
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
151logger.LogInformation("Starting auxiliary backchannel monitor for {CommandType}", command.GetType().Name);
Utils\EnvironmentChecker\EnvironmentChecker.cs (1)
37logger.LogDebug(ex, "Environment check {CheckType} failed with exception", check.GetType().Name);
Aspire.Azure.Messaging.EventHubs.Tests (1)
AspireEventHubsExtensionsTests.cs (1)
663var consumerGroupProperty = settings.GetType().GetProperty("ConsumerGroup");
Aspire.Confluent.Kafka (2)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (1)
179throw new InvalidCastException($"Cannot cast '{paramName}' from '{value?.GetType().ToString() ?? "null"}' to '{typeof(T)}'");
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\PropertyFetcher.AOT.cs (1)
78var fetcher = PropertyFetch.Create(obj.GetType().GetTypeInfo(), propertyName);
Aspire.Dashboard (2)
Components\Controls\Chart\ChartBase.cs (1)
213throw new InvalidOperationException("Unexpected metric type: " + metric.GetType());
Model\GenAI\GenAIMessages.cs (1)
262JsonSerializer.Serialize(writer, (object)value, value.GetType(), options);
Aspire.Dashboard.Components.Tests (1)
Controls\TextVisualizerDialogTests.cs (1)
212Assert.Empty(cut.FindAll("#" + instance.GetType().GetField("_openSelectFormatButtonId", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)?.GetValue(instance)));
Aspire.Dashboard.Tests (5)
AssemblyExtensionsTests.cs (1)
91return _customAttributes.Where(a => a.GetType() == attributeType).ToArray();
Integration\OtlpGrpcServiceTests.cs (1)
160var logger = loggerFactory.CreateLogger(GetType());
Integration\StartupTests.cs (2)
889}, loggerFactory.CreateLogger(GetType()), portCount: 4); 1096var loggerProviderTypes = loggerProviders.Select(p => p.GetType()).ToList();
OtlpApiKeyAuthenticationHandlerTests.cs (1)
100await handler.InitializeAsync(new AuthenticationScheme("Test", "Test", handler.GetType()), httpContext);
Aspire.Hosting (21)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
117_ => throw new InvalidOperationException($"Unknown file system item type: {node.Value.GetType().Name}"),
ApplicationModel\ContainerResource.cs (1)
40return $@"Type = {GetType().Name}, Name = ""{Name}"", Image = ""{imageName}""";
ApplicationModel\EnvironmentCallbackAnnotation.cs (1)
82var text = $@"Type = {GetType().Name}";
ApplicationModel\ProjectResource.cs (1)
300return $@"Type = {GetType().Name}, Name = ""{Name}"", Path = ""{path}""";
ApplicationModel\ReferenceExpression.cs (1)
284var conditionExpr = condition is IManifestExpressionProvider mep ? mep.ValueExpression : condition.GetType().Name;
ApplicationModel\Resource.cs (1)
37return $@"Type = {GetType().Name}, Name = ""{Name}"", Annotations = {Annotations.Count}";
ApplicationModel\ResourceExtensions.cs (1)
1531_ => resource.GetType().Name
ApplicationModel\ResourceNotificationService.cs (1)
872SupportsDetailedTelemetry = IsMicrosoftOpenType(resource.GetType())
Dcp\AppResource.cs (2)
32return dr.GetType().Equals(odr.GetType()) &&
Dcp\DcpExecutor.cs (1)
615_ => throw new InvalidOperationException($"Unknown resource type {resource.GetType().Name}")
DistributedApplication.cs (1)
634var value = $@"Type = {Resource.GetType().Name}, Name = ""{Resource.Name}"", State = {Snapshot?.State?.Text ?? "(null)"}";
DistributedApplicationBuilder.cs (2)
765throw new DistributedApplicationException($"Cannot add resource of type '{resource.GetType()}' with name '{resource.Name}' because resource of type '{existingResource.GetType()}' with that name already exists. Resource names are case-insensitive.");
DistributedApplicationBuilderExtensions.cs (1)
75throw new InvalidOperationException($"Resource '{name}' of type '{resource.GetType()}' is not assignable to requested type '{typeof(T).Name}'.");
DistributedApplicationLifecycle.cs (1)
34if (GetType().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion is string informationalVersion)
Pipelines\DistributedApplicationPipeline.cs (3)
317$"The dependsOn parameter must be a string or IEnumerable<string>, but was {dependsOn.GetType().Name}.", 338$"The requiredBy parameter must be a string or IEnumerable<string>, but was {requiredBy.GetType().Name}.", 942sb.AppendLine(CultureInfo.InvariantCulture, $" Resource: {step.Resource.Name} ({step.Resource.GetType().Name})");
Publishing\ResourceContainerImageManager.cs (1)
291throw new NotSupportedException($"The resource type '{resource.GetType().Name}' is not supported.");
ResourceBuilderExtensions.cs (1)
641return TryDispatchCustomWithReference(builder, source, connectionName, optional, name, source.Resource.GetType(), out dispatchedBuilder);
Aspire.Hosting.Azure (13)
AzureBicepResource.cs (4)
175using var resourceStream = GetType().Assembly.GetManifestResourceStream(TemplateResourceName) 176?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}"); 203using var resourceStream = GetType().Assembly.GetManifestResourceStream(TemplateResourceName) 204?? throw new InvalidOperationException($"Could not find resource {TemplateResourceName} in assembly {GetType().Assembly}");
AzureProvisioningResource.cs (4)
183_ => throw new NotSupportedException($"Existing resource name type '{existingAnnotation.Name.GetType()}' is not supported.") 198if (infraResourceGroup.GetType() == existingResourceGroup.GetType()) 214_ => throw new NotSupportedException($"Resource group type '{existingAnnotation.ResourceGroup.GetType()}' is not supported.")
AzurePublishingContext.cs (1)
248_ => throw new NotSupportedException("Unsupported value type " + val.GetType())
Provisioning\BicepUtilities.cs (2)
57_ => throw new NotSupportedException($"The parameter value type {parameterValue.GetType()} is not supported.") 77_ => throw new NotSupportedException($"The scope value type {targetScope.GetType()} is not supported.")
Provisioning\Internal\DefaultTokenCredentialProvider.cs (1)
103_logger.LogInformation("Using {credentialType} for provisioning.", credential.GetType().Name);
Provisioning\Provisioners\BicepProvisioner.cs (1)
132ResourceType = resource.GetType().Name,
Aspire.Hosting.Azure.AppContainers (3)
BaseContainerAppContext.cs (2)
150_ => throw new NotSupportedException("Unsupported value type " + val.GetType()) 369throw new NotSupportedException("Unsupported value type " + value.GetType());
src\Shared\BicepFormattingHelpers.cs (1)
29_ => throw new ArgumentException($"Invalid expression type for '{format}' encoding: {val.GetType()}")
Aspire.Hosting.Azure.AppService (3)
AzureAppServiceWebsiteContext.cs (2)
276throw new NotSupportedException($"Unsupported value type {value.GetType()}"); 287_ => throw new NotSupportedException($"Unsupported value type {val.GetType()}")
src\Shared\BicepFormattingHelpers.cs (1)
29_ => throw new ArgumentException($"Invalid expression type for '{format}' encoding: {val.GetType()}")
Aspire.Hosting.Azure.Tests (1)
ProvisioningContextProviderTests.cs (1)
407Assert.True((bool)context.GetType().GetProperty("HasErrors", BindingFlags.NonPublic | BindingFlags.Instance)!.GetValue(context, null)!);
Aspire.Hosting.CodeGeneration.TypeScript.Tests (2)
AtsTypeScriptCodeGeneratorTests.cs (2)
1003.FirstOrDefault(a => a.GetType().FullName == "Aspire.Hosting.AspireUnionAttribute"); 1008var typesProperty = unionAttr.GetType().GetProperty("Types");
Aspire.Hosting.Docker (1)
UnixFileModeTypeConverter.cs (1)
34throw new InvalidOperationException($"Expected {nameof(UnixFileMode)} but got {value?.GetType()}");
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
194logger.LogWarning("Environment variable '{Key}' for resource '{Name}' has unknown value of type '{type}' and will be skipped.", key, resource.Name, value.GetType().FullName);
Aspire.Hosting.Keycloak.Tests (2)
KeycloakResourceBuilderTests.cs (2)
95Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.AdminPasswordParameter.Default?.GetType().FullName); 105Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.AdminPasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Kubernetes (5)
KubernetesPublishingContext.cs (1)
185return $"{templatedItem.GetType().Name.ToLowerInvariant()}.yaml";
KubernetesResource.cs (3)
473context.Logger.NotSupportedResourceWarning(nameof(value), r.GetType().Name); 478throw new NotSupportedException($"Unsupported value type: {value.GetType().Name}"); 650ValueType = value?.GetType();
Yaml\IntOrStringConverter.cs (1)
60throw new InvalidOperationException($"Expected {nameof(Int32OrStringV1)} but got {value?.GetType()}");
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
23Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", mysql.Resource.PasswordParameter.Default?.GetType().FullName); 33Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", mysql.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Nats.Tests (2)
AddNatsTests.cs (2)
20Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", nats.Resource.PasswordParameter!.Default?.GetType().FullName); 30Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", nats.Resource.PasswordParameter!.Default?.GetType().FullName);
Aspire.Hosting.Oracle.Tests (2)
AddOracleTests.cs (2)
21Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", orcl.Resource.PasswordParameter.Default?.GetType().FullName); 31Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", orcl.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Orleans (1)
ProviderConfiguration.cs (1)
22var resourceType = resourceBuilder.Resource.GetType().Name;
Aspire.Hosting.PostgreSQL.Tests (2)
AddPostgresTests.cs (2)
32Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", pg.Resource.PasswordParameter.Default?.GetType().FullName); 42Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", pg.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Qdrant.Tests (2)
AddQdrantTests.cs (2)
31Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", qd.Resource.ApiKeyParameter.Default?.GetType().FullName); 41Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", qd.Resource.ApiKeyParameter.Default?.GetType().FullName);
Aspire.Hosting.RabbitMQ.Tests (2)
AddRabbitMQTests.cs (2)
20Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.PasswordParameter.Default?.GetType().FullName); 30Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.RemoteHost (19)
Ats\AtsMarshaller.cs (2)
164var type = value.GetType(); 223var type = value.GetType();
Ats\CapabilityDispatcher.cs (4)
517var taskType = task.GetType(); 565if (HostingTypeHelpers.IsResourceBuilderType(contextObj.GetType())) 567var resource = contextObj.GetType() 662capabilityId, name, typeof(T).Name, obj?.GetType().Name ?? "null");
Ats\GenericMethodResolver.cs (2)
54return argument.GetType(); 65var argType = argument.GetType();
Ats\HandleRegistry.cs (1)
99$"Handle '{handleId}' contains {obj.GetType().FullName}, expected {typeof(T).FullName}");
Ats\ReferenceExpressionRef.cs (10)
179if (conditionObj is null || !valueProviderType.IsAssignableFrom(conditionObj.GetType())) 182$"Condition handle must resolve to an IValueProvider, got {conditionObj?.GetType().Name ?? "null"}"); 328var appendLiteralMethod = builder.GetType().GetMethod( 334?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing AppendLiteral(string)."); 341var appendValueProviderMethod = builder.GetType().GetMethod( 347?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing AppendValueProvider(object, string)."); 354var buildMethod = builder.GetType().GetMethod("Build", BindingFlags.Instance | BindingFlags.Public) 355?? throw new InvalidOperationException($"'{builder.GetType().FullName}' is missing Build()."); 358?? throw new InvalidOperationException($"'{builder.GetType().FullName}.Build()' returned null."); 390var anchoredType = anchor.GetType().Assembly.GetType(fullName, throwOnError: false);
Aspire.Hosting.SqlServer.Tests (2)
AddSqlServerTests.cs (2)
21Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", sql.Resource.PasswordParameter.Default?.GetType().FullName); 31Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", sql.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Tests (1)
DistributedApplicationTests.cs (1)
1823var kubernetesLifecycle = (KubernetesTestLifecycleHook)lifecycles.Where(l => l.GetType() == typeof(KubernetesTestLifecycleHook)).First();
Aspire.Hosting.Yarp (3)
ConfigurationBuilder\YarpConfigurationBuilder.cs (1)
70$"Destination must be an IValueProvider, string, or Uri. Got: {dest?.GetType().FullName ?? "null"}",
YarpEnvConfigGenerator.cs (2)
88foreach (var property in obj.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) 107var type = value.GetType();
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
AspireSqlServerEFCoreSqlClientExtensions.cs (1)
142else if (executionStrategy.GetType() != typeof(SqlServerExecutionStrategy))
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
AspireEFPostgreSqlExtensions.cs (1)
157else if (executionStrategy.GetType() != typeof(NpgsqlExecutionStrategy))
Aspire.OpenAI.Tests (1)
AspireOpenAIExtensionsTests.cs (1)
115var endpointField = client.GetType().GetField("_endpoint", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
Aspire.Oracle.EntityFrameworkCore (1)
AspireOracleEFCoreExtensions.cs (1)
144else if (executionStrategy.GetType() != typeof(OracleExecutionStrategy))
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
AspireEFMySqlExtensions.cs (1)
205else if (executionStrategy.GetType() != typeof(MySqlExecutionStrategy))
Aspire.RabbitMQ.Client.Tests (3)
AspireRabbitMQLoggingTests.cs (3)
213s_log.GetType().GetMethod("Info")!.Invoke(s_log, new object[] { message }); 221s_log.GetType().GetMethod("Warn")!.Invoke(s_log, new object[] { message }); 229s_log.GetType().GetMethod("Error", [typeof(string), typeof(Exception)])!.Invoke(s_log, new object[] { message, ex });
Aspire.StackExchange.Redis (4)
AspireRedisExtensions.cs (1)
264if (options.Defaults.GetType() == typeof(DefaultOptionsProvider))
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
47if (message.GetType() == scriptMessageType)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (1)
185throw new InvalidCastException($"Cannot cast '{paramName}' from '{value?.GetType().ToString() ?? "null"}' to '{typeof(T)}'");
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.AOT.cs (1)
80var fetcher = PropertyFetch.Create(obj.GetType().GetTypeInfo(), propertyName);
Aspire.StackExchange.Redis.OutputCaching.Tests (2)
AspireRedisOutputCacheExtensionsTests.cs (2)
24Assert.StartsWith("Redis", cacheStore.GetType().Name); 38Assert.StartsWith("Redis", cacheStore.GetType().Name);
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
231Assert.StartsWith("Redis", cacheStore.GetType().Name);
CodeStyleConfigFileGenerator (1)
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Contract.Data.IntegrationTests (3)
DataContractTests.4.1.1.cs (3)
33x => x.GetType() == typeof(DataContractSerializerOperationBehavior)) as DataContractSerializerOperationBehavior; 42Assert.True(manager.GetType() == (typeof(Manager)), string.Format("Expected type: {0}, Actual type: {1}", typeof(Manager), manager.GetType()));
Contract.Fault.IntegrationTests (4)
FaultExceptionTests.4.0.0.cs (4)
253Assert.True(response[0].GetType() == typeof(FaultDetail), String.Format("Expected response item to be FaultDetail but actual was {0}", response[0].GetType())); 255Assert.True(response[1].GetType() == typeof(KnownTypeA), String.Format("Expected response item to be FaultDetail2 but actual was {0}", response[1].GetType()));
dotnet (47)
_generated\104\WorkloadSearchVersionsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\115\WorkloadHistoryJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\123\PackInfoJsonSerializerContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\136\NugetSearchApiJsonSerializerContext.g.cs (2)
80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 88throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\14\CliSchemaJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\146\SdkVulnerabilityJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\153\SlnfJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\167\TelemetryDiskLoggerJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\174\LocalToolsCacheJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\184\SdkVulnerabilityCacheJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\32\RunFileApiJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\36\CSharpCompilerCommandJsonSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\49\RunFileJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\54\SdkCheckJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\66\ToolListJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\71\GlobalJsonWorkloadSetsJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\76\WorkloadInstallJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\81\WorkloadManifestUpdaterJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\89\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\97\WorkloadListJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
CommandFactory\CommandResolution\CompositeCommandResolver.cs (1)
45{ "commandResolver", commandResolver.GetType().ToString() }
Commands\Run\CSharpCompilerCommand.cs (1)
182Reporter.Error.WriteLine($"Warning: Compiler server returned unexpected response: {response.GetType().Name}".Yellow());
Commands\Run\FileBasedAppSourceEditor.cs (2)
102if (existingDirective.GetType() == directive.GetType())
Commands\Test\MTP\IPC\NamedPipeServer.cs (1)
161INamedPipeSerializer responseNamedPipeSerializer = GetSerializer(response.GetType());
Commands\Test\MTP\TestApplication.cs (2)
282Logger.LogTrace($"Request '{request.GetType()}' with Serializer ID = {unknownMessage.SerializerId} is unsupported."); 287throw new NotSupportedException(string.Format(CliCommandStrings.CmdUnsupportedMessageRequestTypeException, request.GetType()));
dotnet-format (8)
Analyzers\AnalyzerFormatter.cs (2)
342if (analyzer.GetType().FullName?.EndsWith("NamingStyleDiagnosticAnalyzer") == true) 363return analyzer.GetType()
Analyzers\Extensions.cs (2)
152var notificationProperty = option.GetType().GetProperty("Notification"); 159var reportDiagnosticValue = notification?.GetType().GetProperty("Severity")?.GetValue(notification);
Analyzers\SolutionCodeFixApplier.cs (4)
27logger.LogWarning(Resources.Unable_to_fix_0_Code_fix_1_doesnt_support_Fix_All_in_Solution, diagnosticId, codeFix.GetType().Name); 73logger.LogWarning(Resources.Unable_to_fix_0_Code_fix_1_didnt_return_a_Fix_All_action, diagnosticId, codeFix.GetType().Name); 81logger.LogWarning(Resources.Unable_to_fix_0_Code_fix_1_returned_an_unexpected_operation, diagnosticId, codeFix.GetType().Name); 89logger.LogWarning(Resources.Failed_to_apply_code_fix_0_for_1_2, codeFix.GetType().Name, diagnosticId, ex.Message);
dotnet-Microsoft.XmlSerializer.Generator (2)
Sgen.cs (1)
498Console.Out.WriteLine(SR.Format(SR.HelpUsage, this.GetType().Assembly.GetName().Name.Substring("dotnet-".Length)));
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
dotnet-svcutil-lib (494)
CodeDomFixup\CodeDomVisitors\CodeTypeNameScope.cs (1)
25throw new ObjectDisposedException(GetType().Name);
CodeDomFixup\CodeDomVisitors\PropertyFieldNameScope.cs (1)
30throw new ObjectDisposedException(GetType().Name);
CodeDomFixup\EndpointSelector.cs (10)
45s_bindingValidationErrors.Add(string.Format(SR.BindingTypeNotSupportedFormat, binding.GetType().FullName, 129s_bindingValidationErrors.Add(string.Format(SR.BindingTransportTypeNotSupportedFormat, bindingElement.GetType().FullName, 137s_bindingValidationErrors.Add(string.Format(SR.BindingMessageEncodingElementNotSupportedFormat, bindingElement.GetType().FullName, 218s_bindingValidationErrors.Add(string.Format(SR.BindingElementTypeNotSupportedFormat, bindingElement.GetType().FullName)); 250endorsingTokenParams.BootstrapSecurityBindingElement.GetType().FullName, typeof(TransportSecurityBindingElement).FullName)); 267transportSecurityBindingElement.DefaultAlgorithmSuite.GetType().FullName, SecurityAlgorithmSuite.Default.GetType().FullName)); 297transportSecurityBindingElement.DefaultAlgorithmSuite.GetType().FullName, SecurityAlgorithmSuite.Default.GetType().FullName)); 322transportSecurityBindingElement.EndpointSupportingTokenParameters.SignedEncrypted[0].GetType().FullName, typeof(UserNameSecurityTokenParameters).FullName));
CodeDomFixup\MethodCreationHelper.cs (3)
211throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingTypeNotSupportedFormat, binding.GetType().FullName)); 1084throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ErrBindingElementNotSupportedFormat, bindingElement.GetType().FullName)); 2142createIdentityExpression = new CodeObjectCreateExpression(identity.GetType(), new CodePrimitiveExpression(identity.IdentityClaim.Resource));
CommandLineParser.cs (1)
71return string.Format(CultureInfo.InvariantCulture, "{0} {{{1}, {2}, Type={3}}}", this.GetType().Name, Name, Abbreviation, SwitchType);
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (3)
824throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1143throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1803throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString()));
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (7)
62throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 99throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 500throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 709String message = string.Format(SRCodeDom.InvalidTypeName, typeName, propertyName, e.GetType().FullName); 718String message = string.Format(SRCodeDom.InvalidLanguageIdentifier, identifier, propertyName, e.GetType().FullName); 833throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1019throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (3)
1219throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1405throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString())); 1969throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderSettings.cs (1)
552throw new XmlException(ResXml.Xml_ReadOnlyProperty, this.GetType().Name + '.' + propertyName);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriterSettings.cs (1)
679throw new XmlException(ResXml.Xml_ReadOnlyProperty, this.GetType().Name + '.' + propertyName);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElement.cs (2)
428if (GetType() == typeof(XmlElement)) 459if (e != null && e.GetType() == typeof(XmlElement))
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlLoader.cs (1)
31if (reader.GetType() == typeof(Microsoft.Xml.XmlTextReader))
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (4)
433Type derivedType = this.GetType(); 434Type baseType = datatype.GetType(); 597if (value.GetType() != this.ValueType) 1162Debug.Assert(array.GetType() == ListValueType);
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\infer.cs (3)
990if (((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem].GetType() != typeof(XmlSchemaElement)) 1062if (ct.Particle.GetType() == typeof(XmlSchemaSequence)) 1077if (xss.Items[0].GetType() == typeof(XmlSchemaChoice))
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (1)
370Type returnType = obj.GetType();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaDatatype.cs (1)
274Type t = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (51)
332_clrTypeDefault = Array.CreateInstance(converterAtomic.DefaultClrType, 0).GetType(); 600throw CreateInvalidClrMappingException(value.GetType(), destinationType); 1022Type sourceType = value.GetType(); 1068Type sourceType = value.GetType(); 1107Type sourceType = value.GetType(); 1153Type sourceType = value.GetType(); 1235Type sourceType = value.GetType(); 1281Type sourceType = value.GetType(); 1363Type sourceType = value.GetType(); 1411Type sourceType = value.GetType(); 1446Type sourceType = value.GetType(); 1509Type sourceType = value.GetType(); 1589Type sourceType = value.GetType(); 1634Type sourceType = value.GetType(); 1723Type sourceType = value.GetType(); 1786Type sourceType = value.GetType(); 1843Type sourceType = value.GetType(); 1913Type sourceType = value.GetType(); 1959Type sourceType = value.GetType(); 2058Type sourceType = value.GetType(); 2139Type sourceType = value.GetType(); 2255Type sourceType = value.GetType(); 2346Type sourceType = value.GetType(); 2377Type sourceType = value.GetType(); 2430Type sourceType = value.GetType(); 2452Type sourceType = value.GetType(); 2474Type sourceType = value.GetType(); 2495Type sourceType = value.GetType(); 2517Type sourceType = value.GetType(); 2539Type sourceType = value.GetType(); 2561Type sourceType = value.GetType(); 2583Type sourceType = value.GetType(); 2637Type sourceType = value.GetType(); 2784Type sourceType = value.GetType(); 2884Type sourceType = value.GetType(); 2906Type sourceType = value.GetType(); 3024Type sourceType = value.GetType(); 3060Type sourceType = value.GetType(); 3076Type sourceType = value.GetType(); 3091Type sourceType = value.GetType(); 3107Type sourceType = value.GetType(); 3123Type sourceType = value.GetType(); 3139Type sourceType = value.GetType(); 3155Type sourceType = value.GetType(); 3171Type sourceType = value.GetType(); 3286Type sourceType = value.GetType(); 3366Type sourceType = value.GetType(); 3412if (!(value is IEnumerable) || value.GetType() == StringType || value.GetType() == ByteArrayType) 3477Type sourceType = value.GetType(); 3709Type sourceType = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Advanced\SchemaImporterExtension.cs (5)
68return Add(extension.GetType().FullName, extension); 119if (Names[name].GetType() != extension.GetType()) 203string comment = string.Format(ResXml.XmlExtensionComment, _extension.GetType().FullName); 209throw new InvalidOperationException(string.Format(ResXml.XmlExtensionDuplicateDefinition, _extension.GetType().FullName, _clrType));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
174return var.GetType(); 1123Type valueType = o.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Compilation.cs (2)
185_methods[mapping.Key].readMethod = GetMethodFromType(reader.GetType(), methodName, _pregeneratedAssmbly ? _assembly : null); 219_methods[mapping.Key].writeMethod = GetMethodFromType(writer.GetType(), methodName, _pregeneratedAssmbly ? _assembly : null);
FrameworkFork\Microsoft.Xml\Xml\Serialization\ImportContext.cs (5)
152string key = item.GetType().Name + ":" + qname.ToString(); 172Warnings.Add(string.Format(ResXml.XmlMismatchSchemaObjects, item.GetType().Name, qname.Name, qname.Namespace)); 185if (o1.GetType() != o2.GetType()) 335Type t = item.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaObjectWriter.cs (9)
36return String.Compare(f1.GetType().Name + ":" + f1.Value, f2.GetType().Name + ":" + f2.Value, StringComparison.Ordinal); 337System.Type t = o.GetType(); 972System.Type t = o.GetType(); 1034System.Type t = o.GetType(); 1057System.Type t = o.GetType(); 1089System.Type t = o.GetType(); 1115System.Type t = o.GetType(); 1137System.Type t = o.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (5)
775if (fieldTypeDesc != _typeScope.GetTypeDesc(a.SoapDefaultValue.GetType())) 776throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName)); 777string strValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "G").Replace(",", " "); 778string numValue = Enum.Format(a.SoapDefaultValue.GetType(), a.SoapDefaultValue, "D"); 780throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (1)
389throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (1)
638throw new InvalidOperationException(string.Format(ResXml.XmlInvalidEnumContent, dataType.Content.GetType().Name, identifier));
FrameworkFork\Microsoft.Xml\Xml\Serialization\TypeExtensions.cs (1)
29Type sourceType = data.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAttributes.cs (1)
106if (attrib is XmlIgnoreAttribute || attrib is ObsoleteAttribute || attrib.GetType() == IgnoreAttribute)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (6)
218Type type = value.GetType(); 225if (value.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Invalid enumeration type " + value.GetType().Name)); 462AddWarningComment(comments, string.Format(ResXml.XmlNotKnownDefaultValue, extension.GetType().FullName, attributeName, (string)defaultValue, mapping.TypeName, mapping.Namespace)); 505if (value.GetType() != typeof(object[])) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Default value for list should be object[], not " + value.GetType().Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCustomFormatter.cs (1)
24Type type = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
2148throw new InvalidOperationException(string.Format(ResXml.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2187throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (4)
720throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name)); 919if (value.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, string.Format(ResXml.XmlInvalidDefaultValue, value.ToString(), value.GetType().FullName))); 1117throw new InvalidOperationException(string.Format(ResXml.XmlInvalidContent, type.ContentModel.Content.GetType().Name));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (5)
409if (!(desiredMappingType.IsAssignableFrom(mapping.GetType()))) 410throw new InvalidOperationException(string.Format(ResXml.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 453throw new InvalidOperationException(string.Format(ResXml.XmlImporterExtensionBadLocalTypeName, typeOwner.GetType().FullName, typeName)); 457throw new InvalidOperationException(string.Format(ResXml.XmlImporterExtensionBadTypeName, typeOwner.GetType().FullName, qname.Name, qname.Namespace, typeName)); 533if (mapping != null && desiredMappingType.IsAssignableFrom(mapping.GetType()))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemas.cs (8)
337if (ret == null || !type.IsAssignableFrom(ret.GetType())) 500throw new InvalidOperationException(string.Format(ResXml.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 639item = string.Format(ResXml.XmlSchemaNamedItem, ns, o.GetType() == typeof(XmlSchemaSimpleType) ? "simpleType" : "complexType", ((XmlSchemaType)o).Name, null); 667string itemType = o is XmlSchemaImport ? "import" : o is XmlSchemaInclude ? "include" : o is XmlSchemaRedefine ? "redefine" : o.GetType().Name; 676item = string.Format(ResXml.XmlSchemaNamedItem, ns, o.GetType().Name, null, details); 687XmlSerializer s = new XmlSerializer(o.GetType()); 709Type type = o.GetType(); 715if (item.GetType() == type && name == ItemName(item))
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (4)
1416return new InvalidCastException(string.Format(ResXml.XmlInvalidCast, value.GetType().FullName, type.FullName)); 1418return new InvalidCastException(string.Format(ResXml.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id)); 1649throw new InvalidOperationException(string.Format(ResXml.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString())); 1827Type currItemType = currItem.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (11)
254Type t = o.GetType(); 468if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(string.Format(ResXml.XmlCircularReference, o.GetType().FullName)); 642if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 778if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 810return CreateUnknownTypeException(o.GetType()); 857return CreateInvalidAnyTypeException(o.GetType()); 1371Type t = o.GetType(); 1421Type t = o.GetType(); 1727if (defaultValue.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 3524Type type = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
204if (defaultValue.GetType() != typeof(string)) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2254else if (value.GetType().GetTypeInfo().IsPrimitive) 2262Type valueType = value.GetType();
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\baseaxisquery.cs (2)
121if (qyInput.GetType() != typeof(ContextQuery)) 142w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\BooleanExpr.cs (1)
64w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\BooleanFunctions.cs (1)
93w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CacheChildrenQuery.cs (1)
101if (currentNode.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator")
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CacheOutputQuery.cs (1)
81w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\DescendantBaseQuery.cs (1)
62w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\FilterQuery.cs (1)
187w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\FunctionQuery.cs (1)
128w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\LogicalExpr.cs (1)
439w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\MergeFilterQuery.cs (1)
78w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\NodeFunctions.cs (1)
114w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\NumberFunctions.cs (1)
124w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\NumericExpr.cs (1)
80w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\OperandQuery.cs (1)
32w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\Query.cs (5)
187if (nav.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator") return; 188if (nav.GetType().ToString() == "Microsoft.Xml.DataDocumentXPathNavigator") return; 215if (curr.GetType().ToString() == "Microsoft.VisualStudio.Modeling.StoreNavigator") return; 216if (curr.GetType().ToString() == "Microsoft.Xml.DataDocumentXPathNavigator") return; 261w.WriteElementString(this.GetType().Name, string.Empty);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\SortQuery.cs (1)
118w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\StringFunctions.cs (1)
276w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\UnionExpr.cs (1)
167w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\VariableQuery.cs (1)
75w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\XPathAncestorQuery.cs (1)
70w.WriteStartElement(this.GetType().Name);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
1027if (n1.GetType().ToString() != "Microsoft.VisualStudio.Modeling.StoreNavigator")
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (2)
532throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(string.Format(SRSerialization.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType)))); 541throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(string.Format(SRSerialization.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType))));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeExporter.cs (1)
286throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(string.Format(SRSerialization.UnexpectedContractType, DataContract.GetClrTypeFullName(dataContract.GetType()), DataContract.GetClrTypeFullName(dataContract.UnderlyingType))));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (4)
279return var.GetType(); 833throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.CanOnlyStoreIntoArgOrLocGot0, DataContract.GetClrTypeFullName(var.GetType())))); 971Type valueType = o.GetType(); 980EmitSourceComment("Ldc " + o.GetType() + "." + o);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (2)
309throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(string.Format(SRSerialization.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType)))); 314throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(string.Format(SRSerialization.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType))));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSerializer.cs (3)
312Type graphType = (graph == null) ? declaredType : graph.GetType(); 453return (graph == null) ? _rootType : graph.GetType(); 466objType = obj != null ? obj.GetType() : Globals.TypeOfObject;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ExceptionDataContract.cs (2)
362Type type = value.GetType(); 507Type type = obj.GetType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SerializationExtensionMethods.cs (1)
26if (a.GetType().FullName == attributeType.FullName)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializer.cs (1)
390return (graph == null) ? null : graph.GetType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
423throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.FactoryObjectContainsSelfReference, DataContract.GetClrTypeFullName(oldObj.GetType()), DataContract.GetClrTypeFullName(newObj.GetType()), id)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (8)
118SerializeWithXsiType(xmlWriter, obj, obj.GetType().TypeHandle, null/*type*/, -1, declaredType.TypeHandle, declaredType); 127RuntimeTypeHandle objTypeHandle = obj.GetType().TypeHandle; 422throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.CannotSerializeObjectWithCycles, DataContract.GetClrTypeFullName(obj.GetType())))); 501return obj.GetType().TypeHandle.Equals(memberType.TypeHandle); 571throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.UnknownXmlType, DataContract.GetClrTypeFullName(obj.GetType())))); 602throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.ResolveTypeReturnedFalse, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType)))); 612throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType)))); 617throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
253RuntimeTypeHandle objTypeHandle = isDeclaredType ? declaredTypeHandle : obj.GetType().TypeHandle;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlSerializableWriter.cs (3)
27throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.IXmlSerializableMissingEndElements, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType()))))); 56throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType()))))); 64throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(string.Format(SRSerialization.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlWriterDelegator.cs (1)
294WriteAnyType(value, value.GetType());
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
1208else if (value.GetType().IsArray)
FrameworkFork\System.ServiceModel\Extensions\ReflectionExtensions.cs (1)
72return o == null ? false : type.GetTypeInfo().IsAssignableFrom(o.GetType().GetTypeInfo());
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AsyncResult.cs (2)
116throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 326throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
161return String.Format(CultureInfo.CurrentCulture, "{0}/{1}", source.GetType().ToString(), source.GetHashCode());
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
283(SynchronizationContext.Current.GetType() == typeof(SynchronizationContext)));
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (2)
352throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName)); 583throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\IdentityModel\Policy\UnconditionalPolicy.cs (1)
206throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenAuthenticator.cs (5)
35throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(string.Format(SRServiceModel.CannotValidateSecurityTokenType, this, token.GetType()))); 44tokenType = tokenType ?? token.GetType().ToString(); 51string errorMsg = string.Format(SRServiceModel.CannotValidateSecurityTokenType, this, token.GetType()); 55tokenType = tokenType ?? token.GetType().ToString(); 65tokenType = tokenType ?? token.GetType().ToString();
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenRequirement.cs (2)
164if (dictionaryValue != null && !typeof(TValue).IsAssignableFrom(dictionaryValue.GetType())) 166throw Fx.Exception.Argument(propertyName, string.Format(SRServiceModel.SecurityTokenRequirementHasInvalidTypeForProperty, propertyName, dictionaryValue.GetType(), typeof(TValue)));
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenResolver.cs (1)
89throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException(string.Format(SRServiceModel.ID0023, this.GetType().AssemblyQualifiedName)));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
318throw /*System.ServiceModel.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SecurityToken.cs (3)
25return new LocalIdKeyIdentifierClause(this.Id, this.GetType()) as T; 28string.Format(SRServiceModel.TokenDoesNotSupportKeyIdentifierClauseCreation, GetType().Name, typeof(T).Name))); 35return localKeyIdentifierClause.Matches(this.Id, this.GetType());
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\X509SecurityToken.cs (1)
128throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\BasicHttpMessageSecurity.cs (2)
142return _algorithmSuite.GetType() != SecurityAlgorithmSuite.Default.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\ChannelFactory.cs (1)
601Type implementationType = implementation.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeader.cs (1)
65return (value == null) ? typeof(object) : value.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (2)
173WcfEventSource.Instance.WritePoolMiss(messageWriter.GetType().Name); 212WcfEventSource.Instance.ReadPoolMiss(messageData.GetType().Name);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncodingBindingElement.cs (2)
89string errorMsg = string.Format(SRServiceModel.UnsupportedEnvelopeVersion, this.GetType().FullName, BinaryEncoderDefaults.EnvelopeVersion, value.Envelope); 176this.GetType().Name,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Binding.cs (3)
69_name = this.GetType().Name; 245string.Format(SRServiceModel.TransportBindingElementMustBeLast, this.Name, transport.GetType().Name))); 250string.Format(SRServiceModel.InvalidBindingScheme, transport.GetType().Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingContext.cs (1)
131string typeString = bindingElement.GetType().ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BindingElementCollection.cs (1)
68if (bindingElementType.GetTypeInfo().IsAssignableFrom(this[i].GetType().GetTypeInfo()))
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelBindingMessageProperty.cs (1)
132throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelFactoryBase.cs (1)
154throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.ChannelFactoryCannotBeUsedToCreateChannels, this.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelParameterCollection.cs (4)
89channel.GetType().ToString(), state.ToString()); 94channel.GetType().ToString(), state.ToString()); 117channel.GetType().ToString(), state.ToString()); 129channel.GetType().ToString(), state.ToString());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (5)
196WcfEventSource.Instance.WebSocketCreateClientWebSocketWithFactory(EventTraceActivity, _connectionFactory.GetType().FullName); 224throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_CreateWebSocketFailed, _connectionFactory.GetType().Name), e)); 230throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidWebSocket, _connectionFactory.GetType().Name))); 236throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidWebSocket, _connectionFactory.GetType().Name))); 244throw FxTrace.Exception.AsError(new InvalidOperationException(string.Format(SRServiceModel.ClientWebSocketFactory_InvalidSubProtocol, _connectionFactory.GetType().Name, obtained, requested)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CommunicationObject.cs (1)
582return this.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CommunicationObjectManager.cs (1)
41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FaultConverter.cs (4)
36string text = string.Format(SRServiceModel.FaultConverterDidNotCreateException, this.GetType().Name); 45string text = string.Format(SRServiceModel.FaultConverterCreatedException, this.GetType().Name); 62string text = string.Format(SRServiceModel.FaultConverterDidNotCreateFaultMessage, this.GetType().Name); 71string text = string.Format(SRServiceModel.FaultConverterCreatedFaultMessage, this.GetType().Name);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpMessageHandlerFactory.cs (1)
183throw FxTrace.Exception.Argument("handlers", string.Format(SRServiceModel.DelegatingHandlerArrayHasNonNullInnerHandler, s_delegatingHandlerType.Name, "InnerHandler", handler.GetType().Name));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
42httpHeaders.GetType().Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\LifetimeManager.cs (4)
65throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString())); 203throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString())); 232throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString())); 356this.Complete(false, new ObjectDisposedException(this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (1)
110return (value == null) ? typeof(object) : value.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncodingBindingElementImporter.cs (1)
39Type elementType = messageEncodingBindingElement.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (1)
31(detail == null ? typeof(object) : detail.GetType()), int.MaxValue/*maxItems*/), "", "");
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (2)
429(_objectToSerialize == null ? typeof(object) : _objectToSerialize.GetType()), this.Name, this.Namespace, int.MaxValue/*maxItems*/); 444throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessageHeaderVersionNotSupported, this.GetType().FullName, messageVersion.ToString()), "version"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (1)
1212header.GetType().FullName, _version.Envelope.ToString()), "header"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (1)
53throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(string.Empty, string.Format(SRServiceModel.ObjectDisposed, this.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ReliableSessionBindingElement.cs (1)
310transportTransferMode, this.GetType().Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestContextBase.cs (1)
197throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SecurityBindingElement.cs (1)
1414sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "{0}:", this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (2)
1104string text = string.Format(SRServiceModel.SFxInitializationUINotCalled, example.GetType().ToString()); 1123string text = string.Format(SRServiceModel.SFxInitializationUIDisallowed, example.GetType().ToString());
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannelProxy.cs (2)
70else if (declaringType.IsAssignableFrom(_serviceChannel.GetType())) 328activityName = string.Format(SRServiceModel.ActivityClose, _serviceChannel.GetType().FullName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (2)
156this.GetType().ToString(), SRServiceModel.SocketConnectionDisposed), TransferOperation.Undefined)); 166this.GetType().ToString(), SRServiceModel.SocketConnectionDisposed), TransferOperation.Undefined));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (5)
170throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("upgradeInitiator", string.Format(SRServiceModel.UnsupportedUpgradeInitiator, upgradeInitiator.GetType())); 175throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("kind", string.Format(SRServiceModel.StreamUpgradeUnsupportedChannelBindingKind, this.GetType(), kind)); 192throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("upgradeAcceptor", string.Format(SRServiceModel.UnsupportedUpgradeAcceptor, upgradeAcceptor.GetType())); 197throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("kind", string.Format(SRServiceModel.StreamUpgradeUnsupportedChannelBindingKind, this.GetType(), kind)); 264SRServiceModel.InvalidTokenProvided, _serverTokenProvider.GetType(), typeof(X509SecurityToken))));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (2)
604WcfEventSource.Instance.WritePoolMiss(messageWriter.GetType().Name); 644WcfEventSource.Instance.ReadPoolMiss(messageData.GetType().Name);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
234SRServiceModel.InvalidTokenProvided, tokenProvider.GetType(), typeof(T))));
FrameworkFork\System.ServiceModel\System\ServiceModel\ClientBase.cs (2)
338if (typeof(CompletedAsyncResult).IsAssignableFrom(result.GetType())) 362if (typeof(CompletedAsyncResult).IsAssignableFrom(result.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\Configuration\SecurityElementBase.cs (4)
47if (p1.GetType() != p2.GetType()) 111if (b1.GetType() != b2.GetType())
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientCredentials.cs (3)
129if (result == null || result.GetType() != GetType()) 131throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(NotImplemented.ByDesignWithMessage(string.Format(SRServiceModel.CloneNotImplementedCorrectly, GetType(), (result != null) ? result.ToString() : "null")));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ContractDescription.cs (1)
183Type serviceType = serviceImplementation.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (1)
146string errorMessage = string.Format(SRServiceModel.PolicyExtensionExportError, exporter.GetType(), e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (1)
141string errorMessage = string.Format(SRServiceModel.PolicyExtensionImportError, importer.GetType(), e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataSet.cs (3)
264System.Type t = o.GetType(); 319System.Type t = o.GetType(); 401System.Type t = o.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (2)
983Type attributeType = attribute.GetType(); 1023Type type = val.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (1)
499AssemblyName assemblyName = this.GetType().GetTypeInfo().Assembly.GetName();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (2)
368return provider.GetType(); 465if (attrType.IsAssignableFrom(customAttribute.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (5)
472opBehaviorAttr.GetType().FullName))); 482opBehaviorAttr.GetType().FullName))); 493opBehaviorAttr.GetType().FullName))); 631Type t = behavior.GetType(); 2014if (!descriptionBehaviors.Contains(behavior.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (2)
1203string errorMessage = string.Format(SRServiceModel.WsdlExtensionContractExportError, exporter.GetType(), contractIdentifier); 1221string errorMessage = string.Format(SRServiceModel.WsdlExtensionEndpointExportError, exporter.GetType(), endpointIdentifier);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (9)
638string.Format(SRServiceModel.SFxBadMetadataDialect, doc.Identifier, doc.Dialect, typeof(T).FullName, doc.GetType().FullName))); 816var xfeAttributes = ServiceReflector.GetCustomAttributes(extension.GetType(), typeof(WsdlConfigNS.XmlFormatExtensionAttribute), false); 826WsdlImportException wie = WsdlImportException.Create(item, new InvalidOperationException(string.Format(SRServiceModel.UnknownWSDLExtensionIgnored, extension.GetType().AssemblyQualifiedName))); 1752Fx.Assert("GetElementName Method should be updated to support " + item.GetType()); 1774Fx.Assert(rest != null, "GetXPathParameters Method should never set rest to null. this happened for: " + item.GetType()); 1850Fx.Assert("Unsupported WSDL OM: unknown WsdlNS.MessageBinding: " + item.GetType()); 1860Fx.Assert("GetXPathParameters Method should be updated to support " + item.GetType()); 1896string errorMessage = string.Format(SRServiceModel.WsdlExtensionBeforeImportError, importer.GetType().AssemblyQualifiedName, e.Message); 1909string errorMessage = string.Format(SRServiceModel.WsdlExtensionImportError, importer.GetType().FullName, e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (1)
261return source.GetType().ToString() + "/" + source.GetHashCode().ToString(CultureInfo.CurrentCulture);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (3)
180WcfEventSource.Instance.ParameterInspectorBeforeCallInvoked(rpc.EventTraceActivity, this.ParameterInspectors[i].GetType().FullName); 201WcfEventSource.Instance.ParameterInspectorAfterCallInvoked(rpc.EventTraceActivity, this.ParameterInspectors[i].GetType().FullName); 300string message = string.Format(SRServiceModel.SFxNullReplyFromFormatter2, this.Formatter.GetType().ToString(), (_name ?? ""));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
123WcfEventSource.Instance.FaultProviderInvoked(_handlers[i].GetType().FullName, e.Message); 194WcfEventSource.Instance.ErrorHandlerInvoked(_handlers[i].GetType().FullName, handledByThis, error.GetType().FullName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
152isDetailObjectValid = detailType.IsAssignableFrom(detailObj.GetType());
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (2)
97WcfEventSource.Instance.ClientMessageInspectorAfterReceiveInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName); 126WcfEventSource.Instance.ClientMessageInspectorBeforeSendInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (2)
180WcfEventSource.Instance.ClientParameterInspectorAfterCallInvoked(rpc.EventTraceActivity, _parameterInspectors[i].GetType().FullName); 218WcfEventSource.Instance.ClientParameterInspectorBeforeCallInvoked(rpc.EventTraceActivity, _parameterInspectors[i].GetType().FullName);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ThreadBehavior.cs (1)
121string text = string.Format(SRServiceModel.SFxMultipleCallbackFromSynchronizationContext, _context.GetType().ToString());
FrameworkFork\System.ServiceModel\System\ServiceModel\DuplexChannelFactory.cs (1)
233Type userObjectType = callbackInstance.UserObject.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointIdentity.cs (1)
182throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.UnrecognizedIdentityPropertyType, this.IdentityClaim.GetType().ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\KeyedByTypeCollection.cs (3)
95return item.GetType(); 105if (this.Contains(item.GetType())) 107throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("item", string.Format(SRServiceModel.DuplicateBehavior1, item.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
269if (!(message.Body.ReturnValue.GetType().Equals(typeof(MessagePartDescription))))
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\DataProtectionSecurityStateEncoder.cs (1)
61result.Append(this.GetType().ToString());
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\IdentityVerifier.cs (4)
73SecurityTraceRecordHelper.TraceIdentityVerificationFailure(identity, authorizationContext, this.GetType()); 227SecurityTraceRecordHelper.TraceIdentityVerificationSuccess(eventTraceActivity, identity, identity.IdentityClaim, this.GetType()); 239SecurityTraceRecordHelper.TraceIdentityVerificationSuccess(eventTraceActivity, identity, claim, this.GetType()); 274SecurityTraceRecordHelper.TraceIdentityVerificationFailure(identity, authContext, this.GetType());
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityHeader.cs (1)
161return string.Format(CultureInfo.InvariantCulture, "{0}(Actor = '{1}')", GetType().Name, this.Actor);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityMessageProperty.cs (1)
315throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (4)
740Type authenticatorType = spec.TokenAuthenticator.GetType(); 744Type spec2AuthenticatorType = spec2.TokenAuthenticator.GetType(); 749throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType()))); 756throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityContextSecurityToken.cs (1)
324throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().FullName));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SecurityTokenParameters.cs (2)
84throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(SRServiceModel.SecurityTokenParametersCloneInvalidResult, this.GetType().ToString()))); 95sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "{0}:", this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\ServiceModelSecurityTokenRequirement.cs (1)
229sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "{0}:", this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\Tokens\SupportingTokenParameters.cs (2)
157if (parameters == null || parameters.GetType() != this.GetType())
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WrapperSecurityCommunicationObject.cs (1)
29return _innerCommunicationObject.GetType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
252if (tokenEntry.SupportsCore(token.GetType()))
FrameworkFork\System.ServiceModel\System\ServiceModel\ServiceChannelManager.cs (3)
121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString())); 195throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString())); 274throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(this.GetType().ToString()));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (1)
311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SynchronizedCollectionWrongType1, value.GetType().FullName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
267Type type = (value == null) ? typeof(Object) : value.GetType();
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (7)
1642if (type.IsAssignableFrom(item.GetType())) 1661if (type.IsAssignableFrom(item.GetType())) 2021if (Count > 1 || (Count == 1 && value.GetType() == List[0].GetType())) 2033if (oldValue.GetType() != newValue.GetType()) throw new InvalidOperationException(string.Format(ResWebServices.WebDescriptionTooManyMessages)); 3193throw new ArgumentException(GetDuplicateMessage(value.GetType(), key), e.InnerException);
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptionSerializer.cs (88)
30System.Type t = o.GetType(); 142System.Type t = o.GetType(); 212System.Type t = o.GetType(); 299System.Type t = o.GetType(); 327System.Type t = o.GetType(); 355System.Type t = o.GetType(); 383System.Type t = o.GetType(); 480System.Type t = o.GetType(); 578System.Type t = o.GetType(); 660System.Type t = o.GetType(); 709System.Type t = o.GetType(); 758System.Type t = o.GetType(); 864System.Type t = o.GetType(); 901System.Type t = o.GetType(); 979System.Type t = o.GetType(); 1016System.Type t = o.GetType(); 1065System.Type t = o.GetType(); 1093System.Type t = o.GetType(); 1122System.Type t = o.GetType(); 1162System.Type t = o.GetType(); 1202System.Type t = o.GetType(); 1244System.Type t = o.GetType(); 1285System.Type t = o.GetType(); 1327System.Type t = o.GetType(); 1368System.Type t = o.GetType(); 1482System.Type t = o.GetType(); 1509System.Type t = o.GetType(); 1536System.Type t = o.GetType(); 1580System.Type t = o.GetType(); 1608System.Type t = o.GetType(); 1656System.Type t = o.GetType(); 1688System.Type t = o.GetType(); 1716System.Type t = o.GetType(); 1748System.Type t = o.GetType(); 1818System.Type t = o.GetType(); 1919System.Type t = o.GetType(); 1980System.Type t = o.GetType(); 2041System.Type t = o.GetType(); 2102System.Type t = o.GetType(); 2172System.Type t = o.GetType(); 2234System.Type t = o.GetType(); 2303System.Type t = o.GetType(); 2439System.Type t = o.GetType(); 2502System.Type t = o.GetType(); 2563System.Type t = o.GetType(); 2623System.Type t = o.GetType(); 2682System.Type t = o.GetType(); 2760System.Type t = o.GetType(); 2817System.Type t = o.GetType(); 2933System.Type t = o.GetType(); 2982System.Type t = o.GetType(); 3023System.Type t = o.GetType(); 3072System.Type t = o.GetType(); 3122System.Type t = o.GetType(); 3185System.Type t = o.GetType(); 3224System.Type t = o.GetType(); 3330System.Type t = o.GetType(); 3372System.Type t = o.GetType(); 3414System.Type t = o.GetType(); 3456System.Type t = o.GetType(); 3498System.Type t = o.GetType(); 3540System.Type t = o.GetType(); 3582System.Type t = o.GetType(); 3624System.Type t = o.GetType(); 3666System.Type t = o.GetType(); 3708System.Type t = o.GetType(); 3750System.Type t = o.GetType(); 3792System.Type t = o.GetType(); 3834System.Type t = o.GetType(); 3928System.Type t = o.GetType(); 4052System.Type t = o.GetType(); 4094System.Type t = o.GetType(); 4170System.Type t = o.GetType(); 4208System.Type t = o.GetType(); 4248System.Type t = o.GetType(); 4297System.Type t = o.GetType(); 4375System.Type t = o.GetType(); 4430System.Type t = o.GetType(); 4521System.Type t = o.GetType(); 4612System.Type t = o.GetType(); 4666System.Type t = o.GetType(); 4800System.Type t = o.GetType(); 4866System.Type t = o.GetType(); 4906System.Type t = o.GetType(); 4972System.Type t = o.GetType(); 5010System.Type t = o.GetType(); 5049System.Type t = o.GetType(); 5125System.Type t = o.GetType();
FrameworkFork\System.Web.Services\Services\Description\WebReferenceOptions.cs (1)
231System.Type t = o.GetType();
ImportModule.cs (1)
368if (wsdlImportExtensions[i].GetType() == extensionType)
MarkupTelemetryHelper.cs (1)
86return binding.GetType() == typeof(T) ? name : $"{name}*";
Metadata\MetadataDocumentSaver.cs (1)
119string typeName = doc.Metadata.GetType().ToString();
Shared\Options\ListValue.cs (1)
56OptionValueParser.ThrowInvalidValueIf(value == null || value.GetType() != typeof(TValue), value, this.Owner);
Shared\Options\OptionBase.cs (1)
173serializer.Serialize(writer, value, value?.GetType());
Shared\Options\OptionValueParser.cs (5)
28if (value.GetType() != typeof(TValue)) 94var valueType = value.GetType(); 178var valueType = value.GetType(); 236if (enumValue == null || enumValue.GetType() != thisType) 259ThrowInvalidValueIf(value.GetType() != typeof(TValue), value, option);
dotnet-svcutil-lib.Tests (3)
UnitTest.cs (3)
268log += $"{Environment.NewLine}{cmdOptions.GetType().Name} as {updateOptions.GetType().Name}:{Environment.NewLine}{updateOptions.Json}"; 355errorMessage = $"{options.GetType().Name} did not pass serialization roundtrip!{Environment.NewLine} windiff {jsonFileSrcPath} {outJsonFile}";
DotNetWatchTasks (1)
FileSetSerializer.cs (1)
68var serializer = new DataContractJsonSerializer(fileSetResult.GetType(), new DataContractJsonSerializerSettings
EventSourceGenerator (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
GenerateDocumentationAndConfigFiles (55)
CodeFixerExtensions.cs (1)
76MethodInfo? method = fixer?.GetType().GetTypeInfo().GetMethod("RegisterCodeFixesAsync");
Program.cs (1)
289var analyzerType = analyzer.GetType();
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
54var type = analyzerConfigOptions.GetType();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
166string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 185typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 206typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 224typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
ILCompiler.Compiler (32)
Compiler\Compilation.cs (1)
136if (field.GetType() == typeof(PInvokeLazyFixupField))
Compiler\CompilerTypeSystemContext.BoxedTypes.cs (1)
318if (method.GetTypicalMethodDefinition().GetType() == typeof(GenericUnboxingThunk))
Compiler\Dataflow\ArrayValue.cs (1)
63return HashCode.Combine(GetType().GetHashCode(), Size);
Compiler\Dataflow\FlowAnnotations.cs (1)
837throw new NotImplementedException($"Unsupported provider type {provider.GetType()}");
Compiler\Dataflow\MethodBodyScanner.cs (2)
1057$"Unhandled StoreReference call. Unhandled attempt to store a value in {value} of type {value.GetType()}.", 1223throw new NotImplementedException($"Unhandled dereference of ReferenceValue of type {referenceValue.GetType().FullName}");
Compiler\DependencyAnalysis\GenericLookupResult.cs (4)
167Debug.Assert(x.GetType() == y.GetType()); 178Debug.Assert(x.GetType() != y.GetType());
Compiler\DependencyAnalysis\ReflectedTypeNode.cs (1)
17/// reflection due to <see cref="object.GetType" />, so presence of this node is not
Compiler\DescriptorMarker.cs (1)
142Debug.Fail(member.GetType().ToString());
Compiler\Logging\UnconditionalSuppressMessageAttributeState.cs (1)
327Debug.Fail("Trying to operate with unsupported TypeSystemEntity " + entity.GetType().ToString());
Compiler\ObjectDumper.cs (1)
23string name = node.GetType().Name;
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\CompilerComparer.cs (4)
25Debug.Assert(x.GetType() == y.GetType()); 36Debug.Assert(x.GetType() != y.GetType());
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (8)
181Debug.Assert(x.GetType() == y.GetType() || 182(x.GetType().IsConstructedGenericType && y.GetType().IsConstructedGenericType 183&& x.GetType().GetGenericTypeDefinition() == y.GetType().GetGenericTypeDefinition())); 194Debug.Assert(x.GetType() != y.GetType());
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (2)
425Debug.Assert(codeNode.Signature != null, $"Wasm code node {codeNode.GetType()} has null signature"); 505var outputNode = new OutputNode(sectionWriter.SectionIndex, checked((ulong)sectionWriter.Position), nodeContents.Data.Length, GetNodeTypeName(node.GetType()));
src\runtime\src\coreclr\tools\Common\Pgo\PgoFormat.cs (2)
618if (mergedElem.DataObject.GetType() != schema.DataObject.GetType())
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
26/// <see cref="object.GetType()"/>
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\ValueExtensions.cs (1)
22sb.Append(value.GetType().Name);
ILCompiler.MetadataTransform (3)
Internal\Metadata\NativeFormat\Writer\NativeMetadataWriter.cs (3)
177Debug.Assert(rec.GetType() == pooledRecord.GetType()); 539return "[@TODO:" + this.GetType().ToString() + "]";
ILCompiler.ReadyToRun (18)
JitInterface\CorInfoImpl.ReadyToRun.cs (2)
1557throw new NotImplementedException($"Unsupported token resolution for {resultDef.GetType()}"); 3467Debug.Assert(imp.GetType() == typeof(DelayLoadMethodImport));
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\CompilerComparer.cs (4)
25Debug.Assert(x.GetType() == y.GetType()); 36Debug.Assert(x.GetType() != y.GetType());
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (8)
181Debug.Assert(x.GetType() == y.GetType() || 182(x.GetType().IsConstructedGenericType && y.GetType().IsConstructedGenericType 183&& x.GetType().GetGenericTypeDefinition() == y.GetType().GetGenericTypeDefinition())); 194Debug.Assert(x.GetType() != y.GetType());
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ObjectWriter.cs (2)
425Debug.Assert(codeNode.Signature != null, $"Wasm code node {codeNode.GetType()} has null signature"); 505var outputNode = new OutputNode(sectionWriter.SectionIndex, checked((ulong)sectionWriter.Position), nodeContents.Data.Length, GetNodeTypeName(node.GetType()));
src\runtime\src\coreclr\tools\Common\Pgo\PgoFormat.cs (2)
618if (mergedElem.DataObject.GetType() != schema.DataObject.GetType())
ILCompiler.TypeSystem (16)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\ILDisassembler.cs (1)
181Debug.Assert(obj is string, "NYI: " + obj.GetType());
src\runtime\src\coreclr\tools\Common\TypeSystem\RuntimeDetermined\TypeDesc.RuntimeDetermined.cs (1)
28return this.GetType() == typeof(RuntimeDeterminedType);
src\runtime\src\coreclr\tools\Common\TypeSystem\Sorting\TypeSystemComparer.cs (14)
42Debug.Assert(x.GetType() == y.GetType()); 53Debug.Assert(x.GetType() != y.GetType()); 60Debug.Assert(x.GetType() == y.GetType()); 84Debug.Assert(x.GetType() == y.GetType()); 95Debug.Assert(x.GetType() != y.GetType()); 111Debug.Assert(x.GetType() == y.GetType()); 122Debug.Assert(x.GetType() != y.GetType());
illink (24)
ILLink.RoslynAnalyzer (8)
DataFlow\LocalDataFlowVisitor.cs (3)
105$"{OwningSymbol.GetType()}: {branchValueOperation.Syntax.GetLocation().GetLineSpan()}"); 113$"{OwningSymbol.GetType()}: {branchValueOperation.Syntax.GetLocation().GetLineSpan()}"); 207$"{local.ContainingSymbol.GetType()}: {local.Locations[0].GetLineSpan()}");
DataFlow\UnexpectedOperationHandler.cs (1)
48throw new NotImplementedException($"Unexpected operation type {operation.GetType()}: {operation.Syntax.GetLocation().GetLineSpan()}");
DataFlowAnalyzerContext.cs (1)
20throw new System.ArgumentException($"Analyzer {analyzer.GetType().Name} is not in the cache");
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
26/// <see cref="object.GetType()"/>
src\runtime\src\tools\illink\src\ILLink.Shared\TrimAnalysis\ValueExtensions.cs (1)
22sb.Append(value.GetType().Name);
TrimAnalysis\ArrayValue.cs (1)
44return HashUtils.Combine(GetType().GetHashCode(), Size);
Infrastructure.Tests (1)
PowerShellScripts\SplitTestMatrixByDepsTests.cs (1)
292foreach (var prop in entry.GetType().GetProperties())
Microsoft.Analyzers.Extra (1)
Utilities\SyntaxNodeExtensions.cs (1)
120while (currentNode != null && !typesToStopTraversing.Contains(currentNode.GetType()));
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
445codeActionEquivalenceKey: fixer.GetType().FullName!,
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
446codeActionEquivalenceKey: fixer.GetType().FullName!,
Microsoft.Arcade.Common (2)
MSBuildTaskBase.cs (2)
70return GetType().GetMethod(ExecuteMethodName).GetParameters().Select(p => p.ParameterType).ToArray(); 90return GetType().GetMethod(ExecuteMethodName);
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
88authenticatedIdentity?.GetType() ?? typeof(ClaimsIdentity),
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.BearerToken (2)
_generated\4\BearerTokenJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationService.cs (2)
262var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for SignInAsync. "; 301var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for {nameof(SignOutAsync)}. ";
Microsoft.AspNetCore.Authorization (1)
DefaultAuthorizationPolicyProvider.cs (1)
77public virtual bool AllowsCachingPolicies => GetType() == typeof(DefaultAuthorizationPolicyProvider);
Microsoft.AspNetCore.Components (45)
CascadingParameterState.cs (3)
29var componentType = componentState.Component.GetType(); 67throw 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)
89throw new InvalidOperationException($"Cannot notify about changes because the {GetType()} is configured as fixed.");
ChangeDetection.cs (2)
31var oldValueType = oldValue!.GetType(); 32var newValueType = newValue!.GetType();
ComponentFactory.cs (1)
96var propertyActivator = _propertyActivator.GetActivator(instance.GetType());
ComponentSubscriptionKey.cs (1)
26=> $"{Subscriber.Component.GetType().Name}.{PropertyName}";
NavigationManager.cs (5)
245throw 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)."); 288throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 560=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 569=> throw new NotSupportedException($"To support navigation locks, {GetType().Name} must override {nameof(SetNavigationLockState)}"); 611throw new InvalidOperationException($"'{GetType().Name}' has not been initialized.");
NavigationManagerExtensions.cs (1)
222var valueType = value.GetType();
PersistentState\PersistentServicesRegistry.cs (2)
103var accessors = _cachedAccessorsByType.GetOrAdd(instance.GetType(), static (runtimeType, declaredType) => new PropertiesAccessor(runtimeType, declaredType), type); 130var accessors = _cachedAccessorsByType.GetOrAdd(instance.GetType(), static (runtimeType, declaredType) => new PropertiesAccessor(runtimeType, declaredType), type);
PersistentState\PersistentStateValueProviderKeyResolver.cs (2)
165private static string GetComponentType(ComponentState componentState) => componentState.Component.GetType().FullName!; 205var keyType = key.GetType();
PersistentState\PersistentValueProviderComponentSubscription.cs (4)
66_propertyGetter = _propertyGetterCache.GetOrAdd((subscriber.Component.GetType(), _propertyName), PropertyGetterFactory); 188Log.SkippedPersistingNullValue(_logger, _storageKey, _propertyType.Name, _subscriber.Component.GetType().Name, _propertyName); 194Log.PersistingValueToState(_logger, _storageKey, _propertyType.Name, _subscriber.Component.GetType().Name, _propertyName); 203Log.PersistingValueToState(_logger, _storageKey, _propertyType.Name, _subscriber.Component.GetType().Name, _propertyName);
Reflection\ComponentProperties.cs (2)
37var targetType = target.GetType(); 182$"type '{target.GetType().FullName}'. The error was: {ex.Message}", ex);
Rendering\ComponentState.cs (2)
58_componentTypeName = component.GetType().FullName; 382return $"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)
787throw 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 (7)
355=> GetRequiredRootComponentState(componentId).Component.GetType(); 481receiverName ??= (callback.Receiver?.GetType() ?? callback.Delegate.Target?.GetType())?.FullName; 532receiverName ??= (callback.Receiver?.GetType() ?? callback.Delegate.Target?.GetType())?.FullName; 547receiverName ??= (callback.Receiver?.GetType() ?? callback.Delegate.Target?.GetType())?.FullName;
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");
RenderTree\RenderTreeDiffBuilder.cs (1)
785var componentType = currentComponentState.Component.GetType();
src\aspnetcore\src\Http\Routing\src\RouteConstraintBuilder.cs (1)
145_inlineConstraintResolver.GetType().Name));
Microsoft.AspNetCore.Components.Endpoints (28)
_generated\14\ResourceCollectionSerializerContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\27\BrowserConfigurationJsonContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\5\ImportMapSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\61\JsonTempDataSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\67\PrerenderComponentApplicationStoreSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Builder\RazorComponentEndpointDataSource.cs (1)
165throw new InvalidOperationException($"Unable to find a provider for the render mode: {renderMode.GetType().FullName}. This generally " +
DependencyInjection\HttpNavigationManager.cs (1)
45throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized.");
Rendering\EndpointComponentState.cs (1)
34var streamRenderingAttribute = _streamRenderingAttributeByComponentType.GetOrAdd(component.GetType(),
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
268static string GetName(ComponentState current) => current.Component.GetType().Name;
Rendering\SSRRenderModeBoundary.cs (6)
91throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 148var valueType = value.GetType(); 151throw 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."); 160throw 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."); 193_ => throw new UnreachableException($"Unknown render mode {RenderMode.GetType().FullName}"),
src\aspnetcore\src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
TempData\CookieTempDataProvider.cs (2)
116if (kvp.Value is not null && !_tempDataSerializer.CanSerialize(kvp.Value.GetType())) 118throw new InvalidOperationException($"TempData cannot store values of type '{kvp.Value.GetType()}'.");
TempData\SessionStorageTempDataProvider.cs (2)
60if (kvp.Value is not null && !_tempDataSerializer.CanSerialize(kvp.Value.GetType())) 62throw new InvalidOperationException($"TempData cannot store values of type '{kvp.Value.GetType()}'.");
TempData\TempDataCascadingValueSupplier.cs (2)
37var componentType = componentState.Component.GetType(); 156if (!_underlyingType.IsAssignableFrom(value.GetType()))
Microsoft.AspNetCore.Components.Forms (11)
ClientValidation\DefaultClientValidationService.cs (1)
38var modelType = fieldIdentifier.Model.GetType();
DataAnnotationsValidator.cs (1)
59throw new InvalidOperationException($"{GetType()} does not support changing the " +
EditContextDataAnnotationsExtensions.cs (3)
65_validatorTypeInfo = _validationOptions != null && _validationOptions.TryGetValidatableTypeInfo(_editContext.Model.GetType(), out var typeInfo) 82var modelType = fieldIdentifier.Model.GetType(); 266var cacheKey = (ModelType: fieldIdentifier.Model.GetType(), fieldIdentifier.FieldName);
FieldIdentifier.cs (4)
51if (model.GetType().IsValueType) 151throw 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."); 163throw 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."); 178accessor = cache.GetOrAdd((value.GetType(), member.Member), CreateAccessor);
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
217throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 306throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Microsoft.AspNetCore.Components.Server (14)
_generated\14\PrerenderComponentApplicationStoreSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\8\CircuitPersistenceManagerSerializerContext.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Circuits\CircuitHost.cs (1)
1081handler.GetType(),
Circuits\RemoteNavigationManager.cs (2)
116throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized."); 166throw new InvalidOperationException($"'{GetType().Name}' method for endpoint-based navigation has not been initialized.");
Circuits\RemoteRenderer.cs (1)
85GetComponentState(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\aspnetcore\src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\aspnetcore\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\aspnetcore\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.Web (23)
_generated\10\WebRendererSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Forms\DisplayName.cs (1)
41throw new InvalidOperationException($"{GetType()} requires a value for the " +
Forms\Editor.cs (1)
49throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " +
Forms\ExpressionMemberAccessor.cs (1)
45$"The provided expression contains a {accessorBody.GetType().Name} which is not supported. " +
Forms\InputBase.cs (2)
260throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 288throw 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)
115throw new InvalidOperationException($"Unsupported type {value.GetType()}");
Forms\InputRadio.cs (1)
55throw new InvalidOperationException($"{GetType()} must have an ancestor {typeof(InputRadioGroup<TValue>)} " +
Forms\Label.cs (1)
74throw new InvalidOperationException($"{GetType()} requires a value for the " +
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)
47throw new InvalidOperationException($"{GetType()} requires a cascading parameter " + 48$"of type {nameof(EditContext)}. For example, you can use {GetType()} inside " + 54throw new InvalidOperationException($"{GetType()} requires a value for the " +
Media\MediaComponentBase.cs (1)
75private ILogger Logger => _logger ??= LoggerFactory.CreateLogger(GetType());
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
217throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 306throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Virtualization\Virtualize.cs (3)
220$"{GetType()} requires a positive value for parameter '{nameof(ItemSize)}'."); 242$"{GetType()} can only accept one item source from its parameters. " + 263$"{GetType()} requires either the '{nameof(Items)}' or '{nameof(ItemsProvider)}' parameters to be specified " +
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
376 throw new ObjectDisposedException(GetType().Name);
Microsoft.AspNetCore.Connections.Abstractions (1)
src\aspnetcore\src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
Microsoft.AspNetCore.Diagnostics (7)
_generated\7\ExtensionsExceptionJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (2)
1345WriteAttributeValue("", 17075, metadata.GetType().FullName ?? string.Empty, 17075, 46, false); 1354Write(metadata.GetType().Name);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
177handlerTag = exceptionHandler.GetType().FullName; 213handlerTag = _problemDetailsService.GetType().FullName;
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
169_logger.EnricherFailed(ex, enricher.GetType().Name);
Microsoft.AspNetCore.Hosting (5)
_generated\11\SourceGenerationContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
GenericHost\GenericWebHostBuilder.cs (1)
212UseStartup(instance.GetType(), context, services, instance);
src\aspnetcore\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.Http (1)
Builder\ApplicationBuilder.cs (1)
141return middleware.Target.GetType().FullName + "." + middleware.Method.Name;
Microsoft.AspNetCore.Http.Abstractions (3)
Extensions\UseMiddlewareExtensions.cs (1)
183throw new InvalidOperationException(Resources.FormatException_UseMiddlewareUnableToCreateMiddleware(middlewareFactory.GetType(), _middlewareType));
Routing\RouteValueDictionary.cs (1)
889var type = Value.GetType();
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Http.Extensions (21)
_generated\11\ProblemDetailsJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
DefaultProblemDetailsWriter.cs (1)
64var problemDetailsType = context.ProblemDetails.GetType();
RequestDelegateFactory.cs (5)
183object => Expression.Convert(TargetExpr, handler.Target.GetType()), 807if (parameterCustomAttributes.FirstOrDefault(a => typeof(FromKeyedServicesAttribute).IsAssignableFrom(a.GetType())) is not null) 815else if (parameterCustomAttributes.FirstOrDefault(a => typeof(FromKeyedServicesAttribute).IsAssignableFrom(a.GetType())) is FromKeyedServicesAttribute keyedServicesAttribute) 2008if (targetType.IsEnum && defaultValue.GetType() != targetType) 2012else if (!targetType.IsAssignableFrom(defaultValue.GetType()))
src\aspnetcore\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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Http.Results (3)
HttpResultsHelper.cs (1)
46Type? runtimeType = value.GetType();
ServerSentEventsResult.cs (1)
82var runtimeType = item.Data.GetType();
src\aspnetcore\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.Identity (8)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (1)
1380var runtimeType = value?.GetType();
_generated\17\IdentityEndpointsJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\50\IdentityJsonSerializerContext.g.cs (2)
76throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 84throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
SecurityStampValidator.cs (2)
35Logger = logger.CreateLogger(GetType()); 54Logger = logger.CreateLogger(GetType());
SignInManager.cs (1)
1355if (GetType() == typeof(SignInManager<TUser>))
Microsoft.AspNetCore.Localization (2)
RequestLocalizationMiddleware.cs (2)
78_logger.UnsupportedCultures(provider.GetType().Name, cultures); 91_logger.UnsupportedUICultures(provider.GetType().Name, uiCultures);
Microsoft.AspNetCore.Mvc (1)
HotReloadService.cs (1)
38if (modelMetadataProvider.GetType() == typeof(DefaultModelMetadataProvider))
Microsoft.AspNetCore.Mvc.Abstractions (3)
Formatters\FormatterCollection.cs (1)
49if (formatter.GetType() == formatterType)
ModelBinding\BindingInfo.cs (1)
180if (attributes.FirstOrDefault(a => typeof(FromKeyedServicesAttribute).IsAssignableFrom(a.GetType())) is FromKeyedServicesAttribute fromKeyedServicesAttribute)
src\aspnetcore\src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiDescriptionGroupCollectionProvider.cs (3)
67Log.ApiDescriptionProviderExecuting(_logger, provider.GetType().Name, provider.GetType().Assembly.GetName().Name, provider.GetType().Assembly.GetName().Version?.ToString());
Microsoft.AspNetCore.Mvc.Core (75)
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)
77objectType = result.Value?.GetType(); 161var objectResultType = result.GetType().Name; 162var 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); 139var 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\aspnetcore\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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
TypeFilterAttribute.cs (1)
66var argumentTypes = Arguments?.Select(a => a.GetType())?.ToArray();
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.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.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.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.ViewFeatures (30)
DefaultDisplayTemplates.cs (2)
85"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 117itemMetadata = metadataProvider.GetMetadataForType(item.GetType());
DefaultEditorTemplates.cs (2)
68"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 100itemMetadata = 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.Razor.Utilities.Shared (1)
Utilities\Checksum.Builder.cs (1)
210SR.FormatUnsupported_type_0(value.GetType().FullName), nameof(value));
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\aspnetcore\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\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
src\aspnetcore\src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
Microsoft.AspNetCore.Routing.Abstractions (1)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\TransportManager.cs (2)
61throw new InvalidOperationException($"No registered {nameof(IConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}"); 87throw new InvalidOperationException($"No registered {nameof(IMultiplexedConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}");
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.SignalR.Core (23)
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)
163Log.DroppingMessage(_logger, hubMessage.GetType().Name, (hubMessage as HubInvocationMessage)?.InvocationId ?? "(null)"); 238Log.UnsupportedMessageReceived(_logger, hubMessage.GetType().FullName!); 750descriptor.OriginalParameterTypes[parameterPointer].IsAssignableFrom(hubMethodInvocationMessage.Arguments[hubInvocationArgumentPointer]?.GetType())))
Internal\DefaultHubProtocolResolver.cs (1)
26Log.RegisteredSignalRProtocol(_logger, protocol.Name, protocol.GetType());
SerializedHubMessage.cs (1)
45Debug.Assert(message.GetType().IsAssignableTo(typeof(HubInvocationMessage)));
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (10)
495(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 496(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 497(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 500((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 504((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_valueTaskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 514(awaitable) => ((MethodInfo)awaitable.GetType().GetMemberWithSameMetadataDefinitionAs(_taskGetAwaiterMethodInfo)).Invoke(awaitable, Array.Empty<object>()), 515(awaiter) => (bool)((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetIsCompletedMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 516(awaiter) => ((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterGetResultMethodInfo)).Invoke(awaiter, Array.Empty<object>())!, 519((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterOnCompletedMethodInfo)).Invoke(awaiter, [continuation]); 523((MethodInfo)awaiter.GetType().GetMemberWithSameMetadataDefinitionAs(_taskAwaiterUnsafeOnCompletedMethodInfo)).Invoke(awaiter, [continuation]);
src\aspnetcore\src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (3)
158var constructedIAsyncEnumerableInterface = ReflectionHelper.GetIAsyncEnumerableInterface(asyncEnumerable.GetType())!; 187var type = ReflectionHelper.GetIAsyncEnumeratorInterface(enumerator.GetType()); 215var type = channelReader.GetType();
src\aspnetcore\src\SignalR\common\Shared\MessageBuffer.cs (2)
126return WriteAsyncCore(hubMessage.Message?.GetType() ?? typeof(HubInvocationMessage), hubMessage.GetSerializedMessage(_protocol), cancellationToken); 131return WriteAsyncCore(hubMessage.GetType(), _protocol.GetMessageBytes(hubMessage), cancellationToken);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
567throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
Microsoft.AspNetCore.StaticAssets (2)
_generated\12\StaticAssetsManifestJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.Bcl.AsyncInterfaces (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Bcl.Numerics (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Build (80)
BackEnd\Client\MSBuildClient.cs (1)
585throw new InvalidOperationException($"Unexpected packet type {packet.GetType().Name}");
BackEnd\Components\BuildRequestEngine\FullyQualifiedBuildRequest.cs (2)
118return GetType() == obj.GetType() && InternalEquals((FullyQualifiedBuildRequest)obj);
BackEnd\Components\Logging\LoggingContext.cs (1)
330ErrorUtilities.ThrowInternalError($"LoggingContext (type: {this.GetType()}) was not valid during logging attempt.");
BackEnd\Components\Logging\LoggingService.cs (6)
818loggerTypes.Add(logger.GetType().FullName); 1517InternalLoggerException.Throw(e, null, "FatalErrorDuringLoggerShutdown", false, logger.GetType().Name); 1599ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName); 1845using var assemblyLoadTracker = AssemblyLoadsTracker.StartTracking(this, AssemblyLoadingContext.LoggerInitialization, UnwrapLoggerType(logger).GetType()); 1859InternalLoggerException.Throw(e, null, "FatalErrorWhileInitializingLogger", true, logger.GetType().Name); 1910innerLogger.GetType().FullName == "Microsoft.Build.Logging.TerminalLogger"
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
220pluginTypeName = projectCacheDescriptor.PluginInstance.GetType().Name;
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (1)
80ErrorUtilities.ThrowInternalError($"Unhandled intrinsic task type {taskInstance.GetType().GetTypeInfo().BaseType}");
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
246else if (parameterValue.GetType().IsValueType)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
686using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(taskLoggingContext, AssemblyLoadingContext.TaskRun, _taskExecutionHost?.TaskInstance?.GetType());
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
1122if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1125_taskLoggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
BackEnd\Components\RequestBuilder\TaskRouter.cs (1)
77if (attr.GetType().FullName == attributeFullName)
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
342catch (Exception e) when ((e is FileNotFoundException || e is FileLoadException) && sdkResolver.GetType().GetTypeInfo().Name.Equals("NuGetSdkResolver", StringComparison.Ordinal))
BackEnd\Node\OutOfProcNode.cs (1)
618buildEvent?.GetType().Name ?? string.Empty);
BackEnd\Shared\BuildRequestConfiguration.cs (2)
912if (GetType() != obj.GetType())
BackEnd\Shared\ConfigurationMetadata.cs (2)
130if (GetType() != obj.GetType())
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
365string realTaskAssemblyLocation = TaskInstance.GetType().Assembly.Location; 1054_taskLoggingContext?.TargetLoggingContext?.ProjectLoggingContext?.ProjectTelemetry?.AddTaskExecution(_taskFactoryWrapper.TaskFactory.GetType().FullName, isTaskHost); 1807Type taskType = innerTask.GetType();
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
57if (_eventHandlers.TryGetValue(e.GetType(), out Action<BuildEventArgs>? handler))
BuildCheck\Infrastructure\BuildCheckForwardingLogger.cs (1)
54if (_eventsToForward.Contains(buildEvent.GetType()))
Construction\ProjectElement.cs (6)
354ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 507if (!clone.GetType().IsEquivalentTo(GetType())) 509ErrorUtilities.ThrowInternalError($"{GetType().Name}.Clone() returned an instance of type {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");
Evaluation\Evaluator.cs (1)
1808using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(_evaluationLoggingContext, AssemblyLoadingContext.SdkResolution, _sdkResolverService.GetType());
Evaluation\Expander.cs (4)
3906functionBuilder.ReceiverType = propertyValue.GetType(); 3937var receiverType = propertyValue?.GetType() ?? typeof(string); 4093_receiverType = objectInstance.GetType(); 4098args[0] = Convert.ChangeType(args[0], objectInstance.GetType(), CultureInfo.InvariantCulture);
Evaluation\Expander\WellKnownFunctions.cs (3)
26if (args[i].GetType() != type) 41? string.Join(", ", args.Select(a => a?.GetType().Name ?? "null")) 44File.AppendAllText(logFile, $"ReceiverType={receiverType?.FullName}; ObjectInstanceType={objectInstance?.GetType().FullName}; MethodName={methodName}({argSignature})\n");
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
147throw 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\TaskFactories\AssemblyTaskFactory.cs (1)
368taskLoggingContext?.TargetLoggingContext?.ProjectLoggingContext?.ProjectTelemetry?.AddTaskExecution(GetType().FullName, isTaskHost: useTaskFactory);
Instance\TaskFactories\TaskHostTask.cs (1)
764ErrorUtilities.ThrowInternalError($"HandleBuildRequest requires IBuildEngine3 but _buildEngine is {_buildEngine?.GetType().Name ?? "null"}");
Instance\TaskFactoryEngineContext.cs (2)
387if (!e.GetType().GetTypeInfo().IsSerializable && 392_loggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
780argument = $"Exception encountered writing an object of type {arguments[i]?.GetType()?.Name ?? "<null>"}";
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedDictionary`2.cs (2)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\msbuild\src\Shared\ErrorUtilities.cs (2)
65if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 67ThrowInternalError($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (2)
388Type eventDerivedType = _buildEvent.GetType(); 560Type eventType = eventArg.GetType();
src\msbuild\src\Shared\ResourceUtilities.cs (3)
425if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 426param.GetType() != typeof(string)) 428ErrorUtilities.ThrowInternalError($"Invalid resource parameter type, was {param.GetType().FullName}");
src\msbuild\src\Shared\TaskLoggingHelper.cs (3)
54TaskName = taskInstance.GetType().Name; 275Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?"); 470Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?");
src\msbuild\src\Shared\TaskParameter.cs (1)
107Type wrappedParameterType = wrappedParameter.GetType();
Utilities\EngineFileUtilities.cs (3)
288loggingMechanism?.GetType(), 329loggingMechanism?.GetType(), 359loggingMechanism.GetType(),
Utilities\Utilities.cs (2)
730Debug.Fail($"In {nameof(EnumerateProperties)}(): Unexpected property {item} of type {item?.GetType().ToString()}"); 911Debug.Fail($"In {nameof(EnumerateItems)}(): Unexpected {nameof(item)} {item} of type {item?.GetType().ToString()}");
Microsoft.Build.Framework (11)
BinaryTranslator.cs (1)
524Type enumType = value.GetType();
BuildEventContext.cs (2)
254if (GetType() != obj.GetType())
Collections\CopyOnWriteDictionary.cs (1)
101_backing = dictionary.GetType() == typeof(ImmutableDictionary<string, V>)
LazyFormattedBuildEventArgs.cs (2)
194if (param != null && param.ToString() == param.GetType().FullName) 196throw new InvalidOperationException($"Invalid type for message formatting argument, was {param.GetType().FullName}");
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Telemetry\CrashTelemetry.cs (1)
438LoggerEventType = eventArgs.GetType().Name;
Traits.cs (3)
613if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 614param.GetType() != typeof(string)) 617param.GetType().FullName);
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Microsoft.Build.Tasks.Core (21)
AssignProjectConfiguration.cs (1)
245Log.LogErrorWithCodeFromResources("General.ErrorExecutingTask", GetType().Name, e.Message);
GenerateManifestBase.cs (1)
468if (manifestType != _manifest.GetType())
GenerateResource.cs (1)
3815_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)
25var s = new XmlSerializer(manifest.GetType()); 99n = manifest.GetType().Name; 116if (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;
src\msbuild\src\Shared\ErrorUtilities.cs (2)
65if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 67ThrowInternalError($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (2)
388Type eventDerivedType = _buildEvent.GetType(); 560Type eventType = eventArg.GetType();
src\msbuild\src\Shared\ResourceUtilities.cs (3)
425if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 426param.GetType() != typeof(string)) 428ErrorUtilities.ThrowInternalError($"Invalid resource parameter type, was {param.GetType().FullName}");
src\msbuild\src\Shared\TaskParameter.cs (1)
107Type wrappedParameterType = wrappedParameter.GetType();
System.Design.cs (1)
101_resources = new MainAssemblyFallbackResourceManager("System.Design", this.GetType().Assembly);
system.design\stronglytypedresourcebuilder.cs (1)
154? new ResourceData(liveObject.Value.GetType(), liveObject.Value.ToString())
Microsoft.Build.Utilities.Core (10)
src\msbuild\src\Shared\ErrorUtilities.cs (2)
65if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 67ThrowInternalError($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\ResourceUtilities.cs (3)
425if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 426param.GetType() != typeof(string)) 428ErrorUtilities.ThrowInternalError($"Invalid resource parameter type, was {param.GetType().FullName}");
src\msbuild\src\Shared\TaskLoggingHelper.cs (3)
54TaskName = taskInstance.GetType().Name; 275Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?"); 470Debug.Assert(messageArgs == null || messageArgs.Length == 0 || messageArgs[0].GetType() != typeof(MessageImportance), "Did you call the wrong overload?");
ToolTask.cs (2)
659LogPrivate.LogWarningWithCodeFromResources("ToolTask.CommandTooLong", GetType().Name); 1459LogPrivate.LogErrorWithCodeFromResources("ToolTask.ValidateParametersFailed", this.GetType().FullName);
Microsoft.CodeAnalysis (96)
Binding\BindingDiagnosticBag.cs (1)
67Debug.Assert(diagnosticBag?.GetType().IsValueType != true);
CodeGen\MetadataConstant.cs (2)
34Debug.Assert(value == null || value is string || value is DateTime || value is decimal || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is IntPtr) && !(value is UIntPtr)));
Collections\Rope.cs (3)
145throw ExceptionUtilities.UnexpectedValue(v.GetType().Name); 177throw ExceptionUtilities.UnexpectedValue(v.GetType().Name); 201throw ExceptionUtilities.UnexpectedValue(v.GetType().Name);
CommandLine\ReportAnalyzerUtil.cs (4)
83.GroupBy(kvp => kvp.Key.GetType().Assembly) 134.GroupBy(a => a.GetType().Assembly) 140foreach (var analyzer in group.OrderBy(a => a.GetType().FullName, StringComparer.OrdinalIgnoreCase)) 142consoleOutput.WriteLine($" {analyzer.GetType().FullName}");
Compilation\Compilation.cs (1)
705throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()),
Compilation\DeterministicKeyBuilder.cs (7)
188WriteType(writer, analyzer.GetType()); 593WriteType(writer, "syntaxTreeOptionsProvider", options.SyntaxTreeOptionsProvider?.GetType()); 594WriteType(writer, "metadataReferenceResolver", options.MetadataReferenceResolver?.GetType()); 595WriteType(writer, "xmlReferenceResolver", options.XmlReferenceResolver?.GetType()); 596WriteType(writer, "sourceReferenceResolver", options.SourceReferenceResolver?.GetType()); 597WriteType(writer, "strongNameProvider", options.StrongNameProvider?.GetType()); 598WriteType(writer, "assemblyIdentityComparer", options.AssemblyIdentityComparer?.GetType());
ConstantValue.cs (1)
812return String.Format("{0}({1}: {2})", this.GetType().Name, valueToDisplay, this.Discriminator);
Diagnostic\DiagnosticInfo.cs (5)
109var type = arg.GetType(); 170Debug.Assert(this.GetType() == result.GetType()); 415other.GetType() == this.GetType())
Diagnostic\DiagnosticWithInfo.cs (2)
164if (other == null || this.GetType() != other.GetType())
Diagnostic\Location.cs (1)
139string result = this.GetType().Name;
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
115sb.AppendLine($"{nameof(SyntaxNode)}: {GetFlattenedNodeText(_node)} [{_node.GetType().Name}]@{_node.Span} {(lineSpan.HasValue ? lineSpan.Value.ToString() : string.Empty)}");
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
193CodeAnalysisEventSource.Log.ResolvedAssembly(Directory, assemblyName.ToString(), resolver.GetType().Name, assembly.Location, GetLoadContext(assembly)!.ToString());
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
1755throw new InvalidOperationException("Unexpected compilation event of type " + compilationEvent.GetType().Name);
DiagnosticAnalyzer\AnalyzerFileReference.cs (3)
431public bool Equals(TExtension? x, TExtension? y) => object.Equals(x?.GetType(), y?.GetType()); 433public int GetHashCode(TExtension obj) => obj.GetType().GetHashCode();
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
1088throw ExceptionUtilities.UnexpectedValue(compilationEvent.GetType().ToString());
DiagnosticAnalyzer\DiagnosticAnalyzer.cs (1)
35return this.GetType().ToString();
Operations\Operation.cs (1)
192private string GetDebuggerDisplay() => $"{GetType().Name} Type: {(Type is null ? "null" : Type)}";
PEWriter\MetadataWriter.cs (1)
1737metadata.GetType().GetField("_customAttributeTableNeedsSorting", BindingFlags.Instance | BindingFlags.NonPublic)!.SetValue(metadata, false);
PEWriter\MetadataWriter.PortablePdb.cs (14)
247Debug.Assert(!value.GetType().GetTypeInfo().IsEnum); 252if (value.GetType() == typeof(int)) 257if (value.GetType() == typeof(string)) 262if (value.GetType() == typeof(bool)) 267if (value.GetType() == typeof(char)) 272if (value.GetType() == typeof(byte)) 277if (value.GetType() == typeof(long)) 282if (value.GetType() == typeof(double)) 287if (value.GetType() == typeof(short)) 292if (value.GetType() == typeof(ushort)) 297if (value.GetType() == typeof(uint)) 302if (value.GetType() == typeof(sbyte)) 307if (value.GetType() == typeof(ulong)) 312if (value.GetType() == typeof(float))
ReferenceManager\AssemblyData.cs (1)
72private string GetDebuggerDisplay() => $"{GetType().Name}: [{Identity.GetDisplayName()}]";
SourceFileResolver.cs (2)
127if (obj == null || GetType() != obj.GetType())
SourceGeneration\GeneratorExtensions.cs (4)
27return igw.Generator.GetType(); 29return generator.GetType(); 41return adaptor.SourceGenerator.GetType(); 43return generator.GetType();
SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
StrongName\DesktopStrongNameProvider.cs (2)
272if (obj is null || GetType() != obj.GetType())
StrongName\StrongNameFileSystem.cs (2)
56return this.GetType() == other?.GetType() && StringComparer.Ordinal.Equals(_signingTempPath, other?._signingTempPath);
Symbols\TypedConstantValue.cs (2)
25Debug.Assert(value == null || value is string || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is System.IntPtr) && !(value is System.UIntPtr)) || value is ITypeSymbol);
Syntax\GreenNode.cs (1)
25return this.GetType().Name + " " + this.KindText + " " + this.ToString();
Syntax\SyntaxNode.cs (1)
54return GetType().Name + " " + KindText + " " + ToString();
Syntax\SyntaxNodeOrToken.cs (1)
69return GetType().Name + " " + KindText + " " + ToString();
Syntax\SyntaxToken.cs (1)
48return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString();
Syntax\SyntaxTrivia.cs (1)
45return GetType().Name + " " + (UnderlyingNode?.KindText ?? "None") + " " + ToString();
Text\TextChange.cs (1)
55return string.Format("{0}: {{ {1}, \"{2}\" }}", this.GetType().Name, Span, NewText);
TreeDumper.cs (1)
196var ti = o.GetType().GetTypeInfo();
XmlFileResolver.cs (2)
93if (obj == null || GetType() != obj.GetType())
Microsoft.CodeAnalysis.Analyzers (52)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
54var type = analyzerConfigOptions.GetType();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
166string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 185typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 206typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 224typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Microsoft.CodeAnalysis.AnalyzerUtilities (50)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
54var type = analyzerConfigOptions.GetType();
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\CacheBasedEquatable.cs (2)
55|| GetType() != otherEquatable.GetType()
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
Microsoft.CodeAnalysis.CodeStyle (46)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
166string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 185typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 206typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 224typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder.cs (1)
1004var description = scope.GetType().Name;
Binder\Binder_Expressions.cs (1)
7548Debug.Assert(!value.GetType().GetTypeInfo().IsEnum);
Binder\DecisionDagBuilder.cs (5)
4437if (obj is not SequenceTests other || sequence.GetType() != other.GetType() || sequence.RemainingTests.Length != other.RemainingTests.Length) 4460int value = Hash.Combine(this.RemainingTests.Length, this.GetType().GetHashCode()); 4477value = Hash.Combine(Hash.Combine(sequence.RemainingTests.Length, sequence.GetType().GetHashCode()), value); 4499int value = Hash.Combine(length, sequence.GetType().GetHashCode());
BoundTree\BoundNode.cs (1)
427var result = GetType().Name;
BoundTree\Formatting.cs (1)
21RoslynDebug.Assert(this.Type is { }, $"Unexpected null type in {this.GetType().Name}");
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (1)
69$"Unexpected definition of type: {definition.GetType()}");
FlowAnalysis\AbstractFlowPass.cs (1)
897RoslynDebug.Assert(false, $"Should Visit{node.Kind} be overridden in {this.GetType().Name}?");
FlowAnalysis\DefiniteAssignment.cs (3)
188_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass); 207_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass); 229_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass);
FlowAnalysis\NullableWalker.cs (2)
521return $"{{{GetType().Name} WhenTrue:{Dump(StateWhenTrue)} WhenFalse:{Dump(StateWhenFalse)}{"}"}"; 525return $"{{{GetType().Name} {Dump(State)}{"}"}";
Operations\CSharpOperationFactory.cs (1)
1328Debug.Fail("Unhandled case: " + collectionCreation.GetType());
SymbolDisplay\ObjectDisplay.cs (1)
44Type type = obj.GetType();
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
897return value.GetType().GetTypeInfo().IsPrimitive || value is string || value is decimal;
SymbolDisplay\SymbolDisplayVisitor_Constants.cs (1)
44Debug.Assert(value.GetType().GetTypeInfo().IsPrimitive || value is string || value is decimal);
Symbols\AbstractTypeParameterMap.cs (1)
42result.Append(this.GetType().Name);
Symbols\ReferenceManager.cs (1)
89throw new NotSupportedException(string.Format(CSharpResources.CantReferenceCompilationOf, compilationReference.GetType(), "C#"));
Syntax\InternalSyntax\SyntaxToken.cs (2)
364System.Diagnostics.Debug.Assert(this.GetType() == typeof(SyntaxToken)); 370System.Diagnostics.Debug.Assert(this.GetType() == typeof(SyntaxToken));
Utilities\ValueSetFactory.NumericValueSet.cs (4)
165Debug.Assert(this._tc.GetType() == other._tc.GetType()); 242Debug.Assert(this._tc.GetType() == other._tc.GetType());
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
31/// value would cause a different type to be seen in a <see cref="System.Object.GetType()"/> call,
Microsoft.CodeAnalysis.CSharp.Features (7)
SolutionExplorer\CSharpSolutionExplorerSymbolTreeItemProvider.cs (1)
520Debug.Fail("Unhandled type: " + type.GetType().FullName);
SyncedSource\FileBasedPrograms\FileLevelDirectiveHelpers.cs (4)
163var typeAndName = $"#:{existingDirective.GetType().Name.ToLowerInvariant()} {existingDirective.Name}"; 782return x.GetType() == y.GetType() && 789obj.GetType().GetHashCode(),
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (2)
52yield return KeyValuePair.Create((helper, useExpressionBody: true), helper.GetType().Name + "_UseExpressionBody"); 53yield return KeyValuePair.Create((helper, useExpressionBody: false), helper.GetType().Name + "_UseBlockBody");
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\CSharpUseAsSpanInsteadOfRangeIndexer.Fixer.cs (1)
43throw new InvalidOperationException(node.GetType().FullName);
Microsoft.NetCore.Analyzers\Performance\CSharpUseSearchValues.Fixer.cs (1)
59throw new InvalidOperationException($"Expected 'VariableDeclaratorSyntax' or 'PropertyDeclarationSyntax', got {syntax.GetType().Name}");
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScript.cs (1)
100return Create<T>(code, options, globalsType ?? globals?.GetType()).RunAsync(globals, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
31/// value would cause a different type to be seen in a <see cref="System.Object.GetType()"/> call,
Microsoft.CodeAnalysis.Extensions.Package (22)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Microsoft.CodeAnalysis.Features (31)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
120else if (defaultValue.Value?.GetType() is Type t && t.IsEnum)
CodeFixes\RoslynAssemblyHelper.cs (1)
15=> source.GetType().GetTypeInfo().Assembly.GetName().GetPublicKey().SequenceEqual(
CodeFixes\Service\CodeFixService.cs (2)
529var fixerName = fixer.GetType().Name; 897codeFixProvider.GetType().Name + "." + nameof(CodeFixProvider.FixableDiagnosticIds)));
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (2)
101var exportAttributes = fixAllState.Provider.GetType().GetTypeInfo().GetCustomAttributes(typeof(ExportCodeFixProviderAttribute), false); 108exportAttributes = fixAllState.Provider.GetType().GetTypeInfo().GetCustomAttributes(typeof(ExportCodeRefactoringProviderAttribute), false);
CodeRefactorings\CodeRefactoringService.cs (1)
206var providerName = provider.GetType().Name;
Common\AbstractProjectExtensionProvider.cs (1)
124var typeInfo = extension.GetType().GetTypeInfo();
Completion\ArgumentProvider.cs (1)
14=> Name = GetType().FullName!;
Completion\CompletionProvider.cs (1)
22=> Name = GetType().FullName!;
Completion\Providers\EmbeddedLanguageCompletionProvider.cs (1)
18Name = GetType().FullName!;
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer.cs (1)
154throw ExceptionUtilities.UnexpectedValue(symbol.GetType());
Copilot\ICopilotChangeAnalysisService.cs (2)
356(codeFixCollection.Provider.GetType().Namespace ?? "").StartsWith(RoslynPrefix)) 367=> codeFixCollection.Provider.GetType().FullName![RoslynPrefix.Length..];
Debugging\DebugInformationReaderProvider.cs (1)
69=> EditAndContinueDebugInfoReader.Create(_symReader ?? throw new ObjectDisposedException(GetType().FullName), _version);
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
31=> analyzer.GetType().Assembly.GetName().Name ?? throw ExceptionUtilities.Unreachable();
Diagnostics\DiagnosticAnalyzerTelemetry.cs (1)
55_analyzerInfoMap = _analyzerInfoMap.SetItem(analyzer.GetType(), new Data(analyzerTelemetryInfo, isTelemetryCollectionAllowed));
Diagnostics\Service\DiagnosticAnalyzerComparer.cs (1)
33var typeInfo = analyzer.GetType().GetTypeInfo();
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
306=> TryGetDisplayName(node, editKind) ?? throw ExceptionUtilities.UnexpectedValue(node.GetType().Name); 373throw ExceptionUtilities.UnexpectedValue(node.GetType().Name);
EditAndContinue\DeclarationBody.cs (2)
89GetType() == other?.GetType() && RootNodes.SequenceEqual(other.RootNodes);
EditAndContinue\PdbMatchingSourceTextProvider.cs (1)
41if (workspace.GetType().Name == "LspTestWorkspace")
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingWorkItem.cs (1)
166=> $"{DocumentId?.ToString() ?? ProjectId.ToString()}, ({InvocationReasons}), LowPriority:{IsLowPriority}, ActiveMember:{ActiveMember != null}, Retry:{IsRetry}, ({string.Join("|", SpecificAnalyzers.Select(a => a.GetType().Name))})";
ExtractInterface\AbstractExtractInterfaceService.cs (1)
169default: throw new InvalidOperationException($"Unable to extract interface for operation of type {extractInterfaceOptions.GetType()}");
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
239tokenValue, Type.GetTypeCode(tokenValue.GetType()), solution, progressAdapter, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
123var type = codeAction.GetType();
MetadataAsSource\MetadataAsSourceFileService.cs (1)
109var providerTempPath = Path.Combine(_rootTemporaryPathWithGuid, provider.GetType().Name);
Organizing\AbstractOrganizingService.cs (1)
42return n => map.GetOrAdd(n.GetType(), getter);
Structure\Syntax\BlockSpanCollector.cs (1)
65if (_nodeProviderMap.TryGetValue(node.GetType(), out var providers))
Workspace\MiscellaneousFileUtilities.cs (1)
71var projectId = ProjectId.CreateNewId(debugName: $"{workspace.GetType().Name} Files Project for {filePath}");
Microsoft.CodeAnalysis.Razor.Compiler (24)
Language\Extensions\DefaultTagHelperTargetExtension.cs (5)
81var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode)); 117var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode)); 136var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode)); 179var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode)); 256var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode));
Language\Extensions\PreallocatedAttributeTargetExtension.cs (2)
59var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode)); 91var message = Resources.FormatIntermediateNodes_InvalidParentNode(node.GetType(), typeof(TagHelperIntermediateNode));
Language\Intermediate\IntermediateNodeFormatter.cs (1)
46return s_nodeTypeToShortNameMap.GetOrAdd(node.GetType(), ComputeShortName);
Language\Legacy\ExpressionChunkGenerator.cs (2)
22GetType() == obj.GetType();
Language\Legacy\SpanChunkGenerator.cs (2)
19GetType() == obj.GetType();
Language\Legacy\SpanEditHandler.cs (4)
107_ => Assumed.Unreachable<SyntaxNode>($"The type {target?.GetType().Name} is not a supported span node."), 141return GetType().Name + ";Accepts:" + AcceptedCharacters; 147GetType() == other.GetType() &&
Language\RazorDiagnostic.cs (1)
70if (value.GetType() is { IsEnum: true } enumType)
Language\RazorEngineFeatureBase.cs (2)
41Resources.FormatFeatureDependencyMissing(GetType().Name, typeof(TFeature).Name, nameof(RazorEngine))); 49Resources.FormatFeatureDependencyMissing(GetType().Name, typeof(T).Name, nameof(RazorCodeDocument)));
Language\RazorEnginePhaseBase.cs (2)
49Resources.FormatPhaseDependencyMissing(GetType().Name, typeof(T).Name, nameof(RazorEngine))); 57Resources.FormatPhaseDependencyMissing(GetType().Name, typeof(T).Name, nameof(RazorCodeDocument)));
Language\Syntax\GreenNode.cs (1)
179=> $"{GetType().Name}<{Kind}>";
Language\Syntax\SyntaxNodeOrToken.cs (1)
56=> $"{GetType().Name} {Kind} {ToString()}";
Language\Syntax\SyntaxToken.cs (1)
44=> $"{GetType().Name} {Kind} {ToString()}";
Microsoft.CodeAnalysis.ResxSourceGenerator (48)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
54var type = analyzerConfigOptions.GetType();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
Microsoft.CodeAnalysis.Scripting (14)
Hosting\CommandLine\CommandLineRunner.cs (3)
205var script = Script.CreateInitialScript<int>(_scriptCompiler, code, options, globals.GetType(), assemblyLoaderOpt: null); 231var script = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(initialScriptCodeOpt), options, globals.GetType(), assemblyLoaderOpt: null); 283newScript = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(code ?? string.Empty), options, globals.GetType(), assemblyLoaderOpt: null);
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (6)
93Type type = obj.GetType(); 256FormatObjectMembers(result, proxy ?? obj, obj.GetType().GetTypeInfo(), includeNonPublic, inlineMembers); 331var type = obj.GetType().GetTypeInfo(); 526TypeInfo type = obj.GetType().GetTypeInfo(); 542result.Append(_formatter.TypeNameFormatter.FormatArrayTypeName(array.GetType(), array, _typeNameOptions)); 546result.Append(_formatter.TypeNameFormatter.FormatTypeName(collection.GetType(), _typeNameOptions));
Hosting\ObjectFormatter\CommonPrimitiveFormatter.cs (1)
54var type = obj.GetType();
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (2)
107var type = obj.GetType().GetTypeInfo(); 135TypeInfo type = obj.GetType().GetTypeInfo();
Script.cs (1)
595var runtimeType = globals.GetType().GetTypeInfo();
ScriptState.cs (1)
106foreach (var field in state.GetType().GetTypeInfo().DeclaredFields)
Microsoft.CodeAnalysis.VisualBasic (15)
CommandLine\VisualBasicCommandLineParser.vb (1)
1818diagnosticBuilder.Add(Diagnostic.Create(VisualBasic.MessageProvider.Instance, ERRID.ERR_InvalidPreprocessorConstantType, symbol.Key, symbol.Value.GetType()))
Compilation\VisualBasicDeterministicKeyBuilder.vb (1)
46Dim type = value.GetType()
Lowering\AsyncRewriter\AsyncRewriter.CapturedSymbolOrExpression.vb (1)
30Debug.Assert(False, "This method should not be called for " + Me.GetType.Name)
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
460Debug.Assert(Not expression.IsLValue, "Need to support LValues of type " + expression.GetType.Name)
Preprocessor\ExpressionEvaluator.vb (1)
547If value.GetType().GetTypeInfo().IsValueType Then
SymbolDisplay\ObjectDisplay.vb (1)
44Dim type = obj.GetType()
SymbolDisplay\SymbolDisplayVisitor_Constants.vb (1)
21Debug.Assert(value.GetType().GetTypeInfo().IsPrimitive OrElse TypeOf value Is String OrElse TypeOf value Is Decimal OrElse TypeOf value Is DateTime)
Symbols\ReferenceManager.vb (1)
113Throw New NotSupportedException(String.Format(VBResources.CantReferenceCompilationFromTypes, compilationReference.GetType(), "Visual Basic"))
Symbols\SubstitutedErrorType.vb (2)
259Not Me.GetType().Equals(obj.GetType()) Then
Symbols\SubstitutedNamedType.vb (2)
531Not Me.GetType().Equals(other.GetType()) Then
Symbols\UnboundGenericType.vb (3)
303Return other IsNot Nothing AndAlso other.GetType() = Me.GetType() AndAlso other.OriginalDefinition.Equals(OriginalDefinition, comparison) 307Return Hash.Combine(Me.GetType(), OriginalDefinition.GetHashCode())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\ConvertTypeofToNameof\VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer.vb (1)
26Dim isParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
SolutionExplorer\VisualBasicSolutionExplorerSymbolTreeItemProvider.vb (2)
395Debug.Fail("Unhandled type: " + typeSyntax.GetType().FullName) 412Debug.Fail("Unhandled type: " + element.GetType().FullName)
src\roslyn\src\Analyzers\VisualBasic\Analyzers\ConvertTypeofToNameof\VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer.vb (1)
26Dim isParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Performance\BasicPreferDictionaryTryMethodsOverContainsKeyGuardFixer.vb (2)
53Select Case node.GetType() 92If variableDeclarator.Parent.GetType() <> GetType(LocalDeclarationStatementSyntax) Then
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
VisualBasicScript.vb (1)
46Return Create(Of T)(code, options, globals?.GetType()).RunAsync(globals, cancellationToken)
Microsoft.CodeAnalysis.Workspaces (79)
CodeActions\CodeAction.cs (4)
111var type = this.GetType(); 208_providerTypeForTelemetry = provider.GetType(); 221: this.GetType(); 381=> throw new NotSupportedException(GetType().FullName);
CodeFixesAndRefactorings\FixAllLogger.cs (2)
67m[providerKey] = fixAllState.Provider.GetType().FullName!; 73m[providerKey] = fixAllState.Provider.GetType().FullName!.GetHashCode().ToString();
Diagnostics\Extensions.cs (1)
76var type = analyzer.GetType();
ExtensionManager\IExtensionManagerExtensions.cs (1)
110return n => map.TryGetValue(n.GetType(), out var extensions) ? extensions : [];
Log\WorkspaceErrorLogger.cs (1)
22=> Logger.Log(FunctionId.Extension_Exception, (source, exception) => source.GetType().Name + " : " + ToLogFormat(exception), source, exception, LogLevel.Error);
Serialization\SerializedPortableExecutableReference.cs (1)
65MetadataKind={metadata switch { null => "null", AssemblyMetadata => "assembly", ModuleMetadata => "module", _ => metadata.GetType().Name }}
Serialization\SerializerService_Reference.cs (3)
55throw ExceptionUtilities.UnexpectedValue(reference.GetType()); 114throw ExceptionUtilities.UnexpectedValue(reference.GetType()); 506throw ExceptionUtilities.UnexpectedValue(stream.GetType());
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
193CodeAnalysisEventSource.Log.ResolvedAssembly(Directory, assemblyName.ToString(), resolver.GetType().Name, assembly.Location, GetLoadContext(assembly)!.ToString());
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (2)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 200else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
166string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 185typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 206typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 224typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1166CodeAnalysisEventSource.Log.AnanlyzerReferenceRedirected(redirector.GetType().Name, fullPath, redirectedPath, DisplayName);
Workspace\Solution\DocumentId.cs (1)
61=> string.Format("({0}, #{1} - {2})", this.GetType().Name, this.Id, DebugName);
Workspace\Solution\FileTextLoader.cs (1)
68GetType(), _ => new StrongBox<bool>(new Func<Stream, Workspace, SourceText>(CreateText).Method.DeclaringType != typeof(FileTextLoader))).Value;
Workspace\Solution\ProjectId.cs (1)
70=> string.Format("({0}, #{1} - {2})", this.GetType().Name, this.Id, DebugName);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (6)
153_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 172_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 300_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()) 745_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 857throw ExceptionUtilities.UnexpectedValue(state.GetType()); 962throw ExceptionUtilities.UnexpectedValue(state.GetType());
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
455var driverType = generatorDriver.GetType();
Workspace\Solution\SolutionId.cs (1)
56=> string.Format("({0}, #{1} - {2})", GetType().Name, this.Id, DebugName);
Workspace\Solution\TextLoader.cs (2)
64GetType(), 71throw new NotImplementedException($"{GetType()} must override {nameof(LoadTextAndVersionAsync)}");
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.cs (2)
321if (logger?.GetType().FullName != "Microsoft.Build.Logging.BinaryLogger") 329var fileNameProperty = logger.GetType().GetProperty("FileName");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Rpc\RpcMethodInvoker.cs (1)
55return task.GetType().GetProperty("Result")!.GetValue(task);
Rpc\RpcServer.cs (1)
122var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance);
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (1)
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Microsoft.CSharp (12)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
56tempForIncrement = Expression.Variable(value != null ? value.GetType() : typeof(object), "t0"); 119Expression.Assign(tempForIncrement, Expression.Convert(arg0.Expression, arg0.Value.GetType())),
Microsoft\CSharp\RuntimeBinder\ComInterop\BoundDispEvent.cs (1)
54if (handler is Delegate && handler.GetType() != typeof(Delegate))
Microsoft\CSharp\RuntimeBinder\ComInterop\IDispatchComObject.cs (1)
279Type comType = RuntimeCallableWrapper.GetType();
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (4)
72this.type = value == null ? "<null>" : value.GetType().ToString(); 195delegateSignatureTypes[i + 1] = args[i].GetType(); 219Delegate target = (Delegate)site.GetType().GetField("Target").GetValue(site); 471else if (obj != null && ComObjectType.IsAssignableFrom(obj.GetType()))
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
521arg.RuntimeObjectActualType = SymbolTable.GetCTypeFromType(argument.Value.GetType());
Microsoft\CSharp\RuntimeBinder\Semantics\ConstVal.cs (1)
90Type.GetTypeCode(o.GetType()) switch
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (2)
1540Debug.Assert(Type.GetTypeCode(defValue.GetType()) != TypeCode.Decimal); // Handled above 1541switch (Type.GetTypeCode(defValue.GetType()))
Microsoft.Data.Analysis (1)
PrimitiveDataFrameColumn.cs (1)
239if (value == null || value.GetType() == typeof(T))
Microsoft.Data.Analysis.Tests (3)
DataFrameAssert.cs (2)
22Assert.Equal(expectedColumn.GetType(), actualColumn.GetType());
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
61ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
Microsoft.Diagnostics.DataContractReader (2)
_generated\13\ContractDescriptorContext.g.cs (2)
89throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 97throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Contracts\StackWalk\Context\ContextHolder.cs (2)
62if (GetType() != other?.GetType())
Microsoft.Diagnostics.NETCore.Client (4)
DiagnosticsClient\DiagnosticsClient.cs (1)
698throw new ArgumentException($"Type {obj.GetType()} is not supported in SerializePayloadArgument, please add it.");
DiagnosticsClient\EventPipeProvider.cs (2)
35if (obj == null || GetType() != obj.GetType())
DiagnosticsIpc\IpcServerTransport.cs (1)
77throw new ObjectDisposedException(GetType().Name);
Microsoft.DotNet.Build.Tasks.Packaging (4)
NuGetPack.cs (1)
344var type = packageBuilder.GetType();
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)
106throw new JsonSerializationException($"Expected {nameof(NuGetFramework)} but got {value.GetType()}");
Microsoft.DotNet.Cli.Definitions (3)
_generated\3\GlobalJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Help\HelpBuilder.cs (1)
201throw new NotSupportedException($"Symbol type {symbol.GetType()} is not supported.");
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\BaseAnalyzer.cs (1)
29if (StringComparer.OrdinalIgnoreCase.Equals(line.ToString(), GetType().Name))
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\HotReloadClient\Logging\LogEvents.cs (1)
44if (args?.GetType() == typeof(None))
Microsoft.DotNet.HotReload.WebAssembly.Browser (2)
_generated\9\WebAssemblyHotReloadJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.DotNet.ProjectTools (6)
_generated\5\LaunchProfileJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\sdk\src\Cli\Microsoft.DotNet.FileBasedPrograms\FileLevelDirectiveHelpers.cs (4)
367public virtual string KindToString() => GetType().Name.ToLowerInvariant(); 928return x.GetType() == y.GetType() && 935obj.GetType().GetHashCode(),
Microsoft.DotNet.TemplateLocator (5)
_generated\11\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\3\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (1)
129throw new WorkloadManifestCompositionException(Strings.DuplicateManifestID, manifestProvider.GetType().FullName, readableManifest.ManifestId, readableManifest.ManifestPath, existingManifest.ManifestPath);
Microsoft.Extensions.AI (5)
ChatCompletion\FunctionInvokingChatClient.cs (1)
1233Throw.InvalidOperationException($"{GetType().Name}.{nameof(CreateResponseMessages)} returned null or an empty collection of messages.");
ChatCompletion\OpenTelemetryChatClient.cs (3)
467customContentSerializerOptions?.TryGetTypeInfo(content.GetType(), out JsonTypeInfo? ctsi) is true ? ctsi : 468_defaultOptions.TryGetTypeInfo(content.GetType(), out JsonTypeInfo? dtsi) ? dtsi : 483Type = content.GetType().FullName!,
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.AI.Abstractions (5)
Functions\AIFunctionFactory.cs (1)
870string json = JsonSerializer.Serialize(value, serializerOptions.GetTypeInfo(value.GetType()));
Functions\AIFunctionFactoryOptions.cs (1)
102/// This may be different than the actual type of the object (<see cref="object.GetType"/>) if the method returns a derived type
Tools\AITool.cs (1)
23public virtual string Name => GetType().Name;
Utilities\AIJsonUtilities.Schema.Create.cs (2)
243? JsonSerializer.SerializeToNode(defaultValue, serializerOptions.GetTypeInfo(defaultValue.GetType())) 692if (allowedValue is not null && JsonSerializer.SerializeToNode(allowedValue, serializerOptions.GetTypeInfo(allowedValue.GetType())) is { } valueNode)
Microsoft.Extensions.AI.Abstractions.Tests (17)
AssertExtensions.cs (4)
28Assert.Equal(expectedMessage.GetType(), chatMessage.GetType()); 36Assert.Equal(expectedItem.GetType(), chatItem.GetType());
ChatCompletion\DelegatingChatClientTests.cs (1)
141GetServiceCallback = (type, key) => type == expectedResult.GetType() && key == expectedKey
Contents\AIContentTests.cs (2)
92Assert.Equal(message.Contents[i].GetType(), deserialized.Contents[i].GetType());
Contents\UserInputRequestContentTests.cs (3)
40Assert.Equal(content.GetType(), deserializedContent.GetType()); 56Assert.Equal(contents.ElementAt(i).GetType(), deserializedContents[i].GetType());
Contents\UserInputResponseContentTests.cs (3)
38Assert.Equal(content.GetType(), deserializedContent.GetType()); 54Assert.Equal(contents[i].GetType(), deserializedContents[i].GetType());
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
102GetServiceCallback = (type, key) => type == expectedResult.GetType() && key == expectedKey
Image\DelegatingImageGeneratorTests.cs (1)
100GetServiceCallback = (type, key) => type == expectedResult.GetType() && key == expectedKey
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
142GetServiceCallback = (type, key) => type == expectedResult.GetType() && key == expectedKey
Utilities\AIJsonUtilitiesTests.cs (1)
67Type anonType = new { Name = 42 }.GetType();
Microsoft.Extensions.AI.Evaluation (3)
CompositeEvaluator.cs (2)
54$"The '{nameof(evaluator.EvaluationMetricNames)}' property on '{evaluator.GetType().FullName}' returned an empty collection. An evaluator must advertise the names of the metrics that it supports."); 151$"The '{nameof(e.EvaluationMetricNames)}' property on '{e.GetType().FullName}' returned an empty collection. An evaluator must advertise the names of the metrics that it supports.");
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.AI.Evaluation.Quality (1)
EvaluationMetricExtensions.cs (1)
171throw new NotSupportedException($"{metric.GetType().Name} is not supported.");
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (2)
ScenarioRunResultTests.cs (2)
362if (x?.GetType().Name != y?.GetType().Name)
Microsoft.Extensions.AI.Evaluation.Safety (1)
ContentSafetyEvaluator.cs (1)
104string evaluatorName = GetType().Name;
Microsoft.Extensions.AI.Integration.Tests (1)
ImageGeneratorIntegrationTests.cs (1)
60Assert.Fail($"Unexpected content type: {content.GetType()}");
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (1)
1532public override string Name => Tool.GetType().Name;
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIResponseClientTests.cs (1)
824AIContent computerUserItem = Assert.Single(responseMessage.Contents, content => content.GetType() == typeof(AIContent));
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
28Assert.Equal(expectedMessage.GetType(), chatMessage.GetType()); 36Assert.Equal(expectedItem.GetType(), chatItem.GetType());
Microsoft.Extensions.AI.Tests (7)
ChatCompletion\DistributedCachingChatClientTest.cs (3)
805Assert.IsType(expectedMessage.GetType(), actualMessage); 814Assert.IsType(expectedItem.GetType(), actualItem); 848Assert.IsType(expectedItemItem.GetType(), actualItemItem);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
28Assert.Equal(expectedMessage.GetType(), chatMessage.GetType()); 36Assert.Equal(expectedItem.GetType(), chatItem.GetType());
Microsoft.Extensions.AmbientMetadata.Build.Tests (1)
BuildMetadataTests.cs (1)
26var properties = obj.GetType().GetProperties().Select(f => f.GetValue(obj)).ToArray();
Microsoft.Extensions.Caching.Hybrid (3)
Internal\DefaultHybridCache.cs (2)
89&& _backendCache.GetType() == typeof(MemoryDistributedCache) 90&& _localCache.GetType() == typeof(MemoryCache))
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Compliance.Abstractions (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Compliance.Redaction (5)
RedactorProvider.cs (2)
51if (r.GetType() == m.Value) 66if (r.GetType() == defaultRedactorType)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\Shared\Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Compliance.Redaction.Tests (3)
RedactorProviderTests.cs (3)
97Assert.Equal(typeof(NullRedactor), r1.GetType()); 98Assert.Equal(typeof(NullRedactor), r2.GetType()); 99Assert.Equal(typeof(ErasingRedactor), r3.GetType());
Microsoft.Extensions.Compliance.Testing (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
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)
143BindInstance(instance.GetType(), bindingPoint, configuration, options, false); 222List<PropertyInfo> modelProperties = GetAllProperties(instance.GetType()); 241nameof(options.ErrorOnUnknownConfiguration), nameof(BinderOptions), instance.GetType(),
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.DataIngestion (2)
IngestionPipeline.cs (1)
120private static string GetShortName(object any) => any.GetType().Name;
Writers\VectorStoreWriter.cs (1)
147Type propertyType = metadata.Value.GetType();
Microsoft.Extensions.DataIngestion.Abstractions (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.DataIngestion.Markdig (3)
MarkdownParser.cs (3)
87_ => throw new NotSupportedException($"Block type '{block.GetType().Name}' is not supported.") 114_ => throw new NotSupportedException($"Block type '{block.GetType().Name}' is not supported.") 237throw new NotSupportedException($"Inline type '{inline.GetType().Name}' is not supported.");
Microsoft.Extensions.DataIngestion.MarkItDown (4)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\Libraries\Microsoft.Extensions.DataIngestion.Markdig\MarkdownParser.cs (3)
87_ => throw new NotSupportedException($"Block type '{block.GetType().Name}' is not supported.") 114_ => throw new NotSupportedException($"Block type '{block.GetType().Name}' is not supported.") 237throw new NotSupportedException($"Inline type '{inline.GetType().Name}' is not supported.");
Microsoft.Extensions.DependencyInjection (8)
DependencyInjectionEventSource.cs (1)
288builder.Append(instance.GetType());
ServiceLookup\CallSiteFactory.cs (1)
701else if (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(),
ServiceProvider.cs (1)
163ThrowHelper.ThrowInvalidOperationException_NoKeyedServiceRegistered(serviceType, serviceKey.GetType());
src\runtime\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)
184argumentTypes[i] = parameters[i]?.GetType(); 818Type? givenType = givenParameters[givenIndex]?.GetType();
ServiceDescriptor.cs (4)
318return ImplementationInstance.GetType(); 322Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 337return KeyedImplementationInstance.GetType(); 341Type[]? typeArguments = KeyedImplementationFactory.GetType().GenericTypeArguments;
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
ExceptionSummarizer.cs (1)
95$"Exception summary provider {exceptionSummaryProvider.GetType().Name} returned invalid short description index {descriptionIndex}");
Microsoft.Extensions.Diagnostics.Probes (2)
src\Shared\Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Diagnostics.Probes.Tests (3)
KubernetesProbesExtensionsTests.cs (3)
36var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService"); 80var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService"); 108var hostedServices = host.Services.GetServices<IHostedService>().Where(service => service.GetType().Name == "TcpEndpointProbesService");
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
ResourceMonitorService.cs (1)
117_logger.HandlePublishUtilizationException(e, publisher.GetType().FullName!);
src\Shared\Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Hosting.Abstractions (1)
IHostBuilder.cs (1)
66throw new NotSupportedException($"The type '{GetType()}' does not support '{nameof(UseServiceProviderFactory)}' with a context-based factory. Override this method to provide an implementation.");
Microsoft.Extensions.Http (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpClientLogger.cs (1)
229Log.EnrichmentError(_logger, e, enricher.GetType().FullName, request.Method, logRecord.Host, logRecord.Path);
Microsoft.Extensions.Http.Resilience (3)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\Shared\Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Http.Resilience.Tests (2)
Helpers\OptionsUtilities.cs (1)
52.GetType()
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (1)
354Assert.Equal(typeof(TestHandlerStub), handlers.First().GetType());
Microsoft.Extensions.Logging (1)
LoggerInformation.cs (1)
76ProviderType = provider.GetType();
Microsoft.Extensions.Logging.Abstractions (1)
src\runtime\src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.Logging.Generators (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.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.Contextual (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
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.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
98throw new InvalidOperationException($"Endpoints of type {endPoint.GetType()} are not supported");
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
IFuzzer.cs (1)
8string Name => GetType().Name;
Microsoft.Extensions.Telemetry (4)
Logging\Import\LoggerInformation.cs (1)
87ProviderType = provider.GetType();
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\Shared\Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
Microsoft.Extensions.Telemetry.PerformanceTests (1)
BenchLogger.cs (1)
66if (o?.GetType() == typeof(Guid))
Microsoft.Extensions.Telemetry.Tests (3)
Logging\ExtendedLoggerFactoryTests.cs (3)
472Assert.StartsWith(loggerProvider.ScopeProvider!.GetType().FullName, scope!.GetType().FullName); 484Assert.Contains("LoggerExternalScopeProvider+Scope", scope!.GetType().FullName);
Microsoft.Extensions.TimeProvider.Testing (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Validation (5)
ValidatableParameterInfo.cs (2)
145if (context.ValidationOptions.TryGetValidatableTypeInfo(item.GetType(), out var validatableType)) 158var valueType = value.GetType();
ValidatablePropertyInfo.cs (2)
143var itemType = item.GetType(); 159var valueType = propertyValue.GetType();
ValidatableTypeInfo.cs (1)
141var actualType = value.GetType();
Microsoft.Extensions.Validation.Localization (1)
ValidationAttributeFormatterRegistry.cs (1)
113if (_factories.TryGetValue(attribute.GetType(), out var factory))
Microsoft.Gen.Logging.Generated.Tests (2)
TagProviderTests.cs (1)
403["param2.Type"] = obj2.GetType().ToString(),
test\Generators\Microsoft.Gen.Logging\TestClasses\TagProviderWithObjectExtensions.cs (1)
41list.Add("Type", param?.GetType());
Microsoft.Interop.ComInterfaceGenerator (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Interop.LibraryImportGenerator (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Interop.SourceGeneration (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
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 => 108return _cachedResultSetters.GetOrAdd(taskCompletionSource.GetType(), tcsType =>
JSRuntime.cs (1)
357throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
Microsoft.Maui (16)
Animations\LerpingAnimation.cs (2)
83 var type = StartValue?.GetType() ?? EndValue?.GetType();
Converters\PrimitiveTypeConversions.cs (1)
25 if (value is not null && IsImplicitlyConvertibleToDouble(value.GetType()))
Handlers\HybridWebView\HybridWebViewHandler.cs (2)
214 var resultType = result.GetType(); 243 throw new InvalidOperationException($"The method {requestMethodName} couldn't be found on the {nameof(jsInvokeTarget)} of type {jsInvokeTarget.GetType().FullName}.");
Hosting\ImageSources\ImageSourceServiceProviderExtensions.cs (2)
9 provider.GetImageSourceService(imageSource.GetType()); 16 provider.GetRequiredImageSourceService(imageSource.GetType());
HotReload\HotReloadHelper.cs (3)
70 if (!replacedViews.TryGetValue(view.GetType().FullName!, out var newViewType)) 72 return newView.GetType() == newViewType; 83 var viewType = view.GetType();
Platform\ElementExtensions.cs (3)
75 var viewType = view.GetType(); 87 handlersWithConstructors.Add(view.GetType()); 149 handler = context.Handlers.GetHandler(element.GetType());
Platform\ReflectionExtensions.cs (1)
27 return self.IsAssignableFrom(o.GetType());
Primitives\Font.cs (2)
104 if (obj.GetType() != GetType())
Microsoft.Maui.Controls (65)
AnimatableKey.cs (4)
54 if (obj.GetType() != GetType()) 62 if (obj.GetType() != GetType())
BindableProperty.cs (2)
96 throw new ArgumentException($"Default value did not match return type. Property: {returnType} {declaringType.Name}.{propertyName} Default value type: {defaultValue.GetType().Name}, ", nameof(defaultValue)); 215 Type valueType = value.GetType();
BindablePropertyConverter.cs (2)
140 return vsTarget.GetType(); 146 return veTarget.GetType();
Binding.cs (1)
138 ? $"Cannot apply relative binding to {bindObj.GetType().FullName} because it is not a superclass of Element."
BindingExpression.cs (4)
74 if (sourceObject != null && !dataType.IsAssignableFrom(sourceObject.GetType())) 76 BindingDiagnostics.SendBindingFailure(Binding, "Binding", $"Mismatch between the specified x:DataType ({dataType}) and the current binding context ({sourceObject.GetType()})."); 140 TypeInfo currentType = current is IReflectableType reflectable ? reflectable.GetTypeInfo() : current.GetType().GetTypeInfo(); 153 BindingDiagnostics.SendBindingFailure(Binding, current, target, property, "Binding", PropertyNotFoundErrorMessage, part.Content, current, target.GetType(), property.PropertyName);
CompareStateTrigger.cs (2)
75 value1 = ConvertToEnum(value2.GetType(), value1); 77 value1 = Convert.ChangeType(value1, value2.GetType(), CultureInfo.InvariantCulture);
ContentConverter.cs (1)
116 if (type.IsAssignableFrom(parent.GetType()))
DataTemplate.cs (2)
21 _idString = GetType().FullName + _id; 37 _idString = GetType().FullName + _id;
DataTemplateSelector.cs (2)
22 if (recycle && _dataTemplates.TryGetValue(item.GetType(), out dataTemplate)) 36 _dataTemplates[item.GetType()] = dataTemplate;
Device.cs (1)
122 return GetNamedSize(size, targetElement.GetType());
Element\Element_StyleSheets.cs (1)
30 var t = GetType();
FlyoutPage\FlyoutPage.cs (1)
390 return $"{GetType().FullName}: {debugText}";
FontSizeConverter.cs (1)
57 var type = serviceProvider.GetService(typeof(IProvideValueTarget)) is IProvideValueTarget valueTargetProvider ? valueTargetProvider.TargetObject.GetType() : typeof(Label);
Hosting\Effects\AppHostBuilderExtensions.cs (1)
120 if (_registeredEffects != null && _registeredEffects.TryGetValue(fromEffect.GetType(), out Func<PlatformEffect> effectType))
ImageSource.cs (1)
25 _mergedStyle = new MergedStyle(GetType(), this);
Interactivity\BindingCondition.cs (1)
76 converted = s_valueConverter.Convert(Value, other != null ? other.GetType() : typeof(object), null, null);
Interactivity\EventTrigger.cs (2)
80 _eventinfo = bindable.GetType().GetRuntimeEvent(Event); 85 Application.Current?.FindMauiContext()?.CreateLogger<EventTrigger>()?.LogWarning("Cannot attach EventTrigger to {Type}.{Event}. Check if the handler exists and if the signature is right.", bindable.GetType(), Event);
MultiBinding.cs (1)
220 types[i] = values[i]?.GetType() ?? typeof(object);
Page\Page.cs (1)
964 return $"{this.GetType().FullName}: {debugText}";
Platform\IElementExtensions.cs (1)
10 string typeName = $"{self?.Handler?.GetType().Name}";
PlatformBindingHelpers.cs (5)
44 var targetPropertyInfo = target.GetType().GetProperty(targetProperty); 84 var mi = target.GetType().GetProperty(targetProperty)?.SetMethod; 86 throw new InvalidOperationException(Format("Native Binding on {0}.{1} failed due to missing or inaccessible property", target.GetType(), targetProperty)); 95 SetValueFromRenderer(proxy, bindableProperty, target.GetType().GetProperty(targetProperty)?.GetMethod.Invoke(target, Array.Empty<object>())); 171 throw new ArgumentException(Format("No declared or accessible event {0} on {1}", updateSourceEventName, target.GetType()), nameof(updateSourceEventName));
Registrar.cs (7)
122 returnValue = GetHandler(type, visual?.GetType() ?? _defaultVisualType); 126 Type handlerType = GetHandlerType(type, visual?.GetType() ?? _defaultVisualType); 130 returnValue = (TRegistrable)DependencyResolver.ResolveOrCreate(handlerType, source, visual?.GetType(), args); 152 var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType(); 154 return GetHandler(type, (obj as IVisualController)?.EffectiveVisual?.GetType()) as TOut; 163 var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType(); 202 var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType();
RelativeBindingSource.cs (2)
166 AncestorType!.IsAssignableFrom(element.GetType()); 171 AncestorType!.IsAssignableFrom(element.BindingContext.GetType());
ResourceDictionary.cs (1)
412 var rootObjectType = (serviceProvider.GetService(typeof(Xaml.IRootObjectProvider)) as Xaml.IRootObjectProvider)?.RootObject.GetType();
Routing.cs (1)
134 return $"{DefaultPrefix}{bindable.GetType().Name}{++s_routeCount}";
Shell\Shell.cs (1)
1002 throw new InvalidOperationException($"Unable to determine the current Shell instance you want to use. Please access Shell via the Windows property on {Application.Current.GetType()}.");
Shell\ShellContent.cs (1)
377 var type = content.GetType();
Span.cs (2)
17 _mergedStyle = new MergedStyle(GetType(), this); 190 throw new InvalidOperationException($"{gesture.GetType().Name} is not supported on a {nameof(Span)}");
StyleableElement\StyleableElement.cs (1)
19 _mergedStyle = new MergedStyle(GetType(), this);
TypeConversionHelper.cs (5)
17 Type valueType = value.GetType(); 55 convertedValue = converter.ConvertTo(value, targetType) ?? throw new InvalidOperationException($"The {converter.GetType()} returned null when converting {valueType} to {targetType}"); 61 convertedValue = converter.ConvertFrom(value) ?? throw new InvalidOperationException($"The {converter.GetType()} returned null when converting from {valueType}"); 83 Type valueType = value.GetType(); 174 $"It is not possible to convert value of type {value.GetType()} to {targetType} via an implicit cast " +
TypedBinding.cs (2)
189 ? $"Cannot apply relative binding to {bindObj.GetType().FullName} because it is not a superclass of Element." 293 BindingDiagnostics.SendBindingFailure(this, "Binding", $"Mismatch between the specified x:DataType ({typeof(TSource)}) and the current binding context ({sourceObject.GetType()}).");
ViewExtensions.cs (1)
301 throw new ArgumentException($"Unable to find {nameof(IAnimationManager)} for '{animatable.GetType().FullName}'.", nameof(animatable));
VisualElement\VisualElement.cs (1)
2471 return $"{GetType().FullName}: {debugText}";
VisualElement\VisualElement_StyleSheet.cs (2)
24 if (styleAttribute.TargetType.IsAssignableFrom(GetType())) 39 var propertyOwnerType = styleAttribute.PropertyOwnerType ?? GetType();
Xaml\TypeConversionExtensions.cs (1)
219 if (value != null && !toType.IsAssignableFrom(value.GetType()))
Microsoft.Maui.Controls.BindingSourceGen (1)
AccessExpressionBuilder.cs (1)
18 _ => throw new NotSupportedException($"Unsupported path part type: {nextPart.GetType()}"),
Microsoft.Maui.Controls.Maps (2)
Pin.cs (2)
94 if (obj.GetType() != GetType())
Microsoft.Maui.Controls.SourceGen (1)
src\Controls\src\Xaml\XmlName.cs (1)
32 if (obj.GetType() != typeof(XmlName))
Microsoft.Maui.Controls.Xaml (46)
ApplyPropertiesVisitor.cs (26)
216 if (xpe == null && (addMethod = collection.GetType().GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1)) != null) 266 if (value.GetType().GetCustomAttribute<AcceptEmptyServiceProviderAttribute>() == null) 309 rootElement.GetType().Assembly, true, out xpe); 334 var bpOwnerType = xamlelement.GetType(); 341 var elementType = xamlelement.GetType(); 354 ResourceDictionaryHelpers.LoadFromSource(rd, (string)value, rootElement.GetType(), lineInfo); 377 var assemblyName = rootElement.GetType().Assembly?.GetName().Name; 383 var bpOwnerType = element.GetType(); 406 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 414 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 422 if (value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(rootElement) is string path) 438 var bpOwnerType = xamlElement.GetType(); 462 var elementType = element.GetType(); 473 var rootElementType = rootElement.GetType(); 517 exception = new XamlParseException($"No method {value} with correct signature found on type {rootElement.GetType()}", lineInfo); 525 var elementType = element.GetType(); 546 var elementType = element.GetType(); 578 var elementType = element.GetType(); 642 var elementType = element.GetType(); 659 var elementType = element.GetType(); 691 var elementType = element.GetType(); 723 if (method.IsPrivate && method.DeclaringType == rootElement.GetType()) 725 if ((method.IsAssembly || method.IsFamilyOrAssembly) && method.DeclaringType.AssemblyQualifiedName == rootElement.GetType().AssemblyQualifiedName) 727 if (method.IsFamily && method.DeclaringType.IsAssignableFrom(rootElement.GetType())) 744 var addMethod = collection.GetType().GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1); 836 var runTimeName = source.GetType().GetCustomAttribute<RuntimeNamePropertyAttribute>();
CreateValuesVisitor.cs (8)
51 var type = XamlParser.GetElementType(node.XmlType, node, Context.RootElement?.GetType().Assembly, true, 109 if (converted != null && converted.GetType() == type) 171 var assemblyName = (Context.RootAssembly ?? Context.RootElement?.GetType().Assembly)?.GetName().Name; 172 if (assemblyName != null && value != null && !value.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(Context.RootElement) is string path) 181 Context.Types[node] = rnode.Root.GetType(); 190 var assemblyName = (Context.RootAssembly ?? Context.RootElement.GetType().Assembly)?.GetName().Name; 191 if (rnode.Root != null && !rnode.Root.GetType().IsValueType && XamlFilePathAttribute.GetFilePathForObject(Context.RootElement) is string path) 252 Type[] types = arguments == null ? Array.Empty<Type>() : arguments.Select(a => a.GetType()).ToArray();
MarkupExpressionParser.cs (1)
69 var parser = Activator.CreateInstance(GetType()) as IExpressionParser;
MarkupExtensionParser.cs (5)
70 var t = markupExtension.GetType(); 87 setter = markupExtension.GetType().GetRuntimeProperty(prop).SetMethod; 91 throw new XamlParseException($"Multiple properties with name '{markupExtension.GetType()}.{prop}' found.", serviceProvider, innerException: e); 99 value = strValue.ConvertTo(markupExtension.GetType().GetRuntimeProperty(prop).PropertyType, 106 throw new XamlParseException($"Multiple properties with name '{markupExtension.GetType()}.{prop}' found.", serviceProvider, innerException: e);
MarkupExtensions\StaticResourceExtension.cs (1)
42 Type valueType = value.GetType();
MarkupExtensions\StyleSheetExtension.cs (1)
32 var rootObjectType = (serviceProvider.GetService(typeof(IRootObjectProvider)) as IRootObjectProvider)?.RootObject.GetType();
XamlFilePathAttribute.cs (1)
15 internal static string GetFilePathForObject(object view) => (view?.GetType().GetCustomAttributes(typeof(XamlFilePathAttribute), false).FirstOrDefault() as XamlFilePathAttribute)?.FilePath;
XamlLoader.cs (1)
85 RootAssembly = rootAssembly ?? view.GetType().Assembly,
XamlServiceProvider.cs (1)
337 context.RootElement.GetType().Assembly, true, out var xpe) is Type parentType
XmlName.cs (1)
32 if (obj.GetType() != typeof(XmlName))
Microsoft.Maui.Essentials (2)
Types\Location.shared.cs (2)
255 if (obj.GetType() != GetType())
Microsoft.ML.AutoML (12)
API\BinaryClassificationExperiment.cs (1)
445throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\MulticlassClassificationExperiment.cs (1)
423throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\RegressionExperiment.cs (1)
450throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
AutoMLExperiment\AutoMLExperiment.cs (1)
224var mostRecentAddedStopServices = stopServices.GroupBy(s => s.GetType()).Select(g => g.Last()).ToList();
TrainerExtensions\TrainerExtensionCatalog.cs (1)
54return _extensionTypesToTrainerNames[trainerExtension.GetType()];
TrainerExtensions\TrainerExtensionUtil.cs (3)
239if (propertyType == value?.GetType()) 264var fi = obj.GetType().GetField(param.Name); 296throw new InvalidOperationException($"Cannot set parameter {param.Name} for {obj.GetType()}");
Utils\SweepableParamAttributes.cs (4)
94var type = o.GetType(); 115return $"[{GetType().Name}({name}new object[]{{{string.Join(", ", Options.Select(TranslateOption))}}})]"; 164return $"[{GetType().Name}({name}{Min}f, {Max}f{optional})]"; 211return $"[{GetType().Name}({name}{Min}, {Max}{optional})]";
Microsoft.ML.AutoML.SourceGenerator (5)
Template\EstimatorType.cs (1)
306System.Type t = objectToConvert.GetType();
Template\SearchSpace.cs (1)
323System.Type t = objectToConvert.GetType();
Template\SweepableEstimator.cs (1)
325System.Type t = objectToConvert.GetType();
Template\SweepableEstimator_T_.cs (1)
330System.Type t = objectToConvert.GetType();
Template\SweepableEstimatorFactory.cs (1)
301System.Type t = objectToConvert.GetType();
Microsoft.ML.AutoML.Tests (3)
Utils\TaskAgnosticIterationResult.cs (3)
76if (!supportedTypes.Contains(metric.GetType())) 81var propertiesToReport = metric.GetType().GetProperties().Where(p => p.PropertyType == typeof(double)); 83return propertiesToReport.ToDictionary(p => p.Name, p => (double)metric.GetType().GetProperty(p.Name).GetValue(metric));
Microsoft.ML.CodeGenerator (12)
CodeGenerator\CSharp\TrainerGeneratorBase.cs (2)
63Type type = kv.Value.GetType(); 145if (kv.Value.GetType() == typeof(CustomProperty))
Templates\Azure\Console\AzureModelBuilder.cs (1)
400System.Type t = objectToConvert.GetType();
Templates\Azure\Model\AzureImageModelOutputClass.cs (1)
341System.Type t = objectToConvert.GetType();
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (1)
341System.Type t = objectToConvert.GetType();
Templates\Console\ConsumeModel.cs (1)
352System.Type t = objectToConvert.GetType();
Templates\Console\ModelBuilder.cs (1)
717System.Type t = objectToConvert.GetType();
Templates\Console\ModelInputClass.cs (1)
315System.Type t = objectToConvert.GetType();
Templates\Console\ModelOutputClass.cs (1)
358System.Type t = objectToConvert.GetType();
Templates\Console\ModelProject.cs (1)
347System.Type t = objectToConvert.GetType();
Templates\Console\PredictProgram.cs (1)
374System.Type t = objectToConvert.GetType();
Templates\Console\PredictProject.cs (1)
352System.Type t = objectToConvert.GetType();
Microsoft.ML.Core (25)
CommandLine\CmdParser.cs (11)
259var destinationType = destination.GetType(); 282return ParseArguments(env, settings, destination, destination.GetType(), reporter); 295var info = GetArgumentInfo(destination.GetType(), destination); 335Type t1 = values.GetType(); 336Type t2 = defaults.GetType(); 354Type t1 = values.GetType(); 355Type t2 = defaults.GetType(); 374var info = GetArgumentInfo(values.GetType(), null); 1927var type = value.GetType(); 2035var type = value.GetType(); 2110var type = value.GetType();
ComponentModel\ComponentCatalog.cs (1)
1087var key = (AttributeType: attribute.GetType(), attribute.ContractName);
Data\ServerChannel.cs (1)
186var field = factory.GetType().GetField("Port");
EntryPoints\EntryPointUtils.cs (1)
56foreach (var fieldInfo in args.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
EntryPoints\ModuleArgs.cs (6)
238_type = val.GetType(); 241Contracts.Check(_type == val.GetType(), "All Range attribute values must be of the same type"); 374var type = o.GetType(); 395return $"[TlcModule.{GetType().Name}({name}new object[]{{{string.Join(", ", Options.Select(TranslateOption))}}})]"; 448return $"[TlcModule.{GetType().Name}({name}{Min}f, {Max}f{optional})]"; 499return $"[TlcModule.{GetType().Name}({name}{Min}, {Max}{optional})]";
SearchSpace\ChoiceAttribute.cs (3)
22var candidatesType = candidates.Select(o => o.GetType()).Distinct(); 33var candidatesType = candidates.Select(o => o.GetType()).Distinct(); 35Contract.Assert(candidatesType.First() == defaultValue.GetType(), "candidates type doesn't match with defaultValue type");
Utilities\ResourceManagerUtils.cs (1)
315if (request.GetType() == typeof(FileWebRequest))
Utilities\Utils.cs (1)
1248Type type = value.GetType();
Microsoft.ML.Data (63)
Commands\ShowSchemaCommand.cs (1)
94writer.WriteLine("---- {0} ----", view.GetType().Name);
Data\DataViewTypeManager.cs (3)
60typeAttributes = typeAttributes.Where(attr => attr.GetType().IsSubclassOf(typeof(DataViewTypeAttribute))); 95typeAttributes = typeAttributes.Where(attr => attr.GetType().IsSubclassOf(typeof(DataViewTypeAttribute))); 157if (!attr.GetType().IsSubclassOf(typeof(DataViewTypeAttribute)))
Data\DataViewUtils.cs (2)
1132$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'."); 1323$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
DataLoadSave\Binary\BinaryLoader.cs (1)
2043$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
DataLoadSave\Binary\BinarySaver.cs (1)
851_host.CheckParam(value.GetType() == type.RawType, nameof(value), "Value doesn't match type");
DataLoadSave\Database\DatabaseLoaderCursor.cs (1)
167$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
DataLoadSave\Text\TextLoaderCursor.cs (1)
326$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
DataLoadSave\Transpose\TransposeLoader.cs (2)
697$"expected type: '{_getter.GetType().GetGenericArguments().First().GetGenericArguments().First()}'."); 891$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
DataView\AppendRowsDataView.cs (1)
197$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
DataView\ArrayDataViewBuilder.cs (1)
88values.GetType().GetElementType().TryGetDataKind(out InternalDataKind kind);
DataView\BatchDataViewMapperBase.cs (1)
126$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
DataView\CacheDataView.cs (1)
1213$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
DataView\DataViewConstructionUtils.cs (1)
438$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
DataView\RowToRowMapperTransform.cs (2)
341$"expected type: '{originFn.GetType().GetGenericArguments().First()}'."); 408$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
DataView\Transposer.cs (3)
321$"expected type: '{_getter.GetType().GetGenericArguments().First().GetGenericArguments().First()}'."); 1175$"expected type: '{originFn.GetType().GetGenericArguments().First()}'."); 1508$"expected type: '{_getter.GetType().GetGenericArguments().First()}'.");
Dirty\PredictorUtils.cs (13)
30writer.WriteLine("'{0}' does not support saving summary", predictor.GetType().Name); 31ch.Error("'{0}' does not support saving summary", predictor.GetType().Name); 55writer.WriteLine("'{0}' does not support saving in text format, writing out model summary instead", predictor.GetType().Name); 57predictor.GetType().Name); 62writer.WriteLine("'{0}' does not support saving in text format", predictor.GetType().Name); 63ch.Error("'{0}' doesn't currently have standardized text format for /mt", predictor.GetType().Name); 76ch.Error("'{0}' doesn't currently have standardized binary format for /mb", predictor.GetType().Name); 102writer.WriteLine("'{0}' does not support saving in INI format, writing out model summary instead", predictor.GetType().Name); 104predictor.GetType().Name); 109writer.WriteLine("'{0}' does not support saving in INI format", predictor.GetType().Name); 110ch.Error("'{0}' doesn't currently have standardized INI format output", predictor.GetType().Name); 129writer.WriteLine("'{0}' does not support saving in code.", predictor.GetType().Name); 130ch.Error("'{0}' doesn't currently support saving the model as code", predictor.GetType().Name);
EntryPoints\EntryPointNode.cs (4)
234_ectx.Assert(value == null || Type.IsAssignableFrom(value.GetType())); 544var inputColName = inputInstance.GetType().GetField(colField).GetValue(inputInstance); 854_host.Assert(bindings.Skip(1).All(binding => binding.GetType().Equals(firstBinding.GetType())));
EntryPoints\InputBuilder.cs (5)
220Contracts.Check(instance.GetType() == _type); 276var type = instanceVal.GetType(); 356var deftype = defaultsVal.GetType(); 540throw ectx.Except($"Unexpected value type: {value.GetType()}"); 719_ectx.Check(output.GetType() == _type);
EntryPoints\SummarizePredictor.cs (1)
89bldr.AddColumn("PredictorName", predictor.GetType().ToString());
Model\Pfa\SavePfaCommand.cs (1)
112ch.Warning("Had to stop walkback of pipeline at {0} since it cannot save itself as PFA", transform.GetType().Name);
Prediction\Calibrator.cs (4)
819Type[] genericTypeArgs = { predictor.GetType(), calibrator.GetType() }; 825predictor.GetType(), 826calibrator.GetType()
Scorers\PredictionTransformer.cs (2)
790var genericCtor = CreateConstructor(model.GetType(), predictionTransformerType); 801var genericCtor = CreateConstructor(model.GetType(), predictionTransformerType);
Scorers\RowToRowScorerBase.cs (1)
304$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
TrainCatalog.cs (1)
121var type = o.GetType();
Training\TrainerUtils.cs (1)
452throw _env.Except($"Training resulted in a model of type {model.GetType().Name}.");
Transforms\GenerateNumberTransform.cs (1)
447$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
Transforms\LabelConvertTransform.cs (1)
228$"expected type: '{_getter.GetType().GetGenericArguments().First().GetGenericArguments().First()}'.");
Transforms\NAFilter.cs (1)
433$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
Transforms\PerGroupTransformBase.cs (1)
309$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
Transforms\RangeFilter.cs (1)
328$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
Transforms\RowShufflingTransformer.cs (1)
721$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
Transforms\TransformBase.cs (2)
237$"expected type: '{originFn.GetType().GetGenericArguments().First()}'."); 911$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
215throw new ArgumentNullException(nameof(getter), $"Getter of type '{typeof(TValue)}' expected, but {getter.GetType()} found");
Microsoft.ML.Ensemble (6)
PipelineEnsemble.cs (2)
577writer.WriteLine("Model of type {0}", PredictorModels[i].Predictor.GetType().Name); 715list.Add(new KeyValuePair<string, object>(key, PredictorModels[i].Predictor.GetType().Name));
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
49Contracts.Assert(value.GetType() == type);
Selector\SubModelSelector\BaseSubModelSelector.cs (1)
48ch.Info("| {0} |{1}", metric, model.Predictor.GetType().Name);
Trainer\EnsembleModelParametersBase.cs (1)
158writer.WriteLine("The Model {0} does not support saving summaries", Models[i].GetType().Name);
Trainer\EnsembleTrainerBase.cs (1)
218ch.Info("{0}{1}", string.Join("", model.Metrics.Select(m => string.Format("| {0} |", m.Value))), model.Predictor.GetType().Name);
Microsoft.ML.EntryPoints (4)
JsonUtils\ExecuteGraphCommand.cs (2)
171if (ipmArray != null && !ipmArray.GetType().IsValueType) 178if (idvArray != null && !idvArray.GetType().IsValueType)
JsonUtils\JsonManifestUtils.cs (2)
429ja.Add(BuildValueToken(ectx, item, item.GetType(), catalog)); 458var type = value.GetType();
Microsoft.ML.FastTree (6)
Dataset\Dataset.cs (5)
409Type arrayDataType = Data.GetType().GetElementType(); 679Type arrayDataType = qddata.Data.GetType().GetElementType(); 841Type t = arrays.First(x => x != null).GetType().GetElementType(); 843if (arrays.Any(x => x != null && t != x.GetType().GetElementType())) 845IEnumerable<string> typeNameEnumerable = arrays.Select(x => x.GetType().GetElementType()).Distinct().Select(x => x.Name).OrderBy(n => n);
Utils\FastTreeIniFileUtils.cs (1)
50newSection.AppendLine("Type=" + calibrator.GetType().Name);
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
88serviceType.IsAssignableFrom(GetType()) ? this :
Microsoft.ML.GenAI.LLaMA (1)
Llama3_1ChatTemplateBuilder.cs (1)
69throw new NotSupportedException($"Only text content is supported, but got {item.GetType().Name}");
Microsoft.ML.GenAI.Phi (1)
Phi3\Phi3ChatTemplateBuilder.cs (1)
72throw new NotSupportedException($"Only text content is supported, but got {item.GetType().Name}");
Microsoft.ML.IntegrationTests (4)
Debugging.cs (1)
152rowSum += (float)row.GetType().GetProperty(property).GetValue(row, null);
IntegrationTestBaseClass.cs (1)
53ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
IntrospectiveTraining.cs (1)
375string value = (string)row.GetType().GetProperty(Adult.CategoricalFeatures[i]).GetValue(row, null);
Prediction.cs (1)
117var field = model.GetType().BaseType.BaseType.GetField("_disposed", bfIsDisposed);
Microsoft.ML.InternalCodeAnalyzer (1)
InstanceInitializerAnalyzer.cs (1)
52var typeInfo = symbol.GetType().GetTypeInfo();
Microsoft.ML.KMeansClustering (1)
KMeansModelParameters.cs (1)
139WarnOnOldNormalizer(ctx, GetType(), Host);
Microsoft.ML.LightGbm (2)
LightGbmArguments.cs (1)
179FieldInfo[] fields = BoosterOptions.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
LightGbmTrainerBase.cs (1)
417Type optionsType = LightGbmTrainerOptions.GetType();
Microsoft.ML.Maml (2)
HelpCommand.cs (2)
243writer.WriteLine(CmdParser.ArgumentsUsage(_env, args.GetType(), args, false, columns)); 480from a in CmdParser.GetArgInfo(c.Args.GetType(), c.Args).Args
Microsoft.ML.OnnxConverter (1)
SaveOnnxCommand.cs (1)
151ch.Warning("Had to stop walkback of pipeline at {0} since it cannot save itself as ONNX.", transform.GetType().Name);
Microsoft.ML.Parquet (3)
ParquetLoader.cs (2)
606$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'."); 763if (enu.Current is IList && enu.Current.GetType().IsGenericType)
PartitionedFileLoader.cs (1)
428$"expected type: '{originGetter.GetType().GetGenericArguments().First()}'.");
Microsoft.ML.PCA (1)
PcaTrainer.cs (1)
514WarnOnOldNormalizer(ctx, GetType(), Host);
Microsoft.ML.Predictor.Tests (1)
CmdLine\CmdLine.cs (1)
103wrt.WriteLine(CmdParser.ArgumentsUsage(env, defaults.GetType(), defaults, false, 200));
Microsoft.ML.SearchSpace (1)
Parameter.cs (1)
183Enum e => Parameter.FromEnum(e, e.GetType()),
Microsoft.ML.StandardTrainers (6)
LdSvm\LdSvmModelParameters.cs (1)
119WarnOnOldNormalizer(ctx, GetType(), Host);
Standard\LinearModelParameters.cs (4)
203WarnOnOldNormalizer(ctx, GetType(), Host); 329Type type = GetType(); 331Contracts.Check(type == models[0].GetType(), "Submodel for parameter mixer has the wrong type"); 341Contracts.Check(type == m.GetType(), "Submodel for parameter mixer has the wrong type");
Standard\LogisticRegression\MulticlassLogisticRegression.cs (1)
604WarnOnOldNormalizer(ctx, GetType(), Host);
Microsoft.ML.TestFramework (2)
BaseTestClass.cs (1)
61ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
SubComponent.cs (1)
218var dst = Create(type ?? src.GetType());
Microsoft.ML.Tests (10)
CalibratedModelParametersTests.cs (9)
39Assert.Equal(expectedInternalType, castedModel.Model.GetType()); 40Assert.Equal(model.Model.GetType(), castedModel.Model.GetType()); 61Assert.Equal(expectedInternalType, castedModel.Model.GetType()); 62Assert.Equal(model.Model.GetType(), castedModel.Model.GetType()); 84Assert.Equal(expectedInternalType, castedModel.Model.GetType()); 85Assert.Equal(model.Model.GetType(), castedModel.Model.GetType());
CollectionsDataViewTest.cs (1)
101if (!CompareObjectValues(x.GetValue(i), y.GetValue(i), x.GetType().GetElementType()))
Microsoft.ML.TimeSeries (2)
SequentialTransformerBase.cs (2)
995$"expected type: '{originFn.GetType().GetGenericArguments().First()}'."); 1067$"expected type: '{getter.GetType().GetGenericArguments().First()}'.");
Microsoft.ML.Tokenizers (2)
ModelSourceGenerationContext.g.cs (2)
67throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.ML.TorchSharp (4)
AutoFormerV2\AutoformerV2.cs (4)
66if (layer.GetType() == typeof(BatchNorm2d)) 100if (layer.GetType() == typeof(Linear)) 112else if (layer.GetType() == typeof(LayerNorm)) 124else if (layer.GetType() == typeof(BatchNorm2d))
Microsoft.ML.Transforms (17)
Expression\BuiltinFunctions.cs (1)
37Type type = v.GetType();
Expression\LambdaBinder.cs (3)
1429if (res != null && res.GetType() != best.Method.ReturnType) 1433node.Head.Value, best.Provider.NameSpace, res.GetType(), best.Method.ReturnType)); 1456_host.Assert(res.GetType() == best.Method.ReturnType);
Expression\Node.cs (1)
335Contracts.Assert(value == null || value.GetType() == ToSysType(kind));
ExpressionTransformer.cs (2)
427var types = _columns[iinfo].Del.GetType().GetGenericArguments(); 569var types = _columns[iinfo].Del.GetType().GetGenericArguments();
MissingValueReplacing.cs (5)
249Host.Assert(repValue.GetType() == _replaceTypes[i].RawType || repValue.GetType() == _replaceTypes[i].GetItemType().RawType); 519Host.Assert(repValue.GetType() == _replaceTypes[iinfo].RawType || repValue.GetType() == _replaceTypes[iinfo].GetItemType().RawType); 520var meth = func.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(repValue.GetType());
OptionalColumnTransform.cs (1)
493$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
PermutationFeatureImportanceExtensions.cs (1)
684var predictionTransformerGenericType = GetImplementedIPredictionTransformer(lastTransformer.GetType());
ProduceIdTransform.cs (1)
223$"expected type: '{idGetter.GetType().GetGenericArguments().First()}'.");
StatefulCustomMappingTransformer.cs (1)
326$"expected type: '{originFn.GetType().GetGenericArguments().First()}'.");
SvmLight\SvmLightLoader.cs (1)
487$"expected type: '{_getter.GetType().GetGenericArguments().First()}'.");
Microsoft.NET.Build.Containers (2)
src\sdk\src\Common\VSHostObject.cs (1)
74string? rawTaskItems = (string?)_hostObject!.GetType().InvokeMember(
VSHostObject.cs (1)
66string? rawTaskItems = (string?)_hostObject!.GetType().InvokeMember(
Microsoft.NET.Build.Tasks (7)
_generated\13\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\21\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\7\SdkVulnerabilitySummaryContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (1)
129throw new WorkloadManifestCompositionException(Strings.DuplicateManifestID, manifestProvider.GetType().FullName, readableManifest.ManifestId, readableManifest.ManifestPath, existingManifest.ManifestPath);
Microsoft.NET.Sdk.Publish.Tasks (4)
MsDeploy\DynamicAssembly.cs (2)
119argumentTypes = arguments.Select(p => p.GetType()).ToArray(); 157MethodInfo? invokeMethod = d?.GetType().GetMethod("Invoke");
src\sdk\src\Common\VSHostObject.cs (1)
74string? rawTaskItems = (string?)_hostObject!.GetType().InvokeMember(
Tasks\MsDeploy\VsMsdeploy.cs (1)
906return GetType().Name;
Microsoft.NET.Sdk.StaticWebAssets.Tasks (6)
_generated\29\StaticWebAssetsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\42\DefineStaticWebAssetsSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\49\ImportMapSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Microsoft.NET.Sdk.WorkloadManifestReader (5)
_generated\11\InstallStateJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\3\WorkloadSetJsonSerializerContext.g.cs (2)
77throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 85throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
WorkloadResolver.cs (1)
129throw new WorkloadManifestCompositionException(Strings.DuplicateManifestID, manifestProvider.GetType().FullName, readableManifest.ManifestId, readableManifest.ManifestPath, existingManifest.ManifestPath);
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (1)
CachingWorkloadResolver.cs (1)
96throw new InvalidOperationException("Unknown resolutionResult type: " + GetType());
Microsoft.Private.Windows.Core (11)
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs (1)
25/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
System\DisposalTracking.cs (1)
57throw new InvalidOperationException($"Did not dispose `{GetFriendlyTypeName(GetType())}`. Originating stack:\n{_originatingStack}");
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
293Type type = primitive.GetType(); 402Type type = list.GetType(); 505PrimitiveType primitiveType = array.GetType().GetElementType()!.GetPrimitiveType(); 678Type type = value.GetType();
System\Private\Windows\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
33PrimitiveType primitiveType = value.GetType().GetPrimitiveType();
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (1)
297_ when format == DataFormatNames.Serializable || data is ISerializable || data.GetType().IsSerializable
System\Private\Windows\Ole\DataStore.cs (1)
127SetData(data.GetType(), data);
System\Value.cs (1)
51type = _object.GetType();
Windows\Win32\System\Com\ComHelpers.cs (1)
113Debug.WriteLine($"Did not find IUnknown for {@object.GetType().Name}. {ex.Message}");
Microsoft.TemplateEngine.Cli (8)
CliTemplateParameter.cs (1)
177Debug.Fail($"Unexpected Option type: {option.GetType()}");
Commands\BaseCommand.cs (4)
216.DefineColumn(mp => mp.GetType().FullName ?? string.Empty, LocalizableStrings.Type, showAlways: true) 217.DefineColumn(mp => mp.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty, LocalizableStrings.Assembly, showAlways: true); 227.DefineColumn(g => g.GetType().FullName ?? string.Empty, LocalizableStrings.Type, showAlways: true) 228.DefineColumn(g => g.GetType().GetTypeInfo().Assembly.FullName ?? string.Empty, LocalizableStrings.Assembly, showAlways: true);
TemplatePackageDisplay.cs (1)
207throw new InvalidOperationException($"Unexpected result: {result.GetType()}");
TemplateResolution\TemplateGroupMatchInfo.cs (1)
294.Where(match => match.GetType() != typeof(ParameterMatchInfo))
TemplateResolution\TemplateResolutionResult.cs (1)
294matchInfo.GetType() == typeof(ParameterMatchInfo)
Microsoft.TemplateEngine.Core (23)
Expressions\OperatorSetBuilder.cs (23)
356throw new Exception($"Unable to logical and {left?.GetType()} and {right?.GetType()}"); 366throw new Exception($"Unable to bitwise and {left?.GetType()} and {right?.GetType()}"); 376throw new Exception($"Unable to bitwise or {left?.GetType()} and {right?.GetType()}"); 409throw new Exception($"Cannot divide {left?.GetType()} and {right?.GetType()}"); 442throw new Exception($"Cannot exponentiate {left?.GetType()} and {right?.GetType()}"); 452throw new Exception($"Unable to left shift {left?.GetType()} and {right?.GetType()}"); 485throw new Exception($"Cannot multiply {left?.GetType()} and {right?.GetType()}"); 495throw new Exception($"Unable to logical not {operand?.GetType()}"); 515throw new Exception($"Unable to logical or {left?.GetType()} and {right?.GetType()}"); 525throw new Exception($"Unable to right shift {left?.GetType()} and {right?.GetType()}"); 566throw new Exception($"Cannot subtract {left?.GetType()} and {right?.GetType()}"); 604throw new Exception($"Can't xor {left?.GetType()} and {right?.GetType()}");
Microsoft.TemplateEngine.Edge (7)
_generated\17\SettingsStoreJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\43\TemplateCacheJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\7\GlobalSettingsJsonSerializerContext.g.cs (2)
75throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 83throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Settings\ComponentManager.cs (1)
277throw new ArgumentException($"{component.GetType().Name} should be assignable from {type.Name} type", nameof(type));
Microsoft.TemplateEngine.Utils (2)
MultiValueParameter.cs (2)
80if (obj.GetType() != this.GetType())
Microsoft.TestPlatform.Build (1)
Tasks\VSTestTask.cs (1)
69var allowFailureWithoutError = BuildEngine.GetType().GetProperty("AllowFailureWithoutError");
Microsoft.TestPlatform.CommunicationUtilities (7)
Json\Jsonite\Jsonite.cs (1)
1038var type = value.GetType();
Serialization\ObjectConverter.cs (2)
66JsonSerializer.Serialize(writer, value, value.GetType(), options); 123JsonSerializer.Serialize(writer, kvp.Value, kvp.Value?.GetType() ?? typeof(object), options);
Serialization\TestCaseConverterV2.cs (1)
102JsonSerializer.Serialize(writer, property.Value, property.Value.GetType(), options);
Serialization\TestObjectBaseConverter.cs (1)
100JsonSerializer.Serialize(writer, property.Value, property.Value.GetType(), options);
Serialization\TestObjectConverter.cs (1)
86JsonSerializer.Serialize(writer, kvp.Value, kvp.Value.GetType(), options);
Serialization\TestResultConverterV2.cs (1)
147JsonSerializer.Serialize(writer, property.Value, property.Value.GetType(), options);
Microsoft.TestPlatform.CrossPlatEngine (26)
AttachmentsProcessing\TestRunAttachmentsProcessingManager.cs (3)
128EqtTrace.Error($"TestRunAttachmentsProcessingManager: Non incremental attachment processors are not supported, '{dataCollectorAttachmentsProcessor.DataCollectorAttachmentProcessorInstance.GetType()}'"); 129logger.SendMessage(TestMessageLevel.Error, $"Non incremental attachment processors are not supported '{dataCollectorAttachmentsProcessor.DataCollectorAttachmentProcessorInstance.GetType()}'"); 170EqtTrace.Info($"TestRunAttachmentsProcessingManager: Invocation of data collector attachment processor AssemblyQualifiedName: '{dataCollectorAttachmentsProcessor.DataCollectorAttachmentProcessorInstance.GetType().AssemblyQualifiedName}' FriendlyName: '{dataCollectorAttachmentsProcessor.FriendlyName}' with configuration '{(configuration == null ? "null" : configuration.OuterXml)}'");
Client\ProxyOperationManager.cs (2)
428var friendlyNameAttribute = TestHostManager.GetType().GetCustomAttributes( 479var properties = TestHostManager.GetType().GetRuntimeProperties();
Client\TestLoggerManager.cs (9)
367if (_initializedLoggers.Contains(logger.Value.GetType())) 369EqtTrace.Verbose("TestLoggerManager: Skipping duplicate logger initialization: {0}", logger.Value.GetType()); 379_initializedLoggers.Add(logger.Value.GetType()); 555if (_initializedLoggers.Contains(logger.GetType())) 557EqtTrace.Verbose("TestLoggerManager: Skipping duplicate logger initialization: {0}", logger.GetType()); 567_initializedLoggers.Add(logger.GetType()); 602"TestLoggerManager: Incorrect logger type: {0}", logger.GetType()); 608var loggerUri = extensionUri.IsNullOrEmpty() ? logger.GetType().ToString() : extensionUri; 618extensionUri.IsNullOrEmpty() ? logger.GetType().ToString() : extensionUri,
DataCollection\InProcDataCollector.cs (3)
116var methodInfo = GetMethodInfoFromType(_dataCollectorObject?.GetType(), methodName, [methodArg.GetType()]); 132var initializeMethodInfo = GetMethodInfoFromType(obj?.GetType(), "Initialize", [typeof(IDataCollectionSink)]);
Discovery\DiscovererEnumerator.cs (4)
214discoverer.Value.GetType().FullName); 241discoverer.Value.GetType().FullName); 276discovererType = discoverer.Value.GetType(); 299var discovererLocation = discoverer.Value.GetType().Assembly.GetAssemblyLocation();
Execution\BaseRunTests.cs (3)
313EqtTrace.Info("{0}.Cancel threw an exception: {1} ", executor.GetType().FullName, e); 492? serialTestRunDecorator.OriginalTestExecutor.GetType() 493: executor.Value.GetType();
TestEngine.cs (2)
257EqtTrace.Verbose($"TestEngine.GetExecutionManager: Chosen execution manager '{executionManager.GetType().AssemblyQualifiedName}' ParallelLevel '{parallelLevel}'."); 467testRuntimeProviders.Add(new TestRuntimeProviderInfo(testRuntimeProvider.GetType(), testRuntimeProvider.Shared,
Microsoft.TestPlatform.Utilities (1)
CodeCoverageDataAttachmentsHandler.cs (1)
135if (task.GetType().GetProperty("Result")!.GetValue(task, null) is not IList<string> mergedResults)
Microsoft.TestUtilities (1)
XUnit\ConditionalTheoryDiscoverer.cs (1)
57var type = obj.GetType();
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()
Microsoft.VisualStudio.TestPlatform.Common (10)
DataCollection\DataCollectionManager.cs (2)
511if (RunDataCollectors.ContainsKey(dataCollector.GetType())) 753RunDataCollectors.Remove(dataCollectorToRemove.DataCollector.GetType());
DataCollection\DataCollectorInformation.cs (2)
164EqtTrace.Verbose("dataCollectorInfo.DisposeDataCollector: calling Dispose() on {0}", DataCollector.GetType()); 170EqtTrace.Error("DataCollectorInfo.DisposeDataCollector: exception while calling Dispose() on {0}: " + ex, DataCollector.GetType());
DataCollection\TestPlatformDataCollectionEvents.cs (2)
82if (_eventArgsToEventInvokerMap.TryGetValue(e.GetType(), out var onEvent)) 88EqtTrace.Fail("TestPlatformDataCollectionEvents.RaiseEvent: Unrecognized data collection event of type {0}.", e.GetType().FullName);
DataCollection\TestPlatformDataCollectionLogger.cs (2)
67if (context.GetType() != typeof(DataCollectionContext)) 132if (context.GetType() != typeof(DataCollectionContext))
Hosting\TestRunTimeProviderManager.cs (1)
53return (ITestRuntimeProvider?)Activator.CreateInstance(testExtension.Value.GetType());
Utilities\TypesToLoadUtilities.cs (1)
30var type = attribute.GetType();
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (1)
HtmlTransformer.cs (1)
23using var reader = XmlReader.Create(GetType().Assembly.GetManifestResourceStream("Microsoft.VisualStudio.TestPlatform.Extensions.HtmlLogger.Html.xslt") ?? throw new InvalidOperationException(), new XmlReaderSettings { CheckCharacters = false, CloseInput = true });
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (3)
XML\XmlPersistence.cs (3)
193Type type = requestedType ?? instance.GetType(); 619Type valueType = value.GetType(); 772toReturn.ElementName ??= persistee.GetType().Name;
Microsoft.VisualStudio.TestPlatform.ObjectModel (6)
Client\TestRunCriteria.cs (4)
649return obj.GetType() == GetType() && Equals((TestRunCriteria)obj); 865return obj.GetType() == GetType() && Equals((BaseTestRunCriteria)obj);
TestObject.cs (1)
251if (valueType != null && (valueType.IsAssignableFrom(typeof(T)) || valueType.IsAssignableFrom(value?.GetType())))
Utilities\AssemblyHelper.cs (1)
334.Where(i => i.GetType().FullName == fullyQualifiedName);
Microsoft.Web.XmlTransform (10)
NamedTypeFactory.cs (2)
25AddAssemblyRegistration(GetType().Assembly, GetType().Namespace);
XmlLocator.cs (3)
126throw new XmlTransformationException(string.Format(System.Globalization.CultureInfo.CurrentCulture,Resources.XMLTRANSFORMATION_RequiresMinimumArguments, GetType().Name, min)); 134throw new XmlTransformationException(string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.XMLTRANSFORMATION_RequiresExactArguments, GetType().Name, min)); 141throw new XmlTransformationException(string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.XMLTRANSFORMATION_TooManyArguments, GetType().Name));
XmlTransform.cs (1)
184return GetType().Name;
XmlTransformation.cs (2)
86transformationServiceContainer.AddService(namedTypeFactory.GetType(), namedTypeFactory); 89transformationServiceContainer.AddService(logger.GetType(), logger);
XmlTransforms.cs (2)
118throw new XmlTransformationException(string.Format(System.Globalization.CultureInfo.CurrentCulture,Resources.XMLTRANSFORMATION_InsertMissingArgument, GetType().Name)); 121throw new XmlTransformationException(string.Format(System.Globalization.CultureInfo.CurrentCulture,Resources.XMLTRANSFORMATION_InsertTooManyArguments, GetType().Name));
Microsoft.Win32.Registry (1)
Microsoft\Win32\RegistryKey.cs (1)
1393throw new ArgumentException(SR.Format(SR.Arg_RegSetBadArrType, value.GetType().Name));
Mono.Cecil (5)
Mono.Cecil\AssemblyWriter.cs (4)
1919 return GetConstantType (constant.GetType ()); 1950 return GetConstantType (constant.GetType ()); 3061 switch (Type.GetTypeCode (value.GetType ())) { 3099 throw new NotSupportedException (value.GetType ().FullName);
Mono.Collections.Generic\Collection.cs (1)
406 throw new ObjectDisposedException (GetType ().FullName);
MSBuild (15)
OutOfProcTaskAppDomainWrapperBase.cs (2)
369PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 404PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskHostNode.cs (4)
944ErrorUtilities.ThrowInternalError($"HandleCallbackResponse called with non-callback packet type: {packet.GetType().Name}"); 1026$"Unexpected callback response type: expected {typeof(TResponse).Name}, got {response?.GetType().Name ?? "null"}"); 1736if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1741LogWarningFromResource("ExpectedEventToBeSerializable", e.GetType().Name);
src\msbuild\src\Shared\ErrorUtilities.cs (2)
65if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 67ThrowInternalError($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (2)
388Type eventDerivedType = _buildEvent.GetType(); 560Type eventType = eventArg.GetType();
src\msbuild\src\Shared\ResourceUtilities.cs (3)
425if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 426param.GetType() != typeof(string)) 428ErrorUtilities.ThrowInternalError($"Invalid resource parameter type, was {param.GetType().FullName}");
src\msbuild\src\Shared\TaskParameter.cs (1)
107Type wrappedParameterType = wrappedParameter.GetType();
XMake.cs (1)
1365Type t1 = loggers[0].GetType();
NuGet.CommandLine.XPlat (2)
_generated\35\PackageSearchJsonContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
NuGet.Configuration (4)
Settings\Items\AddItem.cs (2)
109if (item == null || item.GetType() != GetType())
Settings\SettingItem.cs (2)
59if (setting.GetType() != GetType())
NuGet.Packaging (2)
_generated\3\NupkgMetadataSerializationContext.g.cs (2)
78throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 86throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
NuGet.ProjectModel (4)
_generated\11\CacheFileSourceGen.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\22\AssetsLogMessageSourceGen.g.cs (2)
74throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 82throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
NuGet.Protocol (7)
_generated\23\JsonContext.g.cs (2)
81throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 89throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
_generated\35\RepositorySignatureJsonContext.g.cs (2)
80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 88throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Plugins\InboundRequestProcessingHandler.cs (1)
82throw new ObjectDisposedException(GetType().Name);
Plugins\Receiver.cs (1)
89throw new ObjectDisposedException(GetType().Name);
Utility\DedicatedAsynchronousProcessingThread.cs (1)
111throw new ObjectDisposedException(GetType().Name);
NuGet.Versioning (4)
SemanticVersionBase.cs (1)
65var formatter = formatProvider.GetFormat(GetType()) as ICustomFormatter;
VersionFormatter.cs (1)
37throw ResourcesFormatter.TypeNotSupported(arg.GetType(), nameof(arg));
VersionRange.cs (1)
195var formatter = formatProvider.GetFormat(GetType()) as ICustomFormatter;
VersionRangeFormatter.cs (1)
31throw ResourcesFormatter.TypeNotSupported(arg.GetType(), nameof(arg));
PresentationBuildTasks (7)
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (2)
4696|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4738KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (1)
1750_previousXamlParser.GetType() != typeof(StyleXamlParser); }
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
1179baseType = dynamicObject.GetType(); 5244_xmlReader.GetType().FullName);
src\wpf\src\Microsoft.DotNet.Wpf\src\WindowsBase\System\IO\Packaging\CompoundFile\VersionPair.cs (2)
246if (obj.GetType() != GetType())
PresentationCore (228)
MS\Internal\Ink\ExtendedProperty.cs (5)
39if (obj == null || obj.GetType() != GetType()) 48Type type1 = this.Value.GetType(); 49Type type2 = that.Value.GetType(); 174Type type = _value.GetType();
MS\Internal\Ink\ExtendedPropertyCollection.cs (2)
24if (o == null || o.GetType() != GetType())
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (10)
61interopTypeInfo = SerializationHelper.ConvertToVarEnum(attribute.Value.GetType(), true); 786if (!(value.GetType() == typeof(int))) 794if (value.GetType() != typeof(DrawingFlags)) 801Type valueType = value.GetType(); 819Type t = value.GetType(); 843if ( value.GetType() != typeof(bool)) 850if ( value.GetType() != typeof(double) ) 874if ( value.GetType() != typeof(byte) ) 887if ( value.GetType() != typeof(byte[]) ) 895VarEnum varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\StrokeFIndices.cs (2)
92if (obj == null || GetType() != obj.GetType())
MS\Internal\Ink\StrokeIntersection.cs (2)
107if (obj == null || GetType() != obj.GetType())
MS\Internal\Media\VisualTreeUtils.cs (3)
177Debug.Fail(String.Format("Unhandled HitTestResult type '{0}'", result.GetType().Name)); 253throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType())); 283element?.GetType()));
src\wpf\src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
38Type type = key.GetType();
System\Windows\DataObjectExtensions.cs (1)
23dataObject.GetType().FullName));
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
113if (obj is string || obj.GetType().IsValueType)
System\Windows\FreezableCollection.cs (3)
496throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 639throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T"));
System\Windows\Generated\ContentElement.cs (6)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 87throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 152throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Generated\TextDecorationCollection.cs (3)
408throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 497throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration"));
System\Windows\Generated\UIElement.cs (6)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 87throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 152throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Ink\DrawingAttributes.cs (3)
500if (o == null || o.GetType() != this.GetType()) 705Type t = propertyData.GetType();
System\Windows\Input\Command\CommandManager.cs (3)
317Type classType = targetElement.GetType(); 366Type classType = targetElement.GetType(); 547Type senderType = sender.GetType();
System\Windows\Input\Command\RoutedCommand.cs (2)
122throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); 158throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType()));
System\Windows\Input\FocusChangedEventArgs.cs (2)
29throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); 32throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType()));
System\Windows\Input\KeyboardDevice.cs (3)
120throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); 406throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 432throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType()));
System\Windows\Input\MouseDevice.cs (2)
299throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); 546throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (5)
535throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 561throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 626throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 655throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 791throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (1)
552throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispLogic.cs (5)
2087throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 2116throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 2175throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 2204throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 2444throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
245throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 1162throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\TouchDevice.cs (1)
331throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element));
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
1118Type type = rootVisual?.GetType();
System\Windows\Media\Animation\AnimationStorage.cs (4)
492target.GetType().FullName, 493((AnimationClock)sender).Timeline.GetType().FullName), 987clocks[i].Timeline.GetType().FullName, 989d.GetType().FullName));
System\Windows\Media\Animation\Clock.cs (2)
585timeline.GetType().Name)); 4317builder.Append(GetType().Name);
System\Windows\Media\Animation\Generated\Animatable.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 86throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 151throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media\Animation\Generated\ByteAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\ColorAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\DecimalAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\DoubleAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Int16Animation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Int32Animation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Int64Animation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Point3DAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\SingleAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\SizeAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\TimelineCollection.cs (3)
407throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 496throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline"));
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Timeline.cs (1)
1074builder.Append(GetType().Name);
System\Windows\Media\CharacterMetricsDictionary.cs (3)
199Type elementType = array.GetType().GetElementType(); 500throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), nameof(key)); 517throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\CultureSpecificStringDictionary.cs (3)
168Type elementType = array.GetType().GetElementType(); 312throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), nameof(value)); 325throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), nameof(key));
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (3)
410throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 499throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect"));
System\Windows\Media\Effects\Generated\ShaderEffect.cs (1)
147return (Freezable)Activator.CreateInstance(this.GetType());
System\Windows\Media\Effects\ShaderEffect.cs (2)
857Type t = value.GetType(); 939Type t = value.GetType();
System\Windows\Media\FamilyMapCollection.cs (2)
93Type elementType = array.GetType().GetElementType(); 367throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap)));
System\Windows\Media\FamilyTypefaceCollection.cs (2)
359throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); 371Type elementType = array.GetType().GetElementType();
System\Windows\Media\FontFamilyConverter.cs (1)
67if ((o != null) && (o.GetType() == typeof(string)))
System\Windows\Media\Generated\DoubleCollection.cs (3)
382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double"));
System\Windows\Media\Generated\DrawingCollection.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, "Drawing"));
System\Windows\Media\Generated\GeneralTransformCollection.cs (3)
417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform"));
System\Windows\Media\Generated\GeometryCollection.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, "Geometry"));
System\Windows\Media\Generated\GradientStopCollection.cs (3)
417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop"));
System\Windows\Media\Generated\Int32Collection.cs (3)
382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int"));
System\Windows\Media\Generated\PathFigureCollection.cs (3)
418throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 507throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure"));
System\Windows\Media\Generated\PathSegmentCollection.cs (3)
417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment"));
System\Windows\Media\Generated\PointCollection.cs (3)
382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point"));
System\Windows\Media\Generated\TextEffectCollection.cs (3)
417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect"));
System\Windows\Media\Generated\TransformCollection.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, "Transform"));
System\Windows\Media\Generated\VectorCollection.cs (3)
382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector"));
System\Windows\Media\Imaging\BitmapMetadata.cs (2)
1260if (rating != null && rating.GetType() == typeof(ushort)) 1311if (fileTime != null && fileTime.GetType() == typeof(System.Runtime.InteropServices.ComTypes.FILETIME))
System\Windows\Media\Imaging\PropVariant.cs (2)
227Type type = value.GetType(); 314Type type = value.GetType();
System\Windows\Media\Imaging\WriteableBitmap.cs (2)
1074elementType = exemplar.GetType(); 1102elementType = exemplar.GetType();
System\Windows\Media\Visual.cs (2)
1985hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (3)
415throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 504throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D"));
System\Windows\Media3D\Generated\MaterialCollection.cs (3)
427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material"));
System\Windows\Media3D\Generated\Model3DCollection.cs (3)
427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D"));
System\Windows\Media3D\Generated\Point3DCollection.cs (3)
380throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D"));
System\Windows\Media3D\Generated\Transform3DCollection.cs (3)
427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D"));
System\Windows\Media3D\Generated\Vector3DCollection.cs (3)
380throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D"));
System\Windows\Media3D\Generated\Visual3D.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 86throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 151throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media3D\ModelVisual3D.cs (3)
79throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, nameof(Visual3D))); 92throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name));
System\Windows\Media3D\Viewport3DVisual.cs (1)
495throw new NotSupportedException(SR.Format(SR.HitTest_Invalid, nameof(GeometryHitTestParameters), this.GetType().Name));
System\Windows\Media3D\Visual3D.cs (2)
657hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Visual3DCollection.cs (2)
450throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D"));
System\Windows\PresentationSource.cs (5)
119throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); 163throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 185throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e)); 244throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 699throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType()));
System\Windows\RoutedEvent.cs (1)
87Type handlerType = handler.GetType();
System\Windows\UIElement.cs (6)
672throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); 676throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); 802(parent == null ? "" : parent.GetType().FullName), 803this.GetType().FullName)); 1901throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); 1937throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType()));
PresentationFramework (480)
HashHelper.cs (1)
26internal static bool HasReliableHashCode(object item) => item is not null && !s_unreliableTypes.Contains(item.GetType());
MS\Internal\Annotations\Anchoring\AttachedAnnotation.cs (2)
239_selectionProcessor = _locatorManager.GetSelectionProcessor(attachedAnchor.GetType()); 249Debug.Assert(_selectionProcessor != null, SR.Format(SR.NoProcessorForSelectionType, attachedAnchor.GetType()));
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
449throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 455throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 475throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
MS\Internal\Annotations\Anchoring\LocatorManager.cs (3)
340SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 707SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 1036SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType());
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
72throw new ArgumentException(SR.WrongSelectionType, $"anchor1: type = {anchor1.GetType()}"); 75throw new ArgumentException(SR.WrongSelectionType, $"Anchor2: type = {anchor2.GetType()}");
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (1)
501Type type = component.GetType();
MS\Internal\AppModel\Journaling.cs (3)
538throw new Exception(SR.Format(SR.InvalidPageFunctionType, contentObject.GetType())); 617string typeName = pageFunction.GetType().AssemblyQualifiedName; 649Debug.Assert(contentObject.GetType().AssemblyQualifiedName == this._typeName,
MS\Internal\AppModel\ReturnEventSaver.cs (3)
72returnDelegate.GetType().AssemblyQualifiedName, 73returnDelegate.Target.GetType().AssemblyQualifiedName, 116if (!string.Equals(_returnList[i]._targetTypeName, caller.GetType().AssemblyQualifiedName, StringComparison.Ordinal))
MS\Internal\Data\BindingCollection.cs (1)
114throw new NotSupportedException(SR.Format(SR.BindingCollectionContainsNonBinding, binding.GetType().Name));
MS\Internal\Data\ClrBindingWorker.cs (1)
191ParentBindingExpression.SetupDefaultValueConverter(item.GetType());
MS\Internal\Data\DefaultValueConverter.cs (3)
322((o != null && destinationType.IsAssignableFrom(o.GetType())) || 579if (o != null && _sourceType.IsAssignableFrom(o.GetType())) 617if ((o != null && _targetType.IsAssignableFrom(o.GetType())) ||
MS\Internal\Data\DynamicValueConverter.cs (2)
40Type sourceType = value.GetType(); 65Type targetType = value.GetType();
MS\Internal\Data\EnumerableCollectionView.cs (1)
582TraceData.CollectionChangedWithoutNotification(SourceCollection.GetType().FullName));
MS\Internal\Data\IndexedEnumerable.cs (1)
476Type srcType = collection.GetType();
MS\Internal\Data\PropertyPathWorker.cs (4)
1581throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pi.Name)); 1586throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pd.Name)); 1591throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dp.Name)); 1596throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dpa.PropertyName));
MS\Internal\Data\ValueTable.cs (1)
222pd = TypeDescriptor.GetProperties(item.GetType())[name];
MS\Internal\Data\ViewManager.cs (3)
593collectionViewType.Name, collection.GetType()), e); 834Type cachedViewType = (cvp == null) ? cv.GetType() : cvp.ProxiedView.GetType();
MS\Internal\Data\XDeferredAxisSource.cs (1)
76MemberInfo[] aryMembers = xda.GetType().GetDefaultMembers();
MS\Internal\Data\XmlBindingWorker.cs (2)
549return $"{node.GetType().Name} ({node.Name})"; 557return string.Create(TypeConverterHelper.InvariantEnglishUS, $"{nodeList.GetType().Name} (hash={AvTrace.GetHashCodeHelper(nodeList)} Count={nodeList.Count})");
MS\Internal\DataStreams.cs (1)
243DependencyProperty dp = DependencyProperty.FromName(subStream._propertyName, element.GetType());
MS\Internal\FrameworkObject.cs (1)
65object arg = (d != null) ? (object)d.GetType() : (object)"NULL";
MS\Internal\Helper.cs (10)
291throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 580Type targetType = targetObject.GetType(); 662!memberType.IsAssignableFrom(markupExtension.GetType())) 665markupExtension.GetType().Name, 682if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 683!typeof(Collection<BindingBase>).IsAssignableFrom(targetProperty.GetType())) 686markupExtension.GetType().Name, 687targetProperty.GetType().Name)); 706if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 710markupExtension.GetType().Name,
MS\Internal\Ink\EraserBehavior.cs (2)
171|| _cachedStylusShape.GetType() != InkCanvas.EraserShape.GetType()) )
MS\Internal\Ink\PenCursorManager.cs (1)
63if (stylusShape.GetType() == typeof(RectangleStylusShape))
MS\Internal\Interop\InternalDispatchObject.cs (1)
128throw new MissingMethodException(GetType().Name, name);
MS\Internal\IO\Packaging\ContentDescriptor.cs (2)
37if (other.GetType() != GetType())
MS\Internal\LayoutDump.cs (15)
206writer.WriteStartElement(visual.GetType().Name); 243writer.WriteStartElement(element.GetType().Name); 265Type t = element.GetType(); 298writer.WriteAttributeString("Type", page.GetType().FullName); 314Type t = page.GetType(); 739writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 761writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 779writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 797writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 814writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 861writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 901Type paragraphResultType = paragraph.GetType(); 904Type paraClientType = paraClient.GetType(); 946Type paragraphResultType = paragraph.GetType(); 961Type typeOfCell = cell.GetType();
MS\Internal\Markup\StaticExtension.cs (1)
83throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlTypeResolver"));
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1001throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowedInThisContext, Element.GetType().Name));
MS\Internal\Text\TypographyProperties.cs (2)
691if (this.GetType() != other.GetType())
MS\Internal\TraceData.cs (7)
103traceBuilder.Append(objectParam.GetType().Name); 191traceBuilder.AppendFormat("'{0}' (Name='{1}')", fe.GetType().Name, fe.Name); 195traceBuilder.AppendFormat("'{0}' (HashCode={1})", o.GetType().Name, o.GetHashCode()); 248Type type = o.GetType(); 280DependencyProperty dp => $"{dp.GetType().Name}({dp.Name})", 281PropertyInfo pi => $"{pi.GetType().Name}({pi.Name})", 282PropertyDescriptor pd => $"{pd.GetType().Name}({pd.Name})",
MS\Internal\Utility\TraceLog.cs (1)
60return string.Create(CultureInfo.InvariantCulture, $"{o.GetType().Name}.{o.GetHashCode()}");
MS\Internal\WeakHashtable.cs (1)
53Debug.Assert(!key.GetType().IsValueType, "WeakHashtable doesn't support value-type keys. Use WeakObjectHashtable instead.");
MS\Internal\WeakObjectHashtable.cs (1)
50if (key != null && !key.GetType().IsValueType)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (5)
62Type type = o.GetType(); 103var interfaces = obj.GetType().GetInterfaces(); 132IID = GuidGenerator.GetIID(obj.GetType()), 133Vtable = (IntPtr)obj.GetType().GetHelperType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 154Type type = obj.GetType();
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (1)
815if (value.GetType() == HelperType)
System\Windows\Application.cs (5)
424if (bamlStream == null || bamlStream.Assembly != component.GetType().Assembly) 426throw new Exception(SR.Format(SR.UriNotMatchWithRootType, component.GetType( ), resourceLocator)); 1680throw new InvalidOperationException(SR.Format(SR.CannotCallRunMultipleTimes, this.GetType().FullName)); 1687throw new ArgumentException(SR.Format(SR.WindowPassedShouldBeOnApplicationThread, window.GetType().FullName, this.GetType().FullName));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
171return this.Owner.GetType().Name;
System\Windows\Automation\Peers\CalendarButtonAutomationPeer.cs (1)
54return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
71return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
47return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeaderAutomationPeer.cs (1)
44return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
47return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridDetailsPresenterAutomationPeer.cs (1)
31return this.Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowAutomationPeer.cs (1)
46return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowHeaderAutomationPeer.cs (1)
44return Owner.GetType().Name;
System\Windows\Automation\Peers\DatePickerAutomationPeer.cs (1)
109return Owner.GetType().Name;
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (1)
34return Owner.GetType().Name;
System\Windows\Automation\Peers\ItemAutomationPeer.cs (1)
653if (value != null && !value.GetType().IsValueType &&
System\Windows\Automation\Peers\UserControlAutomationPeer.cs (1)
18return Owner.GetType().Name;
System\Windows\ColorConvertedBitmapExtension.cs (1)
92throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IUriContext" ));
System\Windows\Condition.cs (1)
135value.GetType().Name));
System\Windows\Controls\AdornedElementPlaceholder.cs (3)
59throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)); 62throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ComboBox.cs (1)
716undoManager.OpenedUnit.GetType() != typeof(TextParentUndoUnit))
System\Windows\Controls\DataErrorValidationRule.cs (1)
91idei.GetType().FullName,
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (2)
106typeof(PropertyDescriptor).IsAssignableFrom(value.GetType()) || 107typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\Decorator.cs (3)
65throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)); 70throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\FlowDocumentReader.cs (1)
1921throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1559if(scrollInfo.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter)) 1804throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\Frame.cs (1)
1198Debug.Assert(JournalEntry.GetType().IsSerializable);
System\Windows\Controls\Grid.cs (1)
77throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)));
System\Windows\Controls\GridView.cs (1)
88return SR.Format(SR.ToStringFormatString_GridView, this.GetType(), Columns.Count);
System\Windows\Controls\GridViewColumn.cs (1)
61return SR.Format(SR.ToStringFormatString_GridViewColumn, this.GetType(), Header);
System\Windows\Controls\GridViewColumnHeader.cs (1)
741System.Reflection.Assembly assembly = this.GetType().Assembly;
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1150Type headerType = (srcHeader != null ? srcHeader.GetType() : typeof(GridViewColumnHeader));
System\Windows\Controls\GridViewRowPresenter.cs (3)
35this.GetType(), 88Type oldType = e.OldValue?.GetType(); 89Type newType = e.NewValue?.GetType();
System\Windows\Controls\GroupItem.cs (1)
183throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name));
System\Windows\Controls\HeaderedContentControl.cs (1)
385string typeText = this.GetType().ToString();
System\Windows\Controls\HeaderedItemsControl.cs (1)
332string typeText = this.GetType().ToString();
System\Windows\Controls\InkCanvas.cs (2)
777|| oldShape.Rotation != _eraserShape.Rotation || oldShape.GetType() != _eraserShape.GetType())
System\Windows\Controls\ItemContainerGenerator.cs (4)
112string.Create(CultureInfo.InvariantCulture, $"ItemContainerGenerator for {Host.GetType().Name} {label} - {_itemsGenerated} items")); 329_containerType = container.GetType(); 331else if (_containerType != container.GetType()) 1107Type sourceType = source.GetType();
System\Windows\Controls\ItemsControl.cs (2)
3477throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, container.GetType().Name)); 3964return SR.Format(SR.ToStringFormatString_ItemsControl, this.GetType(), itemsCount);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
155throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ItemsPresenter", templatedParent.GetType().Name));
System\Windows\Controls\ItemsPresenter.cs (1)
317if (oldPanel != null && oldPanel.GetType() == type)
System\Windows\Controls\MenuItem.cs (1)
2101throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(MenuItem), nameof(Separator), itemContainer));
System\Windows\Controls\PageRanges.cs (1)
170if (obj == null || obj.GetType() != typeof(PageRange))
System\Windows\Controls\Panel.cs (1)
91throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\PasswordTextContainer.cs (1)
881Invariant.Assert(false, $"Unexpected type: {strongReference.GetType()}");
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (1)
35this.GetType(),
System\Windows\Controls\Primitives\MenuBase.cs (1)
504throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(MenuItem), nameof(Separator), itemContainer));
System\Windows\Controls\Primitives\Popup.cs (1)
1297throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\Primitives\RangeBase.cs (1)
357string typeText = this.GetType().ToString();
System\Windows\Controls\Primitives\Selector.cs (2)
597Type selectedType = value?.GetType(); 625Type itemType = itemValue.GetType();
System\Windows\Controls\Primitives\StatusBar.cs (1)
123throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, nameof(StatusBarItem), nameof(Separator), itemContainer));
System\Windows\Controls\Primitives\ToggleButton.cs (1)
281string typeText = this.GetType().ToString();
System\Windows\Controls\RichTextBox.cs (3)
153throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value)); 158throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ScrollViewer.cs (1)
2250if(isi.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter))
System\Windows\Controls\TextBlock.cs (3)
127throw new ArgumentException(SR.Format(SR.TextPanelIllegalParaTypeForIAddChild, "value", value.GetType())); 132Type parentType = _complexContent.TextContainer.Parent.GetType(); 134Type valueType = value.GetType();
System\Windows\Controls\ToolBar.cs (3)
460Type feType = fe.GetType(); 596throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarPanel, child.GetType())); 619throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarOverflowPanel, child.GetType()));
System\Windows\Controls\ToolBarTray.cs (1)
272throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), nameof(value));
System\Windows\Controls\UIElementCollection.cs (3)
36throw new ArgumentNullException(SR.Format(SR.Panel_NoNullVisualParent, "visualParent", this.GetType())); 391throw new System.ArgumentException(SR.Format(SR.Collection_BadType, "UIElementCollection", value.GetType().Name, "UIElement")); 515throw new ArgumentNullException(SR.Format(SR.Panel_NoNullChildren, this.GetType()));
System\Windows\Controls\ViewPort3D.cs (1)
232throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Visual3D)), nameof(value));
System\Windows\Controls\VirtualizingStackPanel.cs (3)
6561Debug.Fail($"Unexpected container type: {((container == null) ? "null" : container.GetType().Name)}"); 8916if (this.GetType().Name != "RibbonMenuItemsPanel") 12227for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Controls\WebBrowser.cs (1)
428Type t = value.GetType();
System\Windows\ControlTemplate.cs (1)
67throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, _targetType.Name, templatedParent.GetType().Name));
System\Windows\CornerRadiusConverter.cs (1)
123throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), nameof(value));
System\Windows\Data\BindingExpression.cs (4)
1318&& !targetType.IsAssignableFrom(value.GetType())) 1650string name = String.IsNullOrEmpty(stringFormat) ? converter.GetType().Name : "StringFormat"; 1666converter.GetType().Name, 2156if (sourceType.IsAssignableFrom(value.GetType()))
System\Windows\Data\BindingExpressionBase.cs (4)
134Type type = parent.GetType(); 933target.GetType().FullName, dp.Name, AvTrace.GetHashCodeHelper(target)), 1313undoManager.OpenedUnit.GetType() != typeof(System.Windows.Documents.TextParentUndoUnit)) 2179if (converter != null && converter.CanConvertFrom(value.GetType()))
System\Windows\Data\BindingGroup.cs (1)
573TraceData.BindingGroupWrongProperty(name, context.GetType().FullName));
System\Windows\Data\CollectionView.cs (2)
67if (this.GetType() == typeof(CollectionView)) 1498Type collectionType = SourceCollection.GetType();
System\Windows\Data\MultiBinding.cs (2)
56throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), nameof(value));
System\Windows\Data\MultiBindingExpression.cs (3)
526Converter.GetType().Name, 554traceParameters: new object[] { Converter.GetType().Name, count, values.Length, TraceData.DescribeTarget(target, TargetProperty) }); 584Converter.GetType().Name,
System\Windows\Data\ObjectDataProvider.cs (2)
158Debug.Assert((_objectInstance == null) ? (_objectType == null) : (_objectType == _objectInstance.GetType())); 350SetObjectType(value?.GetType());
System\Windows\Data\PriorityBinding.cs (2)
53throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), nameof(value));
System\Windows\Data\XmlNamespaceMapping.cs (6)
46throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Prefix", this.GetType().Name)); 48throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Prefix", this.GetType().Name)); 65throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Uri", this.GetType().Name)); 67throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Uri", this.GetType().Name)); 137throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Prefix", this.GetType().Name)); 141throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Uri", this.GetType().Name));
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
50throw new ArgumentException(SR.Format(SR.RequiresXmlNamespaceMapping, value.GetType().FullName), nameof(value));
System\Windows\DataTemplate.cs (1)
192throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ContentPresenter", templatedParent.GetType().Name));
System\Windows\DataTrigger.cs (1)
78value.GetType().Name));
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (2)
373if (result.Requester.GetType() == typeof(StaticResourceExtension)) 423if (result.Requester.GetType() == typeof(StaticResourceExtension))
System\Windows\Documents\DocumentSequence.cs (1)
101throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), nameof(value));
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
69throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 114throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(), 152throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), nameof(value)); 201throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value)); 243throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 296throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), nameof(value)); 338throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value)); 381throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value)); 425throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\DocumentStructures\StoryFragments.cs (2)
46throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), nameof(value)); 106throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType6, value.GetType(),
System\Windows\Documents\FixedDocument.cs (1)
136throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PageContent)), nameof(value));
System\Windows\Documents\FixedLineResult.cs (2)
44if (o.GetType() != typeof(FixedLineResult)) 46throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), nameof(o));
System\Windows\Documents\FixedNode.cs (2)
149if (o.GetType() != typeof(FixedNode)) 151throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedNode)), nameof(o));
System\Windows\Documents\FixedPage.cs (1)
187throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Documents\FixedSOMContainer.cs (1)
37throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMContainer)), nameof(comparedObj));
System\Windows\Documents\FixedSOMGroup.cs (1)
39throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMGroup)), nameof(comparedObj));
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
94throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedSOMSemanticBox)), nameof(o));
System\Windows\Documents\FixedTextPointer.cs (1)
532return e.IsTextElement ? e.Type : ((ITextContainer)_flowPosition.TextContainer).Parent.GetType();
System\Windows\Documents\FlowDocument.cs (3)
1624if (!TextSchema.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType())) 1626throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, _typeofThis.Name, value.GetType().Name)); 1632throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, value.GetType().Name));
System\Windows\Documents\FlowNode.cs (3)
89if (o == null || this.GetType() != o.GetType()) 113throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowNode)), nameof(o));
System\Windows\Documents\FlowPosition.cs (1)
69throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowPosition)), nameof(o));
System\Windows\Documents\InlineCollection.cs (4)
165if (!TextSchema.IsValidChildOfContainer(this.Parent.GetType(), child.GetType())) 167throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.Parent.GetType().Name, child.GetType().Name));
System\Windows\Documents\PageContent.cs (2)
170throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), nameof(value)); 607throw new ApplicationException(SR.Format(SR.PageContentUnsupportedPageType, o.GetType()));
System\Windows\Documents\Serialization\SerializerDescriptor.cs (1)
92Type factoryType = factoryInstance.GetType();
System\Windows\Documents\Span.cs (2)
116throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name)); 120throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name));
System\Windows\Documents\Speller.cs (1)
841Document = {start.TextContainer.Parent.GetType().Name}
System\Windows\Documents\Table.cs (1)
67throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroup)), nameof(value)));
System\Windows\Documents\TableCell.cs (1)
88throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRow.cs (2)
65throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCell)), nameof(value))); 89throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRowGroup.cs (2)
67throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRow)), nameof(value))); 289throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TextElement.cs (12)
789Type valueType = value.GetType(); 808throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name)); 820throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name)); 836throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 843throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 883throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowed, this.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (6)
248throw new InvalidOperationException(SR.Format(SR.TextElementCollection_PreviousSiblingDoesNotBelongToThisCollection, previousSibling.GetType().Name)); 253throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 287throw new InvalidOperationException(SR.Format(SR.TextElementCollection_NextSiblingDoesNotBelongToThisCollection, nextSibling.GetType().Name)); 292throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 463throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 599Type elementType = array.GetType().GetElementType();
System\Windows\Documents\TextPointer.cs (8)
1419Type containerType = this.TextContainer.Parent.GetType(); 1431throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, ancestor.GetType().Name)); 1613TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1723while (ancestor != null && TextSchema.IsMergeableInline(ancestor.GetType())) 2420return element?.GetType(); 3540bool isValidChild = TextSchema.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 3567Invariant.Assert(TextSchema.IsValidChild(position, /*childType*/inline.GetType())); 3618return element?.GetType();
System\Windows\Documents\TextRange.cs (1)
801throw new ArgumentException(SR.Format(SR.TextEditorTypeOfParameterIsNotAppropriateForFormattingProperty, value == null ? "null" : value.GetType().Name, formattingProperty.Name), nameof(value));
System\Windows\Documents\TextRangeBase.cs (2)
1826while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType())) 1868while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType()))
System\Windows\Documents\TextRangeEdit.cs (32)
30TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 55Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 171while (inline != null && inline.IsEmpty && !TextSchema.IsFormattingType(inline.GetType())) 184(inline.GetType() == typeof(Run) || inline.GetType() == typeof(Span)) && 195((inline.NextInline != null && TextSchema.IsFormattingType(inline.NextInline.GetType())) || 196(inline.PreviousInline != null && TextSchema.IsFormattingType(inline.PreviousInline.GetType())))) 263TextSchema.IsMergeableInline(position.Parent.GetType())) 268TextSchema.IsMergeableInline(position.Parent.GetType())) 282if (TextSchema.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty) 287else if (TextSchema.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty) 292else if (TextSchema.IsKnownType(firstInline.GetType()) && TextSchema.IsKnownType(secondInline.GetType()) && 294TextSchema.IsMergeableInline(firstInline.GetType()) && TextSchema.IsMergeableInline(secondInline.GetType()) 327TextSchema.IsMergeableInline(inline.Parent.GetType()) && 328TextSchema.IsKnownType(inline.Parent.GetType()) && 431else if (parent is Span && TextSchema.IsKnownType(parent.GetType())) 591Invariant.Assert(position.TextContainer.Parent == null || TextSchema.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph))); 789if (TextSchema.IsParagraphOrBlockUIContainer(block.GetType())) 1278TextSchema.IsMergeableInline(position.Parent.GetType())) 1283TextSchema.IsMergeableInline(position.Parent.GetType())) 1298TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1307TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1443if (parent is Inline || TextSchema.AllowsParagraphMerging(parent.GetType())) 1765while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 2021if (TextSchema.IsMergeableInline(topmostSpan.GetType()) && TextSchema.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan)) 2036parent != null && TextSchema.IsMergeableInline(parent.GetType()); 2118TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2266if (!TextSchema.IsMergeableInline(parent.GetType())) 2277if (!TextSchema.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (4)
79Invariant.Assert(TextSchema.AllowsParagraphMerging(parentBlock.GetType())); 109Invariant.Assert(TextSchema.AllowsParagraphMerging(previousBlock.GetType())); 637if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 657if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (1)
633if (ancestor is List || ancestor is Inline && !TextSchema.IsMergeableInline(ancestor.GetType()))
System\Windows\Documents\TextRangeSerialization.cs (11)
236TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(nextElement.GetType(), typeof(TextElementEditingBehaviorAttribute)); 616string complexPropertyName = $"{table.GetType().Name}.Columns"; 1114Type elementTypeStandardized = TextSchema.GetStandardElementType(element.GetType(), reduceElement); 1414TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1419TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1515Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1517Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1524Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1527Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1572if (TextSchema.IsBlock(propertyBag.GetType())) 1621else if (targetType.IsAssignableFrom(element.GetType()))
System\Windows\Documents\TextSchema.cs (13)
109bool isValidChild = IsValidChild(parent.GetType(), child.GetType()); 113throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, child.GetType().Name)); 140bool isValidChild = IsValidChild(parent.GetType(), childType); 144throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 163return (leftElement == null || IsValidSibling(leftElement.GetType(), childType)) && 164(rightElement == null || IsValidSibling(rightElement.GetType(), childType)); 172bool isValidChild = IsValidChild(parent.GetType(), childType); 176throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 618if (value1.GetType() != value2.GetType()) 897throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, nextElement.GetType()));
System\windows\Documents\TextSelection.cs (1)
1470TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(element.GetType(), typeof(TextElementEditingBehaviorAttribute));
System\Windows\Documents\TextStore.cs (1)
4815for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
275container = new ElementContentContainer(elementNode.TextElement.GetType(), 461base(table.GetType(), localValues, table.Resources, childContainer)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
26_type = elementNode.TextElement.GetType();
System\Windows\Documents\ValidationHelper.cs (4)
105if (!TextSchema.IsValidChild(/*position:*/position, /*childType:*/child.GetType())) 107throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name)); 115throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, child.GetType().Name));
System\Windows\EventSetter.cs (1)
101if (_handler.GetType() != _event.HandlerType)
System\Windows\EventSetterHandlerConverter.cs (1)
58if (typeDescriptorContext.GetType() != s_ServiceProviderContextType)
System\Windows\EventTrigger.cs (1)
57throw new ArgumentException(SR.Format(SR.EventTriggerBadAction, value.GetType().Name));
System\Windows\FrameworkContentElement.cs (3)
509object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 576string TypeAndName = $"[{GetType().Name}]{dp.Name}"; 700PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElement.cs (3)
1867object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 1983string TypeAndName = string.Create(CultureInfo.InvariantCulture, $"[{GetType().Name}]{dp.Name}({base.GetHashCode()})"); 2072PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElementFactory.cs (7)
222throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, dp.Name, GetType().Name)); 308if (handler.GetType() != routedEvent.HandlerType) 344if (handler.GetType() != routedEvent.HandlerType) 651parent.GetType().Name)); 906parent.GetType().Name)); 952frameworkObject.DO.GetType().Name)); 1112parent.GetType().Name));
System\Windows\FrameworkTemplate.cs (2)
1122throw new InvalidOperationException(SR.Format(SR.TemplateMustBeFE, new object[] { rootObject.GetType().FullName })); 1136rootObject.GetType(), feResult != null, feResult, fceResult);
System\Windows\Input\Command\CommandValueSerializer.cs (4)
75throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 82throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name )); 132throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 139throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name ));
System\Windows\Interop\ActiveXHost.cs (1)
662throw new TargetInvocationException(SR.Format(SR.AXNohWnd, GetType().Name), e);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1132Type rootType = _root.GetType();
System\Windows\Markup\BamlReader.cs (1)
1075TypeConverter converter = TypeDescriptor.GetConverter(value.GetType());
System\Windows\Markup\BamlRecordReader.cs (23)
1000flags = GetFlagsFromType(element.GetType()); 1283short elementId = BamlMapTable.GetKnownTypeIdFromType(parent.GetType()); 1589paramInfo.ParameterType != param.GetType()) 1601converter.GetType(), 1623if (!paramInfo.ParameterType.IsAssignableFrom(param.GetType())) 1655converter.GetType(), 2664ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.Name, valueType.Name), e); 2906ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.AttributeInfo.Name, attribValue), e); 3037expectedType = CurrentContext.ObjectData.GetType(); 3378element.GetType().ToString(), holder.PropertyDefinition.Name), e); 3477parent.GetType().FullName, 3721ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, currentTarget.GetType().FullName, attribInfo.Name, o), e); 3747o.GetType().FullName); 3766if (genericType != o.GetType()) 3859ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, parentObject.GetType().FullName, memberInfo.Name, o), e); 4753ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4771ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4792return parent.GetType(); 4853elementType = element?.GetType(); 4995value.GetType().Name, 4996container.GetType().Name), 5088currentParentType = currentParent.GetType(); 5741Type currentParentType = currentParent.GetType();
System\Windows\Markup\BamlRecords.cs (2)
4696|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4738KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
System\Windows\Markup\Primitives\ElementMarkupObject.cs (6)
48get { return _instance.GetType(); } 234if (!TryGetShouldSerializeMethod(new ShouldSerializeKey(instance.GetType(), pd.Name), out shouldSerializeMethod)) 236Type instanceType = instance.GetType(); 482(!PropertyIsAttached(PropertyDescriptor) && PropertyType == value.GetType() && 684Type type = value.GetType(); 932string typeName = typeSerializer.ConvertToString(enumValue.GetType(), context);
System\Windows\Markup\Primitives\MarkupWriter.cs (2)
693throw new InvalidOperationException(SR.Format(SR.UnserializableKeyValue, property.Value.GetType().FullName)); 1033Type tagType = property.Value.GetType();
System\Windows\Markup\XamlTypeMapper.cs (2)
588else if (typeConvert.GetType() == typeof(TypeConverter)) 617if(!propType.IsAssignableFrom(obj.GetType()))
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Storyboard.cs (11)
277SR.Format(SR.Storyboard_NameNotFound, targetName, nameScopeUsed.GetType().ToString())); 319SR.Format(SR.Storyboard_NameNotFound, targetName, nameScope.GetType().ToString())); 328SR.Format(SR.Storyboard_NameNotFound, targetName, fe.GetType().ToString())); 337SR.Format(SR.Storyboard_NameNotFound, targetName, fce.GetType().ToString())); 445throw new InvalidOperationException(SR.Format(SR.Storyboard_NoTarget, currentTimeline.GetType().ToString() )); 453throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetPropertyRequired, currentTimeline.GetType().ToString() )); 575$"Internal error - clockMappings table contains an unexpected object {((mappedObject == null) ? "" : mappedObject.GetType().ToString())}"); 616$"Internal error - clockMappings table contains unexpected object of type{value.GetType()}"); 724throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathFrozenCheckFailed, AccessorName(path, i-1), path.Path, intermediateFreezable.GetType().ToString() )); 796throw new InvalidOperationException(SR.Format(SR.Storyboard_AnimationMismatch, animationClock.Timeline.GetType(), targetProperty.Name, targetProperty.PropertyType)); 945throw new InvalidOperationException(SR.Format(SR.Storyboard_ComplexPathNotSupported, targetObject.GetType().ToString()));
System\Windows\Navigation\Journal.cs (1)
464Debug.Assert(je.GetType().IsSerializable);
System\Windows\Navigation\NavigationService.cs (3)
1416_bp != null ? _bp.GetType().ToString() : "null")); 3215Type type = ccs.GetType(); 3882Debug.Fail($"Unhandled scenario: PageFunction returning to {parentEntry.GetType().Name}");
System\Windows\PropertyPath.cs (3)
555(accessor != null) ? accessor.GetType().FullName : "null")); 633accessor = SystemCoreHelper.NewDynamicPropertyAccessor(item.GetType(), propertyName); 721args[i].type = value.GetType();
System\Windows\PropertyPathConverter.cs (3)
102throw new ArgumentException(SR.Format(SR.CannotConvertType, source.GetType().FullName, typeof(PropertyPath))); 139throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), nameof(value)); 225type = pathPart.GetType();
System\Windows\ResourceDictionary.cs (1)
544valueType = value.GetType();
System\Windows\Setter.cs (2)
68throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, property.Name, GetType().Name)); 113value.GetType().Name));
System\Windows\Standard\Utilities.cs (2)
227DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType()); 240DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType());
System\Windows\Standard\Verify.cs (1)
279foreach (var ifaceType in parameter.GetType().GetInterfaces())
System\Windows\StaticResourceExtension.cs (2)
198throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlSchemaContextProvider")); 204throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IAmbientProvider"));
System\Windows\Style.cs (4)
394throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), nameof(value)); 466Type elementType = element.GetType(); 650"Unsupported SetterBase subclass in style triggers ({0})", setterBase.GetType().ToString()); 786throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInStyle, trigger.GetType().Name));
System\Windows\StyleHelper.cs (14)
982throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 999throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1596throw new InvalidOperationException(SR.Format(SR.CrossThreadAccessOfUnshareableFreezable, freezable.GetType().FullName)); 1827$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 1867$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 2073if( walkNode.GetType() == container.GetType() ) 2080SR.Format(SR.TemplateCircularReferenceFound, name, walkNode.GetType())); 2334throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 4341$"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?"); 5052$"FrugalMap for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5098$"HybridDictionary for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5271$"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?"); 5880Type stateType = state?.GetType();
System\Windows\SystemResources.cs (1)
1778return _value?.GetType();
System\Windows\TemplateContent.cs (5)
691if (staticResource.GetType() == typeof(StaticResourceExtension)) 697else if (staticResource.GetType() == typeof(StaticResourceHolder)) 842Type typeofValue = xamlReader.Value.GetType(); 974if (xamlReader.Value != null && typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Value.GetType())) 1068if (value != null && !IsTypeShareable(value.GetType()))
System\Windows\TemplateKey.cs (6)
50throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "DataType", this.GetType().Name)); 69throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "DataType", this.GetType().Name)); 71throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "DataType", this.GetType().Name)); 119? string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}({DataType})") 120: string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}(null)"); 163result = new ArgumentException(SR.Format(SR.MustBeTypeOrString, dataType.GetType().Name), argName);
System\Windows\ThemeDictionaryExtension.cs (1)
74throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IProvideValueTarget" ));
System\Windows\ThicknessConverter.cs (1)
124throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), nameof(value));
System\Windows\Trigger.cs (2)
80value.GetType().Name)); 181throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), nameof(o));
System\Windows\TriggerBase.cs (1)
300throw new InvalidOperationException(SR.Format(SR.VisualTriggerSettersIncludeUnsupportedSetterType, setters[i].GetType().Name));
PresentationFramework-SystemData (6)
SystemDataExtension.cs (6)
76s_DataTablePropertyDescriptorType = pdc["Table1"].GetType(); 79s_DataRelationPropertyDescriptorType = pdc["IDRelation"].GetType(); 82Type pdType = pd.GetType(); 126if (pd.GetType() == s_DataTablePropertyDescriptorType) 135else if (pd.GetType() == s_DataRelationPropertyDescriptorType) 151if (useFollowParent && pd.GetType() == s_DataRelationPropertyDescriptorType)
PresentationFramework-SystemXmlLinq (6)
SystemXmlLinqExtension.cs (6)
23s_XElementElementsPropertyDescriptorType = pdc["Elements"].GetType(); 24s_XElementDescendantsPropertyDescriptorType = pdc["Descendants"].GetType(); 25s_XElementAttributePropertyDescriptorType = pdc["Attribute"].GetType(); 26s_XElementElementPropertyDescriptorType = pdc["Element"].GetType(); 47Type pdType = pd.GetType(); 61Type pdType = pd.GetType();
PresentationUI (6)
MS\Internal\Documents\Application\ChainOfDependencies.cs (2)
80member.GetType(), 113member.GetType(),
MS\Internal\Documents\Application\ChainOfResponsibility.cs (4)
70member.GetType().Name, 71subject.GetType().Name); 80member.GetType().Name, 81subject.GetType().Name);
ReachFramework (69)
AlphaFlattener\BrushProxy.cs (3)
385str += _brush.GetType(); 675Debug.Fail("IsOpaque(" + _brush.GetType() + ") not handled"); 771Debug.Fail("IsTransparent not handled " + _brush.GetType());
AlphaFlattener\Primitive.cs (1)
536Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
AlphaFlattener\PrimitiveList.cs (1)
90string typ = p.GetType().ToString();
AlphaFlattener\Utility.cs (1)
920Type typ = segment.GetType();
Packaging\XpsFixedDocumentReaderWriter.cs (1)
314if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (1)
242if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedPageReaderWriter.cs (1)
511if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsInterleavingPolicy.cs (3)
282if (!_flushOrderItems.ContainsKey(node.GetType()) || 584FlushItem xOrder = (FlushItem)_orderTable[x.Node.GetType()]; 585FlushItem yOrder = (FlushItem)_orderTable[y.Node.GetType()];
PrintSystemExceptions\PrintSystemException.cs (3)
801committedAttributes = (Collection<String>)(info.GetValue("CommittedAttributes", committedAttributes.GetType())); 802failedAttributes = (Collection<String>)(info.GetValue("FailedAttributes", failedAttributes.GetType())); 803printObjectName = (String)(info.GetValue("ObjectName", printObjectName.GetType()));
Serialization\ColorTypeConverter.cs (1)
106if (!IsSupportedType(value.GetType()))
Serialization\FontTypeConverter.cs (1)
104if (!IsSupportedType(value.GetType()))
Serialization\ImageSourceTypeConverter.cs (1)
110if (!IsSupportedType(value.GetType()))
Serialization\Manager\MetroSerializationManager.cs (3)
153return TypeDescriptor.GetConverter(serializedObject.GetType()); 699Type type = serializableObject.GetType(); 758Type type = serializableObject.GetType();
Serialization\Manager\NGCSerializationManager.cs (2)
656Type serializedObjectType = serializedObject.GetType(); 689Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\NGCSerializationManagerAsync.cs (6)
147if(objectOnStack.GetType() == 155else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 259if(objectOnStack.GetType() == 267else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 905Type serializedObjectType = serializedObject.GetType(); 966Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\ReachFixedPageSerializer.cs (1)
152String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachFixedPageSerializerAsync.cs (1)
177String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachObjectContext.cs (1)
185serializableObjectContext.Name = serializableObjectContext.TargetObject.GetType().Name;
Serialization\Manager\ReachSerializableProperties.cs (2)
428Type valueType = Value.GetType(); 773Type valueType = Value.GetType();
Serialization\Manager\ReachSerializationUtils.cs (10)
303if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 304(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 305&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 312else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 337else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType())) 355if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 356(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 357&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 361else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 366else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType()))
Serialization\Manager\XpsOMFixedPageSerializer.cs (1)
142String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\XpsOMSerializationManager.cs (5)
72serializedObject.GetType().ToString().Contains("FixedDocumentPaginator")) 78serializedObject.GetType().ToString().Contains("FixedDocumentSequencePaginator")) 209if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 213else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 217else if (typeof(Color).IsAssignableFrom(serializedObject.GetType()))
Serialization\Manager\XpsOMSerializationManagerAsync.cs (4)
117if (objectOnStack.GetType() == 125else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 214if (objectOnStack.GetType() == 222else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\Manager\XpsSerializationManager.cs (8)
102serializedObject.GetType().ToString().Contains( "FixedDocumentPaginator") ) 108serializedObject.GetType().ToString().Contains( "FixedDocumentSequencePaginator") ) 364if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 368else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 372else if (typeof(Color).IsAssignableFrom(serializedObject.GetType())) 748TypeSerializableDependencyProperties[serializableObject.GetType()]; 799TypeNoneSerializableClrProperties[serializableObject.GetType()]; 1051Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\XpsSerializationManagerAsync.cs (4)
134if(objectOnStack.GetType() == 142else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 242if(objectOnStack.GetType() == 250else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\VisualSerializer.cs (1)
821WriteBrushHeader(brush.GetType().ToString(), brush);
Serialization\VisualTreeFlattener.cs (2)
430_dcf.Comment(visual.GetType().ToString()); 747Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
Roslyn.Diagnostics.Analyzers (52)
src\roslyn\src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
280if (value.GetType() == typeof(int)) 285if (value.GetType() == typeof(string)) 290if (value.GetType() == typeof(bool)) 295if (value.GetType() == typeof(char)) 300if (value.GetType() == typeof(long)) 305if (value.GetType() == typeof(double)) 310if (value.GetType() == typeof(uint)) 315if (value.GetType() == typeof(ulong)) 320if (value.GetType() == typeof(float)) 325if (value.GetType() == typeof(decimal)) 330if (value.GetType() == typeof(short)) 335if (value.GetType() == typeof(ushort)) 340if (value.GetType() == typeof(DateTime)) 345if (value.GetType() == typeof(byte)) 350if (value.GetType() == typeof(sbyte)) 373Debug.Assert(value.GetType().IsPrimitive);
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
102throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
68throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
78throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray.cs (1)
143if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\roslyn\src\Dependencies\Collections\Segmented\SegmentedDictionary`2.cs (1)
156if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\roslyn\src\Dependencies\Contracts\ExceptionUtilities.cs (1)
23string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerConfigOptionsProviderExtensions.cs (1)
18return analyzerConfigOptionsProvider.GetType().GetField("_treeDict", flags)?.GetValue(analyzerConfigOptionsProvider) is ImmutableDictionary<object, AnalyzerConfigOptions> perTreeOptionsMap
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\SyntaxTreeCategorizedAnalyzerConfigOptions.cs (1)
54var type = analyzerConfigOptions.GetType();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
104(obj.GetType(), name),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
185Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 193var type = value.GetType(); 208if (value.GetType() == typeof(int)) 212else if (value.GetType() == typeof(double)) 217else if (value.GetType() == typeof(bool)) 221else if (value.GetType() == typeof(char)) 226else if (value.GetType() == typeof(byte)) 231else if (value.GetType() == typeof(short)) 236else if (value.GetType() == typeof(long)) 241else if (value.GetType() == typeof(sbyte)) 246else if (value.GetType() == typeof(float)) 251else if (value.GetType() == typeof(ushort)) 256else if (value.GetType() == typeof(uint)) 260else if (value.GetType() == typeof(ulong)) 267throw ExceptionUtilities.UnexpectedValue(value.GetType()); 270else if (value.GetType() == typeof(decimal)) 275else if (value.GetType() == typeof(DateTime)) 280else if (value.GetType() == typeof(string)) 286throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
130if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 131existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
166string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 185typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 206typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 224typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
31/// value would cause a different type to be seen in a <see cref="System.Object.GetType()"/> call,
sdk-tasks (2)
_generated\4\SdkTasksJsonSerializerContext.g.cs (2)
72throw new global::System.InvalidOperationException(string.Format("The converter '{0}' is not compatible with the type '{1}'.", converter.GetType(), type)); 80throw new global::System.InvalidOperationException(string.Format("The converter '{0}' cannot return null or a JsonConverterFactory instance.", factory.GetType()));
Shared (4)
Data.Validation\LengthAttribute.cs (2)
140throw new InvalidOperationException($"{nameof(LengthAttribute)} is not supported for fields of type {value.GetType()} (see field {validationContext.GetDisplayName()})"); 150private static PropertyInfo? GetCountProperty(object value) => value.GetType().GetRuntimeProperty("Count");
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
StringSplit\StringRange.cs (1)
73Throw.ArgumentException(nameof(obj), $"Provided value must be of type {typeof(StringRange)}, but was of type {obj.GetType()}.");
System.CodeDom (13)
Microsoft\CSharp\CSharpCodeGenerator.cs (3)
611throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 748throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e)); 1232throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
System\CodeDom\Compiler\CodeGenerator.cs (3)
608throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 1426throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e));
System\CodeDom\Compiler\CodeValidator.cs (7)
62throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 97throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 458throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 652string message = SR.Format(SR.InvalidTypeName, typeName, propertyName, e.GetType().FullName); 661string message = SR.Format(SR.InvalidLanguageIdentifier, identifier, propertyName, e.GetType().FullName); 771throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 941throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
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.CommandLine (2)
Help\HelpBuilder.cs (1)
423throw new NotSupportedException($"Symbol type {symbol.GetType()} is not supported.");
Symbol.cs (1)
79public override string ToString() => $"{GetType().Name}: {Name}";
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)
206Type operandType = minimum.GetType(); 243conversion = value => value.GetType() == type 249conversion = value => value.GetType() == type ? value : converter.ConvertFrom(value);
System\ComponentModel\DataAnnotations\ValidationContext.cs (1)
157public 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)
212Type 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)
473public override Type ComponentType => _option.GetType(); 477public 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)
262argTypes[idx] = arg.GetType(); 490return GetClassName(instance.GetType()); 509return GetConverter(instance.GetType(), instance); 535return GetEditor(instance.GetType(), instance, editorBaseType); 562Type componentType = instance.GetType(); 810return GetPropertyOwner(instance.GetType(), instance); 1250Type providerType = provider.GetType(); 1620return (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)
79public override object TypeId => field ??= 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)
1751Type type = instance.GetType(); 1862Type keyType = key as Type ?? key.GetType(); 2329Type type = component.GetType(); 2732Attribute? memberAttribute = member.Attributes[attribute.GetType()]; 2787throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance)); 3299Type type = instance.GetType(); 3448if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3450if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3471if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3472string? name = desc.GetClassName() ?? _instance.GetType().FullName; 3493if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3514if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3516if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3532return rp.GetConverterFromRegisteredType(_instance.GetType(), _instance); 3536if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3538if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3559if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3579if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3601if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3621if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3623if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3642if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3644if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3669if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3671if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3691if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3693if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3712if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3714if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3739if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3741if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3763if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3811throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3814throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3838throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3863throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3889throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3892throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3916throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3919throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3944throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3970throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3998throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4023throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4026throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4050throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4053throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4078throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4081throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4106throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4110throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4134throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4139throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4164throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4167throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4191throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor"));
System.Composition.Convention (1)
System\Composition\Convention\PartConventionBuilder.cs (1)
409Type attrType = attr.GetType();
System.Composition.TypedParts (5)
System\Composition\CompositionContextExtensions.cs (2)
51var objType = objectWithLooseImports.GetType(); 72var 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.Configuration.ConfigurationManager (31)
System\Configuration\ApplicationSettingsBase.cs (4)
403SettingChangingEventArgs e = new SettingChangingEventArgs(propertyName, this.GetType().FullName, SettingsKey, value, false); 507settingsProperty.Attributes[attribute.GetType()] = attribute; 544Type type = GetType(); 643_init.Attributes.Add(attr.GetType(), attr);
System\Configuration\ConfigurationConverterBase.cs (1)
22if ((value != null) && (value.GetType() != expected))
System\Configuration\ConfigurationElement.cs (10)
193if (PropertiesFromType(GetType(), out result)) 459if (elem.GetType() != GetType()) elem.SetLocked(); 677(compareTo.GetType() != GetType()) || 823if ((s_perTypeValidators != null) && s_perTypeValidators.TryGetValue(elem.GetType(), out ConfigurationValidatorBase value)) 868tw.WriteLine("Type: " + GetType().FullName); 870foreach (PropertyInfo pi in GetType().GetProperties()) 1762if ((validator != null) && !validator.CanValidate(elem.GetType())) 1765elem.GetType().Name));
System\Configuration\ConfigurationElementCollection.cs (2)
208if (compareTo == null || compareTo.GetType() != GetType())
System\Configuration\ConfigurationManager.cs (2)
56if ((section == null) || (section.GetType() != typeof(ConnectionStringsSection))) 210(s_configSystem.GetType() != typeof(ClientConfigurationSystem)))
System\Configuration\ConfigurationProperty.cs (1)
276if (!Converter.CanConvertFrom(value.GetType()))
System\Configuration\ConfigurationSection.cs (1)
55ConfigurationElement tempElement = CreateElement(GetType());
System\Configuration\ElementInformation.cs (1)
51public Type Type => _thisElement.GetType();
System\Configuration\MgmtConfigurationRecord.cs (3)
686string typeName = configSection.SectionInformation.Type ?? Host.GetConfigTypeName(configSection.GetType()); 705configSection.GetType(), typeof(ConfigurationSection), true), 840string typeName = configSectionGroup.Type ?? Host.GetConfigTypeName(configSectionGroup.GetType());
System\Configuration\SettingsPropertyValue.cs (2)
118if (value != null && !Property.PropertyType.IsAssignableFrom(value.GetType())) // is it the correct type 149if (value != null && !Property.PropertyType.IsAssignableFrom(value.GetType())) // is it the correct type
System\Configuration\ValidatorUtils.cs (1)
15if (value.GetType() != allowedType)
System\Diagnostics\FilterElement.cs (1)
23if (Type.GetType(TypeName) != filter.GetType() || InitDataChanged(filter))
System\Diagnostics\ListenerElementsCollection.cs (1)
335if (Type.GetType(className) != listener.GetType() || InitDataChanged(listener))
System\Diagnostics\TraceConfiguration.cs (1)
119Type currentType = traceSource.Switch.GetType();
System.Data.Common (161)
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
309return Argument(SR.Format(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 325return InvalidCast(SR.Format(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 395return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 399return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
src\runtime\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)
319if ((GetType() != connectionStringBuilder.GetType()) || (CurrentValues.Count != connectionStringBuilder.CurrentValues.Count)) 440GetType(); 484vtype = value.GetType(); 527GetType(), vtype, false, useAttributes!); 567Attribute? attr = property.Attributes[attribute.GetType()]; 596GetType(); 605GetType(); 650GetType();
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(); 477if (!IsTypeCustomType(value.GetType())) 482if (Type.GetTypeCode(value.GetType()) != TypeCode.Object) 497XmlSerializer serializerWithOutRootAttribute = ObjectStorage.GetXmlSerializer(value.GetType()); 513XmlSerializer 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)
119Debug.Assert((value.GetType() == typeof(SqlBinary)), "wrong input type");
System\Data\Common\SQLTypes\SQlBooleanStorage.cs (1)
153Debug.Assert((value.GetType() == typeof(SqlBoolean)), "wrong input type");
System\Data\Common\SQLTypes\SQLBytesStorage.cs (1)
117Debug.Assert((value.GetType() == typeof(SqlBytes)), "wrong input type");
System\Data\Common\SQLTypes\SQLByteStorage.cs (1)
229Debug.Assert((value.GetType() == typeof(SqlByte)), "wrong input type");
System\Data\Common\SQLTypes\SQLCharsStorage.cs (1)
120Debug.Assert((value.GetType() == typeof(SqlChars)), "wrong input type");
System\Data\Common\SQLTypes\SQLDateTimeStorage.cs (1)
155Debug.Assert((value.GetType() == typeof(SqlDateTime)), "wrong input type");
System\Data\Common\SQLTypes\SQLDecimalStorage.cs (1)
227Debug.Assert((value.GetType() == typeof(SqlDecimal)), "wrong input type");
System\Data\Common\SQLTypes\SQLDoubleStorage.cs (1)
228Debug.Assert((value.GetType() == typeof(SqlDouble)), "wrong input type");
System\Data\Common\SQLTypes\SQLGuidStorage.cs (1)
120Debug.Assert((value.GetType() == typeof(SqlGuid)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt16Storage.cs (1)
228Debug.Assert((value.GetType() == typeof(SqlInt16)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt32Storage.cs (1)
228Debug.Assert((value.GetType() == typeof(SqlInt32)), "wrong input type");
System\Data\Common\SQLTypes\SQLInt64Storage.cs (1)
229Debug.Assert((value.GetType() == typeof(SqlInt64)), "wrong input type");
System\Data\Common\SQLTypes\SQLMoneyStorage.cs (1)
228Debug.Assert((value.GetType() == typeof(SqlMoney)), "wrong input type");
System\Data\Common\SQLTypes\SQLSingleStorage.cs (1)
226Debug.Assert((value.GetType() == typeof(SqlSingle)), "wrong input type");
System\Data\Common\SQLTypes\SQLStringStorage.cs (1)
181Debug.Assert((value.GetType() == typeof(SqlString)), "wrong input type");
System\Data\Common\SqlUDTStorage.cs (1)
216XmlSerializer serializerWithOutRootAttribute = ObjectStorage.GetXmlSerializer(value.GetType());
System\Data\Common\TimeSpanStorage.cs (1)
186Type typeofValue = value.GetType();
System\Data\DataColumn.cs (8)
537throw ExceptionBuilder.DefaultValueDataType(ColumnName, DefaultValue.GetType(), value, ex); 541throw ExceptionBuilder.DefaultValueDataType(ColumnName, DefaultValue.GetType(), value, ex); 691throw ExceptionBuilder.DefaultValueColumnDataType(ColumnName, newDefaultValue.GetType(), DataType, ex); 1476Type leftType = value.GetType(); 1477Type rightType = _storage!.Get(record1).GetType(); 1515DataColumn clone = (DataColumn)Activator.CreateInstance(GetType())!; 1623(DataStorage.IsTypeCustomType(value.GetType()) && !(value is Type)); 1956Debug.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)
1137return (DataSet)Activator.CreateInstance(GetType(), true)!; 2279if (root.ChildNodes.Count == 0 || ((root.ChildNodes.Count == 1) && root.FirstChild!.GetType() == typeof(System.Xml.XmlText))) 3521if (GetType() == typeof(DataSet))
System\Data\DataTable.cs (3)
1050_isTypedDataTable = (byte)((GetType() != typeof(DataTable)) ? 1 : 2); 2325protected virtual DataTable CreateInstance() => (DataTable)Activator.CreateInstance(GetType(), true)!; 6725if (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)
477SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName), 503SR.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)
652StorageType leftType = DataStorage.GetStorageType(vLeft.GetType()); 661StorageType rightType = DataStorage.GetStorageType(vRight.GetType()); 673BinaryNode.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)
611throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime));
System\Data\SQLTypes\SQLDecimal.cs (1)
3290throw 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)
537throw 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)
1450if (col.GetType() != typeof(DataColumn)) 1872if (colTxt.GetType() != typeof(DataColumn)) 2583if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(columnValue) || (typeof(IXmlSerializable).IsAssignableFrom(columnValue.GetType()))) 2588Type valuesType = columnValue.GetType(); 2607if (!startElementSkipped && columnValue.GetType() != col.DataType) 2618if (columnValue.GetType() != col.DataType) 3017if (!col.IsCustomType || !DataColumn.IsValueCustomTypeInstance(value) || (typeof(IXmlSerializable).IsAssignableFrom(value.GetType()))) 3024Type valuesType = value.GetType(); 3051if (value.GetType() != col.DataType)
System.Data.Odbc (24)
Common\System\Data\Common\AdapterUtil.Odbc.cs (8)
302return DataAdapter(SR.GetString(SR.ADP_DeriveParametersNotSupported, value.GetType().Name, value.CommandType.ToString())); 395string message = SR.GetString(SR.ADP_ParameterConversionFailed, value.GetType().Name, destType.Name); 425return CollectionIndexInt32(index, collection.GetType(), collection.Count); 429return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType()); 433return CollectionNullValue(parameter, collection.GetType(), parameterType); 437return CollectionInvalidType(collection.GetType(), parameterType, invalidValue); 445return InvalidOperation(SR.GetString(SR.ADP_ParallelTransactionsNotSupported, obj.GetType().Name)); 449return InvalidOperation(SR.GetString(SR.ADP_TransactionZombied, obj.GetType().Name));
Common\System\Data\Common\DbConnectionStringCommon.cs (4)
190throw ADP.ConvertFailed(value.GetType(), typeof(bool), e); 229throw ADP.ConvertFailed(value.GetType(), typeof(bool), e); 241throw ADP.ConvertFailed(value.GetType(), typeof(int), e); 253throw ADP.ConvertFailed(value.GetType(), typeof(string), e);
Common\System\Data\ProviderBase\DbBuffer.cs (1)
387ValidateCheck(offset, Marshal.SizeOf(structure.GetType()));
src\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
309return Argument(SR.Format(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 325return InvalidCast(SR.Format(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 395return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 399return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionPoolKey.cs (1)
44if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey))
System\Data\Odbc\OdbcDataReader.cs (1)
76throw new ObjectDisposedException(GetType().Name);
System\Data\Odbc\OdbcMetaDataFactory.cs (2)
464if (values[positionOfColumnType].GetType() == typeof(short)) 490if (values[positionOfProcedureType].GetType() == typeof(short))
System\Data\Odbc\OdbcParameter.cs (3)
976if ((typemap != _typemap) && (null != Value) && !Convert.IsDBNull(Value) && (Value.GetType() != _typemap!._type)) 992Type valueType = value.GetType(); 1027Type type = value.GetType();
System.Data.OleDb (26)
DbConnectionStringCommon.cs (3)
158throw ADP.ConvertFailed(value.GetType(), typeof(bool), e); 170throw ADP.ConvertFailed(value.GetType(), typeof(int), e); 182throw ADP.ConvertFailed(value.GetType(), typeof(string), e);
OleDb_Enum.cs (1)
291_ => throw ADP.UnknownDataTypeCode(value.GetType(), ic.GetTypeCode()),
OleDbConnectionStringBuilder.cs (1)
661if ((typeof(string) == destinationType) && (null != value) && (typeof(int) == value.GetType()))
OleDbDataReader.cs (2)
241throw new ObjectDisposedException(GetType().Name); 252throw new ObjectDisposedException(GetType().Name);
OleDbMetaDataFactory.cs (2)
295if (invalidCharsObject.GetType() == typeof(string)) 300if (invalidStartingCharsObject.GetType() == typeof(string))
OleDbParameter.cs (1)
469Type currentType = value.GetType();
System\Data\Common\AdapterUtil.cs (15)
451return Argument(SR.GetString(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 467return InvalidCast(SR.GetString(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 471return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 475return Argument(SR.GetString(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 553return DataAdapter(SR.GetString(SR.ADP_DeriveParametersNotSupported, value.GetType().Name, value.CommandType.ToString())); 561return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterType, cmd.GetType().Name)); 565return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterSize, cmd.GetType().Name)); 569return InvalidOperation(SR.GetString(SR.ADP_PrepareParameterScale, cmd.GetType().Name, type)); 718string message = SR.GetString(SR.ADP_ParameterConversionFailed, value.GetType().Name, destType.Name); 748return CollectionIndexInt32(index, collection.GetType(), collection.Count); 752return CollectionIndexString(parameterType, ADP.ParameterName, parameterName, collection.GetType()); 756return CollectionNullValue(parameter, collection.GetType(), parameterType); 760return CollectionInvalidType(collection.GetType(), parameterType, invalidValue); 768return InvalidOperation(SR.GetString(SR.ADP_ParallelTransactionsNotSupported, obj.GetType().Name)); 772return InvalidOperation(SR.GetString(SR.ADP_TransactionZombied, obj.GetType().Name));
System\Data\Common\DbConnectionPoolKey.cs (1)
46if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey))
System.Diagnostics.DiagnosticSource (8)
System\Diagnostics\DsesFilterAndTransform.cs (2)
441Type argType = args.GetType(); 705Type? objType = obj?.GetType();
System\Diagnostics\Metrics\AggregationManager.cs (2)
374Type aggregatorType = createAggregatorFunc.GetType().GenericTypeArguments[0]; 381Type type = instrument.GetType();
System\Diagnostics\Metrics\Meter.cs (1)
530if (instrument.GetType() == instrumentType && instrument.Unit == unit &&
System\Diagnostics\Metrics\MetricsEventSource.cs (3)
492beginInstrumentMeasurements: (i, state) => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 494endInstrumentMeasurements: (i, state) => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 496instrumentPublished: (i, state) => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description,
System.Diagnostics.EventLog (2)
System\Diagnostics\EventLogInternal.cs (2)
1056throw new ObjectDisposedException(GetType().Name); 1094throw new ObjectDisposedException(GetType().Name);
System.Diagnostics.PerformanceCounter (1)
System\Diagnostics\SharedPerformanceCounter.cs (1)
696Debug.Assert(counterNamesObject is string[], $"Expected string[], got '{counterNamesObject}' of type '{counterNamesObject?.GetType()}' with kind '{categoryKey.GetValueKind("Counter Names")}' for category '{_categoryName}'");
System.Diagnostics.Process (1)
System\Diagnostics\Process.cs (1)
100if (GetType() == typeof(Process))
System.Diagnostics.TraceSource (1)
System\Diagnostics\TraceUtils.cs (1)
24throw new ArgumentException(SR.Format(SR.AttributeNotSupported, key, parent.GetType().FullName));
System.DirectoryServices (128)
Interop\AdsValueHelper2.cs (1)
53AdsType adsType = GetAdsTypeForManagedType(managedValue.GetType());
System\DirectoryServices\ActiveDirectory\ActiveDirectoryInterSiteTransport.cs (10)
104throw new ObjectDisposedException(GetType().Name); 115throw new ObjectDisposedException(GetType().Name); 137throw new ObjectDisposedException(GetType().Name); 165throw new ObjectDisposedException(GetType().Name); 188throw new ObjectDisposedException(GetType().Name); 218throw new ObjectDisposedException(GetType().Name); 266throw new ObjectDisposedException(GetType().Name); 316throw new ObjectDisposedException(GetType().Name); 331throw new ObjectDisposedException(GetType().Name); 345throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectoryPartition.cs (1)
77throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClass.cs (1)
1042throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaProperty.cs (1)
1090throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (21)
234throw new ObjectDisposedException(GetType().Name); 245throw new ObjectDisposedException(GetType().Name); 267throw new ObjectDisposedException(GetType().Name); 291throw new ObjectDisposedException(GetType().Name); 312throw new ObjectDisposedException(GetType().Name); 332throw new ObjectDisposedException(GetType().Name); 353throw new ObjectDisposedException(GetType().Name); 411throw new ObjectDisposedException(GetType().Name); 432throw new ObjectDisposedException(GetType().Name); 456throw new ObjectDisposedException(GetType().Name); 479throw new ObjectDisposedException(GetType().Name); 498throw new ObjectDisposedException(GetType().Name); 524throw new ObjectDisposedException(GetType().Name); 541throw new ObjectDisposedException(GetType().Name); 565throw new ObjectDisposedException(GetType().Name); 588throw new ObjectDisposedException(GetType().Name); 625throw new ObjectDisposedException(GetType().Name); 721throw new ObjectDisposedException(GetType().Name); 855throw new ObjectDisposedException(GetType().Name); 877throw new ObjectDisposedException(GetType().Name); 1075throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (19)
202throw new ObjectDisposedException(GetType().Name); 213throw new ObjectDisposedException(GetType().Name); 224throw new ObjectDisposedException(GetType().Name); 249throw new ObjectDisposedException(GetType().Name); 267throw new ObjectDisposedException(GetType().Name); 288throw new ObjectDisposedException(GetType().Name); 308throw new ObjectDisposedException(GetType().Name); 337throw new ObjectDisposedException(GetType().Name); 364throw new ObjectDisposedException(GetType().Name); 401throw new ObjectDisposedException(GetType().Name); 428throw new ObjectDisposedException(GetType().Name); 465throw new ObjectDisposedException(GetType().Name); 495throw new ObjectDisposedException(GetType().Name); 533throw new ObjectDisposedException(GetType().Name); 556throw new ObjectDisposedException(GetType().Name); 580throw new ObjectDisposedException(GetType().Name); 604throw new ObjectDisposedException(GetType().Name); 626throw new ObjectDisposedException(GetType().Name); 634throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkBridge.cs (7)
190throw new ObjectDisposedException(GetType().Name); 201throw new ObjectDisposedException(GetType().Name); 226throw new ObjectDisposedException(GetType().Name); 235throw new ObjectDisposedException(GetType().Name); 260throw new ObjectDisposedException(GetType().Name); 282throw new ObjectDisposedException(GetType().Name); 290throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnet.cs (9)
195throw new ObjectDisposedException(GetType().Name); 206throw new ObjectDisposedException(GetType().Name); 213throw new ObjectDisposedException(GetType().Name); 231throw new ObjectDisposedException(GetType().Name); 248throw new ObjectDisposedException(GetType().Name); 273throw new ObjectDisposedException(GetType().Name); 313throw new ObjectDisposedException(GetType().Name); 335throw new ObjectDisposedException(GetType().Name); 343throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ADAMInstance.cs (12)
298throw new ObjectDisposedException(GetType().Name); 314throw new ObjectDisposedException(GetType().Name); 334throw new ObjectDisposedException(GetType().Name); 348throw new ObjectDisposedException(GetType().Name); 368throw new ObjectDisposedException(GetType().Name); 387throw new ObjectDisposedException(GetType().Name); 404throw new ObjectDisposedException(GetType().Name); 426throw new ObjectDisposedException(GetType().Name); 442throw new ObjectDisposedException(GetType().Name); 782throw new ObjectDisposedException(GetType().Name); 790throw new ObjectDisposedException(GetType().Name); 810throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (1)
734throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\DirectoryServer.cs (1)
272throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\DomainController.cs (13)
422throw new ObjectDisposedException(GetType().Name); 438throw new ObjectDisposedException(GetType().Name); 458throw new ObjectDisposedException(GetType().Name); 472throw new ObjectDisposedException(GetType().Name); 492throw new ObjectDisposedException(GetType().Name); 511throw new ObjectDisposedException(GetType().Name); 528throw new ObjectDisposedException(GetType().Name); 550throw new ObjectDisposedException(GetType().Name); 566throw new ObjectDisposedException(GetType().Name); 842throw new ObjectDisposedException(GetType().Name); 850throw new ObjectDisposedException(GetType().Name); 1174throw new ObjectDisposedException(GetType().Name); 1211throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\Forest.cs (1)
1061throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\ActiveDirectory\ReplicationConnection.cs (23)
230throw new ObjectDisposedException(GetType().Name); 241throw new ObjectDisposedException(GetType().Name); 271throw new ObjectDisposedException(GetType().Name); 310throw new ObjectDisposedException(GetType().Name); 328throw new ObjectDisposedException(GetType().Name); 346throw new ObjectDisposedException(GetType().Name); 382throw new ObjectDisposedException(GetType().Name); 413throw new ObjectDisposedException(GetType().Name); 452throw new ObjectDisposedException(GetType().Name); 483throw new ObjectDisposedException(GetType().Name); 522throw new ObjectDisposedException(GetType().Name); 556throw new ObjectDisposedException(GetType().Name); 604throw new ObjectDisposedException(GetType().Name); 637throw new ObjectDisposedException(GetType().Name); 678throw new ObjectDisposedException(GetType().Name); 709throw new ObjectDisposedException(GetType().Name); 748throw new ObjectDisposedException(GetType().Name); 774throw new ObjectDisposedException(GetType().Name); 800throw new ObjectDisposedException(GetType().Name); 846throw new ObjectDisposedException(GetType().Name); 868throw new ObjectDisposedException(GetType().Name); 888throw new ObjectDisposedException(GetType().Name); 896throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\DirectoryEntry.cs (4)
504throw new ObjectDisposedException(GetType().Name); 777Type type = target.GetType(); 810Type type = target.GetType(); 840Type type = target.GetType();
System\DirectoryServices\SearchResultCollection.cs (3)
80throw new ObjectDisposedException(GetType().Name); 99throw new ObjectDisposedException(GetType().Name); 127throw new ObjectDisposedException(GetType().Name);
System.DirectoryServices.AccountManagement (62)
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (4)
722Type principalType = p.GetType(); 801Type principalType = p.GetType(); 928if ((p.GetType() == typeof(ComputerPrincipal)) || (p.GetType().IsSubclassOf(typeof(ComputerPrincipal))))
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (6)
33GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "Entering PushChangesToNative, type={0}", p.GetType()); 46Type principalType = p.GetType(); 409GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "Entering Load, type={0}, path={1}", p.GetType(), de.Path); 1334GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheToLdapConverter - Value Type " + kvp.Value.Value.GetType().ToString()); 1368GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheToLdapConverter - Element Value Type " + oVal.GetType().ToString()); 1530Type memberType = member.GetType();
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (11)
143ldapFilter.Append(GetObjectClassPortion(qbeFilter.GetType())); 156FilterPropertyTableEntry entry = (FilterPropertyTableEntry)filterTable[filter.GetType()]; 178BuildPropertySet(qbeFilter.GetType(), ds.PropertiesToLoad); 245ADEntriesSet resultSet = new ADEntriesSet(src, this, ps.QueryFilter.GetType()); 688return (ExtensionTypeConverter(suggestedAdProperty, qmt.Value.GetType(), qmt.Value, qmt.Match)); 710return (ExtensionTypeConverter(suggestedAdProperty, qmt.Value.GetType(), qmt.Value, qmt.Match)); 894GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionTypeConverter collection filter type " + o.GetType().ToString()); 895collectionFilter.Append(ExtensionTypeConverter(attributeName, o.GetType(), o, mt)); 980Type type = kvp.Value.Type ?? kvp.Value.Value.GetType(); 992GlobalDebug.WriteLineIf(GlobalDebug.Info, "ADStoreCtx", "ExtensionCacheConverter collection filter type " + o.GetType().ToString()); 993query.Append(ExtensionTypeConverter(kvp.Key, o.GetType(), o, kvp.Value.MatchType));
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (2)
217GlobalDebug.WriteLineIf(GlobalDebug.Warn, "SDSUtils", "InsertPrincipal: Bad principal type:" + p.GetType().ToString()); 219throw new InvalidOperationException(SR.Format(SR.StoreCtxUnsupportedPrincipalTypeForSave, p.GetType()));
System\DirectoryServices\AccountManagement\AuthZSet.cs (1)
30userStoreCtx.GetType());
System\DirectoryServices\AccountManagement\Computer.cs (2)
18if (Context.ContextType == ContextType.ApplicationDirectory && this.GetType() == typeof(ComputerPrincipal)) 30if (Context.ContextType == ContextType.ApplicationDirectory && this.GetType() == typeof(ComputerPrincipal))
System\DirectoryServices\AccountManagement\ExtensionHelper.cs (2)
24(DirectoryRdnPrefixAttribute[])Attribute.GetCustomAttributes(_p.GetType(), typeof(DirectoryRdnPrefixAttribute), false); 79(DirectoryObjectClassAttribute[])Attribute.GetCustomAttributes(_p.GetType(), typeof(DirectoryObjectClassAttribute), false);
System\DirectoryServices\AccountManagement\Principal.cs (13)
316GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "Save: inserting principal of type {0} using {1}", this.GetType(), storeCtxToUse.GetType()); 317Debug.Assert(storeCtxToUse == _ctx.ContextForType(this.GetType())); 323GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "Save: updating principal of type {0} using {1}", this.GetType(), storeCtxToUse.GetType()); 380GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "Save(context): inserting new principal of type {0} using {1}", this.GetType(), newStoreCtx.GetType()); 381Debug.Assert(newStoreCtx == _ctx.ContextForType(this.GetType())); 388GlobalDebug.WriteLineIf(GlobalDebug.Info, "Principal", "Save(context): Moving principal of type {0} using {1}", this.GetType(), newStoreCtx.GetType()); 516return _ctx.ContextForType(this.GetType()).NativeType(this); 810return _ctx.ContextForType(this.GetType()); 889throw new ObjectDisposedException(this.GetType().ToString());
System\DirectoryServices\AccountManagement\PrincipalSearcher.cs (4)
187"Dispose: disposing underlying searcher of type " + this.UnderlyingSearcher.GetType().ToString()); 281"SetDefaultPageSizeForContext: type is " + _ctx.QueryCtx.GetType().ToString()); 308Type t = _qbeFilter.GetType(); 336throw new ObjectDisposedException(this.GetType().ToString());
System\DirectoryServices\AccountManagement\SAM\SAMQuerySet.cs (1)
261FilterPropertyTableEntry entry = (FilterPropertyTableEntry)s_filterPropertiesTable[filter.GetType()];
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (2)
375Type principalType = p.GetType(); 1083return ((s_maskMap[p.GetType()] & value) > 0 ? true : false);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (7)
34Type principalType = p.GetType(); 36GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMStoreCtx", "Entering PushChangesToNative, type={0}", p.GetType()); 231Type principalType = p.GetType(); 283GlobalDebug.WriteLineIf(GlobalDebug.Info, "SAMStoreCtx", "Entering Load, type={0}, path={1}", p.GetType(), de.Path); 289Type principalType = p.GetType(); 904p.GetType(), 1069Type memberType = member.GetType();
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_Query.cs (1)
94qbeFilterType = ps.QueryFilter.GetType();
System\DirectoryServices\AccountManagement\StoreCtx.cs (3)
371p.GetType().ToString(), 374value.GetType().ToString()); 438Debug.Fail($"StoreCtx.BuildFilterSet: fell off end looking for {propertyName} of type {value.GetType()}");
System\DirectoryServices\AccountManagement\User.cs (1)
302"GetAuthorizationGroupsHelper: retrieving AZ groups from StoreCtx of type=" + storeCtx.GetType().ToString() +
System\DirectoryServices\AccountManagement\ValueCollection.cs (2)
448el.insertedValue.GetType()); 466pair.Left.GetType());
System.DirectoryServices.Protocols (32)
System\DirectoryServices\Protocols\common\BerConverter.cs (4)
110Debug.WriteLine(value[valueCount].GetType()); 139Debug.WriteLine(value[valueCount].GetType()); 162Debug.WriteLine(value[valueCount].GetType()); 203Debug.WriteLine(value[valueCount].GetType());
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (6)
197throw new ObjectDisposedException(GetType().Name); 267throw new ObjectDisposedException(GetType().Name); 384throw new ObjectDisposedException(GetType().Name); 426throw new ObjectDisposedException(GetType().Name); 448throw new ObjectDisposedException(GetType().Name); 992throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (17)
301throw new ObjectDisposedException(GetType().Name); 318throw new ObjectDisposedException(GetType().Name); 423throw new ObjectDisposedException(GetType().Name); 432throw new ObjectDisposedException(GetType().Name); 461throw new ObjectDisposedException(GetType().Name); 470throw new ObjectDisposedException(GetType().Name); 503throw new ObjectDisposedException(GetType().Name); 512throw new ObjectDisposedException(GetType().Name); 540throw new ObjectDisposedException(GetType().Name); 567throw new ObjectDisposedException(GetType().Name); 747throw new ObjectDisposedException(GetType().Name); 767throw new ObjectDisposedException(GetType().Name); 781throw new ObjectDisposedException(GetType().Name); 794throw new ObjectDisposedException(GetType().Name); 808throw new ObjectDisposedException(GetType().Name); 821throw new ObjectDisposedException(GetType().Name); 846throw new ObjectDisposedException(GetType().Name);
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.Linux.cs (5)
52if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); 57if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); 98if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); 109if (_connection._disposed) throw new ObjectDisposedException(GetType().Name); 118if (_connection._disposed) throw new ObjectDisposedException(GetType().Name);
System.Drawing.Common (7)
System\Drawing\Font.cs (3)
261$"[{GetType().Name}: Name={FontFamily.Name}, Size={_fontSize}, Units={(int)_fontUnit}, GdiCharSet={_gdiCharSet}, GdiVerticalFont={_gdiVerticalFont}]"; 271Type type = logFont.GetType(); 629Type type = lf.GetType();
System\Drawing\Icon.cs (2)
185public IntPtr Handle => _handle.IsNull ? throw new ObjectDisposedException(GetType().Name) : (nint)_handle; 408throw new InvalidOperationException(SR.Format(SR.IllegalState, GetType().Name));
System\Drawing\Text\FontCollection.cs (1)
42bool installedFontCollection = GetType() == typeof(InstalledFontCollection);
System\Drawing\ToolboxBitmapAttribute.cs (1)
61component is not null ? GetImage(component.GetType(), large) : null;
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
37WriteEnumeratedValue(tag?.AsPrimitive() ?? Asn1Tag.Enumerated, value.GetType(), value);
System\Formats\Asn1\AsnWriter.NamedBitList.cs (1)
41WriteNamedBitList(tag, value.GetType(), value);
System.Formats.Nrbf (1)
System\Formats\Nrbf\NullsRecord.cs (1)
15public override TypeName TypeName => TypeName.Parse(GetType().Name.AsSpan());
System.IO.Compression (17)
System\IO\Compression\DeflateZLib\DeflateStream.cs (6)
292if (GetType() != typeof(DeflateStream)) 431if (GetType() != typeof(DeflateStream)) 539if (GetType() != typeof(DeflateStream)) 554if (GetType() != typeof(DeflateStream)) 760return GetType() == typeof(DeflateStream) ? 830if (GetType() != typeof(DeflateStream))
System\IO\Compression\GZipStream.cs (6)
105if (GetType() != typeof(GZipStream)) 133if (GetType() != typeof(GZipStream)) 149if (GetType() != typeof(GZipStream)) 187if (GetType() != typeof(GZipStream)) 219if (GetType() != typeof(GZipStream)) 241if (GetType() != typeof(GZipStream))
System\IO\Compression\ZipArchiveEntry.cs (1)
1574throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System\IO\Compression\ZipCustomStreams.cs (4)
76throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 317throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 545throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 938throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System.IO.FileSystem.AccessControl (2)
System\Security\AccessControl\FileSystemSecurity.cs (2)
173AuthorizationRuleCollection rules = GetAccessRules(true, true, rule.IdentityReference.GetType()); 216AuthorizationRuleCollection rules = GetAccessRules(true, true, rule.IdentityReference.GetType());
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)
54if (source.GetType() == typeof(TSource[])) 58else 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)
38Type? enumType = TypeHelper.FindGenericType(typeof(IEnumerable<>), source.GetType());
System.Management (19)
System\Management\ManagementNamedValueCollection.cs (1)
150Type valueType = val.GetType();
System\Management\ManagementObject.cs (4)
387if (GetType() == typeof(ManagementObject) && path.IsClass) 389else if (GetType() == typeof(ManagementClass) && path.IsInstance) 575if ((GetType() == typeof(ManagementObject) && newPath.IsInstance) || 576(GetType() == typeof(ManagementClass) && newPath.IsClass) ||
System\Management\ManagementObjectSearcher.cs (2)
335if ((query.GetType() == typeof(SelectQuery)) && 428if ((query.GetType() == typeof(SelectQuery)) &&
System\Management\MethodSet.cs (2)
363if (parent.GetType() == typeof(ManagementObject)) //can't remove methods from instance 425if (parent.GetType() == typeof(ManagementObject)) //can't add methods to instance
System\Management\Property.cs (4)
25else if (theValue.GetType().IsPrimitive) 164if (parent.GetType() == typeof(ManagementObject)) 597isArray = val.GetType().IsArray; 598Type valueType = val.GetType();
System\Management\PropertySet.cs (5)
377if (parent.GetType() == typeof(ManagementObject)) 416if (parent.GetType() == typeof(ManagementObject)) //can't add properties to instance 455if (parent.GetType() == typeof(ManagementObject)) //can't add properties to instance 461if ((null != propertyValue) && propertyValue.GetType().IsArray) 497if (parent.GetType() == typeof(ManagementObject)) //can't add properties to instance
System\Management\Qualifier.cs (1)
105Type elementType = (length > 0 ? valArray.GetValue(0).GetType() : null);
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\runtime\src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\runtime\src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (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)
514Debug.Assert(parsedValue.GetType() == value.GetType(), 531Debug.Assert(item.GetType() == value.GetType(), 609Debug.Assert(parsedValue.GetType() == value.GetType(), 621Debug.Assert(item.GetType() == value.GetType(), 641Debug.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)
306throw 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)
164sb.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)
199GetType() == typeof(MultipartContent) ? SerializeToStreamAsyncCore(stream, context, cancellationToken) : 248GetType() == 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)
409if (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)
581throw 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)
108GetType() == typeof(StringContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 112GetType() == 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())); 167if (inputValue is not null && !inputType.IsAssignableFrom(inputValue.GetType())) 169throw new ArgumentException(SR.Format(SR.SerializeWrongType, inputType, inputValue.GetType()));
System.Net.Http.WinHttpHandler (8)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\Http\WinHttpHandler.cs (1)
1591throw new ObjectDisposedException(GetType().FullName);
System\Net\Http\WinHttpRequestStream.cs (1)
188throw new ObjectDisposedException(this.GetType().FullName);
System\Net\Http\WinHttpResponseStream.cs (1)
336throw new ObjectDisposedException(this.GetType().FullName);
System.Net.HttpListener (5)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System.Net.Mail (5)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System.Net.NameResolution (6)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\NameResolutionTelemetry.cs (1)
139Debug.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\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\IPEndPoint.cs (3)
192throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 198throw new ArgumentException(SR.Format(SR.net_InvalidSocketAddressSize, socketAddress.GetType().FullName, GetType().FullName), nameof(socketAddress));
System.Net.Quic (9)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\Quic\QuicConnection.cs (3)
386throw new ArgumentException(SR.Format(SR.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options)); 680Exception exception = ExceptionDispatchInfo.SetCurrentStackTrace(_disposed ? new ObjectDisposedException(GetType().FullName) : ThrowHelper.GetOperationAbortedException()); 863_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicListener.cs (1)
432_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System.Net.Requests (5)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System.Net.Security (8)
src\runtime\src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\runtime\src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\Security\SslStream.Protocol.cs (1)
254if (certificate.GetType() == typeof(X509Certificate2))
System.Net.Sockets (12)
src\runtime\src\libraries\Common\src\System\Net\DebugSafeHandleMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\Sockets\NetworkStream.cs (2)
252if (GetType() != typeof(NetworkStream)) 324if (GetType() != typeof(NetworkStream))
System\Net\Sockets\Socket.Unix.cs (1)
156throw new ObjectDisposedException(GetType().FullName);
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
2329public static string IdOf(object o) => o == null ? "(null)" : $"{o.GetType().Name}#{o.GetHashCode():X2}";
System\Net\Sockets\SocketPal.Unix.cs (2)
1900throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList)); 2007throw 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 (7)
src\runtime\src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
106public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 131return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 137return $"{c.GetType().Name}({c.Count})"; 143return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 155if (toString == null || toString == value.GetType().FullName)
System\Net\WebSockets\WebSocketStream.cs (2)
199return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName))); 301return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System.Net.WebSockets.Client (2)
System\Net\WebSockets\ClientWebSocket.cs (2)
107throw new ObjectDisposedException(GetType().FullName); 137throw new ObjectDisposedException(GetType().FullName);
System.Numerics.Tensors (2)
System\ThrowHelper.cs (2)
32if ((array is not null) && (array.GetType().GetElementType() != typeof(T))) 40if ((array is not null) && !typeof(T).IsValueType && (array.GetType() != typeof(T[])))
System.Private.CoreLib (254)
Internal\Reflection\Augments\ReflectionAugments.cs (2)
298RuntimeTypeInfo runtimeContainingType = target.GetType().ToRuntimeTypeInfo(); 407Type targetType = target.GetType();
Internal\Reflection\Core\Execution\MethodBaseInvoker.cs (1)
60throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, declaringTypeHandle.GetRuntimeTypeInfoForRuntimeTypeHandle(), thisObject.GetType()));
Internal\Runtime\CompilerHelpers\InteropHelpers.cs (2)
522return Marshal.SizeOf(o.GetType()); 565Marshal.DestroyStructure(address, o.GetType());
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (3)
791if (ctx == null || ctx.GetType() == typeof(SynchronizationContext)) 1034if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext)) 1101if (threadSyncCtx != null && threadSyncCtx.GetType() != typeof(SynchronizationContext))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (6)
442if (sourceArray.GetType() != destinationArray.GetType() && sourceArray.Rank != destinationArray.Rank) 461if (sourceArray.GetType() == destinationArray.GetType() 1478if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 1508if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Attribute.cs (3)
97Type thisValueType = thisValue.GetType(); 102if (!thisValueType.Equals(thatValue.GetType())) 137public virtual object TypeId => GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffer.cs (2)
24if (src.GetType() != typeof(byte[])) 35if (dst.GetType() != typeof(byte[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\CodeDom\Compiler\IndentedTextWriter.cs (1)
68GetType() != typeof(IndentedTextWriter) ? FlushAsync() :
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (1)
2563_isArrayList = (list.GetType() == typeof(ArrayList));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (16)
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(); 318public override int GetHashCode() => GetType().GetHashCode();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
209Type targetType = array.GetType().GetElementType()!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
140Type targetType = array.GetType().GetElementType()!;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
173if (ReferenceEquals(value.GetType(), targetType)) 218throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); 243if (value.GetType() == conversionType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
89argTypes[i] = args[i]!.GetType(); 223if (argTypes[index] == null || !CanChangePrimitive(args[index]!.GetType(), pCls)) 261if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) 469valueType = value.GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs (1)
23/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventListener.cs (2)
191if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) 209if (eventSource.GetType() == typeof(NativeRuntimeEventSource))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
418Type underlyingType = Enum.GetUnderlyingType(data.GetType());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (4)
754Type myType = this.GetType(); 2141if ((arg != null && !pType.IsAssignableFrom(arg.GetType())) 2895m_rawManifest = EventSourceHelpers.CreateManifestAndDescriptors(this.GetType(), Name, this); 3075if (source?.GetType() == typeof(NativeRuntimeEventSource))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (18)
403if (GetType() != flag.GetType() && !GetType().IsEquivalentTo(flag.GetType())) 404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1150Type valueType = value.GetType(); 1199if (this.GetType() != obj.GetType()) 1289if (GetType() != target.GetType()) 1290throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1357RuntimeType enumType = (RuntimeType)GetType(); 1405RuntimeType enumType = (RuntimeType)GetType(); 1632Type valueType = value.GetType(); 1690RuntimeType enumType = (RuntimeType)GetType(); 2212Type valueType = value.GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
202public new Type GetType() => base.GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
170_isInherited = GetType() != typeof(CultureInfo); 211_isInherited = GetType() != typeof(CultureInfo);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
1168if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (2)
313if (provider.GetType() == typeof(CultureInfo) && ((CultureInfo)provider)._dateTimeInfo is { } info) 2114if (Calendar.GetType() != typeof(JapaneseCalendar))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
4058if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
95throw new TypeInitializationException(this.GetType().ToString(), e);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
51throw new TypeInitializationException(GetType().ToString(), e);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
220if (provider.GetType() == typeof(CultureInfo) && ((CultureInfo)provider)._numInfo is { } info)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
52throw new TypeInitializationException(GetType().ToString(), e);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
58_isMemoryStream = _stream.GetType() == typeof(MemoryStream);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (3)
87if (GetType() == typeof(BinaryWriter)) 359if (GetType() == typeof(BinaryWriter) && value.Length <= 127 / 3) 389if (GetType() == typeof(BinaryWriter))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
348if (GetType() != typeof(MemoryStream)) 443if (GetType() != typeof(MemoryStream)) 478if (GetType() != typeof(MemoryStream)) 624if (GetType() != typeof(MemoryStream))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
42=> fileStream.GetType() == typeof(FileStream)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (3)
61ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 95ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 1001ThrowHelper.ThrowObjectDisposedException_StreamClosed(destination.GetType().Name);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (9)
364GetType() == typeof(StreamReader) ? ReadSpan(buffer) : 446if (GetType() != typeof(StreamReader)) 893if (GetType() != typeof(StreamReader)) 1021if (GetType() != typeof(StreamReader)) 1065if (GetType() != typeof(StreamReader)) 1081if (GetType() != typeof(StreamReader)) 1276if (GetType() != typeof(StreamReader)) 1292if (GetType() != typeof(StreamReader)) 1408void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_ReaderClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (27)
164Debug.Assert(GetType() == typeof(NullStreamWriter)); 248GetType() != typeof(StreamWriter) ? 255Debug.Assert(GetType() == typeof(StreamWriter)); 389if (GetType() == typeof(StreamWriter)) 491if (GetType() == typeof(StreamWriter)) 520if (GetType() == typeof(StreamWriter)) 532if (GetType() == typeof(StreamWriter)) 544if (GetType() == typeof(StreamWriter)) 556if (GetType() == typeof(StreamWriter)) 577if (GetType() == typeof(StreamWriter)) 589if (GetType() == typeof(StreamWriter)) 601if (GetType() == typeof(StreamWriter)) 613if (GetType() == typeof(StreamWriter)) 625if (GetType() == typeof(StreamWriter)) 643if (GetType() == typeof(StreamWriter)) 659if (GetType() != typeof(StreamWriter)) 707if (GetType() != typeof(StreamWriter)) 743if (GetType() != typeof(StreamWriter)) 759if (GetType() != typeof(StreamWriter)) 821if (GetType() != typeof(StreamWriter)) 841if (GetType() != typeof(StreamWriter)) 866if (GetType() != typeof(StreamWriter)) 895if (GetType() != typeof(StreamWriter)) 911if (GetType() != typeof(StreamWriter)) 932if (GetType() != typeof(StreamWriter)) 947if (GetType() != typeof(StreamWriter)) 1015void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_WriterClosed);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (1)
117if (GetType() != typeof(StringReader))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (6)
106if (GetType() != typeof(StringWriter)) 140if (GetType() != typeof(StringWriter)) 158if (GetType() != typeof(StringWriter)) 177if (GetType() != typeof(StringWriter)) 227if (GetType() != typeof(StringWriter)) 262if (GetType() != typeof(StringWriter))
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
345if (GetType() == typeof(UnmanagedMemoryStream)) 613if (GetType() == typeof(UnmanagedMemoryStream))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Memory.cs (4)
44if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 62if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 94if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 283if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (3)
34if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 56if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 83if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Object.cs (1)
42return GetType().ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
35_impl = GetType() == typeof(Random) ? new XoshiroImpl() : new CompatDerivedImpl(this); 46_impl = GetType() == typeof(Random) ? new CompatSeedImpl(Seed) : new CompatDerivedImpl(this, Seed); 502if ((impl is null || impl.GetType() == typeof(XoshiroImpl)) &&
src\runtime\src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
205if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
31_argumentType = value.GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionContext.cs (1)
18return MapType(value.GetType().GetTypeInfo());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
72if (graph.GetType() != type) 73throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
93Type stateMachineType = stateMachine.GetType();
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
528provider.GetType() != typeof(CultureInfo) && // optimization to avoid GetFormat in the majority case
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
38if (typeof(T[]) == array.GetType()) 55dest = Unsafe.As<T[]>(Array.CreateInstanceFromArrayType(array.GetType(), length));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
38Debug.Assert(typeof(T[]) == list._items.GetType(), "Implementation depends on List<T> always using a T[] and not U[] where U : T.");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
136if (target.GetType() == typeof(string))
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
280(typeof(T) == typeof(char) && obj.GetType() == typeof(string)) 612if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
271public override string ToString() => $"\"{Name}\" {GetType()} #{_id}"; 408if (stream.GetType() == typeof(MemoryStream) && ((MemoryStream)stream).TryGetBuffer(out ArraySegment<byte> memoryStreamBuffer))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
149AddValue(name, value, value.GetType());
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.T.cs (1)
54string display = $"{GetType().Name}, Count = {values.Length}";
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
42if (children.GetType() == typeof(int[]))
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
923if (values.GetType() == typeof(List<string?>)) // avoid accidentally bypassing a derived type's reimplementation of IEnumerable<T>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
243throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (1)
465ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (3)
382throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 665throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 1740GetType() != typeof(UnicodeEncoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UnicodeEncoding overrode GetPreamble
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (3)
375throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 510throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 1132GetType() != typeof(UTF32Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF32Encoding overrode GetPreamble
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
105Debug.Assert(asyncLocalValueMap == Empty || asyncLocalValueMap.GetType() != typeof(EmptyAsyncLocalValueMap));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
309return Task.FromException(new ObjectDisposedException(GetType().FullName, SR.CancellationTokenSource_Disposed));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
140if (userData.GetType() == typeof(object[])) 166if (userData.GetType() == typeof(object[]))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
551if (m_pair.CompletionRequested) throw new InvalidOperationException(GetType().ToString());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
150sc.GetType() != typeof(SynchronizationContext))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
2649if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 2722if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 6874if (tasks.GetType() == typeof(List<TTask>))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (1)
611if (ctx != null && ctx.GetType() != typeof(SynchronizationContext)) return false;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 452throw new ObjectDisposedException(instance?.GetType().FullName);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (4)
21public new Type GetType() => base.GetType(); 477return o.GetType().TypeHandle; 489cls[i] = args[i].GetType(); 602public virtual bool IsInstanceOfType([NotNullWhen(true)] object? o) => o != null && IsAssignableFrom(o.GetType());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (2)
28Type valueType = value.GetType(); 73Type valueType = value.GetType();
src\runtime\src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
233Debug.Assert(this.GetType() != typeof(WeakReference));
System\ActivatorImplementation.cs (1)
74argTypes[i] = args[i]?.GetType();
System\Array.NativeAot.cs (1)
411throw new InvalidCastException(SR.Format(SR.Arg_ObjObjEx, value.GetType(), Type.GetTypeFromHandle(new RuntimeTypeHandle(pElementEEType))));
System\Attribute.NativeAot.cs (3)
31if (this.GetType() != obj.GetType()) 78if (fieldValue != null && !fieldValue.GetType().IsArray)
System\Delegate.cs (3)
248DynamicInvokeInfo dynamicInvokeInfo = ReflectionAugments.GetDelegateDynamicInvokeInfo(GetType()); 271return GetType().GetMethod("Invoke"); 291Type t = GetType();
System\Reflection\DynamicInvokeInfo.cs (1)
613if (arg.GetType() == typeof(Missing))
System\Reflection\Runtime\CustomAttributes\RuntimeCustomAttributeData.cs (2)
148return GetType().ToString(); 166argumentType = value.GetType();
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (2)
351if (target != null && !IsAssignableFrom(targetParameterEnumerator.Current.ParameterType, target.GetType())) 363if (target != null && !IsAssignableFrom(this.DeclaringType, target.GetType()))
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.InvokeMember.cs (1)
64if (target != null && target.GetType().IsCOMObject)
System\Runtime\InteropServices\IDynamicInterfaceCastable.cs (1)
62throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, instance.GetType(), Type.GetTypeFromMethodTable(interfaceType)));
System\Runtime\InteropServices\Marshal.NativeAot.cs (3)
132DestroyStructure(ptr, structure.GetType()); 257Type structType = ptr.GetType(); 335Type structType = ptr.GetType();
System\RuntimeType.NativeAot.cs (4)
160if (Type.IsIntegerType(value.GetType())) 161throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, value.GetType(), Enum.InternalGetUnderlyingType(this))); 169throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, value.GetType(), this)); 175throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, value.GetType(), underlyingType));
System\ValueType.cs (1)
31return this.GetType().ToString();
System.Private.CoreLib.Generators (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
System.Private.DataContractSerialization (52)
System\Runtime\Serialization\CodeGenerator.cs (3)
186return var.GetType(); 695throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CanOnlyStoreIntoArgOrLocGot0, DataContract.GetClrTypeFullName(var.GetType()))); 799Type valueType = o.GetType();
System\Runtime\Serialization\DataContract.cs (4)
177throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 184throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 191throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 196throw 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)
434return (graph == null) ? _rootType : graph.GetType(); 507Type 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)
365string oldType = (oldObj != null) ? DataContract.GetClrTypeFullName(oldObj.GetType()) : SR.UnknownNullType; 366string newType = (newObj != null) ? DataContract.GetClrTypeFullName(newObj.GetType()) : SR.UnknownNullType;
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (11)
99SerializeWithXsiType(xmlWriter, obj, obj.GetType().TypeHandle, null/*type*/, -1, declaredType.TypeHandle, declaredType); 108RuntimeTypeHandle objTypeHandle = obj.GetType().TypeHandle; 382throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotSerializeObjectWithCycles, DataContract.GetClrTypeFullName(obj.GetType()))); 445return obj.GetType().TypeHandle.Equals(memberType.TypeHandle); 498throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownXmlType, DataContract.GetClrTypeFullName(obj.GetType()))); 516Type objType = obj.GetType(); 605throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedFalse, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 615throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 620throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 730InternalSerialize(xmlWriter, o, false /*isDeclaredType*/, false /*writeXsiType*/, -1, o.GetType().TypeHandle); 747Type 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.Reflection.Execution (11)
Internal\Reflection\Execution\FieldAccessors\PointerTypeFieldAccessorForInstanceFields.cs (6)
30Debug.Assert(value.GetType() == typeof(UIntPtr) || value.GetType() == typeof(IntPtr)); 31RuntimeAugments.StoreValueTypeField(obj, OffsetPlusHeader, value, value.GetType().TypeHandle); 36Debug.Assert(value.GetType() == typeof(UIntPtr) || value.GetType() == typeof(IntPtr)); 37RuntimeAugments.StoreValueTypeFieldValueIntoValueType(typedReference, this.Offset, value, value.GetType().TypeHandle);
Internal\Reflection\Execution\FieldAccessors\PointerTypeFieldAccessorForStaticFields.cs (5)
39Debug.Assert(value.GetType() == typeof(UIntPtr) || value.GetType() == typeof(IntPtr)); 44RuntimeAugments.StoreValueTypeField(gcStaticsRegion, FieldOffset, value, value.GetType().TypeHandle); 48RuntimeAugments.StoreValueTypeField(StaticsBase + FieldOffset, value, value.GetType().TypeHandle); 54RuntimeAugments.StoreValueTypeField(threadStaticsRegion, FieldOffset, value, value.GetType().TypeHandle);
System.Private.Uri (7)
System\Uri.cs (2)
1611throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 2601throw new UriFormatException(SR.Format(SR.net_uri_PortOutOfRange, _syntax.GetType(), portStr));
System\UriExt.cs (1)
379throw 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)
227Type type = this.GetType();
System.Private.Windows.Core (10)
System\DisposalTracking.cs (1)
57throw new InvalidOperationException($"Did not dispose `{GetFriendlyTypeName(GetType())}`. Originating stack:\n{_originatingStack}");
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
293Type type = primitive.GetType(); 402Type type = list.GetType(); 505PrimitiveType primitiveType = array.GetType().GetElementType()!.GetPrimitiveType(); 678Type type = value.GetType();
System\Private\Windows\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
33PrimitiveType primitiveType = value.GetType().GetPrimitiveType();
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (1)
297_ when format == DataFormatNames.Serializable || data is ISerializable || data.GetType().IsSerializable
System\Private\Windows\Ole\DataStore.cs (1)
127SetData(data.GetType(), data);
System\Value.cs (1)
51type = _object.GetType();
Windows\Win32\System\Com\ComHelpers.cs (1)
113Debug.WriteLine($"Did not find IUnknown for {@object.GetType().Name}. {ex.Message}");
System.Private.Windows.Core.TestUtilities (7)
DebuggerAttributes.cs (6)
26DebuggerAttributeInfo info = ValidateDebuggerTypeProxyProperties(obj.GetType(), obj); 35return ValidateDebuggerTypeProxyProperties(obj.GetType(), obj); 84public static Type GetProxyType(object obj) => GetProxyType(obj.GetType()); 116Type objType = obj.GetType(); 204for (Type t = obj.GetType(); t is not null; t = t.GetTypeInfo().BaseType) 217for (Type t = obj.GetType(); t is not null; t = t.GetTypeInfo().BaseType)
TestAccessor.cs (1)
119[.. args.Select(a => a!.GetType())],
System.Private.Xml (169)
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)
155if (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(); 770Type valueType = o.GetType();
System\Xml\Serialization\Compilation.cs (2)
623_methods[mapping.Key!].readMethod = GetMethodFromType(reader.GetType(), methodName); 650_methods[mapping.Key!].writeMethod = GetMethodFromType(writer.GetType(), methodName);
System\Xml\Serialization\ImportContext.cs (5)
67string key = $"{item.GetType().Name}:{qname}"; 87Warnings.Add(SR.Format(SR.XmlMismatchSchemaObjects, item.GetType().Name, qname.Name, qname.Namespace)); 100if (o1.GetType() != o2.GetType()) 254Type t = item.GetType();
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (6)
432Type = refObj.GetType(), 603Type type = o.GetType(); 612MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveSetInfo(o.GetType(), memberName); 647MethodInfo getSetMemberValueDelegateWithTypeMi = getSetMemberValueDelegateWithTypeGenericMi.MakeGenericMethod(o.GetType(), memberType); 1813MemberInfo[] memberInfos = o!.GetType().GetMember(member.Mapping.Name); 2023if (memberType == value.GetType())
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (8)
230string choiceFullName = (enumUseReflection ? "" : choiceSource!.GetType().FullName + ".@") + choiceSource!.ToString(); 238if (o != null && !td.Type!.IsAssignableFrom(o!.GetType())) 251if (td.Type!.IsAssignableFrom(o!.GetType())) 595&& o.GetType() != mapping.TypeDesc!.Type) 726MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveGetInfo(o.GetType(), memberName); 733Type objType = o.GetType(); 979Type t = o.GetType(); 1390WritePotentiallyReferencingElement(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)
2164throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2203throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (4)
677throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 872if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 1069throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
364if (!(desiredMappingType.IsAssignableFrom(mapping.GetType()))) 365throw new InvalidOperationException(SR.Format(SR.XmlElementImportedTwice, element.Name, ns, mapping.GetType().Name, desiredMappingType.Name)); 422if (mapping != null && desiredMappingType.IsAssignableFrom(mapping.GetType()))
System\Xml\Serialization\XmlSchemas.cs (8)
231if (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); 577XmlSerializer s = new XmlSerializer(o.GetType()); 601Type type = o.GetType(); 607if (item.GetType() == type && name == ItemName(item))
System\Xml\Serialization\XmlSerializationReader.cs (4)
1355return new InvalidCastException(SR.Format(SR.XmlInvalidCast, value.GetType().FullName, type.FullName)); 1357return new InvalidCastException(SR.Format(SR.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id)); 1574throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1748Type currItemType = currItem.GetType();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3622WriteSourceEnd(source, value == null ? typeof(object) : value.GetType());
System\Xml\Serialization\XmlSerializationWriter.cs (12)
299Type t = o.GetType(); 547if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 705if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 829if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 861return CreateUnknownTypeException(o.GetType()); 902return CreateInvalidAnyTypeException(o.GetType()); 1383Type t = o.GetType(); 1434Type t = o.GetType(); 2503if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 4313Type type = value.GetType(); 4402Writer.Write(((DateTimeOffset)value).Offset.GetType().FullName);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
201if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2126else if (value.GetType().IsPrimitive) 2134Type 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 (1)
System\Reflection\Emit\ModuleBuilderImpl.cs (1)
879Type type = defaultValue.GetType();
System.Reflection.Metadata (21)
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)
543throw new InvalidOperationException(SR.Format(SR.ReturnedBuilderSizeTooSmall, GetType(), nameof(AllocateChunk)));
System\Reflection\Metadata\BlobWriterImpl.cs (3)
164var type = value.GetType(); 261var type = value.GetType(); 334var 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)
23public sealed override string ToString() => GetType().ToString(); // Does not match .NET Framework output - however, doing so can prematurely
System.Resources.Extensions (12)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
425Type type = value.GetType(); 584if (sw.Stream.GetType() == typeof(MemoryStream))
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
198throw new ArgumentException(SR.Format(SR.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader));
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (1)
38Type elementType = _arrayOfClassRecords.GetType();
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
86Type type = value.GetType();
System\Resources\Extensions\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (1)
93|| (Deserializer.IncompleteObjects.Contains(valueRecord) && value.GetType().IsValueType));
System\Resources\Extensions\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
34Type type = @object.GetType();
System\Resources\Extensions\BinaryFormat\Deserializer\SerializationInfoValueUpdater.cs (1)
24_info.UpdateValue(_name, newValue, newValue.GetType());
System\Resources\Extensions\DeserializingResourceReader.cs (3)
147type = value.GetType(); 230if (value.GetType() != type) 231throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, value.GetType().FullName));
System\Resources\Extensions\PreserializedResourceWriter.cs (1)
100Debug.Assert(primitiveValue.GetType() == primitiveType);
System.Resources.Writer (2)
src\runtime\src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
425Type type = value.GetType(); 584if (sw.Stream.GetType() == typeof(MemoryStream))
System.Runtime.Caching (2)
System\Runtime\Caching\MemoryCache.cs (1)
822string 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)
103else if (managed is not null && StrategyBasedComWrappers.DefaultIUnknownInterfaceDetailsStrategy.GetComExposedTypeDetails(managed.GetType().TypeHandle) is not null)
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (1)
84if (GetOrCreateInterfaceDetailsStrategy().GetComExposedTypeDetails(obj.GetType().TypeHandle) is { } details)
System.Runtime.InteropServices.JavaScript (2)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (1)
21var type = task.GetType();
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Object.cs (1)
136Type type = value.GetType();
System.Runtime.Serialization.Formatters (12)
System\Runtime\Serialization\Formatter.cs (1)
98Type varType = data.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.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\CodeExporter.cs (1)
238throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, GetClrTypeFullName(dataContract.GetType()), GetClrTypeFullName(dataContract.UnderlyingType))));
System.Security.AccessControl (2)
System\Security\AccessControl\ObjectSecurity.cs (2)
648if (!this.AccessRuleType.IsAssignableFrom(rule.GetType())) 671if (!this.AuditRuleType.IsAssignableFrom(rule.GetType()))
System.Security.Cryptography (10)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (3)
215Debug.Assert(typeof(T) == this.GetType()); 240Debug.Assert(typeof(T) == this.GetType()); 264Debug.Assert(typeof(T) == this.GetType());
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
916$"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)
709Debug.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)
610return GetType().ToString();
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1744Debug.Assert(rawSAN.GetType() == typeof(X509Extension));
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseKey.cs (1)
111throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key));
System\Security\Cryptography\Cose\CoseSigner.cs (1)
79throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key));
System.Security.Cryptography.Pkcs (1)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
916$"Unexpected cipher characteristics by {cipher.GetType().FullName}, KeySize={cipher.KeySize}, BlockSize={cipher.BlockSize}");
System.Security.Cryptography.Xml (18)
System\Security\Cryptography\Xml\KeyInfo.cs (1)
149if (requestedObjectType.Equals(tempObj.GetType()))
System\Security\Cryptography\Xml\SignedXml.cs (1)
1100Type actualType = key.GetType();
System\Security\Cryptography\Xml\SignedXmlDebugLog.cs (15)
247return $"{key.GetType().Name}#{keyName}"; 257return $"{o.GetType().Name}#{o.GetHashCode():x8}"; 289canonicalizationTransform.GetType().Name); 300canonicalizationTransform.Resolver!.GetType(), 645signatureDescription.GetType().Name, 646hash.GetType().Name, 647asymmetricSignatureFormatter.GetType().Name); 670key.GetType().Name); 693string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name; 829string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name; 874signatureDescription.GetType().Name, 875hashAlgorithm.GetType().Name, 876asymmetricSignatureDeformatter.GetType().Name); 917mac.GetType().Name); 1044string hashAlgorithmName = hashAlgorithm == null ? "null" : hashAlgorithm.GetType().Name;
System\Security\Cryptography\Xml\TransformChain.cs (1)
67if (currentInput == null || transform.AcceptsType(currentInput.GetType()))
System.Security.Permissions (6)
System\Security\Permissions\PrincipalPermission.cs (6)
62return (perm != null) && (perm.GetType() == GetType()); 83throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(target)); 126throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(target)); 182throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(other)); 256root.AddAttribute("class", typename + ", " + GetType().Module.Assembly.FullName.Replace('\"', '\''));
System.Security.Principal.Windows (7)
System\Security\Principal\IRCollection.cs (5)
176Type type = Identities[i].GetType(); 238Type type = id.GetType(); 300if (id.GetType() != targetType) 311if (id.GetType() != targetType) 331Type type = id.GetType();
System\Security\Principal\NTAccount.cs (1)
146if (id.GetType() != targetType)
System\Security\Principal\SID.cs (1)
1104if (id.GetType() != targetType)
System.ServiceModel.Federation (4)
System\IdentityModel\Security\WrapperSecurityCommunicationObject.cs (2)
27return _innerCommunicationObject.GetType(); 32return _innerCommunicationObject.GetType();
System\Runtime\OperationWithTimeoutAsyncResult.cs (2)
132throw new InvalidOperationException(SR.Format(SR.AsyncResultCompletedTwice, GetType())); 339throw new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType()));
System.ServiceModel.NetFramingBase (8)
System\ServiceModel\Channels\NetFramingTransportChannelFactory.cs (4)
195if (!s_connectionPoolRegistries.ContainsKey(GetType())) 199if (!s_connectionPoolRegistries.ContainsKey(GetType())) 201s_connectionPoolRegistries[GetType()] = new ConnectionPoolRegistry(); 206_connectionPoolRegistry = (ConnectionPoolRegistry)s_connectionPoolRegistries[GetType()];
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (3)
116throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("upgradeInitiator", SR.Format(SR.UnsupportedUpgradeInitiator, upgradeInitiator.GetType())); 121throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("kind", SR.Format(SR.StreamUpgradeUnsupportedChannelBindingKind, GetType(), kind)); 188SR.InvalidTokenProvided, _serverTokenProvider.GetType(), typeof(X509SecurityToken))));
System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
93SR.InvalidTokenProvided, tokenProvider.GetType(), typeof(T))));
System.ServiceModel.NetTcp (4)
System\ServiceModel\Channels\SocketConnection.cs (2)
502GetType().ToString(), SR.SocketConnectionDisposed), TransferOperation.Undefined)); 512GetType().ToString(), SR.SocketConnectionDisposed), TransferOperation.Undefined));
System\ServiceModel\Channels\TcpChannelFactory.cs (2)
106if (other.GetType().IsConstructedGenericType) 108if (other.GetType().GetGenericTypeDefinition() != typeof(TcpChannelFactory<>))
System.ServiceModel.Primitives (186)
Extensions\ReflectionExtensions.cs (1)
77return o == null ? false : type.GetTypeInfo().IsAssignableFrom(o.GetType().GetTypeInfo());
Internals\System\Runtime\AsyncResult.cs (2)
94throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.AsyncResultCompletedTwice(GetType()))); 301throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.InvalidAsyncResultImplementation(result.GetType())));
Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
90return string.Format(CultureInfo.CurrentCulture, "{0}/{1}", source.GetType().ToString(), source.GetHashCode());
Internals\System\Runtime\MruCache.cs (1)
252throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
Internals\System\Runtime\TaskHelpers.cs (1)
444(SynchronizationContext.Current.GetType() == typeof(SynchronizationContext)));
Internals\System\Xml\XmlMtomReader.cs (20)
2153get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, GetType().FullName))); } 2158get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, GetType().FullName))); } 2159set { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, GetType().FullName))); } 2164throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, GetType().FullName))); 2174throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, GetType().FullName))); 2179throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, GetType().FullName))); 2201throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, GetType().FullName))); 2206throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, GetType().FullName))); 2211throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, GetType().FullName))); 2872get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, stream.GetType().FullName))); } 2877get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, stream.GetType().FullName))); } 2878set { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, stream.GetType().FullName))); } 2884throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.ReadNotSupportedOnStream, stream.GetType().FullName))); 2891throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, stream.GetType().FullName))); 2902throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.ReadNotSupportedOnStream, stream.GetType().FullName))); 2909throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, stream.GetType().FullName))); 2920throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.ReadNotSupportedOnStream, stream.GetType().FullName))); 3005throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, stream.GetType().FullName))); 3010throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.SeekNotSupportedOnStream, stream.GetType().FullName))); 3015throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SRP.Format(SRP.WriteNotSupportedOnStream, stream.GetType().FullName)));
System\IdentityModel\Claims\X509CertificateClaimSet.cs (2)
372throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName)); 629throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\IdentityModel\CryptoHelper.cs (3)
300if (defaultObject != null && defaultObject.GetType() == algorithmObject.GetType()) 307Type algorithmType = algorithmObject.GetType();
System\IdentityModel\Policy\UnconditionalPolicy.cs (1)
188throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\IdentityModel\Selectors\SecurityTokenAuthenticator.cs (5)
36throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(SRP.Format(SRP.CannotValidateSecurityTokenType, this, token.GetType()))); 45tokenType = tokenType ?? token.GetType().ToString(); 52string errorMsg = SRP.Format(SRP.CannotValidateSecurityTokenType, this, token.GetType()); 56tokenType = tokenType ?? token.GetType().ToString(); 66tokenType = tokenType ?? token.GetType().ToString();
System\IdentityModel\Selectors\SecurityTokenRequirement.cs (2)
164if (dictionaryValue != null && !typeof(TValue).IsAssignableFrom(dictionaryValue.GetType())) 166throw Fx.Exception.Argument(propertyName, string.Format(SRP.SecurityTokenRequirementHasInvalidTypeForProperty, propertyName, dictionaryValue.GetType(), typeof(TValue)));
System\IdentityModel\Tokens\GenericXmlSecurityToken.cs (4)
142if (InternalTokenReference != null && typeof(T) == InternalTokenReference.GetType()) 147if (ExternalTokenReference != null && typeof(T) == ExternalTokenReference.GetType()) 157if (InternalTokenReference != null && typeof(T) == InternalTokenReference.GetType()) 162if (ExternalTokenReference != null && typeof(T) == ExternalTokenReference.GetType())
System\IdentityModel\Tokens\KeyInfoSerializer.cs (3)
129throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, token.GetType()))); 219throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifier.GetType()))); 316throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
System\IdentityModel\Tokens\SecurityToken.cs (3)
27return new LocalIdKeyIdentifierClause(Id, GetType()) as T; 31SRP.Format(SRP.TokenDoesNotSupportKeyIdentifierClauseCreation, GetType().Name, typeof(T).Name))); 39return localKeyIdentifierClause.Matches(Id, GetType());
System\IdentityModel\Tokens\WSSecurityJan2004.cs (2)
247throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType()))); 320return ClauseType.IsAssignableFrom(clause.GetType());
System\IdentityModel\Tokens\WSSecurityXXX2005.cs (1)
71throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, keyIdentifierClause.GetType())));
System\IdentityModel\Tokens\X509SecurityToken.cs (1)
195throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\ServiceModel\ChannelFactory.cs (1)
532Type implementationType = implementation.GetType();
System\ServiceModel\Channels\AddressHeader.cs (1)
72return (value == null) ? typeof(object) : value.GetType();
System\ServiceModel\Channels\BinaryMessageEncoder.cs (3)
149WcfEventSource.Instance.WritePoolMiss(messageWriter.GetType().Name); 188WcfEventSource.Instance.ReadPoolMiss(messageData.GetType().Name); 252WcfEventSource.Instance.ReadPoolMiss(xmlReader.GetType().Name);
System\ServiceModel\Channels\BinaryMessageEncodingBindingElement.cs (2)
74string errorMsg = SRP.Format(SRP.UnsupportedEnvelopeVersion, GetType().FullName, BinaryEncoderDefaults.EnvelopeVersion, value.Envelope); 164GetType().Name,
System\ServiceModel\Channels\Binding.cs (3)
71_name = GetType().Name; 252SRP.Format(SRP.TransportBindingElementMustBeLast, Name, transport.GetType().Name))); 257SRP.Format(SRP.InvalidBindingScheme, transport.GetType().Name)));
System\ServiceModel\Channels\BindingContext.cs (1)
112string typeString = bindingElement.GetType().ToString();
System\ServiceModel\Channels\BindingElementCollection.cs (1)
77if (bindingElementType.GetTypeInfo().IsAssignableFrom(this[i].GetType().GetTypeInfo()))
System\ServiceModel\Channels\ChannelBindingMessageProperty.cs (1)
128throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\ServiceModel\Channels\ChannelDemuxer.cs (1)
141if (!context.BindingParameters.Contains(_cachedContextState.CachedBindingParameters[i].GetType()))
System\ServiceModel\Channels\ChannelFactoryBase.cs (1)
163throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ChannelFactoryCannotBeUsedToCreateChannels, GetType().ToString())));
System\ServiceModel\Channels\ChannelParameterCollection.cs (4)
90channel.GetType().ToString(), state.ToString()); 95channel.GetType().ToString(), state.ToString()); 118channel.GetType().ToString(), state.ToString()); 130channel.GetType().ToString(), state.ToString());
System\ServiceModel\Channels\CommunicationObject.cs (4)
67string ns = GetType().Namespace; 819return GetType(); 1001Contract.Assert(false, String.Format("Type '{0}' is required to override OnCloseAsync", GetType())); 1010Contract.Assert(false, String.Format("Type '{0}' is required to override OnOpenAsync", GetType()));
System\ServiceModel\Channels\CommunicationObjectManager.cs (1)
44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString()));
System\ServiceModel\Channels\FaultConverter.cs (4)
37string text = SRP.Format(SRP.FaultConverterDidNotCreateException, GetType().Name); 46string text = SRP.Format(SRP.FaultConverterCreatedException, GetType().Name); 63string text = SRP.Format(SRP.FaultConverterDidNotCreateFaultMessage, GetType().Name); 72string text = SRP.Format(SRP.FaultConverterCreatedFaultMessage, GetType().Name);
System\ServiceModel\Channels\LifetimeManager.cs (3)
62throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString())); 241throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString())); 252throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString()));
System\ServiceModel\Channels\Message.cs (1)
113return (value == null) ? typeof(object) : value.GetType();
System\ServiceModel\Channels\MessageFault.cs (1)
32(detail == null ? typeof(object) : detail.GetType()), int.MaxValue/*maxItems*/), "", "");
System\ServiceModel\Channels\MessageHeader.cs (2)
473(_objectToSerialize == null ? typeof(object) : _objectToSerialize.GetType()), Name, Namespace, int.MaxValue/*maxItems*/); 489throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MessageHeaderVersionNotSupported, GetType().FullName, messageVersion.ToString()), "version"));
System\ServiceModel\Channels\MessageHeaders.cs (1)
1367header.GetType().FullName, MessageVersion.Envelope.ToString()), "header"));
System\ServiceModel\Channels\MessageProperties.cs (1)
57throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(string.Empty, SRP.Format(SRP.ObjectDisposed, GetType().ToString())));
System\ServiceModel\Channels\MtomMessageEncoder.cs (7)
96WcfEventSource.Instance.WritePoolMiss(xmlWriter.GetType().Name); 131WcfEventSource.Instance.WritePoolMiss(messageWriter.GetType().Name); 160WcfEventSource.Instance.ReadPoolMiss(messageData.GetType().Name); 197WcfEventSource.Instance.ReadPoolMiss(xmlReader.GetType().Name); 212WcfEventSource.Instance.ReadPoolMiss(xmlReader.GetType().Name); 626WcfEventSource.Instance.ReadPoolMiss(xmlReader.GetType().Name); 641WcfEventSource.Instance.ReadPoolMiss(xmlReader.GetType().Name);
System\ServiceModel\Channels\ReliableChannelBinder.cs (4)
358SRP.CommunicationObjectAborted1, GetType().ToString())); 362return new ObjectDisposedException(GetType().ToString()); 394SRP.CommunicationObjectFaulted1, GetType().ToString())); 517GetType().ToString(), State.ToString()));
System\ServiceModel\Channels\ReliableSessionBindingElement.cs (1)
413transportTransferMode, GetType().Name)));
System\ServiceModel\Channels\RequestContextBase.cs (1)
190throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\ServiceModel\Channels\SecurityBindingElement.cs (1)
606sb.AppendLine(string.Format(CultureInfo.InvariantCulture, "{0}:", GetType().ToString()));
System\ServiceModel\Channels\ServiceChannel.cs (2)
1119string text = SRP.Format(SRP.SFxInitializationUINotCalled, example.GetType().ToString()); 1138string text = SRP.Format(SRP.SFxInitializationUIDisallowed, example.GetType().ToString());
System\ServiceModel\Channels\ServiceChannelProxy.cs (2)
70else if (declaringType.IsAssignableFrom(_serviceChannel.GetType())) 346activityName = SRP.Format(SRP.ActivityClose, _serviceChannel.GetType().FullName);
System\ServiceModel\Channels\TextMessageEncoder.cs (2)
642WcfEventSource.Instance.WritePoolMiss(messageWriter.GetType().Name); 682WcfEventSource.Instance.ReadPoolMiss(messageData.GetType().Name);
System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
144SRP.InvalidTokenProvided, tokenProvider.GetType(), typeof(T))));
System\ServiceModel\Description\ClientCredentials.cs (3)
160if (result == null || result.GetType() != GetType()) 162throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(NotImplemented.ByDesignWithMessage(SRP.Format(SRP.CloneNotImplementedCorrectly, GetType(), (result != null) ? result.ToString() : "null")));
System\ServiceModel\Description\ContractDescription.cs (1)
174Type serviceType = serviceImplementation.GetType();
System\ServiceModel\Description\ServiceReflector.cs (2)
405return provider.GetType(); 502if (attrType.IsAssignableFrom(customAttribute.GetType()))
System\ServiceModel\Description\TypeLoader.cs (5)
485opBehaviorAttr.GetType().FullName))); 495opBehaviorAttr.GetType().FullName))); 506opBehaviorAttr.GetType().FullName))); 644Type t = behavior.GetType(); 2071if (!descriptionBehaviors.Contains(behavior.GetType()))
System\ServiceModel\Diagnostics\TraceUtility.cs (1)
271return source.GetType().ToString() + "/" + source.GetHashCode().ToString(CultureInfo.CurrentCulture);
System\ServiceModel\Dispatcher\DispatchOperationRuntime.cs (3)
138WcfEventSource.Instance.ParameterInspectorBeforeCallInvoked(rpc.EventTraceActivity, ParameterInspectors[i].GetType().FullName); 159WcfEventSource.Instance.ParameterInspectorAfterCallInvoked(rpc.EventTraceActivity, ParameterInspectors[i].GetType().FullName); 258string message = SRP.Format(SRP.SFxNullReplyFromFormatter2, Formatter.GetType().ToString(), (Name ?? ""));
System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
129WcfEventSource.Instance.FaultProviderInvoked(_handlers[i].GetType().FullName, e.Message); 200WcfEventSource.Instance.ErrorHandlerInvoked(_handlers[i].GetType().FullName, handledByThis, error.GetType().FullName);
System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
169isDetailObjectValid = detailType.IsAssignableFrom(detailObj.GetType());
System\ServiceModel\Dispatcher\ImmutableClientRuntime.cs (2)
82WcfEventSource.Instance.ClientMessageInspectorAfterReceiveInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName); 111WcfEventSource.Instance.ClientMessageInspectorBeforeSendInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName);
System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (3)
111WcfEventSource.Instance.MessageInspectorAfterReceiveInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName); 150WcfEventSource.Instance.MessageInspectorBeforeSendInvoked(rpc.EventTraceActivity, _messageInspectors[i].GetType().FullName); 155string message = SRP.Format(SRP.SFxNullReplyFromExtension2, _messageInspectors[i].GetType().ToString(), (rpc.Operation.Name ?? ""));
System\ServiceModel\Dispatcher\ProxyOperationRuntime.cs (2)
160WcfEventSource.Instance.ClientParameterInspectorAfterCallInvoked(rpc.EventTraceActivity, _parameterInspectors[i].GetType().FullName); 198WcfEventSource.Instance.ClientParameterInspectorBeforeCallInvoked(rpc.EventTraceActivity, _parameterInspectors[i].GetType().FullName);
System\ServiceModel\Dispatcher\ThreadBehavior.cs (1)
120string text = SRP.Format(SRP.SFxMultipleCallbackFromSynchronizationContext, _context.GetType().ToString());
System\ServiceModel\DuplexChannelFactory.cs (1)
191Type userObjectType = callbackInstance.UserObject.GetType();
System\ServiceModel\EndpointIdentity.cs (1)
226throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.UnrecognizedIdentityPropertyType, IdentityClaim.GetType().ToString())));
System\ServiceModel\KeyedByTypeCollection.cs (3)
98return item.GetType(); 108if (Contains(item.GetType())) 110throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("item", SRP.Format(SRP.DuplicateBehavior1, item.GetType().FullName));
System\ServiceModel\Security\AcceleratedTokenProvider.cs (2)
93throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 104throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType())));
System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
263if (!(message.Body.ReturnValue.GetType().Equals(typeof(MessagePartDescription))))
System\ServiceModel\Security\IdentityVerifier.cs (4)
73SecurityTraceRecordHelper.TraceIdentityVerificationFailure(identity, authorizationContext, GetType()); 229SecurityTraceRecordHelper.TraceIdentityVerificationSuccess(eventTraceActivity, identity, identity.IdentityClaim, GetType()); 241SecurityTraceRecordHelper.TraceIdentityVerificationSuccess(eventTraceActivity, identity, claim, GetType()); 276SecurityTraceRecordHelper.TraceIdentityVerificationFailure(identity, authContext, GetType());
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (3)
250Exception e = new InvalidOperationException(SRP.Format(SRP.CommunicationObjectCannotBeUsed, GetType().ToString(), state.ToString())); 266throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.TargetAddressIsNotSet, GetType()))); 271throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityAlgorithmSuiteNotSet, GetType())));
System\ServiceModel\Security\NegotiationTokenProvider.cs (1)
102throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType())));
System\ServiceModel\Security\ReceiveSecurityHeader.cs (3)
424if ((_primaryTokenAuthenticator != null) && (_primaryTokenAuthenticator.GetType().Equals(spec.TokenAuthenticator.GetType()))) 789SRP.Format(SRP.UnableToFindTokenAuthenticator, token.GetType())));
System\ServiceModel\Security\SecurityHeader.cs (1)
123return string.Format(CultureInfo.InvariantCulture, "{0}(Actor = '{1}')", GetType().Name, Actor);
System\ServiceModel\Security\SecurityHeaderTokenResolver.cs (1)
239i, _tokens[i].AllowedReferenceStyle, _tokens[i].Token.GetType(), _tokens[i].TokenParameters);
System\ServiceModel\Security\SecurityMessageProperty.cs (1)
309throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\ServiceModel\Security\SecuritySessionClientSettings.cs (3)
226throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityStandardsManagerNotSet, GetType().ToString()))); 230throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuedSecurityTokenParametersNotSet, GetType()))); 447throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.ProtocolMisMatch, nameof(IInitiatorSecuritySessionProtocol), GetType().ToString())));
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (7)
272throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.TargetAddressIsNotSet, GetType()))); 276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType()))); 280throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuedSecurityTokenParametersNotSet, GetType()))); 284throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType()))); 288throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityAlgorithmSuiteNotSet, GetType()))); 300throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.IssuerBuildContextNotSet, GetType()))); 304throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.BootstrapSecurityBindingElementNotSet, GetType())));
System\ServiceModel\Security\Tokens\SecurityContextSecurityToken.cs (1)
185throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().FullName));
System\ServiceModel\Security\Tokens\SecurityTokenParameters.cs (4)
61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.SecurityTokenParametersCloneInvalidResult, GetType().ToString()))); 86SRP.Format(SRP.TokenDoesNotSupportKeyIdentifierClauseCreation, token.GetType().Name, referenceStyle))); 135SRP.Format(SRP.TokenDoesNotSupportKeyIdentifierClauseCreation, token.GetType().Name, referenceStyle))); 192sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "{0}:", GetType().ToString()));
System\ServiceModel\Security\Tokens\ServiceModelSecurityTokenRequirement.cs (1)
230sb.AppendLine(String.Format(CultureInfo.InvariantCulture, "{0}:", GetType().ToString()));
System\ServiceModel\Security\Tokens\SupportingTokenParameters.cs (2)
173if (parameters == null || parameters.GetType() != GetType())
System\ServiceModel\Security\WrapperSecurityCommunicationObject.cs (1)
27return _innerCommunicationObject.GetType();
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (3)
231if (tokenEntry.SupportsCore(token.GetType())) 246if (tokenEntry.SupportsCore(token.GetType())) 267throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SRP.Format(SRP.StandardsManagerCannotWriteObject, token.GetType())));
System\ServiceModel\ServiceChannelManager.cs (3)
97throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString())); 131throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString())); 197throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ObjectDisposedException(GetType().ToString()));
System\ServiceModel\SynchronizedCollection.cs (1)
314throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.SynchronizedCollectionWrongType1, value.GetType().FullName)));
System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
272Type type = (value == null) ? typeof(Object) : value.GetType();
System.ServiceModel.Primitives.Tests (16)
ServiceModel\ChannelFactoryTest.cs (12)
39Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 40String.Format("Channel type '{0}' was not assignable to '{1}'", channel.GetType(), typeof(IRequestChannel))); 43Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()), 44String.Format("Channel type '{0}' was not assignable to '{1}'", channel2.GetType(), typeof(IRequestChannel))); 96Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 97String.Format("Channel type '{0}' was not assignable to '{1}'", channel.GetType(), typeof(IRequestChannel))); 100Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()), 101String.Format("Channel type '{0}' was not assignable to '{1}'", channel2.GetType(), typeof(IRequestChannel))); 152Assert.True(typeof(IRequestChannel).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 153String.Format("Channel type '{0}' was not assignable to '{1}'", channel.GetType(), typeof(IRequestChannel))); 196Assert.True(typeof(IWcfServiceGenerated).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 197String.Format("Channel type '{0}' was not assignable to '{1}'", channel.GetType(), typeof(IRequestChannel)));
ServiceModel\DuplexChannelFactoryTest.cs (4)
229Assert.True(typeof(IWcfDuplexService).GetTypeInfo().IsAssignableFrom(channel.GetType().GetTypeInfo()), 230String.Format("Channel type '{0}' was not assignable to '{1}'", channel.GetType(), typeof(IDuplexChannel))); 233Assert.True(typeof(IWcfDuplexService).GetTypeInfo().IsAssignableFrom(channel2.GetType().GetTypeInfo()), 234String.Format("Channel type '{0}' was not assignable to '{1}'", channel2.GetType(), typeof(IDuplexChannel)));
System.ServiceModel.Syndication (17)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
55FeedType = feedToWrite.GetType();
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
36ItemType = itemToWrite.GetType();
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
49_inlineDocumentType = documentToWrite.GetType(); 54_referencedDocumentType = documentToWrite.GetType();
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
42_documentType = documentToWrite.GetType();
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
56FeedType = feedToWrite.GetType();
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
49ItemType = itemToWrite.GetType();
System\ServiceModel\Syndication\SyndicationElementExtension.cs (6)
73dataContractSerializer ??= new DataContractSerializer(dataContractExtension.GetType()); 86serializer ??= new XmlSerializer(xmlSerializerExtension.GetType()); 139if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) 155if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) 286XmlQualifiedName qName = dcExporter.GetRootElementName(_extensionData.GetType()); 302XmlTypeMapping typeMapping = importer.ImportTypeMapping(_extensionData.GetType());
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (2)
77dataContractSerializer ??= new DataContractSerializer(dataContractExtension.GetType()); 87serializer ??= new XmlSerializer(xmlSerializerExtension.GetType());
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
58public override string ToString() => $"{GetType()}, SyndicationVersion={Version}";
System\ServiceModel\Syndication\SyndicationItemFormatter.cs (1)
35public override string ToString() => $"{GetType()}, SyndicationVersion={Version}";
System.ServiceModel.UnixDomainSocket (4)
System\ServiceModel\Channels\SocketConnection.cs (2)
479GetType().ToString(), SR.SocketConnectionDisposed), TransferOperation.Undefined)); 489GetType().ToString(), SR.SocketConnectionDisposed), TransferOperation.Undefined));
System\ServiceModel\Channels\UnixDomainSocketChannelFactory.cs (2)
119if (other.GetType().IsConstructedGenericType) 121if (other.GetType().GetGenericTypeDefinition() != typeof(UnixDomainSocketChannelFactory<>))
System.ServiceProcess.ServiceController (2)
System\ServiceProcess\ServiceBase.cs (1)
670throw new ObjectDisposedException(GetType().Name);
System\ServiceProcess\ServiceController.cs (1)
650throw new ObjectDisposedException(GetType().Name);
System.Speech (14)
Internal\AlphabetConverter.cs (1)
203Assembly assembly = Assembly.GetAssembly(GetType())!;
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (1)
38types[i] = parameters[i].GetType();
Internal\SrgsParser\SrgsDocumentParser.cs (1)
286Type elementType = srgsElement.GetType();
Recognition\Grammar.cs (5)
564return GetType().GetMethod(method, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 913Assembly assembly = Assembly.GetAssembly(GetType())!; 937_ruleName = CheckRuleName(stream, GetType().Name, false, stgInit, out _sapi53Only, out _semanticTag); 1012types[i] = _parameters[i].GetType(); 1014MethodInfo? onInit = GetType().GetMethod(methodName, types);
Recognition\SrgsGrammar\SrgsItem.cs (1)
214Type elementType = element.GetType();
Recognition\SrgsGrammar\SrgsRule.cs (1)
259Type elementType = element.GetType();
Result\RecognitionResult.cs (2)
39Type thisType = this.GetType(); 103Type thisType = this.GetType();
Result\RecognizedPhrase.cs (2)
979Type grammarType = grammar.GetType(); 995Type grammarType = grammar.GetType();
System.Text.Encoding.CodePages (5)
System\Text\DBCSCodePageEncoding.cs (2)
530throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType())); 646throw 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)
338throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes"); 346throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowChars, EncodingName, DecoderFallback.GetType()), "chars");
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (1)
477if (GetType() == typeof(OptimizedInboxTextEncoder)) { /* intentionally left blank */ }
System\Text\Encodings\Web\TextEncoderSettings.cs (1)
219if (GetType() == typeof(TextEncoderSettings))
System.Text.Json (19)
System\ReflectionExtensions.cs (1)
66if (attribute.GetType().FullName == fullName)
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (1)
53Type runtimeType = value.GetType();
System\Text\Json\Serialization\JsonConverter.cs (1)
20IsInternalConverter = 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)
43ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsNull(GetType()); 46ThrowHelper.ThrowInvalidOperationException_SerializerConverterFactoryReturnsJsonConverterFactory(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)
532referenceId, value.GetType(), typeof(T));
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (1)
194Type 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)
118=> _modifiers is null or { Count: 0 } && GetType() == typeof(DefaultJsonTypeInfoResolver);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (2)
318Type attributeType = attr.GetType(); 338MethodInfo invokeMethod = fsharpFunc.GetType().GetMethod("Invoke", BindingFlags.Public | BindingFlags.Instance)!;
System\Text\Json\ThrowHelper.Serialization.cs (4)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); 46throw new NotSupportedException(SR.Format(SR.DictionaryKeyTypeNotSupported, keyType, converter.GetType())); 456throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 1015throw new InvalidOperationException(SR.Format(SR.PipeWriter_DoesNotImplementUnflushedBytes, pipeWriter.GetType().Name));
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexCompiler.cs (1)
6527Call(MakeUnsafeAs(list[index].GetType())); // provide JIT with details necessary to devirtualize calls on this instance
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\Common\src\System\ExceptionPolyfills.cs (1)
49throw new ObjectDisposedException(instance?.GetType().FullName);
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
334if (sc is not 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 (24)
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\Oletx\OletxTransactionManager.cs (1)
395etwLog.OleTxTransactionManagerCreate(GetType(), _nodeNameField);
System\Transactions\TransactionsEtwProvider.cs (1)
221public 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 (26)
Microsoft\Windows\Automation\Peers\RibbonAutomationPeer.cs (1)
39return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextMenuAutomationPeer.cs (1)
35return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextualTabGroupAutomationPeer.cs (1)
64return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlAutomationPeer.cs (1)
32return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlGroupAutomationPeer.cs (1)
40return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupAutomationPeer.cs (1)
53return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupHeaderAutomationPeer.cs (1)
45return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (1)
84return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuItemAutomationPeer.cs (1)
60return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonQuickAccessToolBarAutomationPeer.cs (1)
73return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonSeparatorAutomationPeer.cs (1)
39return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabAutomationPeer.cs (1)
58return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabHeaderAutomationPeer.cs (1)
35return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTitleAutomationPeer.cs (1)
40return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTwoLineTextAutomationPeer.cs (1)
40return Owner.GetType().Name;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
241throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
75throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
73throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (1)
696undoManager.OpenedUnit.GetType() != typeof(TextParentUndoUnit))
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
529throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1875object clone = Activator.CreateInstance(original.GetType()); 1946return (FrameworkElement)Activator.CreateInstance(original.GetType()); 2019if (clone.GetType().IsInstanceOfType(original))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (2)
557throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer)); 1469Debug.Assert(GetType().IsSubclassOf(type)); // RibbonMenuButton is a subclass of MenuBase
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
519throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
System.Windows.Forms (239)
System\Resources\ResXDataNode.cs (4)
83Type valueType = (value is null) ? typeof(object) : value.GetType(); 238Type valueType = value?.GetType() ?? typeof(object); 560? GenerateObjectFromBinaryDataNodeInfo(_nodeInfo, typeResolver)?.GetType() 561: GenerateObjectFromDataNodeInfo(_nodeInfo, typeResolver)?.GetType();
System\Windows\Forms\Accessibility\AccessibleObject.cs (1)
315RuntimeTypeHandle type = GetType().TypeHandle;
System\Windows\Forms\ActiveX\AxHost.AxPropertyDescriptor.cs (1)
224if (PropertyType.IsEnum && value is not null && value.GetType() != PropertyType)
System\Windows\Forms\ActiveX\AxHost.cs (9)
192_axState[s_assignUniqueID] = !GetType().GUID.Equals(s_comctlImageCombo_Clsid); 1458throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 1526throw new NotSupportedException(string.Format(SR.AXNohWnd, GetType().Name)); 1605throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 2311throw new LicenseException(GetType(), this, SR.AXNoLicenseToUse); 2431TypeDescriptor.Refresh(GetType()); 2509TypeDescriptor.Refresh(GetType()); 2576PropertyInfo[] propInfos = GetType().GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance); 3829return o.GetType() == typeof(float)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (6)
735string streamName = _control.GetType().FullName!; 1011GetType().FullName!, 1091using BSTR bstrSource = new(_control.GetType().FullName!); 1168$"No type converter for property '{currentProperty.Name}' on class {_control.GetType().FullName}"); 1412if (GetDefaultEventsInterface(_control.GetType()) is { } eventInterface) 1552$"No type converter for property '{currentProperty.Name}' on class {_control.GetType().FullName}");
System\Windows\Forms\ActiveX\Control_ActiveXControlInterfaces.cs (7)
247*pClsid = GetType().GUID; 260(USERCLASSTYPE)dwFormOfType == USERCLASSTYPE.USERCLASSTYPE_FULL ? GetType().FullName : GetType().Name); 361*pClassID = GetType().GUID; 376*pClassID = GetType().GUID; 402*pClassID = GetType().GUID; 448*pClassID = GetType().GUID;
System\Windows\Forms\ApplicationContext.cs (2)
35if (GetType() == typeof(ApplicationContext) || GetType() == Application.s_typeOfModalApplicationContext)
System\Windows\Forms\ComponentModel\COM2Interop\COM2ColorConverter.cs (1)
37Debug.Fail($"Don't know how to set type: {managedValue.GetType().Name}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2Enum.cs (3)
95if (_values.Length > 0 && value.GetType() != _values[0].GetType()) 99value = Convert.ChangeType(value, _values[0].GetType(), CultureInfo.InvariantCulture);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (1)
158if (parameters.Length == 1 && parameters[0].ParameterType.IsAssignableFrom(value.GetType()))
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (1)
110if (valueItems[i].GetType() != targetType)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (1)
116Debug.Fail($"Unknown Image type: {managedValue.GetType().Name}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2Properties.cs (1)
170Debug.WriteLine($"Adding browsing handler type {handler.GetType().Name} to object.");
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (3)
655if (_lastValue is not null && _propertyType is not null && _propertyType.IsEnum && _lastValue.GetType().IsPrimitive) 701_ = value.GetType(); 725Type localConverterType = localConverter.GetType();
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (2)
39if (instance is not null && !instance.GetType().IsArray) 66object[] objects = component.GetType().IsArray ? (object[])component : [component];
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
791enumType = var.GetType();
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (3)
104=> TypeDescriptor.GetEditor(component.GetType(), baseEditorType); 340Type type = propertyValue.GetType(); 342if (subConverter is not null && subConverter.GetType() != typeof(TypeConverter))
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
76return _control.GetType().FullName!;
System\Windows\Forms\Control.ControlVersionInfo.cs (7)
33object[] attrs = _owner.GetType().Module.Assembly.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 50string? ns = _owner.GetType().Namespace; 80object[] attrs = _owner.GetType().Module.Assembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false); 97string? ns = _owner.GetType().Namespace; 128object[] attrs = _owner.GetType().Module.Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false); 163string path = _owner.GetType().Module.FullyQualifiedName; 172private bool OwnerIsInMemoryAssembly => _owner.GetType().Assembly.Location.Length == 0;
System\Windows\Forms\Control.cs (5)
3595Exception ex = new ObjectDisposedException(GetType().Name); 4743Exception ex = new ObjectDisposedException(GetType().Name); 9235$"RecreateHandle: {GetType().FullName} [Text={Text}]"); 10950if (this is TabControl || GetType() == typeof(Control)) 11309string type = GetType().AssemblyQualifiedName!;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckableControlBaseAdapter.cs (1)
55Debug.Fail($"Unexpected control type '{Control.GetType().FullName}'");
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (1)
1469Type valueType = value.GetType();
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
2594Type? editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 2627Type? editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 2658&& !_latestEditingControl.GetType().IsSubclassOf(editControlType)) 21893editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 25292|| (dataGridViewCurrentCell.FormattedValueType is not null && dataGridViewCurrentCell.FormattedValueType.IsAssignableFrom(nullValue.GetType()))) 25358&& dataGridViewCurrentCell.ValueType.IsAssignableFrom(dgvcpe.Value.GetType()))
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
706DataGridViewBand band = (DataGridViewBand)Activator.CreateInstance(GetType())!;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (1)
130Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
188Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
932DataGridViewCell dataGridViewCell = (DataGridViewCell)Activator.CreateInstance(GetType())!; 1110Type editingControlType = DataGridView.EditingControl.GetType(); 1601(formattedValue is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 1634(formattedValue is null || FormattedValueType is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 3719!FormattedValueType.IsAssignableFrom(formattedValue.GetType()))
System\Windows\Forms\Controls\DataGridView\DataGridViewCellConverter.cs (1)
30ConstructorInfo? ctor = cell.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleConverter.cs (1)
40ConstructorInfo? ctor = value.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
62if (value is null || !FormattedValueType.IsAssignableFrom(value.GetType())) 410Type thisType = GetType(); 1571Debug.Assert(formattedValue is null || FormattedValueType is null || FormattedValueType.IsAssignableFrom(formattedValue.GetType()));
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellAccessibleObject.cs (1)
155throw new InvalidOperationException(string.Format(SR.DataGridViewCellAccessibleObject_OwnerWrongType, Owner is null ? "null" : Owner.GetType().Name));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
163public Type? CellType => CellTemplate?.GetType(); 817DataGridViewColumn dataGridViewColumn = (DataGridViewColumn)Activator.CreateInstance(GetType())!;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnConverter.cs (2)
42ctor = dataGridViewColumn.GetType().GetConstructor([typeof(Type)]); 51ctor = dataGridViewColumn.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
98Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
636Type thisType = GetType(); 913if (value is null || ((ValueType is not null && !ValueType.IsAssignableFrom(value.GetType())) && value != DBNull.Value))
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (1)
496Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewElement.cs (20)
22if (GetType() == typeof(DataGridViewBand) || GetType() == typeof(DataGridViewColumn) || 23GetType() == typeof(DataGridViewButtonColumn) || GetType() == typeof(DataGridViewCheckBoxColumn) || 24GetType() == typeof(DataGridViewComboBoxColumn) || GetType() == typeof(DataGridViewImageColumn) || 25GetType() == typeof(DataGridViewLinkColumn) || GetType() == typeof(DataGridViewTextBoxColumn) || 26GetType() == typeof(DataGridViewRow) || GetType() == typeof(DataGridViewCell) || 27GetType() == typeof(DataGridViewButtonCell) || GetType() == typeof(DataGridViewCheckBoxCell) || 28GetType() == typeof(DataGridViewComboBoxCell) || GetType() == typeof(DataGridViewHeaderCell) || 29GetType() == typeof(DataGridViewColumnHeaderCell) || GetType() == typeof(DataGridViewTopLeftHeaderCell) || 30GetType() == typeof(DataGridViewRowHeaderCell) || GetType() == typeof(DataGridViewImageCell) || 31GetType() == typeof(DataGridViewLinkCell) || GetType() == typeof(DataGridViewTextBoxCell))
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
193Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
205Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
239Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (1)
365Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (1)
370Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1044Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowConverter.cs (1)
29ConstructorInfo? ctor = row.GetType().GetConstructor([]);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
54Type thisType = GetType();
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
103Type thisType = GetType();
System\Windows\Forms\Controls\Labels\Label.cs (1)
966if (GetType() == typeof(Label))
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
430Type clonedType = GetType();
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
901Type clonedType = GetType();
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (2)
446if (this.TryGetOwnerAs(out MonthCalendar? owner) && owner.GetType().BaseType is Type baseType) 448return $"{owner.GetType().Name}({baseType.Name})";
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (14)
953Type oldType = GetUnwrappedObject(i)!.GetType(); 962Type newType = newObject.GetType(); 1057Type objectType = currentObject.GetType(); 1467if (tabType == _tabs[i].Tab.GetType()) 1693throw new ArgumentException(string.Format(SR.PropertyGridNoBitmap, tab.GetType().FullName)); 1698throw new ArgumentException(string.Format(SR.PropertyGridTabName, tab.GetType().FullName)); 2422if (!TypeDescriptorHelper.TryGetAttribute(e.Component.GetType(), out PropertyTabAttribute? tabAttribute)) 2469if (!TypeDescriptorHelper.TryGetAttribute(e.Component.GetType(), out PropertyTabAttribute? tabAttribute)) 3033if (_selectedObjects[i] == e.ComponentChanged || typeChanged?.IsAssignableFrom(_selectedObjects[i].GetType()) == true) 3445if (TypeDescriptorHelper.TryGetAttribute(components.GetType(), out PropertyTabAttribute? tabAttribute)) 3467if (tabType == _tabs[i].Tab.GetType()) 3599if (tabType == _tabs[i].Tab.GetType()) 3640Debug.Assert(oldObject is not null && newObject is not null && oldObject.GetType() == newObject.GetType());
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.TabInfo.cs (1)
13public Type TabType => Tab.GetType();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\AttributeTypeSorter.cs (1)
37Debug.Fail($"Attribute '{attribute.GetType().FullName}' does not have a typeid.");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
736public virtual Type? PropertyType => PropertyValue?.GetType(); 1467public override int GetHashCode() => HashCode.Combine(PropertyLabel, PropertyType, GetType()); 2258public override string ToString() => $"{GetType().FullName} {PropertyLabel}";
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
134Debug.Fail($"TTM_ADDTOOL failed for {control.GetType().Name}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MergePropertyDescriptor.cs (1)
116Type type = value.GetType();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (6)
85|| (owner.GetType().IsValueType && owner.GetType() == entry.PropertyValue?.GetType())) 107Type ownerType = owner.GetType(); 367bool isValueType = owner?.GetType().IsValueType ?? false; 846string componentName = component.Site?.Name ?? component.GetType().Name;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (4)
2462if (value is not null && currentValue is not null && value.GetType() != currentValue.GetType() 2463&& entry.TypeConverter.CanConvertTo(entry, value.GetType())) 2465currentValue = entry.TypeConverter.ConvertTo(entry, CultureInfo.CurrentCulture, currentValue, value.GetType());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObject.cs (1)
68UIA_PROPERTY_ID.UIA_ClassNamePropertyId when this.TryGetOwnerAs(out object? owner) => (VARIANT)owner.GetType().ToString(),
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\SingleSelectRootGridEntry.cs (1)
168return component.Site?.Name ?? Target.GetType().Name;
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
25throw new ArgumentException(string.Format(SR.TabControlInvalidTabPageType, value.GetType().Name));
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
493throw new ArgumentException(string.Format(SR.TabControlTabPageNotOnTabControl, value.GetType().FullName));
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
1509_currentRendererType = _renderer.GetType(); 1523_currentRendererType = (_renderer is not null) ? _renderer.GetType() : typeof(Type);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerTypedControlCollection.cs (2)
34Type controlType = value.GetType(); 37throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfTypes, _contentPanelType.Name, _panelType.Name)), value.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripCustomIComparer.cs (6)
15if (x.GetType() == y.GetType()) 20if (x.GetType().IsAssignableFrom(y.GetType())) 25if (y.GetType().IsAssignableFrom(x.GetType()))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (1)
796if (typeof(ToolStripDropDownItem).IsAssignableFrom(childItem.GetType()))
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (2)
237if ((typeof(ToolStripButton).IsAssignableFrom(e.Item.GetType()) 240|| (typeof(ToolStripMenuItem).IsAssignableFrom(e.Item.GetType())
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (7)
464CurrentRendererType = (value is null) ? s_defaultRendererType : value.GetType(); 608LoadSettings(targetForm, targetForm.GetType().FullName!); 631SaveSettings(sourceForm, sourceForm.GetType().FullName!); 1083&& (sourceToolStrip.GetType().IsAssignableFrom(targetToolStrip.GetType()) 1084|| targetToolStrip.GetType().IsAssignableFrom(sourceToolStrip.GetType())));
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
52throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))), control.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.ToolStripPanelCellToControlEnumerator.cs (1)
29Debug.Assert(cell is not null, $"Expected ToolStripPanel cells only!!!{_arrayListEnumerator.Current.GetType()}");
System\Windows\Forms\Controls\ToolStrips\ToolStripRendererSwitcher.cs (1)
67_currentRendererType = (_renderer is not null) ? _renderer.GetType() : typeof(Type);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (3)
1343Type clonedType = GetType(); 2085if (_userData is not null && _userData.GetType().IsSerializable) 2087si.AddValue("UserData", _userData, _userData.GetType());
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
479if (!Marshal.IsTypeVisibleFromCom(value.GetType()))
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
940throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 983throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t);
System\Windows\Forms\DataBinding\Binding.cs (12)
481Type controlClass = BindableComponent.GetType(); 698(value is null ? _propInfo!.PropertyType : value.GetType()), 712if (e.Value is not null && (e.Value.GetType().IsSubclassOf(type) || e.Value.GetType() == type || e.Value is DBNull)) 718TypeConverter typeConverter = TypeDescriptor.GetConverter(value is not null ? value.GetType() : typeof(object)); 728if (ret is not null && (ret.GetType().IsSubclassOf(type) || ret.GetType() == type)) 786if (ret is not null && (ret.GetType().IsSubclassOf(type) || ret.GetType() == type)) 792TypeConverter typeConverter = TypeDescriptor.GetConverter(value is not null ? value.GetType() : typeof(object)); 802if (ret is not null && (ret.GetType().IsSubclassOf(type) || ret.GetType() == type))
System\Windows\Forms\DataBinding\BindingSource.cs (4)
689list ??= CreateBindingList(item.GetType()); 1220IList list = CreateBindingList(obj.GetType()); 1467SetList(CreateBindingList((value is null) ? typeof(object) : value.GetType()), true, true); 1472if (value is not null && !_itemType!.IsAssignableFrom(value.GetType()))
System\Windows\Forms\DataBinding\CurrencyManager.cs (3)
156finalType = tempList.GetType(); 167finalType ??= tempList.GetType(); 188throw new ArgumentException(string.Format(SR.ListManagerSetDataSource, tempList.GetType().FullName), nameof(dataSource));
System\Windows\Forms\DataBinding\ListBindingHelper.cs (4)
101type = list.GetType(); 220Type listType = (list is Type type) ? type : list.GetType(); 443return (instance is not null) ? instance.GetType() : typeof(object); 574Type targetType = enumerable.GetType();
System\Windows\Forms\DataBinding\PropertyManager.cs (1)
64internal override Type BindType => _dataSource!.GetType();
System\Windows\Forms\Design\PropertyTab.cs (2)
47GetType(), 48GetType().Name,
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (4)
294GetType(), 298GetType(), 343_expandImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), DownBitmapName, DeviceDpi); 344_collapseImage = ScaleHelper.GetSmallIconResourceAsBitmap(GetType(), UpBitmapName, DeviceDpi);
System\Windows\Forms\Form.cs (4)
6287Type? closestMatchingSourceType = FindClosestStockType(sourceToolStrip.GetType()); 6290Type? closestMatchingTargetType = FindClosestStockType(thisToolstrip.GetType()); 6293thisToolstrip.GetType().IsAssignableFrom(sourceToolStrip.GetType()))
System\Windows\Forms\Help\Help.cs (2)
173Debug.Fail($"Cannot handle HTML parameter of type: {htmlParam!.GetType()}"); 185else if (param.GetType() == typeof(int))
System\Windows\Forms\Internal\Formatter.cs (3)
138Type sourceType = value.GetType(); 339else if (value is not null && targetType.IsAssignableFrom(value.GetType())) 496Equals(value, NullData(value.GetType(), dataSourceNullValue));
System\Windows\Forms\Internal\TypedControlCollection.cs (2)
46if (!_typeOfControl.IsAssignableFrom(value.GetType())) 48throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, _typeOfControl.Name)), value.GetType().Name);
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
167typeOfControl = c.GetType().ToString();
System\Windows\Forms\Layout\LayoutEngine.cs (1)
14throw new NotSupportedException(string.Format(SR.LayoutEngineUnsupportedType, obj.GetType()));
System\Windows\Forms\NativeWindow.cs (2)
468$"Handle created of type '{cp.ClassName}' with caption '{cp.Caption}' from NativeWindow of type '{GetType().FullName}'"); 503Debug.Fail($"Can't find a default window procedure for message {m} on class {GetType().Name}");
System\Windows\Forms\OLE\DataObjectExtensions.cs (1)
19dataObject.GetType().FullName));
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyle.cs (1)
80internal Type GetTypeWithConstructor() => this.GetType();
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyleCollection.cs (1)
143throw new ArgumentException(string.Format(SR.OnlyOneControl, style.GetType().Name), nameof(style));
System\Windows\Forms\Screen.cs (1)
345=> $"{GetType().Name}[Bounds={_bounds} WorkingArea={WorkingArea} Primary={_primary} DeviceName={_deviceName}";
System\Windows\Forms\Timer.cs (1)
220Caption = GetType().Name,
System\Windows\Forms\WindowsFormsSynchronizationContext.cs (1)
143if (currentContext is null || currentContext.GetType() == typeof(SynchronizationContext))
System.Windows.Forms.Design (171)
System\ComponentModel\Design\BinaryEditor.cs (2)
66Debug.Fail($"No conversion from {value?.GetType().FullName ?? "null"} to byte[]"); 91Debug.Fail($"No conversion from byte[] to {value?.GetType().FullName ?? "null"}");
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
99Type type = item.Value.GetType();
System\ComponentModel\Design\CollectionEditor.cs (1)
165text = value.GetType().Name;
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (1)
62descriptor = TypeDescriptor.GetProperties(_designer.Component.GetType())[propertyName];
System\ComponentModel\Design\DesignerActionList.cs (2)
35MethodInfo[] methods = GetType().GetMethods(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public); 52PropertyInfo[] properties = GetType().GetProperties(BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public);
System\ComponentModel\Design\DesignerActionMethodItem.cs (1)
116_methodInfo ??= _actionList?.GetType()?.GetMethod(MemberName, BindingFlags.Default | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
System\ComponentModel\Design\DesignerActionPanel.cs (3)
670list.GetType().FullName)); 861if (oldLine.GetType() == newLineInfo.LineType) 877Debug.Assert(newLine.GetType() == newLineInfo.LineType);
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
36public override string FocusId => $"METHOD:{_actionList!.GetType().FullName}.{_methodItem!.MemberName}";
System\ComponentModel\Design\DesignerActionPanel.PropertyLine.cs (2)
23public sealed override string FocusId => $"PROPERTY:{_actionList!.GetType().FullName}.{PropertyItem!.MemberName}"; 50Type valueType = newValue.GetType();
System\ComponentModel\Design\DesignerActionUI.cs (3)
340string.Format(SR.DesignerActionPanel_DefaultPanelTitle, behaviorWithPanelToRegen.RelatedComponent.GetType().Name), 708_designerActionHost.AccessibleName = string.Format(SR.DesignerActionPanel_DefaultPanelTitle, relatedComponent.GetType().Name); 709panel.AccessibleName = string.Format(SR.DesignerActionPanel_DefaultPanelTitle, relatedComponent.GetType().Name);
System\ComponentModel\Design\DesignerHost.cs (8)
194if (_rootComponent is not null && string.Equals(component.GetType().FullName, _rootComponentClassName, StringComparison.OrdinalIgnoreCase)) 198component.GetType().FullName, 248throw new InvalidOperationException(string.Format(SR.DesignerHostNoTopLevelDesigner, component.GetType().FullName)) 394if (string.Equals(reflectType.FullName, component.GetType().FullName, StringComparison.Ordinal)) 396reflectType = component.GetType(); 695helpService.RemoveContextAttribute("Keyword", $"Designer_{designer.GetType().FullName}"); 991string name = component.Site?.Name ?? component.GetType().Name; 1096helpService.AddContextAttribute("Keyword", $"Designer_{rootDesigner.GetType().FullName}", HelpKeywordType.F1Keyword);
System\ComponentModel\Design\InheritanceService.cs (1)
55AddInheritedComponents(component.GetType(), component, container);
System\ComponentModel\Design\MenuCommandService.cs (1)
209_verbSourceType = selectedComponent.GetType();
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.ComponentListCodeDomSerializer.cs (2)
59Debug.Fail($"No case for {data.GetType().Name}"); 510if (manager.TryGetSerializer(data._value.GetType(), out CodeDomSerializer? serializer))
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationService.CodeDomSerializationStore.cs (1)
176Assembly a = obj.GetType().Assembly;
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
792Debug.Assert(_rootSerializer is not null || _typeSerializer is not null, $"What are we saving right now? Base component has no serializer: {LoaderHost.RootComponent.GetType().FullName}");
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.ModifiersInheritedExtenderProvider.cs (1)
79Type baseType = baseComponent.GetType();
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (2)
88throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes)); 254throw new NotSupportedException(string.Format(SR.SerializerMemberTypeNotSerializable, member.GetType().FullName));
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (22)
112Type type = instance.GetType(); 131Error(manager, string.Format(SR.TypeNotFoundInTargetFramework, instance.GetType().FullName), SR.SerializerUndeclaredName); 507Error(manager, string.Format(SR.SerializerNoSuchEvent, targetObject.GetType().FullName, statement.Event.EventName), SR.SerializerNoSuchEvent); 574if (fieldType != rhs.GetType()) 600Error(manager, string.Format(SR.SerializerNoSuchField, lhs.GetType().FullName, fieldReferenceEx.FieldName), SR.SerializerNoSuchField); 743mi = target.GetType().GetMethod(methodRef.MethodName, paramTypes)!; 994Debug.Assert(o is IConvertible, $"Array size expression could not be resolved to IConvertible: {(o.GetType().Name)}"); 1165Debug.Fail($"Unrecognized expression type: {result.GetType().Name}"); 1242Error(manager, string.Format(SR.SerializerNoSuchEvent, targetObject.GetType().FullName, eventName), SR.SerializerNoSuchEvent); 1409result = Enum.ToObject(left.GetType(), result); 1557if (rhs is IConvertible ic && p.PropertyType != rhs.GetType()) 1628Error(manager, string.Format(SR.SerializerNoSuchProperty, lhs.GetType().FullName, propertyReferenceEx.PropertyName), SR.SerializerNoSuchProperty); 1757AttributeCollection typeAttributes = GetAttributesFromTypeHelper(manager, value.GetType()); 1827Type? t = value?.GetType(); 1981if (arg is not null && !parameters[i].ParameterType.IsAssignableFrom(arg.GetType())) 2025Debug.Fail($"Unrecognized reflection type in instance descriptor: {descriptor.MemberInfo.GetType().Name}"); 2032Type targetType = value.GetType(); 2109MemberCodeDomSerializer? memberSerializer = manager.GetSerializer<MemberCodeDomSerializer>(descriptor.GetType()); 2255MemberCodeDomSerializer? memberSerializer = manager.GetSerializer<MemberCodeDomSerializer>(propertyToSerialize.GetType()); 2411valueName = manager.GetName(value) ?? value.GetType().Name; 2420manager.ReportError(string.Format(SR.SerializerNoSerializerForComponent, value is null ? "(null)" : value.GetType().FullName)); 2539if (value is null || value.GetType().IsSerializable)
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (8)
43Debug.Fail($"Collection of type {modified.GetType().FullName} doesn't return an enumerator"); 167Type collectionType = context?.ExpressionType ?? collection.GetType(); 219Debug.Fail($"Collection serializer invoked for non-collection: {(value is null ? "(null)" : value.GetType().Name)}"); 373if (!serialized && originalCollection.GetType().IsSerializable) 442if (o is not null && o.GetType() != elementType) 534if (o is not null && !elementType.IsAssignableFrom(o.GetType()) && o.GetType().IsPrimitive) 613if (o is not null && !elementType.IsAssignableFrom(o.GetType()))
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (1)
70if (manager.TryGetSerializer(property.GetType(), out MemberCodeDomSerializer? memberSerializer) &&
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (4)
240if (instance is not null && ValidateRecycledTypes && instance.GetType() != type) 299types[index] = argArray[index]?.GetType(); 390: string.Join(", ", argArray.Select(o => o?.GetType().Name ?? "null")); 435if (_serializers.TryGetValue(objectType, out serializer) && !serializerType.IsAssignableFrom(serializer.GetType()))
System\ComponentModel\Design\Serialization\EnumCodeDomSerializer.cs (3)
51CodeTypeReferenceExpression enumType = new(enumValue.GetType()); 60TypeConverter enumConverter = new EnumConverter(enumValue.GetType()); 82expression = new CodeCastExpression(enumValue.GetType(), expression);
System\ComponentModel\Design\Serialization\PrimitiveCodeDomSerializer.cs (1)
29_ => new CodeCastExpression(new CodeTypeReference(value.GetType()), new CodePrimitiveExpression(value)),
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (3)
60if (propertyValue is not null and not Type && (!propertyValue.GetType().IsValueType)) 139name ??= value.GetType().FullName; 143else if (manager.TryGetSerializer(propertyValue.GetType(), out CodeDomSerializer? serializer))
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (2)
112throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes)); 178Type castTo = value.GetType();
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (4)
516if (value is not null && (!value.GetType().IsSerializable)) 518Debug.Fail($"Cannot save a non-serializable value into resources. Add serializable to {(value is null ? "(null)" : value.GetType().Name)}"); 601if (value is not null && (!value.GetType().IsSerializable)) 603Debug.Fail($"Cannot save a non-serializable value into resources. Add serializable to {(value is null ? "(null)" : value.GetType().Name)}");
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.cs (2)
265typeName = comp.GetType().FullName; 429docType.BaseTypes.Add(root.GetType());
System\ComponentModel\Design\UndoEngine.cs (1)
274componentName = obj is null ? "(null)" : obj.GetType().Name;
System\Drawing\Design\ImageEditor.cs (3)
82Type myClass = GetType(); 91&& editor.GetType() is Type editorClass 144if (editor is not null && editor.GetType() != typeof(ImageEditor))
System\Drawing\Design\ToolboxItem.cs (2)
376if (obj.GetType() != GetType())
System\Resources\Tools\StronglyTypedResourceBuilder.cs (1)
186Type type = (entry.Value is null) ? typeof(object) : entry.Value.GetType();
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
284_itemType = c.GetType(); 304_image ??= ToolboxBitmapAttribute.GetImageFromResource(_comp!.GetType(), imageName: null, large: false);
System\Windows\Forms\Design\Behavior\DesignerActionBehavior.cs (1)
64dap.UpdateTasks(lists, [], string.Format(SR.DesignerActionPanel_DefaultPanelTitle, relatedComponent.GetType().Name), null);
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
368name = _dragComponents[0].dragComponent.GetType().Name;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
242name = _resizeComponents[0].resizeControl.GetType().Name;
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
200name = control.GetType().Name;
System\Windows\Forms\Design\CommandSet.cs (8)
2625if (lastComp is null || curComp.GetType() != lastComp.GetType()) 2664if (lastComp is null || curComp.GetType() != lastComp.GetType()) 2732if (lastComp is null || lastComp.GetType() != curComp.GetType()) 2763if (lastComp.GetType() != curComp.GetType())
System\Windows\Forms\Design\ComponentTray.cs (4)
943PropertyDescriptor loc = TypeDescriptor.GetProperties(receiver.GetType())["Location"]; 1529PropertyDescriptor loc = TypeDescriptor.GetProperties(receiver.GetType())["Location"]; 1923ds?.SetValue(GetType(), this); 1928name ??= component.GetType().Name;
System\Windows\Forms\Design\ControlCodeDomSerializer.cs (4)
255string? componentTypeName = multiTargetHelper is null ? component.GetType().AssemblyQualifiedName : multiTargetHelper.GetAssemblyQualifiedName(component.GetType()); 275SerializeResourceInvariant(manager, $">>{name}.Type", multiTargetHelper is null ? control.GetType().AssemblyQualifiedName : multiTargetHelper.GetAssemblyQualifiedName(control.GetType()));
System\Windows\Forms\Design\ControlDesigner.cs (2)
930PropertyDescriptorCollection props = TypeDescriptor.GetProperties(component.GetType()); 2497typeName = owner.GetType().FullName;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (7)
339Type srcType = srcColumn.GetType(); 340Type destType = destColumn.GetType(); 420if (srcNullValue is not null && destNullValue is not null && srcNullValue.GetType() == destNullValue.GetType()) 874ComponentDesigner columnDesigner = DataGridViewAddColumnDialog.GetComponentDesignerForType(tr, _columnsPrivateCopy[i].GetType())!; 1356return item.DataGridViewColumn.GetType().Name; 1367if (item?.DataGridViewColumn.GetType() != type)
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.cs (1)
36_columnTypePicker.Start(windowsFormsEditorService, discoveryService!, item.DataGridViewColumn.GetType());
System\Windows\Forms\Design\DesignBindingPicker.cs (4)
1267bindingSourceName = ToolStripDesigner.NameFromText(bindingSourceName, bs.GetType(), _serviceProvider); 1271bindingSourceName += bs.GetType().Name; 1378return dataSource.GetType().Name; 1427if (dsType is not null && dsType.Equals(comp.GetType()))
System\Windows\Forms\Design\DesignerFrame.cs (3)
417Debug.Assert(_overlayList.IndexOf(control) == -1, $"Duplicate overlay in overlay service: {control.GetType().FullName}"); 435Debug.Assert(_overlayList.IndexOf(control) != -1, $"Control is not in overlay service: {control.GetType().FullName}"); 446Debug.Assert(_overlayList.IndexOf(control) == -1, $"Duplicate overlay in overlay service: {control.GetType().FullName}");
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (7)
81object? tlbRef = references.GetType().InvokeMember( 91object? axRef = references.GetType().InvokeMember( 162string? path = (string?)reference.GetType().InvokeMember("Path", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, reference, null, CultureInfo.InvariantCulture); 228string? name = ext.GetType().InvokeMember("Name", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, ext, null, CultureInfo.InvariantCulture)!.ToString(); 230object? project = ext.GetType().InvokeMember("ContainingProject", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, ext, null, CultureInfo.InvariantCulture); 233object? vsproject = project.GetType().InvokeMember("Object", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, project, null, CultureInfo.InvariantCulture); 236object? references = vsproject.GetType().InvokeMember("References", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, vsproject, null, CultureInfo.InvariantCulture);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
634PropertyDescriptor backProp = TypeDescriptor.GetProperties(Component.GetType())["BackColor"];
System\Windows\Forms\Design\EventHandlerService.cs (1)
91_lastHandlerType = handler.GetType();
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
343name = _dragControls[0].GetType().Name;
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
322PropertyDescriptor windowStateProp = TypeDescriptor.GetProperties(component.GetType())["WindowState"];
System\Windows\Forms\Design\ImageCollectionEditor.cs (1)
56text = value.GetType().Name;
System\Windows\Forms\Design\ImageListImageEditor.cs (2)
47Type myClass = GetType(); 56&& editor.GetType() is Type editorClass
System\Windows\Forms\Design\ListViewItemCollectionEditor.cs (1)
47text = value.GetType().Name;
System\Windows\Forms\Design\ListViewSubItemCollectionEditor.cs (1)
66text = value.GetType().Name;
System\Windows\Forms\Design\MaskDescriptor.cs (1)
152return $"{GetType()}<Name={Name ?? "null"}, Mask={Mask ?? "null"}, ValidatingType={(ValidatingType is not null ? ValidatingType.ToString() : "null")}";
System\Windows\Forms\Design\NewItemsContextMenuStrip.cs (2)
46if (item is ItemTypeToolStripMenuItem toolItem && _currentItem is not null && toolItem.ItemType == _currentItem.GetType()) 58if (item is ItemTypeToolStripMenuItem toolItem && _currentItem is not null && toolItem.ItemType == _currentItem.GetType())
System\Windows\Forms\Design\OleDragDropHandler.ComponentDataObject.cs (2)
47Debug.Assert(_components[i] is IComponent, $"Item {_components[i].GetType().Name} is not an IComponent"); 307SetData(data.GetType(), data);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
2350string error = string.Format(SR.DesignerCantParentType, component.GetType().Name, Component.GetType().Name);
System\Windows\Forms\Design\SelectionUIService.cs (2)
267name = objects[0].GetType().Name; 291name = objects[0].GetType().Name;
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
232Debug.Assert(_splitContainer is not null, $"Component must be a non-null SplitContainer, it is a: {component.GetType().FullName}");
System\Windows\Forms\Design\TabControlDesigner.cs (1)
204Debug.Assert(control is not null, "Component must be a tab control, it is a: " + component.GetType().FullName);
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (1)
66if (serializedObj is not null && !typeof(Control).IsAssignableFrom(o.GetType()))
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
1395AttributeCollection attribs = TypeDescriptor.GetAttributes(Component.GetType());
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (2)
673itemType = item.GetType(); 883string className = "&" + selectedItem.GetType().Name;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
343Type toolType = component.GetType();
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1864name = dragComponents[0].GetType().Name;
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
378if (item is ItemTypeToolStripMenuItem toolItem && currentItem is not null && toolItem.ItemType == currentItem.GetType()) 411if (item is ItemTypeToolStripMenuItem toolItem && currentItem is not null && toolItem.ItemType == currentItem.GetType())
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
387_menuItem.Text = (_dropDown is not null) ? _dropDown.GetType().Name : _menuItem.Name;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
663name = dragComponents[0].GetType().Name;
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (1)
302if (t != _currentItem.GetType())
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
2651name = dragComponents[0].GetType().Name;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
302Type toolType = component.GetType();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
767designer.CommitEdit(_designer.Component.GetType(), text, commit, enterKeyPressed, tabKeyPressed);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
702if (value?.GetType() is { } type && type.IsValueType && !type.IsPrimitive && !type.IsEnum)
Windows\Win32\PInvoke.CreateWindowEx.cs (1)
68Marshal.DestroyStructure(native, lpParam.GetType());
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (1)
39_type = instance.GetType();
System.Xaml (55)
System\Windows\Markup\ArrayExtension.cs (1)
46Type = elements.GetType().GetElementType();
System\Windows\Markup\StaticExtension.cs (1)
84throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\TypeExtension.cs (1)
71throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\ValueSerializer.cs (5)
136if (converter.GetType() == typeof(DateTimeConverter2)) 244text = value.GetType().FullName; 247return new NotSupportedException(SR.Format(SR.ConvertToException, base.GetType().Name, text, destinationType.FullName)); 262text = value.GetType().FullName; 265return new NotSupportedException(SR.Format(SR.ConvertFromException, base.GetType().Name, text));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (12)
304_context.CurrentInstance = inst ?? throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.GetObjectNull, parentInstance.GetType(), parentProperty.Name))); 372XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); 776XamlType valueXamlType = GetXamlType(value.GetType()); 788XamlType valueXamlType = GetXamlType(value.GetType()); 1088SchemaContext.GetType(), clrType)); 1198XamlType instType = GetXamlType(inst.GetType()); 1745ctx.CurrentType = GetXamlType(value.GetType()); 1809if (value is XAML3.MarkupExtension me && !Logic_WillParentCollectionAdd(ctx, value.GetType(), true)) 1823currentType = value is null ? collectionType.ItemType : GetXamlType(value.GetType()); 2237Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType; 2268childThatHasUnresolvedChildren.GetType(), property, namesString))); 2637pendingAdd.ItemType = (item is not null) ? GetXamlType(item.GetType()) : null;
System\Xaml\Runtime\ClrObjectRuntime.cs (6)
190throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex); 207throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex); 395if (genericIEnumerator.IsAssignableFrom(enumerator.GetType())) 521throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e); 662if (_ignoreCanConvert && value.GetType() == typeof(string)) 668if (typeConverter.CanConvertFrom(value.GetType()))
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
184Type targetType = target.GetType();
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (3)
438return xamlType.Invoker.GetType() == typeof(XamlTypeInvoker); 444return xamlMember.Invoker.GetType() == typeof(XamlMemberInvoker); 451return converter.GetType() == typeof(XamlValueConverter<TConverterBase>);
System\Xaml\Schema\BuiltInValueConverter.cs (2)
218s_Uri = new BuiltInValueConverter<TypeConverter>(stdConverter.GetType(), () => TypeDescriptor.GetConverter(typeof(Uri))); 236s_StringSerializer = new BuiltInValueConverter<ValueSerializer>(stringSerializer.GetType(), () => stringSerializer);
System\Xaml\Schema\XamlTypeInvoker.cs (2)
75itemType = _xamlType.SchemaContext.GetXamlType(item.GetType()); 109itemType = _xamlType.SchemaContext.GetXamlType(item.GetType());
System\Xaml\XamlObjectReader.cs (18)
51var context = new SerializerContext(schemaContext, this.settings) { RootType = instance?.GetType() }; 442actualKeyType = context.GetXamlType(entry.Key.GetType()); 476XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); 1292else if (!parameterInfo.ParameterType.IsAssignableFrom(argument.GetType())) 1294throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, argument.GetType(), parameterInfo.ParameterType)); 1432var valueType = value.GetType(); 1588AddFactoryMethodAndValidateArguments(value.GetType(), member, arguments, context, out methodParams); 1701throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType())); 1704throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType())); 1771var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); 1809var type = context.LocalAssemblyAwareGetXamlType(value.GetType()); 1935XamlType valueType = context.GetXamlType(value.GetType()); 2024XamlType xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType()); 2066var xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType()); 2518string ns = GetXamlType(obj.GetType()).PreferredXamlNamespace; 2643schemaContext.GetType(), clrType)); 2704XamlType valueXamlType = context.GetXamlType(value.GetType()); 2746XamlType type = GetXamlType(objectToName.GetType());
System\Xaml\XamlSchemaContext.cs (2)
1009typeof(object).Assembly.GetType().IsAssignableFrom(assembly.GetType());
System\Xaml\XamlType.cs (1)
1673Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties");
UIAutomationClient (4)
System\Windows\Automation\ItemContainerPattern.cs (1)
138|| (value != null && !expectedType.IsAssignableFrom(value.GetType()))))
System\Windows\Automation\PropertyCondition.cs (1)
136|| (val != null && !expectedType.IsAssignableFrom(val.GetType()))))
System\Windows\Automation\Text\TextRange.cs (2)
183if (value.GetType() != ai.Type) 185throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), nameof(value));
UIAutomationClientSideProviders (119)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (55)
408return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 415new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 423return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 437return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 443return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 449return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 465return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 472bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 484bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 505new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 512new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 519new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 538new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 549new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 560new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 583new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 594new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 605new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 630return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 642return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 654return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 689return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 707return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 725return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 751return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 758bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 771bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 792return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 799new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 807return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 833return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 840bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 853bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 874return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 882Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 889return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 915return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 922bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 935bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 956return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 962return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 968return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 990Marshal.SizeOf(hitTestInfo.GetType()), XSendMessage.ErrorValue.Zero)) 999Marshal.SizeOf(hitTestInfo32.GetType()), XSendMessage.ErrorValue.Zero)) 1008Marshal.SizeOf(hitTestInfo64.GetType()), XSendMessage.ErrorValue.Zero)) 1027return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1035Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1042return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1068return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1075bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1088bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1126Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1134Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1143Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1171int cMem = Marshal.SizeOf(rectW32.GetType());
MS\Internal\AutomationProxies\Misc.cs (3)
1078gui.cbSize = Marshal.SizeOf(gui.GetType()); 1178ti.cbSize = Marshal.SizeOf(ti.GetType()); 1194ti.cbSize = Marshal.SizeOf(ti.GetType());
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
343throw new InvalidOperationException(SR.Format(SR.EditControlsHaveNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
37throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1065throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1077throw new InvalidOperationException(SR.Format(SR.InvalidRangeEndpoint, GetType().FullName)); 1111throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1142throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (3)
211bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 395return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 492bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
MS\Internal\AutomationProxies\WindowsListView.cs (7)
1269if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1420result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1429result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1493if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1664scrollBarInfo.cbSize = Marshal.SizeOf(scrollBarInfo.GetType()); 1675si.cbSize = Marshal.SizeOf (si.GetType ()); 1792if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType())))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (1)
306XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
386while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 703new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 814sbi.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)
133if (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)
56si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsMenu.cs (6)
504mbi.cbSize = Marshal.SizeOf(mbi.GetType()); 1886menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 1901menuItemInfo.cbSize = Marshal.SizeOf (menuItemInfo.GetType ()); 1945menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2552menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2593int readSize = Marshal.SizeOf(msaaMenuInfo.GetType());
MS\Internal\AutomationProxies\WindowsRebar.cs (3)
206return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 399if (!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)
260throw new InvalidOperationException(SR.Format(SR.RichEditTextPatternHasNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsScroll.cs (6)
127sbi.cbSize = Marshal.SizeOf(sbi.GetType()); 143si.cbSize = Marshal.SizeOf (si.GetType ()); 195si.cbSize = Marshal.SizeOf (si.GetType ()); 250si.cbSize = Marshal.SizeOf (si.GetType ()); 291si.cbSize = Marshal.SizeOf(si.GetType ()); 367si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsScrollBar.cs (8)
135sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 431si.cbSize = Marshal.SizeOf (si.GetType ()); 445sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 519sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 572si.cbSize = Marshal.SizeOf (si.GetType ()); 625si.cbSize = Marshal.SizeOf (si.GetType ()); 711sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 726sbi.cbSize = Marshal.SizeOf(sbi.GetType());
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (3)
205si.cbSize = Marshal.SizeOf (si.GetType ()); 223sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 542si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsSlider.cs (2)
460XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 472XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (2)
161index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 568result = 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)
276index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 653result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1272if (!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)
555if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 935if (Marshal.SizeOf(_hItem.GetType()) > sizeof(int)) 1592int readSize = Marshal.SizeOf(ent.GetType());
VBCSCompiler (1)
src\roslyn\src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
53Logger.Log($"Received request {request.RequestId} of type {request.GetType()}");
vstest.console (5)
Processors\HelpArgumentProcessor.cs (1)
104IArgumentProcessor? runTestsArgumentProcessor = processors.Find(p1 => p1.GetType() == typeof(RunTestsArgumentProcessor));
Processors\ListExtensionsArgumentProcessor.cs (4)
90ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 127ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 163ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 207ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information);
vstest.console.arm64 (5)
src\vstest\src\vstest.console\Processors\HelpArgumentProcessor.cs (1)
104IArgumentProcessor? runTestsArgumentProcessor = processors.Find(p1 => p1.GetType() == typeof(RunTestsArgumentProcessor));
src\vstest\src\vstest.console\Processors\ListExtensionsArgumentProcessor.cs (4)
90ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 127ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 163ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information); 207ConsoleOutput.Instance.WriteLine(extension.Value.GetType().FullName, OutputLevel.Information);
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName)); 181return SourceObject.GetType().GetProperty(propertyName, Type.EmptyTypes);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
109PropertyInfo propertyInfo = childControl.GetType().GetProperty("RightToLeftLayout", memberAccess);