5926 references to GetType
AnalyzerRunner (9)
CodeRefactoringRunner.cs (2)
182if (!refactoringTypes.Add(refactoring.GetType())) 192else if (options.AnalyzerNames.Contains(refactoring.GetType().Name))
DiagnosticAnalyzerRunner.cs (7)
261if (!analyzerTypes.Add(analyzer.GetType())) 278else if (options.AnalyzerNames.Contains(analyzer.GetType().Name)) 430foreach (var pair in telemetryInfoDictionary.OrderBy(x => x.Key.GetType().Name, StringComparer.OrdinalIgnoreCase)) 432WriteTelemetry(pair.Key.GetType().Name, pair.Value); 436var longestAnalyzerName = telemetryInfoDictionary.Select(x => x.Key.GetType().Name.Length).Max(); 437foreach (var pair in telemetryInfoDictionary.OrderBy(x => x.Key.GetType().Name, StringComparer.OrdinalIgnoreCase)) 439WriteExecutionTimes(pair.Key.GetType().Name, longestAnalyzerName, pair.Value);
ApiExplorerWebSite (3)
ApiExplorerDataFilter.cs (3)
77ConstraintTypes = parameter.RouteInfo.Constraints?.Select(c => c.GetType().Name).ToArray(), 90FormatterType = request.Formatter?.GetType().FullName, 108FormatterType = responseFormat.Formatter?.GetType().FullName,
ApplicationModelWebSite (1)
Conventions\FromHeaderConvention.cs (1)
15if (param.Attributes.Any(p => p.GetType() == typeof(FromHeaderAttribute)))
Aspire.Dashboard (1)
Components\Controls\Chart\ChartBase.cs (1)
210throw new InvalidOperationException("Unexpected metric type: " + metric.GetType());
Aspire.Dashboard.Tests (3)
AssemblyExtensionsTests.cs (1)
91return _customAttributes.Where(a => a.GetType() == attributeType).ToArray();
Integration\OtlpGrpcServiceTests.cs (1)
159var logger = loggerFactory.CreateLogger(GetType());
OtlpApiKeyAuthenticationHandlerTests.cs (1)
100await handler.InitializeAsync(new AuthenticationScheme("Test", "Test", handler.GetType()), httpContext);
Aspire.Hosting (7)
ApplicationModel\EnvironmentCallbackAnnotation.cs (1)
82var text = $@"Type = {GetType().Name}";
ApplicationModel\Resource.cs (1)
37return $@"Type = {GetType().Name}, Name = ""{Name}"", Annotations = {Annotations.Count}";
ApplicationModel\ResourceExtensions.cs (1)
209_ => throw new InvalidOperationException($"Unsupported expression type: {expr.GetType()}")
ApplicationModel\ResourceNotificationService.cs (1)
493ResourceType = resource.GetType().Name,
Dashboard\DashboardLifecycleHook.cs (1)
151_ => dashboardResource.GetType().Name
DistributedApplicationBuilder.cs (2)
434throw 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.");
Aspire.Hosting.Azure (5)
Provisioning\Provisioners\AzureProvisioner.cs (4)
267var type = resource.GetType(); 292resourceLogger.LogWarning("No provisioner found for {resourceType} skipping.", resource.GetType().Name); 382if (credential.GetType() == typeof(DefaultAzureCredential)) 390logger.LogInformation("Using {credentialType} for provisioning.", credential.GetType().Name);
Provisioning\Provisioners\BicepProvisioner.cs (1)
112ResourceType = resource.GetType().Name,
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
540_ => throw new NotSupportedException("Unsupported value type " + val.GetType()) 709throw new NotSupportedException("Unsupported value type " + value.GetType());
Aspire.Hosting.Keycloak.Tests (2)
KeycloakResourceBuilderTests.cs (2)
114Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.AdminPasswordParameter.Default?.GetType().FullName); 124Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.AdminPasswordParameter.Default?.GetType().FullName);
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)
21Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", nats.Resource.PasswordParameter!.Default?.GetType().FullName); 31Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", nats.Resource.PasswordParameter!.Default?.GetType().FullName);
Aspire.Hosting.Oracle.Tests (2)
AddOracleTests.cs (2)
22Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", orcl.Resource.PasswordParameter.Default?.GetType().FullName); 32Assert.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)
25Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", qd.Resource.ApiKeyParameter.Default?.GetType().FullName); 35Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", qd.Resource.ApiKeyParameter.Default?.GetType().FullName);
Aspire.Hosting.RabbitMQ.Tests (2)
AddRabbitMQTests.cs (2)
21Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.PasswordParameter.Default?.GetType().FullName); 31Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.SqlServer.Tests (2)
AddSqlServerTests.cs (2)
22Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", sql.Resource.PasswordParameter.Default?.GetType().FullName); 32Assert.NotEqual("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", sql.Resource.PasswordParameter.Default?.GetType().FullName);
Aspire.Hosting.Tests (3)
AddParameterTests.cs (1)
93Assert.Contains(app.Services.GetServices<IDistributedApplicationLifecycleHook>(), hook => hook.GetType().Name == "WriteParameterLogsHook");
DistributedApplicationTests.cs (1)
870var kubernetesLifecycle = (KubernetesTestLifecycleHook)lifecycles.Where(l => l.GetType() == typeof(KubernetesTestLifecycleHook)).First();
Utils\EnvironmentVariableEvaluator.cs (1)
41_ => throw new InvalidOperationException($"Unsupported expression type: {expr.GetType()}")
Aspire.Microsoft.Data.SqlClient (2)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (1)
74var fetcher = PropertyFetch.Create(obj.GetType().GetTypeInfo(), propertyName);
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
177throw new InvalidCastException($"Cannot cast '{paramName}' from '{value?.GetType().ToString() ?? "null"}' to '{typeof(T)}'");
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
AspireSqlServerEFCoreSqlClientExtensions.cs (1)
139else if (executionStrategy.GetType() != typeof(SqlServerExecutionStrategy))
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\DiagnosticSourceInstrumentation\PropertyFetcher.cs (1)
74var fetcher = PropertyFetch.Create(obj.GetType().GetTypeInfo(), propertyName);
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
177throw new InvalidCastException($"Cannot cast '{paramName}' from '{value?.GetType().ToString() ?? "null"}' to '{typeof(T)}'");
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
AspireEFPostgreSqlExtensions.cs (1)
153else if (executionStrategy.GetType() != typeof(NpgsqlExecutionStrategy))
Aspire.Oracle.EntityFrameworkCore (1)
AspireOracleEFCoreExtensions.cs (1)
141else if (executionStrategy.GetType() != typeof(OracleExecutionStrategy))
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
AspireEFMySqlExtensions.cs (1)
195else if (executionStrategy.GetType() != typeof(MySqlExecutionStrategy))
Aspire.StackExchange.Redis (3)
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 (1)
AspireRedisOutputCacheExtensionsTests.cs (1)
24Assert.StartsWith("Redis", cacheStore.GetType().Name);
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
230Assert.StartsWith("Redis", cacheStore.GetType().Name);
BasicTestApp (3)
FormsTest\CustomFieldCssClassProvider.cs (1)
18var propertyInfo = fieldIdentifier.Model.GetType().GetProperty(fieldIdentifier.FieldName);
InteropTest\JavaScriptInterop.cs (2)
463ThisTypeName = GetType().Name, 479ThisTypeName = GetType().Name,
CodeStyleConfigFileGenerator (1)
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string 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()));
DesignSurfaceExt (2)
DesignSurfaceExt.cs (1)
121Type hostType = host.RootComponent.GetType();
NameCreationServiceImp.cs (1)
30if (cc[i] is Component comp && comp.GetType() == type)
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}";
FilesWebSite (3)
Controllers\EmbeddedFilesController.cs (3)
16FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"), 26FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"), 35FileProvider = new EmbeddedFileProvider(GetType().GetTypeInfo().Assembly, "FilesWebSite.EmbeddedResources"),
GetDocument.Insider (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181var buildMethod = builder.GetType().GetMethod("Build"); 191var hostType = host.GetType();
IdeBenchmarks (1)
SQLitePersistentStorageBenchmark.cs (1)
71Console.WriteLine("Storage type: " + _storage.GetType());
Identity.DefaultUI.WebSite (1)
StartupBase.cs (1)
112throw new InvalidOperationException($"Unknown provider '{currentProvider.GetType().Name}'");
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
148Assert.Contains("gzip", response.Content.GetType().FullName, StringComparison.OrdinalIgnoreCase);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
50var configuration = this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>().Configuration;
illink (24)
ILLink.RoslynAnalyzer (8)
DataFlow\LocalDataFlowVisitor.cs (3)
104 $"{OwningSymbol.GetType ()}: {branchValueOperation.Syntax.GetLocation ().GetLineSpan ()}"); 112 $"{OwningSymbol.GetType ()}: {branchValueOperation.Syntax.GetLocation ().GetLineSpan ()}"); 205 $"{local.ContainingSymbol.GetType ()}: {localReference.Syntax.GetLocation ().GetLineSpan ()}");
DataFlow\UnexpectedOperationHandler.cs (1)
47 throw new NotImplementedException ($"Unexpected operation type {operation.GetType ()}: {operation.Syntax.GetLocation ().GetLineSpan ()}");
DataFlowAnalyzerContext.cs (1)
20 throw new System.ArgumentException ($"Analyzer {analyzer.GetType ().Name} is not in the cache");
src\tools\illink\src\ILLink.Shared\TrimAnalysis\IntrinsicId.cs (1)
26 /// <see cref="object.GetType()"/>
src\tools\illink\src\ILLink.Shared\TrimAnalysis\ValueExtensions.cs (1)
22 sb.Append (value.GetType ().Name);
TrimAnalysis\ArrayValue.cs (1)
43 return HashUtils.Combine (GetType ().GetHashCode (), Size);
InMemory.FunctionalTests (5)
Http2\Http2ConnectionTests.cs (2)
257var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 275var contentTypeValue2 = (StringValues)headerReferences2.GetType().GetField("_ContentType").GetValue(headerReferences2);
Http3\Http3ConnectionTests.cs (2)
476var contentTypeValue1 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences1); 483var contentTypeValue2 = (StringValues)headerReferences1.GetType().GetField("_ContentType").GetValue(headerReferences2);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\shared\WebSockets\TestStartup.cs (1)
19var type = startup.GetType();
LocalizationSample (1)
Startup.cs (1)
89await context.Response.WriteAsync($"<tr><th>Winning provider:</th><td>{requestCultureFeature.Provider.GetType().Name}</td></tr>");
Microsoft.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.Arcade.Test.Common (2)
AssertEx.cs (2)
64if (x.GetType() != y.GetType())
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
37var project = DiagnosticProject.Create(GetType().Assembly, sources);
DiagnosticVerifier.cs (1)
165foreach (var defaultCompileLibrary in DependencyContext.Load(GetType().Assembly).CompileLibraries)
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
84authenticatedIdentity?.GetType() ?? typeof(ClaimsIdentity),
Microsoft.AspNetCore.App.Analyzers.Test (7)
Infrastructure\WellKnownTypesTests.cs (1)
63var project = TestDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, source.Source);
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (2)
39var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods() 49var methodInfo = (from method in _exportProvider.GetType().GetTypeInfo().GetMethods()
TestDiagnosticAnalyzer.cs (4)
31var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 48var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 70var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources); 109var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, sources);
Microsoft.AspNetCore.App.CodeFixes (1)
RouteParameterUnusedParameterFixer.cs (1)
94_ => throw new InvalidOperationException($"Unexpected method syntax: {methodSyntax.GetType().FullName}")
Microsoft.AspNetCore.Authentication (2)
AuthenticationHandler.cs (2)
119Logger = logger.CreateLogger(this.GetType().FullName!); 136Logger = logger.CreateLogger(this.GetType().FullName!);
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationService.cs (2)
283var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for SignInAsync. "; 322var mismatchError = $"The authentication handler registered for scheme '{scheme}' is '{handler.GetType().Name}' which cannot be used for {nameof(SignOutAsync)}. ";
Microsoft.AspNetCore.Authentication.OpenIdConnect (7)
OpenIdConnectHandler.cs (7)
219Logger.EnteringOpenIdAuthenticationHandlerHandleSignOutAsync(GetType().FullName!); 382Logger.EnteringOpenIdAuthenticationHandlerHandleUnauthorizedAsync(GetType().FullName!); 635Logger.EnteringOpenIdAuthenticationHandlerHandleRemoteAuthenticateAsync(GetType().FullName!); 1412Logger.InvalidSecurityTokenType(validatedToken?.GetType().ToString()); 1413throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.ValidatedSecurityTokenNotJwt, validatedToken?.GetType())); 1473Logger.InvalidSecurityTokenTypeFromHandler(validatedToken?.GetType()); 1474throw new SecurityTokenException(string.Format(CultureInfo.InvariantCulture, Resources.ValidatedSecurityTokenNotJsonWebToken, validatedToken?.GetType()));
Microsoft.AspNetCore.Authorization (1)
DefaultAuthorizationPolicyProvider.cs (1)
77public virtual bool AllowsCachingPolicies => GetType() == typeof(DefaultAuthorizationPolicyProvider);
Microsoft.AspNetCore.Components (29)
CascadingParameterState.cs (3)
30var componentType = componentState.Component.GetType(); 68throw new InvalidOperationException($"'{info.Attribute.GetType()}' is flagged with SingleDelivery, but the selected supplier '{supplier.GetType()}' is not flagged with {nameof(ICascadingValueSupplier.IsFixed)}");
CascadingValue.cs (1)
105throw new ArgumentException($"Missing required parameter '{nameof(Value)}' for component '{GetType().Name}'.");
CascadingValueSource.cs (1)
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 (2)
76if (component.GetType() == componentType) 94var componentTypeInfo = GetComponentTypeInfo(instance.GetType());
NavigationManager.cs (5)
167throw new NotImplementedException($"The type {GetType().FullName} does not support supplying {nameof(NavigationOptions)}. To add support, that type should override {nameof(NavigateToCore)}(string uri, {nameof(NavigationOptions)} options)."); 192throw new InvalidOperationException($"'{GetType().Name}' already initialized."); 464=> throw new InvalidOperationException($"To support navigation locks, {GetType().Name} must override {nameof(HandleLocationChangingHandlerException)}"); 473=> throw new NotSupportedException($"To support navigation locks, {GetType().Name} must override {nameof(SetNavigationLockState)}"); 515throw new InvalidOperationException($"'{GetType().Name}' has not been initialized.");
NavigationManagerExtensions.cs (1)
222var valueType = value.GetType();
Reflection\ComponentProperties.cs (2)
28var targetType = target.GetType(); 173$"type '{target.GetType().FullName}'. The error was: {ex.Message}", ex);
Rendering\ComponentState.cs (1)
323return $"ComponentId = {ComponentId}, Type = {Component.GetType().Name}, Disposed = {_componentWasDisposed}";
Rendering\RenderQueueEntry.cs (1)
22return $"ComponentId = {ComponentState.ComponentId}, Type = {ComponentState.Component.GetType().Name}";
Rendering\RenderTreeBuilder.cs (1)
783throw new InvalidOperationException($"Render output is invalid for component of type '{component.GetType().FullName}'. A frame of type '{invalidFrame.FrameType}' was left unclosed. Do not use try/catch inside rendering logic, because partial output cannot be undone.");
RenderTree\Renderer.cs (1)
320=> GetRequiredRootComponentState(componentId).Component.GetType();
RenderTree\Renderer.Log.cs (7)
25InitializingRootComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 29InitializingChildComponent(logger, componentState.ComponentId, componentState.Component.GetType(), parentComponentState.ComponentId, parentComponentState.Component.GetType()); 41RenderingComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 52DisposingComponent(logger, componentState.ComponentId, componentState.Component.GetType()); 63HandlingEvent(logger, eventHandlerId, eventArgs?.GetType().Name ?? "null"); 74SkippingEventOnDisposedComponent(logger, componentId, eventHandlerId, eventArgs?.GetType().Name ?? "null");
src\Http\Routing\src\RouteConstraintBuilder.cs (1)
145_inlineConstraintResolver.GetType().Name));
Microsoft.AspNetCore.Components.Analyzers.Tests (3)
AnalyzerTestBase.cs (2)
21var filePath = Path.Combine(ProjectDirectory, "TestFiles", GetType().Name, source); 39return DiagnosticProject.Create(GetType().Assembly, new[] { read.Source, });
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Endpoints (11)
Builder\RazorComponentEndpointDataSource.cs (1)
157throw new InvalidOperationException($"Unable to find a provider for the render mode: {renderMode.GetType().FullName}. This generally " +
Rendering\EndpointComponentState.cs (1)
22var streamRenderingAttribute = _streamRenderingAttributeByComponentType.GetOrAdd(component.GetType(),
Rendering\EndpointHtmlRenderer.EventDispatch.cs (1)
201static string GetName(ComponentState current) => current.Component.GetType().Name;
Rendering\SSRRenderModeBoundary.cs (6)
89throw new InvalidOperationException($"A component of type '{componentType}' has render mode '{specifiedMode.GetType().Name}', " + 125var valueType = value.GetType(); 128throw new InvalidOperationException($"Cannot pass RenderFragment<T> parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. Templated content can't be passed across a rendermode boundary, because it is arbitrary code and cannot be serialized."); 137throw new InvalidOperationException($"Cannot pass the parameter '{name}' to component '{_componentType.Name}' with rendermode '{RenderMode.GetType().Name}'. This is because the parameter is of the delegate type '{value.GetType()}', which is arbitrary code and cannot be serialized."); 170_ => throw new UnreachableException($"Unknown render mode {RenderMode.GetType().FullName}"),
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
RazorComponentsServiceCollectionExtensionsTest.cs (2)
124{ ImplementationInstance: { } instance } => instance.GetType(), 125{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(),
TypeNameHashTest.cs (2)
42var type = new { Foo = "bar" }.GetType(); 58var type = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12).GetType();
Microsoft.AspNetCore.Components.Forms (8)
DataAnnotationsValidator.cs (1)
39throw new InvalidOperationException($"{GetType()} does not support changing the " +
EditContextDataAnnotationsExtensions.cs (1)
157var cacheKey = (ModelType: fieldIdentifier.Model.GetType(), fieldIdentifier.FieldName);
FieldIdentifier.cs (4)
48if (model.GetType().IsValueType) 137throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 149throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 164accessor = cache.GetOrAdd((value.GetType(), member.Member), CreateAccessor);
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Microsoft.AspNetCore.Components.QuickGrid (1)
Infrastructure\AsyncQueryExecutorSupplier.cs (1)
38var providerType = queryable.Provider?.GetType();
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (3)
AnalyzerTestBase.cs (2)
21var filePath = Path.Combine(ProjectDirectory, "TestFiles", GetType().Name, source); 39return DiagnosticProject.Create(GetType().Assembly, new[] { read.Source, });
Verifiers\DiagnosticVerifier.cs (1)
244var analyzerType = analyzer.GetType();
Microsoft.AspNetCore.Components.Server (8)
Circuits\CircuitHost.cs (1)
919handler.GetType(),
Circuits\RemoteRenderer.cs (1)
84GetComponentState(componentId).Component.GetType();
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (2)
33throw new PlatformNotSupportedException($"{GetType()} cannot be used when running in a browser."); 155=> $"{GetType().FullName}:{_storeName}:{key}";
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (2)
419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 503Serialize(ref writer, argument.GetType(), argument);
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\Utilities.cs (1)
41throw new InvalidOperationException("The underlying IBufferWriter<byte>.GetMemory(int) method returned an empty memory block, which is not allowed. This is a bug in " + bufferWriter.GetType().FullName);
Microsoft.AspNetCore.Components.Server.Tests (9)
Circuits\RenderBatchWriterTest.cs (2)
320var expectedEntry = expectedEntryIterationVar.GetType().IsEnum 349throw new InvalidOperationException($"Unsupported type: {expectedEntry.GetType().FullName}");
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestBinder.cs (4)
21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 27_returnType = s.Item?.GetType() ?? typeof(object); 30_returnType = c.Result?.GetType() ?? typeof(object);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\TestHubMessageEqualityComparer.cs (3)
20if (!Equals(x.GetType(), y.GetType())) 47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
Microsoft.AspNetCore.Components.Tests (20)
ParameterViewTest.Assignment.cs (1)
769cascadingParameters.Add(new CascadingParameterState(new(null, name, value.GetType()), new TestCascadingValueProvider(value)));
ParameterViewTest.cs (3)
98new CascadingParameterState(new(null, "attribute 2", attribute2Value.GetType()), new TestCascadingValue(attribute2Value)), 99new CascadingParameterState(new(null, "attribute 3", attribute3Value.GetType()), new TestCascadingValue(attribute3Value)), 309new CascadingParameterState(new(null, "my entry", myEntryValue.GetType()), new TestCascadingValue(myEntryValue)),
Routing\RouteKeyTest.cs (7)
60var key1 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 61var key2 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 72var key1 = new RouteKey(typeof(string).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly }); 73var key2 = new RouteKey(typeof(string).Assembly, new[] { GetType().Assembly, typeof(ComponentBase).Assembly }); 84var key1 = new RouteKey(typeof(string).Assembly, new[] { GetType().Assembly }); 85var key2 = new RouteKey(typeof(ComponentBase).Assembly, new[] { GetType().Assembly, }); 97var key2 = new RouteKey(typeof(ComponentBase).Assembly, new[] { GetType().Assembly, });
Routing\RouteTableFactoryTests.cs (9)
28var routes1 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 31var routes2 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 42var routes1 = routeTableFactory.Create(new RouteKey(typeof(object).Assembly, new[] { typeof(ComponentBase).Assembly, GetType().Assembly, }), _serviceProvider); 45var routes2 = routeTableFactory.Create(new RouteKey(typeof(object).Assembly, new[] { GetType().Assembly, typeof(ComponentBase).Assembly, }), _serviceProvider); 56var routes1 = routeTableFactory.Create(new RouteKey(GetType().Assembly, null), _serviceProvider); 59var routes2 = routeTableFactory.Create(new RouteKey(GetType().Assembly, new[] { typeof(object).Assembly }), _serviceProvider); 70var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, new[] { GetType().Assembly }), _serviceProvider); 83var routeTable = routeTableFactory.Create(new RouteKey(GetType().Assembly, Array.Empty<Assembly>()), _serviceProvider);
Microsoft.AspNetCore.Components.Web (17)
Forms\Editor.cs (1)
49throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " +
Forms\InputBase.cs (2)
235throw new InvalidOperationException($"{GetType()} requires a value for the 'ValueExpression' " + 263throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\InputDate.cs (1)
62throw new InvalidOperationException($"Unsupported {GetType()} type param '{type}'.");
Forms\InputExtensions.cs (1)
48throw new InvalidOperationException($"{input.GetType()} does not support the type '{typeof(TValue)}'.", ex);
Forms\InputNumber.cs (1)
114throw new InvalidOperationException($"Unsupported type {value.GetType()}");
Forms\InputRadio.cs (1)
55throw new InvalidOperationException($"{GetType()} must have an ancestor {typeof(InputRadioGroup<TValue>)} " +
Forms\Mapping\FormMappingValidator.cs (1)
48throw new InvalidOperationException($"{GetType()} does not support changing the " +
Forms\Mapping\SupplyParameterFromFormValueProvider.cs (1)
63throw new InvalidOperationException($"Received an unexpected attribute type {parameterInfo.Attribute.GetType()}");
Forms\ValidationMessage.cs (3)
44throw new InvalidOperationException($"{GetType()} requires a cascading parameter " + 45$"of type {nameof(EditContext)}. For example, you can use {GetType()} inside " + 51throw new InvalidOperationException($"{GetType()} requires a value for the " +
src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (2)
214throw new InvalidOperationException($"Unable to evaluate index expressions of type '{indexExpression.GetType().Name}'."); 303throw new InvalidOperationException($"Unable to format constant values of type '{x.GetType()}'.");
Virtualization\Virtualize.cs (3)
160$"{GetType()} requires a positive value for parameter '{nameof(ItemSize)}'."); 173$"{GetType()} can only accept one item source from its parameters. " + 194$"{GetType()} requires either the '{nameof(Items)}' or '{nameof(ItemsProvider)}' parameters to be specified " +
Microsoft.AspNetCore.Components.WebAssembly (1)
src\Shared\Components\ComponentParameter.cs (1)
20var valueType = kvp.Value?.GetType();
Microsoft.AspNetCore.Components.WebView.Photino (1)
PhotinoSynchronizationContext.cs (1)
50_uiThreadId = (int)_window.GetType()
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
376 throw new ObjectDisposedException(GetType().Name);
Microsoft.AspNetCore.Connections.Abstractions (1)
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
Microsoft.AspNetCore.DataProtection (1)
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Abstractions (1)
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Extensions (1)
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.AspNetCore.DataProtection.Tests (3)
ServiceCollectionTests.cs (2)
45services1.GetRequiredService<ILoggerFactory>().GetType(), 46services2.GetRequiredService<ILoggerFactory>().GetType());
XmlAssert.cs (1)
124throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, "Node of type '{0}' is not supported.", node.GetType().Name));
Microsoft.AspNetCore.Diagnostics (5)
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (2)
1345WriteAttributeValue("", 17075, metadata.GetType().FullName ?? string.Empty, 17075, 46, false); 1354Write(metadata.GetType().Name);
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
178handler = exceptionHandler.GetType().FullName; 200handler = _problemDetailsService.GetType().FullName;
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
DatabaseErrorPageMiddleware.cs (1)
170_localDiagnostic.Value?.Hold(contextErrorEventData.Exception, contextErrorEventData.Context!.GetType());
MigrationsEndPointMiddleware.cs (1)
71var dbName = db.GetType().FullName!;
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
164_logger.EnricherFailed(ex, enricher.GetType().Name);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionDetailsProviderTest.cs (1)
109GetType().Assembly,
Microsoft.AspNetCore.Grpc.JsonTranscoding (9)
Internal\Json\AnyConverter.cs (3)
89JsonSerializer.Serialize(writer, wrappedValue, wrappedValue.GetType(), options); 93JsonSerializer.Serialize(writer, valueMessage, valueMessage.GetType(), options); 118JsonSerializer.Serialize(writer, value, value.GetType(), options);
Internal\Json\ListValueConverter.cs (1)
30JsonSerializer.Serialize(writer, list, list.GetType(), options);
Internal\Json\StructConverter.cs (1)
41JsonSerializer.Serialize(writer, v, v.GetType(), options);
Internal\Json\ValueConverter.cs (1)
80JsonSerializer.Serialize(writer, v, v.GetType(), options);
Internal\Json\WrapperConverter.cs (1)
31JsonSerializer.Serialize(writer, innerValue, innerValue.GetType(), options);
Internal\JsonRequestHelpers.cs (1)
392responseType = message.GetType();
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
379var enumType = value.GetType();
Microsoft.AspNetCore.Grpc.Swagger (1)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (1)
379var enumType = value.GetType();
Microsoft.AspNetCore.Hosting (3)
GenericHost\GenericWebHostBuilder.cs (1)
208UseStartup(instance.GetType(), context, services, instance);
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
WebHostBuilderExtensions.cs (1)
122return new ConventionBasedStartup(StartupLoader.LoadMethods(serviceProvider, instance.GetType(), hostingEnvironment.EnvironmentName, instance));
Microsoft.AspNetCore.Hosting.Tests (3)
ConfigureBuilderTests.cs (1)
15var methodInfo = GetType().GetMethod(nameof(InjectedMethod), BindingFlags.NonPublic | BindingFlags.Static);
Fakes\StartupThrowTypeLoadException.cs (1)
14classes: new Type[] { GetType() },
HostingApplicationDiagnosticsTests.cs (1)
1082var property = o.GetType().GetTypeInfo().GetProperty(name, BindingFlags.Instance | BindingFlags.Public);
Microsoft.AspNetCore.Http (1)
Builder\ApplicationBuilder.cs (1)
141return middleware.Target.GetType().FullName + "." + middleware.Method.Name;
Microsoft.AspNetCore.Http.Abstractions (3)
Extensions\UseMiddlewareExtensions.cs (1)
183throw new InvalidOperationException(Resources.FormatException_UseMiddlewareUnableToCreateMiddleware(middlewareFactory.GetType(), _middlewareType));
Routing\RouteValueDictionary.cs (1)
891var type = Value.GetType();
src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
RouteValueDictionaryTests.cs (1)
347$"The type '{obj.GetType().FullName}' defines properties 'controller' and 'Controller' which differ " +
Microsoft.AspNetCore.Http.Extensions (15)
DefaultProblemDetailsWriter.cs (1)
63var problemDetailsType = context.ProblemDetails.GetType();
RequestDelegateFactory.cs (1)
181object => Expression.Convert(TargetExpr, handler.Target.GetType()),
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\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\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Http.Extensions.Tests (4)
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
236Assert.Equal("Microsoft.AspNetCore.Http.ProblemDetailsJsonContext", jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[1].GetType().FullName);
PropertyAsParameterInfoTests.cs (2)
120a => typeof(TestAttribute).IsAssignableFrom(a.GetType())); 123a => typeof(SampleAttribute).IsAssignableFrom(a.GetType()));
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (1)
522m => m.GetType().Name != "NullableContextAttribute" &&
Microsoft.AspNetCore.Http.Results (2)
HttpResultsHelper.cs (1)
40Type? runtimeType = value.GetType();
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
335var type = value.GetType(); 363var type = value.GetType();
Microsoft.AspNetCore.Identity (3)
SecurityStampValidator.cs (2)
35Logger = logger.CreateLogger(GetType()); 54Logger = logger.CreateLogger(GetType());
SignInManager.cs (1)
952if (GetType() == typeof(SignInManager<TUser>))
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Infrastructure\ServerFactory.cs (2)
145if (!manager.ApplicationParts.Any(p => p.GetType() == part.GetType() &&
Microsoft.AspNetCore.Identity.Test (3)
SignInManagerTest.cs (3)
1049new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType()) 1080new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType()) 1112new AuthenticationScheme("blah", "Blah blah", handler.Object.GetType())
Microsoft.AspNetCore.InternalTesting (6)
LoggedTest\LoggedTestBase.cs (3)
55return AssemblyTestLog.ForAssembly(GetType().GetTypeInfo().Assembly).StartTestLog(TestOutputHelper, GetType().FullName, out loggerFactory, minLogLevel, testName); 64var classType = GetType();
xunit\AspNetTestMethodRunner.cs (2)
36if (testCase.GetType() == typeof(XunitTestCase)) 53if (testCase.GetType() == typeof(XunitTheoryTestCase))
xunit\ConditionalTheoryDiscoverer.cs (1)
54var type = obj.GetType();
Microsoft.AspNetCore.InternalTesting.Tests (3)
TestContextTest.cs (3)
18Assert.Equal(GetType().FullName, Context.FileOutput.TestClassName); 43Assert.Equal(GetType().Name, Context.FileOutput.TestClassName); 69Assert.Equal(GetType().Name, Context.FileOutput.TestClassName);
Microsoft.AspNetCore.JsonPatch (22)
Adapters\AdapterFactory.cs (1)
28var jsonContract = contractResolver.ResolveContract(target.GetType());
Adapters\ObjectAdapter.cs (1)
187var copyResult = ConversionResultProvider.CopyTo(propertyValue, propertyValue?.GetType());
Internal\ConversionResultProvider.cs (3)
27else if (typeToConvertTo.IsAssignableFrom(value.GetType())) 65else if (typeToConvertTo.IsAssignableFrom(value.GetType())) 68targetType = value.GetType();
Internal\DictionaryAdapterOfTU.cs (6)
24var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 51var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 79var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 106var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 140var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType()); 187var contract = (JsonDictionaryContract)contractResolver.ResolveContract(target.GetType());
Internal\DynamicObjectAdapter.cs (9)
68if (property.GetType().IsValueType 69&& Nullable.GetUnderlyingType(property.GetType()) == null) 71value = Activator.CreateInstance(property.GetType()); 95if (!TryConvertValue(value, property.GetType(), contractResolver, out var convertedValue)) 127if (!TryConvertValue(value, property.GetType(), contractResolver, out var convertedValue)) 172var jsonDynamicContract = (JsonDynamicContract)contractResolver.ResolveContract(target.GetType()); 179target.GetType(), 208var jsonDynamicContract = (JsonDynamicContract)contractResolver.ResolveContract(target.GetType()); 215target.GetType(),
Internal\ListAdapter.cs (1)
270var listType = list.GetType();
Internal\PocoAdapter.cs (1)
209if (contractResolver.ResolveContract(target.GetType()) is JsonObjectContract jsonObjectContract)
Microsoft.AspNetCore.JsonPatch.Tests (9)
Adapters\AdapterFactoryTests.cs (4)
28Assert.Equal(typeof(ListAdapter), adapter.GetType()); 41Assert.Equal(typeof(DictionaryAdapter<string, string>), adapter.GetType()); 57Assert.Equal(typeof(PocoAdapter), adapter.GetType()); 70Assert.Equal(typeof(DynamicObjectAdapter), adapter.GetType());
IntegrationTests\NestedObjectIntegrationTest.cs (1)
253Assert.Equal(typeof(InheritedObject), targetObject.SimpleObject.GetType());
Internal\ListAdapterTest.cs (2)
27Assert.Equal($"The type '{targetObject.GetType().FullName}' which is an array is not supported for json patch operations as it has a fixed size.", message); 45Assert.Equal($"The type '{targetObject.GetType().FullName}' which is a non generic list is not supported for json patch operations. Only generic list types are supported.", message);
Internal\ObjectVisitorTest.cs (2)
90Assert.Equal(typeof(DictionaryAdapter<string, string>), adapter.GetType()); 120Assert.Same(typeof(DictionaryAdapter<string, object>), adapter.GetType());
Microsoft.AspNetCore.Localization (2)
RequestLocalizationMiddleware.cs (2)
78_logger.UnsupportedCultures(provider.GetType().Name, cultures); 91_logger.UnsupportedUICultures(provider.GetType().Name, uiCultures);
Microsoft.AspNetCore.MiddlewareAnalysis (1)
AnalysisMiddleware.cs (1)
35middlewareName = next.Target!.GetType().FullName!;
Microsoft.AspNetCore.Mvc (1)
HotReloadService.cs (1)
38if (modelMetadataProvider.GetType() == typeof(DefaultModelMetadataProvider))
Microsoft.AspNetCore.Mvc.Abstractions (2)
Formatters\FormatterCollection.cs (1)
49if (formatter.GetType() == formatterType)
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
ApiDescriptionGroupCollectionProvider.cs (3)
67Log.ApiDescriptionProviderExecuting(_logger, provider.GetType().Name, provider.GetType().Assembly.GetName().Name, provider.GetType().Assembly.GetName().Version?.ToString());
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
DefaultApiDescriptionProviderTest.cs (4)
2144var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2170var methodInfo = GetType().GetMethod(nameof(ParameterDefaultValue), BindingFlags.Instance | BindingFlags.NonPublic); 2193var methodInfo = GetType().GetMethod(nameof(AcceptsId_Query), BindingFlags.Instance | BindingFlags.NonPublic); 2325action.MethodInfo = GetType().GetMethod(
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)
76objectType = result.Value?.GetType(); 151var objectResultType = result.GetType().Name; 152var valueType = value == null ? "null" : value.GetType().FullName;
Infrastructure\PhysicalFileResultExecutor.cs (1)
169var fileResultType = fileResult.GetType().Name;
Infrastructure\ResourceInvoker.Log.cs (2)
87BeforeExecutingActionResult(logger, actionResult.GetType()); 95AfterExecutingActionResult(logger, actionResult.GetType());
Infrastructure\SystemTextJsonResultExecutor.cs (2)
61var objectType = value?.GetType() ?? typeof(object); 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\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\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\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.Core.Test (120)
ApiConventionMethodAttributeTest.cs (1)
69var attributeType = a.GetType();
ControllerBaseTest.cs (3)
2925await controller.TryUpdateModelAsync(model, model.GetType(), modelName, valueProvider, propertyFilter); 2953var result = await controller.TryUpdateModelAsync(model, model.GetType(), modelName); 2981var result = await controller.TryUpdateModelAsync(model, model.GetType(), modelName);
Formatters\SystemTextJsonOutputFormatterTest.cs (2)
103asyncEnumerable.GetType(), 132asyncEnumerable.GetType(),
Infrastructure\ActionMethodExecutorTest.cs (15)
33Assert.Equal("VoidResultExecutor", actionMethodExecutor.GetType().Name); 59Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 85Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 112Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 141Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 170Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 197Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 222Assert.Equal("TaskResultExecutor", actionMethodExecutor.GetType().Name); 248Assert.Equal("AwaitableResultExecutor", actionMethodExecutor.GetType().Name); 274Assert.Equal("TaskOfIActionResultExecutor", actionMethodExecutor.GetType().Name); 300Assert.Equal("TaskOfActionResultExecutor", actionMethodExecutor.GetType().Name); 327Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 356Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 383Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 410Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name);
Infrastructure\ActionResultTypeMapperTest.cs (2)
36var result = mapper.Convert(returnValue, returnValue.GetType()); 52var result = mapper.Convert(returnValue, returnValue.GetType());
Infrastructure\AsyncEnumerableReaderTest.cs (16)
38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 175var expected = $"'AsyncEnumerableReader' reached the configured maximum size of the buffer when enumerating a value of type '{enumerable.GetType()}'. " + 177$"consider ways to reduce the collection size, or consider manually converting '{enumerable.GetType()}' into a list rather than increasing the limit."; 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (25)
601var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 603var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 666var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 668var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithDataMemberIsRequired.Age)); 703var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 707var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 737var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 739var property = GetMetadataForProperty(model.GetType(), nameof(BindingOptionalProperty.ValueTypeRequired)); 760var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 762var property = GetMetadataForProperty(model.GetType(), nameof(NullableValueTypeProperty.NullableValueType)); 783var containerMetadata = GetMetadataForType(model.GetType()); 787var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 808var containerMetadata = GetMetadataForType(model.GetType()); 812var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 838var containerMetadata = GetMetadataForType(model.GetType()); 866var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 888var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 912var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 936var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 978var type = model.GetType(); 1002var modelMetadata = GetMetadataForType(model.GetType()); 1003var propertyMetadata = GetMetadataForProperty(model.GetType(), nameof(CollectionContainer.ReadOnlyList)); 1023var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1047var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1067var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (26)
782var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 784var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 816var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 820var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithDataMemberIsRequired.Age)); 850var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 856var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithBindRequired.Age)); 881var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 885var property = GetMetadataForProperty(model.GetType(), nameof(BindingOptionalProperty.ValueTypeRequired)); 901var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 905var property = GetMetadataForProperty(model.GetType(), nameof(NullableValueTypeProperty.NullableValueType)); 921var containerMetadata = GetMetadataForType(model.GetType()); 927var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 943var containerMetadata = GetMetadataForType(model.GetType()); 949var property = GetMetadataForProperty(model.GetType(), nameof(Person.ValueTypeRequired)); 970var containerMetadata = GetMetadataForType(model.GetType()); 1003var property = GetMetadataForProperty(model.GetType(), nameof(ModelWithPropertyInitializedInConstructor.NameContainer)); 1028var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1050var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1074var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1098var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1140var type = model.GetType(); 1164var modelMetadata = GetMetadataForType(model.GetType()); 1165var propertyMetadata = GetMetadataForProperty(model.GetType(), nameof(CollectionContainer.ReadOnlyList)); 1185var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1209var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model); 1229var bindingContext = CreateContext(GetMetadataForType(model.GetType()), model);
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (3)
268var parameter = GetType() 319var parameter = GetType() 336var parameter = GetType()
ModelBinding\Metadata\DefaultModelMetadataTest.cs (3)
990var parameter = GetType() 1009var property = GetType() 1011var modelIdentity = ModelMetadataIdentity.ForProperty(property, property.PropertyType, GetType());
ModelBinding\ModelBindingHelperTest.cs (6)
468model.GetType(), 523model.GetType(), 551modelType: model.GetType(), 591model.GetType(), 614var modelName = model.GetType().FullName; 1261var expectedMessage = $"The parameter conversion from type '{value.GetType()}' to type " +
ModelBinding\ParameterBinderTest.cs (2)
307var method = GetType().GetMethod(nameof(TestMethodWithoutAttributes), BindingFlags.NonPublic | BindingFlags.Instance); 362var method = GetType().GetMethod(nameof(TestMethodWithAttributes), BindingFlags.NonPublic | BindingFlags.Instance);
MvcCoreLoggerExtensionsTest.cs (15)
208$"{authFilter.GetType()}, {asyncAuthFilter.GetType()}, {orderedAuthFilter.GetType()} (Order: -100)", 254$"{resourceFilter.GetType()}, {asyncResourceFilter.GetType()}, {orderedResourceFilter.GetType()} (Order: -100)", 300$"{actionFilter.GetType()}, {asyncActionFilter.GetType()}, {orderedActionFilter.GetType()} (Order: -100)", 346$"{exceptionFilter.GetType()}, {asyncExceptionFilter.GetType()}, {orderedExceptionFilter.GetType()} (Order: -100)", 392$"{resultFilter.GetType()}, {asyncResultFilter.GetType()}, {orderedResultFilter.GetType()} (Order: -100)",
Routing\KnownRouteValueConstraintTests.cs (1)
198var providerName = actionDescriptorCollectionProvider.GetType().FullName;
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
SimpleValueProvider.cs (1)
40if (rawValue != null && rawValue.GetType().IsArray)
Microsoft.AspNetCore.Mvc.Cors (1)
CorsAuthorizationFilter.cs (1)
49_logger = loggerFactory.CreateLogger(GetType());
Microsoft.AspNetCore.Mvc.DataAnnotations (3)
DataAnnotationsMetadataProvider.cs (1)
220else if (dataTypeAttribute.GetType() != typeof(DataTypeAttribute))
ValidatableObjectAdapter.cs (1)
24model.GetType());
ValidationAttributeAdapterProvider.cs (1)
24var type = attribute.GetType();
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
DataAnnotationsModelValidatorProviderTest.cs (3)
25var metadata = _metadataProvider.GetMetadataForType(mockValidatable.GetType()); 99var metadata = _metadataProvider.GetMetadataForType(mockValidatable.Object.GetType()); 118var result = provider.HasValidators(mockValidatable.GetType(), Array.Empty<object>());
DataAnnotationsModelValidatorTest.cs (1)
535var json = Newtonsoft.Json.JsonConvert.SerializeObject(values) + " " + attribute.GetType().Name;
Microsoft.AspNetCore.Mvc.Formatters.Xml (11)
SerializableErrorWrapperProvider.cs (1)
25original.GetType().Name),
XmlDataContractSerializerInputFormatter.cs (1)
90if (GetType() == typeof(XmlDataContractSerializerInputFormatter))
XmlDataContractSerializerOutputFormatter.cs (4)
85_logger = loggerFactory.CreateLogger(GetType()); 230if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 235valueType = value.GetType(); 316BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName!);
XmlSerializerInputFormatter.cs (1)
72if (GetType() == typeof(XmlSerializerInputFormatter))
XmlSerializerOutputFormatter.cs (4)
82_logger = loggerFactory.CreateLogger(GetType()); 208if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 213valueType = value.GetType(); 305BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName!);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (34)
ProblemDetailsWrapperProviderFactoryTest.cs (3)
28var context = new WrapperProviderContext(instance.GetType(), isSerialization: true); 45var context = new WrapperProviderContext(instance.GetType(), isSerialization: true); 62var context = new WrapperProviderContext(instance.GetType(), isSerialization: true);
ProblemDetailsWrapperTest.cs (1)
86var dataContractSerializer = new DataContractSerializer(wrapper.GetType());
ValidationProblemDetailsWrapperTest.cs (2)
175var dataContractSerializer = new DataContractSerializer(wrapper.GetType()); 213var dataContractSerializer = new DataContractSerializer(wrapper.GetType());
XmlDataContractSerializerOutputFormatterTest.cs (15)
102var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 160var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 226var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 251var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 282var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType(), 313var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 334var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 352var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 487var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 524var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 618var outputFormatterContext = GetOutputFormatterContext(parent, parent.GetType()); 707var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 733asyncEnumerable.GetType()); 771asyncEnumerable.GetType());
XmlSerializerOutputFormatterTest.cs (13)
56var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 91var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 111var outputFormatterContext = GetOutputFormatterContext(input, input.GetType()); 164var formatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 191var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 224var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 247var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 277GetOutputFormatterContext(sampleInput, sampleInput.GetType(), "application/xml; charset=utf-16"); 304var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 323var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 406var outputFormatterContext = GetOutputFormatterContext(sampleInput, sampleInput.GetType()); 515asyncEnumerable.GetType()); 553asyncEnumerable.GetType());
Microsoft.AspNetCore.Mvc.IntegrationTests (14)
ComplexTypeIntegrationTestBase.cs (1)
45Assert.Equal(ExpectedModelBinderType, modelBinder.GetType());
NullableReferenceTypeIntegrationTest.cs (1)
166var method = GetType().GetMethod(nameof(NonNullableParameter), BindingFlags.NonPublic | BindingFlags.Instance);
ProductValidatorAttribute.cs (1)
38+ value.GetType() + " instance");
TryUpdateModelIntegrationTest.cs (2)
1160Assert.Equal($"TryUpdateModelAsync cannot update a record type model. If a '{model.GetType()}' must be updated, include it in an object type.", ex.Message); 1362model.GetType(),
ValidationIntegrationTests.cs (5)
2020var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_NoValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2072var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_ValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2142var parameterInfo = GetType().GetMethod(nameof(Validation_CollectionOfType_ValidatorOnElementTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2466var parameterInfo = GetType().GetMethod(nameof(Validation_InifnitelyRecursiveModel_ValidationOnTopLevelParameterMethod), BindingFlags.NonPublic | BindingFlags.Static) 2511var parameterInfo = GetType().GetMethod(nameof(Validation_ModelWithNonNullableReferenceTypes_DoesNotValidateNonNullablePropertiesOnFrameworkTypesAction), BindingFlags.NonPublic | BindingFlags.Static)
ValidationWithRecordIntegrationTests.cs (4)
1811var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_NoValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 1863var parameterInfo = GetType().GetMethod(nameof(Validation_ListOfType_ValidatorOnParameterTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 1933var parameterInfo = GetType().GetMethod(nameof(Validation_CollectionOfType_ValidatorOnElementTestMethod), BindingFlags.NonPublic | BindingFlags.Static) 2252var parameterInfo = GetType().GetMethod(nameof(Validation_InifnitelyRecursiveModel_ValidationOnTopLevelParameterMethod), BindingFlags.NonPublic | BindingFlags.Static)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (12)
BsonTempDataSerializer.cs (1)
156var itemType = item.GetType();
DependencyInjection\MvcNewtonsoftJsonOptionsExtensions.cs (2)
44var contractResolverName = options.SerializerSettings.ContractResolver.GetType().Name; 76var contractResolverName = options.SerializerSettings.ContractResolver.GetType().Name;
JsonPatchExtensions.cs (1)
51var affectedObjectName = jsonPatchError.AffectedObject.GetType().Name;
NewtonsoftJsonInputFormatter.cs (1)
76if (GetType() == typeof(NewtonsoftJsonInputFormatter))
NewtonsoftJsonOutputFormatter.cs (2)
153if (value is not null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 240BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName);
NewtonsoftJsonPatchInputFormatter.cs (1)
52if (GetType() == typeof(NewtonsoftJsonPatchInputFormatter))
NewtonsoftJsonResultExecutor.cs (3)
105if (value != null && _asyncEnumerableReaderFactory.TryGetReader(value.GetType(), out var reader)) 175BufferingAsyncEnumerable(logger, asyncEnumerable.GetType().FullName); 186var type = value == null ? "null" : value.GetType().FullName;
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (1)
91value.GetType()));
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (19)
NewtonsoftJsonOutputFormatterTest.cs (3)
451asyncEnumerable.GetType(), 496asyncEnumerable.GetType(), 530asyncEnumerable.GetType(),
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (16)
38var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 56var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 75Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 76Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 92Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader1)); 93Assert.True(readerFactory.TryGetReader(asyncEnumerable2.GetType(), out var reader2)); 110Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 127Assert.True(readerFactory.TryGetReader(asyncEnumerable1.GetType(), out var reader)); 144Assert.True(readerFactory.TryGetReader(enumerable1.GetType(), out var reader1)); 145Assert.True(readerFactory.TryGetReader(enumerable2.GetType(), out var reader2)); 161var result = readerFactory.TryGetReader(asyncEnumerable.GetType(), out var reader); 175var expected = $"'AsyncEnumerableReader' reached the configured maximum size of the buffer when enumerating a value of type '{enumerable.GetType()}'. " + 177$"consider ways to reduce the collection size, or consider manually converting '{enumerable.GetType()}' into a list rather than increasing the limit."; 182Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 198Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader)); 213Assert.True(readerFactory.TryGetReader(enumerable.GetType(), out var reader));
Microsoft.AspNetCore.Mvc.Razor (9)
DefaultTagHelperFactory.cs (1)
57tagHelper.GetType(),
RazorHotReload.cs (2)
36if (razorViewEngine.GetType() == typeof(RazorViewEngine)) 41if (razorPageActivator.GetType() == typeof(RazorPageActivator))
RazorPageActivator.cs (1)
69var pageType = page.GetType();
RazorPagePropertyActivator.cs (1)
66else if (context.ViewData.GetType() != _viewDataDictionaryType)
TagHelpers\TagHelperComponentPropertyActivator.cs (1)
33tagHelperComponent.GetType(),
TagHelpers\TagHelperComponentTagHelper.cs (3)
40_logger = loggerFactory.CreateLogger(GetType()); 72Log.TagHelperComponentInitialized(_logger, component.GetType().FullName!); 86Log.TagHelperComponentProcessed(_logger, component.GetType().FullName!);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
AssemblyPartExtensionTest.cs (1)
15var assembly = GetType().Assembly;
Microsoft.AspNetCore.Mvc.Razor.Test (1)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (1)
148Assert.Contains(typeof(RouteAttribute), item.Item.Metadata.Select(m => m.GetType())); // Verify we pick up new attributes
Microsoft.AspNetCore.Mvc.RazorPages (4)
ApplicationModels\PageConventionCollection.cs (1)
242if (pageConvention.GetType() == pageConventionType)
Filters\PageResponseCacheFilter.cs (1)
26_logger = loggerFactory.CreateLogger(GetType());
Infrastructure\DefaultPageFactoryProvider.cs (1)
47_pageActivator.GetType().FullName,
PageContext.cs (1)
123private string DebuggerToString() => ActionDescriptor?.DisplayName ?? $"{{{GetType().FullName}}}";
Microsoft.AspNetCore.Mvc.RazorPages.Test (23)
Infrastructure\CompiledPageActionDescriptorFactoryTest.cs (11)
79var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 107var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 134var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 165var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 196var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 227var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 262var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 263var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 296var methodInfo = GetType().GetMethod(nameof(OnGet), BindingFlags.Instance | BindingFlags.NonPublic); 297var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic); 327var propertyInfo = GetType().GetProperty(nameof(TestProperty), BindingFlags.Instance | BindingFlags.NonPublic);
Infrastructure\DefaultPageActivatorProviderTest.cs (4)
118PageTypeInfo = page.GetType().GetTypeInfo() 139PageTypeInfo = page.GetType().GetTypeInfo() 160PageTypeInfo = page.GetType().GetTypeInfo() 181PageTypeInfo = page.GetType().GetTypeInfo()
Infrastructure\DefaultPageFactoryProviderTest.cs (1)
37$"Page created by '{pageActivator.GetType()}' must be an instance of '{typeof(PageBase)}'.",
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (4)
623MethodInfo = GetType().GetMethod(nameof(Post)), 629MethodInfo = GetType().GetMethod(nameof(PostAsync)), 675MethodInfo = GetType().GetMethod(nameof(Post)), 682MethodInfo = GetType().GetMethod(nameof(PostAsync)),
Infrastructure\DefaultPageModelActivatorProviderTest.cs (3)
164ModelTypeInfo = model.GetType().GetTypeInfo() 185ModelTypeInfo = model.GetType().GetTypeInfo() 206ModelTypeInfo = model.GetType().GetTypeInfo()
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
InputTagHelperTest.cs (1)
167possibleBool.GetType().FullName,
Microsoft.AspNetCore.Mvc.Test (4)
MvcServiceCollectionExtensionsTest.cs (4)
276{ ImplementationInstance: { } instance } => instance.GetType(), 277{ ImplementationFactory: { } factory } => factory(serviceProvider).GetType(), 656implementations.Add(service.ImplementationInstance.GetType()); 661implementations.Add(instance.GetType());
Microsoft.AspNetCore.Mvc.Testing (2)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181var buildMethod = builder.GetType().GetMethod("Build"); 191var hostType = host.GetType();
Microsoft.AspNetCore.Mvc.ViewFeatures (30)
DefaultDisplayTemplates.cs (2)
85"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 117itemMetadata = metadataProvider.GetMetadataForType(item.GetType());
DefaultEditorTemplates.cs (2)
67"Collection", model.GetType().FullName, typeof(IEnumerable).FullName)); 99itemMetadata = metadataProvider.GetMetadataForType(item.GetType());
DefaultHtmlGenerator.cs (2)
989var valueType = value.GetType(); 1509value.GetType().FullName,
ExpressionMetadataProvider.cs (3)
169viewDataInfo.Container.GetType(), 176var containerMetadata = metadataProvider.GetMetadataForType(viewDataInfo.Container.GetType()); 185var valueMetadata = metadataProvider.GetMetadataForType(viewDataInfo.Value.GetType());
Filters\SaveTempDataPropertyFilterBase.cs (1)
136tempDataSerializer.GetType().FullName,
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
20_logger = loggerFactory.CreateLogger(GetType());
HtmlHelper.cs (1)
168foreach (var helper in HtmlAttributePropertyHelper.GetProperties(htmlAttributes.GetType()))
HtmlHelperOfT.cs (1)
82viewContext.ViewData.GetType().FullName,
Infrastructure\DefaultTempDataSerializer.cs (2)
148if (!CanSerializeType(value.GetType())) 153value.GetType()));
ModelExplorer.cs (1)
162return Model.GetType();
ModelExplorerExtensions.cs (1)
70if (!stringResult.Equals(modelExplorer.Model.GetType().FullName, StringComparison.Ordinal))
Rendering\ViewContext.cs (1)
218private string DebuggerToString() => View?.Path ?? $"{{{GetType().FullName}}}";
ViewComponents\DefaultViewComponentFactory.cs (1)
54viewComponent.GetType(),
ViewComponents\DefaultViewComponentHelper.cs (1)
117if (descriptor.Parameters.Count == 1 && descriptor.Parameters[0].ParameterType.IsAssignableFrom(arguments.GetType()))
ViewDataDictionary.cs (4)
195var modelType = model?.GetType(); 442var modelType = value?.GetType(); 498message = Resources.FormatViewData_WrongTModelType(value.GetType(), _declaredModelType); 516return _declaredModelType.IsAssignableFrom(value.GetType());
ViewDataDictionaryControllerPropertyActivator.cs (1)
40var controllerType = controller.GetType();
ViewDataEvaluator.cs (2)
167var tryDelegate = TryGetValueProvider.CreateInstance(indexableObject.GetType()); 200var propertyInfo = container.GetType().GetRuntimeProperty(propertyName);
ViewExecutor.cs (3)
134throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ViewOptions), GetType().Name)); 139throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(TempDataFactory), GetType().Name)); 144throw new InvalidOperationException(Resources.FormatPropertyOfTypeCannotBeNull(nameof(ModelMetadataProvider), GetType().Name));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (16)
Filters\ControllerSaveTempDataPropertyFilterTest.cs (4)
28var controllerType = controller.GetType(); 73var controllerType = controller.GetType(); 117var controllerType = controller.GetType(); 156var controllerType = controller.GetType();
HtmlAttributePropertyHelperTest.cs (8)
16var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 31var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 46var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 61var property = anonymous.GetType().GetTypeInfo().DeclaredProperties.First(); 78var helpers1 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 79var helpers2 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 94var helpers1 = HtmlAttributePropertyHelper.GetProperties(anonymous.GetType()); 95var helpers2 = PropertyHelper.GetProperties(anonymous.GetType());
Infrastructure\DefaultTempDataSerializerTest.cs (2)
52Assert.Equal($"The '{testProvider.GetType()}' cannot serialize an object of type '{value.GetType()}'.", ex.Message);
Rendering\DefaultTemplatesUtilities.cs (1)
330var modelExplorer = helper.MetadataProvider.GetModelExplorerForType(model.GetType(), model);
ViewDataDictionaryTest.cs (1)
143$"The model item passed into the ViewDataDictionary is of type '{ model.GetType() }', but this " +
Microsoft.AspNetCore.OpenApi (11)
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\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
214action.MethodInfo = GetType().GetMethod(
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
346if (key.IsAssignableFrom(GetType()))
Microsoft.AspNetCore.Routing (7)
EndpointDataSource.cs (1)
49throw new NotSupportedException(Resources.FormatMapGroup_CustomEndpointUnsupported(endpoint.GetType()));
Matching\JumpTable.cs (1)
15return GetType().Name;
Matching\PolicyJumpTable.cs (1)
21return GetType().Name;
RouteConstraintBuilder.cs (1)
145_inlineConstraintResolver.GetType().Name));
src\Shared\Json\JsonSerializerExtensions.cs (1)
26=> context.GetTypeInfo(type) ?? throw new InvalidOperationException($"Unable to obtain the JsonTypeInfo for type '{type.FullName}' from the context '{context.GetType().FullName}'.");
src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
src\Shared\RouteHandlers\ExecuteHandlerHelper.cs (1)
41var runtimeType = value?.GetType();
Microsoft.AspNetCore.Routing.Abstractions (1)
src\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
Microsoft.AspNetCore.Routing.Tests (6)
Patterns\RoutePatternParserTest.cs (2)
699if (x.GetType() != y.GetType())
Tree\TreeRouterTest.cs (4)
1813Assert.Equal(next.Object.GetType(), nestedRouters[0].GetType()); 1855Assert.Equal(next.Object.GetType(), nestedRouters[0].GetType());
Microsoft.AspNetCore.Server.IIS (2)
Core\IISServerSetupFilter.cs (1)
18if (server?.GetType() != typeof(IISHttpServer))
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Deployers\ApplicationDeployer.cs (1)
25Logger = LoggerFactory.CreateLogger(GetType().FullName);
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
79throw new ObjectDisposedException(GetType().Name, "This instance of deployer has already been disposed.");
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (1)
IISExpressDeployer.cs (1)
279using (var stream = GetType().Assembly.GetManifestResourceStream("Microsoft.AspNetCore.Server.IntegrationTesting.IIS.Http.config"))
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\TransportManager.cs (2)
62throw new InvalidOperationException($"No registered {nameof(IConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}"); 88throw new InvalidOperationException($"No registered {nameof(IMultiplexedConnectionListenerFactory)} supports endpoint {endPoint.GetType().Name}: {endPoint}");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
HttpRequestHeadersTests.cs (1)
144var methodValue = (StringValues)headerReferences.GetType().GetField("_Method").GetValue(headerReferences);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeTransportFactory.cs (1)
41throw new NotSupportedException($"{endpoint.GetType()} is not supported.");
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionListener.cs (1)
45throw new InvalidOperationException($"QUIC doesn't support listening on the configured endpoint type. Expected {nameof(IPEndPoint)} but got {endpoint.GetType().Name}.");
Microsoft.AspNetCore.Shared.Tests (40)
PropertyActivatorTest.cs (6)
17var typeInfo = instance.GetType().GetTypeInfo(); 40var typeInfo = instance.GetType().GetTypeInfo(); 56var typeInfo = instance.GetType().GetTypeInfo(); 80var typeInfo = instance.GetType().GetTypeInfo(); 104var typeInfo = instance.GetType().GetTypeInfo(); 123var typeInfo = instance.GetType().GetTypeInfo();
PropertyHelperTest.cs (21)
19var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 34var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 49var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 66instance.GetType()).First(prop => prop.Name == "PropA"); 82instance.GetType()).First(prop => prop.Name == "PropA"); 97var property = PropertyHelper.GetProperties(anonymous.GetType()).First().Property; 114var helpers1 = PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()); 115var helpers2 = PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()); 130var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 141var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 152var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 164var helper = Assert.Single(PropertyHelper.GetProperties(obj.GetType().GetTypeInfo())); 179var helper = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo())); 219var helper1 = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()).Where(prop => prop.Name == "IntProp")); 220var helper2 = Assert.Single(PropertyHelper.GetProperties(anonymous.GetType().GetTypeInfo()).Where(prop => prop.Name == "StringProp")); 232var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 252var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 272var helpers = PropertyHelper.GetProperties(derived.GetType().GetTypeInfo()).ToArray(); 438var typeInfo = instance.GetType().GetTypeInfo(); 458var typeInfo = instance.GetType().GetTypeInfo(); 474var typeInfo = instance.GetType().GetTypeInfo();
src\Shared\ActivatorUtilities\ActivatorUtilities.cs (1)
116var givenType = givenParameters[givenIndex]?.GetType();
src\Shared\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\Shared\PropertyHelper\PropertyHelper.cs (1)
333foreach (var helper in GetProperties(value.GetType(), PropertiesCache))
src\Shared\TypeNameHelper\TypeNameHelper.cs (1)
40return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.AspNetCore.SignalR.Client.Core (16)
HubConnection.cs (6)
773if (arg is not null && ReflectionHelper.IsStreamingType(arg.GetType())) 837if (ReflectionHelper.GetIAsyncEnumerableInterface(reader.GetType()) is { } asyncEnumerableType) 849if (ReflectionHelper.TryGetStreamType(reader.GetType(), out var channelGenericType)) 862throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}."); 1358throw new InvalidOperationException($"Unexpected message type: {message.GetType().FullName}"); 2303Log.DroppingMessage(_logger, ((HubInvocationMessage)message).GetType().Name, ((HubInvocationMessage)message).InvocationId);
HubConnection.Log.cs (6)
31var argsList = args == null ? string.Empty : string.Join(", ", args.Select(a => a?.GetType().FullName ?? "(null)")); 42SendingMessage(logger, message.GetType().Name, invocationMessage.InvocationId); 46SendingMessageGeneric(logger, message.GetType().Name); 63MessageSent(logger, message.GetType().Name, invocationMessage.InvocationId); 67MessageSentGeneric(logger, message.GetType().Name); 88var argsList = args == null ? string.Empty : string.Join(", ", args.Select(a => a?.GetType().FullName ?? "(null)"));
HubConnectionBuilder.cs (1)
89return base.GetType();
src\SignalR\common\Shared\AsyncEnumerableAdapters.cs (3)
158var constructedIAsyncEnumerableInterface = ReflectionHelper.GetIAsyncEnumerableInterface(asyncEnumerable.GetType())!; 187var type = ReflectionHelper.GetIAsyncEnumeratorInterface(enumerator.GetType()); 215var type = channelReader.GetType();
Microsoft.AspNetCore.SignalR.Common.Tests (9)
Internal\Protocol\JsonHubProtocolTests.cs (2)
254Assert.Equal(expected.GetType(), actual.GetType());
Internal\Protocol\TestBinder.cs (4)
21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 27_returnType = s.Item?.GetType() ?? typeof(object); 30_returnType = c.Result?.GetType() ?? typeof(object);
Internal\Protocol\TestHubMessageEqualityComparer.cs (3)
20if (!Equals(x.GetType(), y.GetType())) 47throw new InvalidOperationException($"Unknown message type: {x.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Core (20)
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!); 731descriptor.OriginalParameterTypes[parameterPointer].IsAssignableFrom(hubMethodInvocationMessage.Arguments[hubInvocationArgumentPointer]?.GetType())))
Internal\DefaultHubProtocolResolver.cs (1)
26Log.RegisteredSignalRProtocol(_logger, protocol.Name, protocol.GetType());
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\SignalR\common\Shared\AsyncEnumerableAdapters.cs (3)
158var constructedIAsyncEnumerableInterface = ReflectionHelper.GetIAsyncEnumerableInterface(asyncEnumerable.GetType())!; 187var type = ReflectionHelper.GetIAsyncEnumeratorInterface(enumerator.GetType()); 215var type = channelReader.GetType();
Microsoft.AspNetCore.SignalR.Microbenchmarks (5)
HubConnectionReceiveBenchmark.cs (1)
88_hubConnection.On(MethodName, arguments.Select(v => v.GetType()).ToArray(), OnInvoke);
TestBinder.cs (4)
18_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 21_paramTypes = i.Arguments?.Select(a => a?.GetType() ?? typeof(object))?.ToArray(); 24_returnType = s.Item?.GetType() ?? typeof(object); 27_returnType = c.Result?.GetType() ?? typeof(object);
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
567throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Protocol\MessagePackHubProtocolWorker.cs (2)
419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 503Serialize(ref writer, argument.GetType(), argument);
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Protocol\NewtonsoftJsonHubProtocol.cs (1)
564throw new InvalidOperationException($"Unsupported message type: {message.GetType().FullName}");
Microsoft.AspNetCore.SignalR.Tests (8)
HubConnectionHandlerTests.cs (3)
2309Assert.Equal(typeof(MethodHub), resource.Hub.GetType()); 2787Assert.Fail("Unexpected message type: " + message.GetType().Name); 3931Assert.Equal(typeof(CompletionMessage), response.GetType());
HubConnectionHandlerTestUtils\Utils.cs (1)
52throw new InvalidOperationException($"Unsupported Hub Message type {expected.GetType()}");
Internal\DefaultHubProtocolResolverTests.cs (3)
25protocol.GetType(), 38protocol.GetType(), 51protocol.GetType(),
Internal\ReflectionHelperTests.cs (1)
45streamAsObject.GetType(),
Microsoft.AspNetCore.TestHost (3)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (2)
181var buildMethod = builder.GetType().GetMethod("Build"); 191var hostType = host.GetType();
WebHostBuilderExtensions.cs (1)
80if (webHostBuilder.GetType().Name.Equals("GenericWebHostBuilder", StringComparison.Ordinal))
Microsoft.Build (70)
BackEnd\Client\MSBuildClient.cs (1)
583throw 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)
331this.GetType());
BackEnd\Components\Logging\LoggingService.cs (7)
780loggerTypes.Add(logger.GetType().FullName); 996buildEvent?.GetType().Name ?? string.Empty); 1475InternalLoggerException.Throw(e, null, "FatalErrorDuringLoggerShutdown", false, logger.GetType().Name); 1557ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName); 1801using var assemblyLoadTracker = AssemblyLoadsTracker.StartTracking(this, AssemblyLoadingContext.LoggerInitialization, UnwrapLoggerType(logger).GetType()); 1815InternalLoggerException.Throw(e, null, "FatalErrorWhileInitializingLogger", true, logger.GetType().Name); 1860_ => innerLogger.GetType().FullName == "Microsoft.Build.Logging.TerminalLogger.TerminalLogger"
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
214pluginTypeName = projectCacheDescriptor.PluginInstance.GetType().Name;
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (1)
80ErrorUtilities.ThrowInternalError("Unhandled intrinsic task type {0}", taskInstance.GetType().GetTypeInfo().BaseType);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
247else if (parameterValue.GetType().IsValueType)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
655using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(taskLoggingContext, AssemblyLoadingContext.TaskRun, _taskExecutionHost?.TaskInstance?.GetType());
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
1118if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1121_taskLoggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
332catch (Exception e) when ((e is FileNotFoundException || e is FileLoadException) && sdkResolver.GetType().GetTypeInfo().Name.Equals("NuGetSdkResolver", StringComparison.Ordinal))
BackEnd\Node\OutOfProcNode.cs (1)
598buildEvent?.GetType().Name ?? string.Empty);
BackEnd\Shared\BuildRequestConfiguration.cs (2)
883if (GetType() != obj.GetType())
BackEnd\Shared\ConfigurationMetadata.cs (2)
129if (GetType() != obj.GetType())
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
335string realTaskAssemblyLoaction = TaskInstance.GetType().Assembly.Location;
BuildCheck\Infrastructure\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("{0}.Clone() returned an instance of type {1}.", GetType().Name, clone.GetType().Name);
Construction\ProjectElementContainer.cs (2)
355ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
Construction\ProjectExtensionsElement.cs (2)
165ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
Evaluation\Evaluator.cs (1)
1789using var assemblyLoadsTracker = AssemblyLoadsTracker.StartTracking(_evaluationLoggingContext, AssemblyLoadingContext.SdkResolution, _sdkResolverService.GetType());
Evaluation\Expander.cs (7)
3398functionBuilder.ReceiverType = propertyValue.GetType(); 3429var receiverType = propertyValue?.GetType() ?? typeof(string); 3533_receiverType = objectInstance.GetType(); 3538args[0] = Convert.ChangeType(args[0], objectInstance.GetType(), CultureInfo.InvariantCulture); 4594if (args[i].GetType() != type) 5016? string.Join(", ", args.Select(a => a?.GetType().Name ?? "null")) 5019File.AppendAllText(logFile, $"ReceiverType={_receiverType?.FullName}; ObjectInstanceType={objectInstance?.GetType().FullName}; MethodName={_methodMethodName}({argSignature})\n");
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
138throw new InvalidOperationException(fragment.GetType().ToString());
Instance\ProjectItemGroupTaskInstance.cs (1)
130var typeName = this.GetType().FullName;
Instance\ProjectOnErrorInstance.cs (1)
119var typeName = this.GetType().FullName;
Instance\ProjectPropertyGroupTaskInstance.cs (1)
129var typeName = this.GetType().FullName;
Instance\ProjectTaskInstance.cs (1)
362var typeName = this.GetType().FullName;
Instance\ProjectTaskOutputItemInstance.cs (1)
140var typeName = this.GetType().FullName;
Instance\ProjectTaskOutputPropertyInstance.cs (1)
140var typeName = this.GetType().FullName;
Instance\TaskFactoryLoggingHost.cs (2)
343if (!e.GetType().GetTypeInfo().IsSerializable && 348_loggingContext.LogWarning(null, new BuildEventFileInfo(string.Empty), "ExpectedEventToBeSerializable", e.GetType().Name);
LogMessagePacketBase.cs (4)
431Type eventDerivedType = _buildEvent.GetType(); 479string assemblyName = _buildEvent.GetType().GetTypeInfo().Assembly.FullName; 510Type eventDerivedType = _buildEvent.GetType(); 679Type eventType = eventArg.GetType();
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
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?");
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
Utilities\EngineFileUtilities.cs (2)
287throw new InternalErrorException($"Logging type {loggingMechanism.GetType()} is not understood by {nameof(GetFileList)}."); 325throw new InternalErrorException($"Logging type {loggingMechanism.GetType()} is not understood by {nameof(GetFileList)}.");
Utilities\Utilities.cs (2)
680Debug.Fail($"In {nameof(EnumerateProperties)}(): Unexpected property {item} of type {item?.GetType().ToString()}"); 838Debug.Fail($"In {nameof(EnumerateItems)}(): Unexpected {nameof(item)} {item} of type {item?.GetType().ToString()}");
Microsoft.Build.BuildCheck.UnitTests (4)
BuildCheckManagerProviderTests.cs (2)
47_logger.AllBuildEvents.Where(be => be.GetType() == typeof(BuildMessageEventArgs)).Select(be => be.Message).ToArray() 59var mockedField = _testedInstance.GetType().GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Instance);
EditorConfig_Tests.cs (2)
62if (x.GetType() != y.GetType())
Microsoft.Build.CommandLine.UnitTests (2)
ValidateAssemblyLoadContext.cs (2)
26if (thisLoadContext.GetType().FullName == typeof(MSBuildLoadContext).FullName) 39Log.LogError($"Load context was a {thisLoadContext.GetType().AssemblyQualifiedName} instead of an {typeof(MSBuildLoadContext).AssemblyQualifiedName}");
Microsoft.Build.Engine.OM.UnitTests (11)
Construction\ElementLocationPublic_Tests.cs (1)
125foreach (var property in element.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance))
Definition\ProjectCollection_Tests.cs (1)
1451Version expectedVersion = new Version(this.GetType().GetTypeInfo().Assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version);
ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
275throw new NotImplementedException($"Unknown type:{view.GetType().Name}");
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (1)
107var implType = xml.GetType();
ObjectModelRemoting\RemoteProjectsProviderMock\LinkedObjectsMap.cs (2)
110throw new ObjectDisposedException(GetType().Name); 188throw new ObjectDisposedException(GetType().Name);
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
Microsoft.Build.Engine.UnitTests (28)
BackEnd\BinaryTranslator_Tests.cs (2)
895if (obj.GetType() != this.GetType())
BackEnd\EventSourceSink_Tests.cs (1)
300Type eventType = buildEventToRaise.GetType();
BackEnd\FailingTask.cs (1)
17BuildEngine.GetType().GetProperty("AllowFailureWithoutError").SetValue(BuildEngine, AllowFailureWithoutError.Equals("True"));
BackEnd\NodePackets_Tests.cs (1)
341.WithTracing(), "Roundtrip deserialization of message type {0} should be equivalent", args.GetType().Name);
BackEnd\SdkResolverLoader_Tests.cs (1)
49resolvers.Select(i => i.GetType().FullName).ShouldBe(new[] { typeof(DefaultSdkResolver).FullName });
BackEnd\TaskBuilderTestTask.cs (2)
1240return GetType().GetProperty(property.Name).GetValue(this, null); 1253GetType().GetProperty(property.Name).SetValue(this, value, null);
BackEnd\TaskHost_Tests.cs (4)
460string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 479string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 499string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name); 519string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ExpectedEventToBeSerializable", e.GetType().Name);
BuildEventArgsSerialization_Tests.cs (1)
1238Assert.Equal(typeof(T), deserializedArgs.GetType());
Construction\ElementLocation_Tests.cs (11)
45Assert.Contains("RegularElementLocation", location.GetType().FullName); 58Assert.Contains("RegularElementLocation", location.GetType().FullName); 71Assert.Contains("RegularElementLocation", location.GetType().FullName); 172Assert.Contains("RegularElementLocation", location.GetType().FullName); 190Assert.Contains("SmallElementLocation", deserializedLocation.GetType().FullName); 203Assert.Contains("SmallElementLocation", location.GetType().FullName); 248Assert.Contains("SmallElementLocation", location.GetType().FullName); 261Assert.Contains("SmallElementLocation", location.GetType().FullName); 274Assert.Contains("SmallElementLocation", location.GetType().FullName); 292Assert.Contains("SmallElementLocation", location.GetType().FullName); 432foreach (var property in node.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
Evaluation\EvaluationLogging_Tests.cs (2)
132allBuildEvents[0].GetType().ShouldBe(typeof(ProjectEvaluationStartedEventArgs)); 133allBuildEvents[1].GetType().ShouldBe(typeof(ProjectEvaluationFinishedEventArgs));
Instance\ProjectPropertyInstance_Internal_Tests.cs (2)
67Assert.Equal(typeof(ProjectPropertyInstance), property.GetType()); 86Assert.Equal("Microsoft.Build.Execution.ProjectPropertyInstance+ProjectPropertyInstanceImmutable", property.GetType().ToString());
Microsoft.Build.Framework (11)
BinaryTranslator.cs (1)
492Type enumType = value.GetType();
BuildEventContext.cs (2)
254if (GetType() != obj.GetType())
ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
LazyFormattedBuildEventArgs.cs (2)
184if (param != null && param.ToString() == param.GetType().FullName) 186throw new InvalidOperationException(string.Format("Invalid type for message formatting argument, was {0}", param.GetType().FullName));
SegmentedArray.cs (1)
135if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
SegmentedDictionary`2.cs (1)
117if (dictionary.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
Traits.cs (3)
576if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 577param.GetType() != typeof(string)) 580param.GetType().FullName);
Microsoft.Build.Framework.UnitTests (3)
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
Microsoft.Build.Tasks.Core (18)
AssignProjectConfiguration.cs (1)
244Log.LogErrorWithCodeFromResources("General.ErrorExecutingTask", GetType().Name, e.Message);
ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
GenerateManifestBase.cs (1)
464if (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)
199if (m.GetType() == typeof(ApplicationManifest)) 215n = m.GetType().Name;
ManifestUtil\ManifestWriter.cs (3)
26var s = new XmlSerializer(manifest.GetType()); 100n = manifest.GetType().Name; 117if (manifest.GetType() == typeof(ApplicationManifest))
ResolveNonMSBuildProjectOutput.cs (1)
148Log.LogErrorWithCodeFromResources("General.ErrorExecutingTask", this.GetType().Name, e.Message);
ResourceHandling\LiveObjectResource.cs (2)
24public string TypeAssemblyQualifiedName => Value.GetType().AssemblyQualifiedName; 26public string TypeFullName => Value.GetType().FullName;
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
System.Design.cs (1)
101_resources = new MainAssemblyFallbackResourceManager("System.Design", this.GetType().Assembly);
system.design\stronglytypedresourcebuilder.cs (1)
125? new ResourceData(liveObject.Value.GetType(), liveObject.Value.ToString())
Microsoft.Build.Tasks.UnitTests (1)
ResourceHandling\GenerateResource_Tests.cs (1)
4175return o.GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
Microsoft.Build.UnitTests.Shared (3)
BuildEventArgsExtension.cs (2)
38if (args.GetType() != other.GetType())
MockLogger.cs (1)
310string msg = eventArgs.Message ?? $"(null message in {eventArgs.GetType().Name} event)";
Microsoft.Build.Utilities.Core (10)
ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
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)
643LogPrivate.LogWarningWithCodeFromResources("ToolTask.CommandTooLong", GetType().Name); 1352LogPrivate.LogErrorWithCodeFromResources("ToolTask.ValidateParametersFailed", this.GetType().FullName);
Microsoft.Cci.Extensions (6)
Differs\Differences.cs (1)
36return obj.GetType().Name;
Extensions\DocIdExtensions.cs (1)
83Contract.Assert(false, string.Format("Fell through cases in TypeExtensions.RefDocId() Type of reference: {0}", reference.GetType()));
Extensions\TypeExtensions.cs (3)
151throw new NotSupportedException(string.Format("Unknown IReference '{0}' so we cannot get assembly reference!", reference.GetType().FullName)); 263Contract.Assert(false, String.Format("Fell through cases in TypeExtensions.FullName() Type of reference: {0}", reference.GetType())); 418string.Format("Unexpected type reference that we may need to unwrap {0}", (reference != null ? reference.GetType().FullName : "null")));
Writers\CSharp\CSDeclarationWriter.Enums.cs (1)
186throw new ArgumentException($"Unsupported type {value.GetType()}", nameof(value));
Microsoft.CodeAnalysis (93)
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)
144throw ExceptionUtilities.UnexpectedValue(v.GetType().Name); 176throw ExceptionUtilities.UnexpectedValue(v.GetType().Name); 200throw ExceptionUtilities.UnexpectedValue(v.GetType().Name);
CommandLine\ReportAnalyzerUtil.cs (1)
82.GroupBy(kvp => kvp.Key.GetType().Assembly)
Compilation\Compilation.cs (1)
684throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()),
Compilation\DeterministicKeyBuilder.cs (8)
178WriteType(writer, analyzer.GetType()); 189WriteType(writer, generator.GetType()); 500WriteType(writer, "syntaxTreeOptionsProvider", options.SyntaxTreeOptionsProvider?.GetType()); 501WriteType(writer, "metadataReferenceResolver", options.MetadataReferenceResolver?.GetType()); 502WriteType(writer, "xmlReferenceResolver", options.XmlReferenceResolver?.GetType()); 503WriteType(writer, "sourceReferenceResolver", options.SourceReferenceResolver?.GetType()); 504WriteType(writer, "strongNameProvider", options.StrongNameProvider?.GetType()); 505WriteType(writer, "assemblyIdentityComparer", options.AssemblyIdentityComparer?.GetType());
ConstantValue.cs (1)
812return String.Format("{0}({1}: {2})", this.GetType().Name, valueToDisplay, this.Discriminator);
Diagnostic\DiagnosticInfo.cs (5)
108var type = arg.GetType(); 169Debug.Assert(this.GetType() == result.GetType()); 414other.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\AnalyzerDriver.cs (1)
1740throw new InvalidOperationException("Unexpected compilation event of type " + compilationEvent.GetType().Name);
DiagnosticAnalyzer\AnalyzerFileReference.cs (3)
428public bool Equals(TExtension? x, TExtension? y) => object.Equals(x?.GetType(), y?.GetType()); 430public int GetHashCode(TExtension obj) => obj.GetType().GetHashCode();
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (1)
1093throw ExceptionUtilities.UnexpectedValue(compilationEvent.GetType().ToString());
DiagnosticAnalyzer\DiagnosticAnalyzer.cs (1)
35return this.GetType().ToString();
InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Operations\Operation.cs (1)
192private string GetDebuggerDisplay() => $"{GetType().Name} Type: {(Type is null ? "null" : Type)}";
PEWriter\MetadataWriter.cs (1)
1732metadata.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)
281if (value.GetType() == typeof(int)) 286if (value.GetType() == typeof(string)) 291if (value.GetType() == typeof(bool)) 296if (value.GetType() == typeof(char)) 301if (value.GetType() == typeof(long)) 306if (value.GetType() == typeof(double)) 311if (value.GetType() == typeof(uint)) 316if (value.GetType() == typeof(ulong)) 321if (value.GetType() == typeof(float)) 326if (value.GetType() == typeof(decimal)) 331if (value.GetType() == typeof(short)) 336if (value.GetType() == typeof(ushort)) 341if (value.GetType() == typeof(DateTime)) 346if (value.GetType() == typeof(byte)) 351if (value.GetType() == typeof(sbyte)) 375Debug.Assert(value.GetType().IsPrimitive);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
100throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
66throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\SegmentedArray.cs (1)
141if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 198else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
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)
23return this.GetType().Name + " " + this.KindText + " " + this.ToString();
Syntax\SyntaxNode.cs (1)
53return GetType().Name + " " + KindText + " " + ToString();
Syntax\SyntaxNodeOrToken.cs (1)
68return GetType().Name + " " + KindText + " " + ToString();
Syntax\SyntaxToken.cs (1)
47return GetType().Name + " " + (Node != null ? Node.KindText : "None") + " " + ToString();
Syntax\SyntaxTrivia.cs (1)
43return GetType().Name + " " + (UnderlyingNode?.KindText ?? "None") + " " + ToString();
Text\TextChange.cs (1)
54return string.Format("{0}: {{ {1}, \"{2}\" }}", this.GetType().Name, Span, NewText);
TreeDumper.cs (1)
189var ti = o.GetType().GetTypeInfo();
XmlFileResolver.cs (2)
93if (obj == null || GetType() != obj.GetType())
Microsoft.CodeAnalysis.CodeStyle (46)
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
281if (value.GetType() == typeof(int)) 286if (value.GetType() == typeof(string)) 291if (value.GetType() == typeof(bool)) 296if (value.GetType() == typeof(char)) 301if (value.GetType() == typeof(long)) 306if (value.GetType() == typeof(double)) 311if (value.GetType() == typeof(uint)) 316if (value.GetType() == typeof(ulong)) 321if (value.GetType() == typeof(float)) 326if (value.GetType() == typeof(decimal)) 331if (value.GetType() == typeof(short)) 336if (value.GetType() == typeof(ushort)) 341if (value.GetType() == typeof(DateTime)) 346if (value.GetType() == typeof(byte)) 351if (value.GetType() == typeof(sbyte)) 375Debug.Assert(value.GetType().IsPrimitive);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
100throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
66throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\SegmentedArray.cs (1)
141if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105(obj.GetType(), name),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
161Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 169var type = value.GetType(); 184if (value.GetType() == typeof(int)) 188else if (value.GetType() == typeof(double)) 193else if (value.GetType() == typeof(bool)) 197else if (value.GetType() == typeof(char)) 202else if (value.GetType() == typeof(byte)) 207else if (value.GetType() == typeof(short)) 212else if (value.GetType() == typeof(long)) 217else if (value.GetType() == typeof(sbyte)) 222else if (value.GetType() == typeof(float)) 227else if (value.GetType() == typeof(ushort)) 232else if (value.GetType() == typeof(uint)) 236else if (value.GetType() == typeof(ulong)) 243throw ExceptionUtilities.UnexpectedValue(value.GetType()); 246else if (value.GetType() == typeof(decimal)) 251else if (value.GetType() == typeof(DateTime)) 256else if (value.GetType() == typeof(string)) 262throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
129if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 130existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
167string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 186typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 207typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 225typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Microsoft.CodeAnalysis.Collections.Package (6)
ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
100throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
66throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
SegmentedArray.cs (1)
141if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
SegmentedDictionary`2.cs (2)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 198else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
Microsoft.CodeAnalysis.CSharp (23)
Binder\Binder.cs (1)
958var description = scope.GetType().Name;
Binder\DecisionDagBuilder.cs (3)
2369this == obj || obj is SequenceTests other && this.GetType() == other.GetType() && RemainingTests.SequenceEqual(other.RemainingTests); 2373int value = Hash.Combine(length, this.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}");
FlowAnalysis\AbstractFlowPass.cs (1)
897RoslynDebug.Assert(false, $"Should Visit{node.Kind} be overridden in {this.GetType().Name}?");
FlowAnalysis\DefiniteAssignment.cs (3)
187_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass); 206_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass); 228_shouldCheckConverted = this.GetType() == typeof(DefiniteAssignmentPass);
FlowAnalysis\NullableWalker.cs (2)
488return $"{{{GetType().Name} WhenTrue:{Dump(StateWhenTrue)} WhenFalse:{Dump(StateWhenFalse)}{"}"}"; 492return $"{{{GetType().Name} {Dump(State)}{"}"}";
SymbolDisplay\ObjectDisplay.cs (1)
48Type type = obj.GetType();
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
891return 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)
90throw 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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
30/// value would cause a different type to be seen in a <see cref="System.Object.GetType()"/> call,
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
107var asyncToken = asyncListener.BeginAsyncOperation(GetType().Name + ".Start");
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
CommentSelection\CSharpToggleBlockCommentCommandHandlerTests.cs (1)
245.First(export => typeof(CSharpToggleBlockCommentCommandHandler).Equals(export.GetType()));
CommentSelection\CSharpToggleLineCommentCommandHandlerTests.cs (1)
1134.First(export => typeof(ToggleLineCommentCommandHandler).Equals(export.GetType()));
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (1)
31var actualOrder = orderedCSharpArgumentProviders.Select(x => x.Value.GetType()).ToArray();
Completion\CompletionProviders\CompletionProviderOrderTests.cs (1)
32var actualOrder = orderedCSharpCompletionProviders.Select(x => x.Value.GetType()).ToArray();
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\KeywordRecommenderTests.cs (1)
43var name = GetType().Name;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (14)
CodeGen\CodeGenTupleTest.cs (14)
12793Assert.Equal("TupleElementFieldSymbol", m1Item1.GetType().Name); 12812Assert.Equal("TupleElementFieldSymbol", m2Item1.GetType().Name); 12834Assert.Equal("TupleVirtualElementFieldSymbol", m2a2.GetType().Name); 28074Assert.Equal(module is SourceModuleSymbol ? "SourceNamedTypeSymbol" : "PENamedTypeSymbolGeneric", type.GetType().Name); 28136return s.GetType().Name + ": " + s.ToTestDisplayString(); 28178return s.GetType().Name + ": " + s.ToTestDisplayString(); 28252namedType.GetType().Name); 28762Assert.Equal(isSourceSymbol ? "SourceMemberFieldSymbolFromDeclarator" : "PEFieldSymbol", underlying.GetType().Name); 28773Assert.Equal("SubstitutedFieldSymbol", underlying.GetType().Name); 28781return fields.Select(s => s.GetType().Name + ": " + s.Name); 28786return s.GetType().Name + ": " + s.ToTestDisplayString(); 28933Assert.Equal("SubstitutedFieldSymbol", underlying.GetType().Name); 28941return fields.Select(s => s.GetType().Name + ": " + s.Name); 28946return s.GetType().Name + ": " + s.ToTestDisplayString();
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
src\Compilers\CSharp\Portable\SymbolDisplay\ObjectDisplay.cs (1)
48Type type = obj.GetType();
Microsoft.CodeAnalysis.CSharp.Features (2)
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (2)
50yield return KeyValuePairUtil.Create((helper, useExpressionBody: true), helper.GetType().Name + "_UseExpressionBody"); 51yield return KeyValuePairUtil.Create((helper, useExpressionBody: false), helper.GetType().Name + "_UseBlockBody");
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IConversionExpression.cs (2)
5407throw new ArgumentException($"Cannot handle syntax of type {syntax.GetType()}"); 5432throw new ArgumentException($"Cannot handle arguments of type {operation.GetType()}");
Microsoft.CodeAnalysis.CSharp.Scripting (1)
CSharpScript.cs (1)
100return Create<T>(code, options, globalsType ?? globals?.GetType()).RunAsync(globals, cancellationToken);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
456Assert.Equal(s0.Result.ReturnValue.GetType(), s1.Result.ReturnValue);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (6)
InteractiveSessionTests.cs (5)
245Assert.True(e.GetType().GetTypeInfo().IsEnum, "Expected enum"); 246Assert.Equal(typeof(int), Enum.GetUnderlyingType(e.GetType())); 2033", options: ScriptOptions, globalsType: globals.GetType()); 2067", options: ScriptOptions, globalsType: globals.GetType()); 2101", options: ScriptOptions, globalsType: globals.GetType());
ScriptTests.cs (1)
395globalsType: globals.GetType()).
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (9)
Semantics\SyntaxTreeRootTests.cs (2)
44Assert.Equal(typeof(CompilationUnitSyntax), tree.GetRoot().GetType()); 54Assert.NotEqual(typeof(CompilationUnitSyntax), root.GetType());
SourceGeneration\GeneratorDriverTests.cs (7)
537Path.Combine(generator.GetType().Assembly.GetName().Name!, generator.GetType().FullName!, "source.cs"), 538Path.Combine(generator2.GetType().Assembly.GetName().Name!, generator2.GetType().FullName!, "source.cs") 3223MetadataReference.CreateFromAssemblyInternal(this.GetType().Assembly), 4264Assert.Same(generator.GetType(), type); 4286Assert.Same(generator.GetType(), type);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (50)
Compilation\SymbolVisitorTests.cs (46)
41_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 46_output.Append(symbol.GetType().Name + " of "); 52_output.Append(symbol.GetType().Name + " of "); 58_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 76_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 83_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 100_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 109_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 119_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 127_output.Append(symbol.GetType().Name + " " + symbol.Name); 138_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 146_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 153_output.Append(symbol.GetType().Name + " of "); 164_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 178_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 182_output.Append(symbol.GetType().Name + " " + symbol.Name); 209_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 215_output.Append(symbol.GetType().Name + " of "); 222_output.Append(symbol.GetType().Name + " of "); 229_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 250_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 258_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 278_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 288_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 299_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 307_output.Append(symbol.GetType().Name + " " + symbol.Name); 319_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 328_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 336_output.Append(symbol.GetType().Name + " of "); 349_output.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 365_output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 369_output.Append(symbol.GetType().Name + " " + symbol.Name); 392argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 401argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 410argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 421argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 429argument.Append(symbol.GetType().Name + " " + symbol.Name); 441argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 449argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 457argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 467argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name + ": "); 481argument.Append(symbol.GetType().Name + " of "); 488argument.Append(symbol.GetType().Name + " of "); 500argument.Append(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 515argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name); 519argument.Append(symbol.GetType().Name + " " + symbol.Name);
Symbols\Source\EnumTests.cs (1)
997if (first != null && first.GetType() == typeof(long))
Symbols\TypeTests.cs (3)
627Assert.False(f1 is ErrorTypeSymbol, f1.GetType().ToString() + " : " + f1.ToTestDisplayString()); 644Assert.False(objType is ErrorTypeSymbol, objType.GetType().ToString() + " : " + objType.ToTestDisplayString()); 652Assert.False(dynType is ErrorTypeSymbol, dynType.GetType().ToString() + " : " + dynType.ToTestDisplayString()); // this is ok
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (28)
LexicalAndXml\XmlDocCommentTests.cs (28)
1723Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[2].GetStructure().GetType()); 1757Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1758Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[3].GetStructure().GetType()); 1799Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1800Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[3].GetStructure().GetType()); 1832Assert.Equal(typeof(MethodDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 1842Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1867Assert.Equal(typeof(MethodDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 1877Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1902Assert.Equal(typeof(PropertyDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 1912Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1937Assert.Equal(typeof(IndexerDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 1947Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 1972Assert.Equal(typeof(MethodDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 1984Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2009Assert.Equal(typeof(ClassDeclarationSyntax), tree.GetCompilationUnitRoot().Members[0].GetType()); 2020Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2047Assert.Equal(typeof(MethodDeclarationSyntax), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType()); 2058Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2090Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2124Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2155Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2185Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[2].GetStructure().GetType()); 2217Assert.Equal(typeof(DocumentationCommentTriviaSyntax), trivias[0].GetStructure().GetType()); 2641Assert.Equal(typeof(XmlElementSyntax), doc.Content[0].GetType()); 3358if (element.GetType() == typeof(XmlElementSyntax)) 3362else if (element.GetType() == typeof(XmlTextSyntax)) 3366else if (element.GetType() == typeof(XmlCDataSectionSyntax))
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
548if (!o.GetType().IsArray)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Metadata\WinMdDumpTest.cs (2)
318if (value.GetType() == typeof(string)) 324else if (value.GetType() == typeof(bool))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
30/// value would cause a different type to be seen in a <see cref="System.Object.GetType()"/> call,
Microsoft.CodeAnalysis.EditorFeatures (9)
Classification\Syntactic\SyntacticClassificationTaggerProvider.Tagger.cs (1)
29var tagComputer = _tagComputer ?? throw new ObjectDisposedException(GetType().FullName);
Editor\EditorLayerExtensionManager.cs (3)
62var providerType = provider.GetType(); 113Log(functionId, $"Name: {provider.GetType().FullName} Assembly Version: {provider.GetType().Assembly.GetName().Version}");
LanguageServer\AbstractInProcLanguageClient.cs (1)
219var serverTypeName = languageClient.GetType().Name;
RenameTracking\RenameTrackingTaggerProvider.cs (1)
83text.Container.GetType().FullName));
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (2)
77_asyncListener.BeginAsyncOperation(GetType().Name + ".UpdateTrackingSessionAfterIsRenamableIdentifierTask")); 110_asyncListener.BeginAsyncOperation($"{GetType().Name}.{nameof(QueueUpdateToStateMachine)}"));
Structure\InvalidOutliningRegionException.cs (1)
20=> $"OutliningService({service.GetType()}) produced an invalid region. ITextSnapshot span is {snapshotSpan}. OutliningSpan is {regionSpan}.";
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
QuickInfo\ToolTipAssert.cs (2)
25Assert.IsType(expected.GetType(), actual); 125result.Append($"{indent}New {element.GetType().Name}(");
SignatureHelp\AbstractSignatureHelpProviderTests.cs (1)
384var signatureHelpProvider = workspace.ExportProvider.GetExportedValues<ISignatureHelpProvider>().Single(provider => provider.GetType() == signatureHelpProviderType);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (2)
Intellisense\TestState.vb (2)
81Single(Function(e As ICompletionPresenterProvider) e.GetType().FullName = "Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense.MockCompletionPresenterProvider") 83Single(Function(e As ICommandHandler) e.GetType().Name = PredefinedCompletionNames.CompletionCommandHandler)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
CodeFixes\CodeFixServiceTests.cs (1)
626=> Messages.Add(source.GetType().Name, ToLogFormat(exception));
CommentSelection\ToggleBlockCommentCommandHandlerTests.cs (1)
1504.First(export => typeof(ToggleBlockCommentCommandHandler).Equals(export.GetType()));
Options\GlobalOptionsTests.cs (3)
106Assert.Equal(options.GetType(), defaultOptions.GetType()); 107Recurse(options.GetType(), options, defaultOptions, language);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (10)
Adornments\AbstractAdornmentManager.cs (4)
108using (_asyncListener.BeginAsyncOperation(GetType() + ".OnLayoutChanged")) 154using (_asyncListener.BeginAsyncOperation(GetType().Name + ".OnTagsChanged.1")) 185using (_asyncListener.BeginAsyncOperation(GetType() + ".OnTagsChanged.2")) 202using (_asyncListener.BeginAsyncOperation(GetType().Name + ".UpdateInvalidSpans.1"))
artifacts\obj\Microsoft.CodeAnalysis.EditorFeatures.Wpf\Release\net472\GeneratedInternalTypeHelper.g.cs (1)
47return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
Lightup\ISmartRenameSessionFactoryWrapper.cs (1)
43throw new InvalidCastException($"Cannot cast '{instance.GetType().FullName}' to '{WrappedTypeName}'");
Lightup\ISmartRenameSessionWrapper.cs (1)
115throw new InvalidCastException($"Cannot cast '{instance.GetType().FullName}' to '{WrappedTypeName}'");
Lightup\LightupHelpers.cs (3)
34if (!wrappedObject.TryGetValue(obj.GetType(), out var canCast)) 36canCast = underlyingType.GetTypeInfo().IsAssignableFrom(obj.GetType().GetTypeInfo()); 37wrappedObject.TryAdd(obj.GetType(), canCast);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
143New AnalyzerFileReference(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.CSharp).GetType().Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile), 144New AnalyzerFileReference(DiagnosticExtensions.GetCompilerDiagnosticAnalyzer(LanguageNames.VisualBasic).GetType().Assembly.Location, TestAnalyzerAssemblyLoader.LoadFromFile)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (2)
ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (19)
Debugger\Engine\DkmClrValue.cs (8)
104var valueType = new DkmClrType(this.Type.RuntimeInstance, (value == null || elementType.IsPointer) ? elementType : (TypeImpl)value.GetType()); 310DkmClrType.Create(appDomain, (TypeImpl)((fieldValue == null) ? field.FieldType : fieldValue.GetType())), 324DkmClrType.Create(appDomain, (TypeImpl)((propertyValue == null) ? property.PropertyType : propertyValue.GetType())), 346DkmClrType.Create(appDomain, (TypeImpl)((methodValue == null) ? method.ReturnType : methodValue.GetType())), 436var valueType = runtime.GetType((TypeImpl)RawValue.GetType()); 534type = (TypeImpl)value.GetType(); 572var type = DkmClrType.Create(this.Type.AppDomain, (TypeImpl)((element == null) ? array.GetType().GetElementType() : element.GetType()));
Debugger\Engine\DkmDataContainer.cs (1)
39Guid key = item.GetType().GUID;
Debugger\MemberInfo\TypeImpl.cs (2)
113return o != null && o.GetType() == this.GetType() && ((TypeImpl)o).Type == this.Type;
ResultProviderTestBase.cs (5)
68type = value.GetType(); 119return FormatValue(value, value.GetType(), useHexadecimal); 136return HasUnderlyingString(value, value.GetType()); 147var clrValue = GetValueForUnderlyingString(value, value.GetType()); 484var enumTypeName = e.GetType().Name;
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\ExpressionEvaluator\Core\Source\ExpressionCompiler\ExpressionEvaluatorFatalError.cs (2)
31var openSubKeyMethod = currentUserKey.GetType().GetTypeInfo().GetDeclaredMethod("OpenSubKey", [typeof(string), typeof(bool)]); 36var getValueMethod = eeKey.GetType().GetTypeInfo().GetDeclaredMethod("GetValue", [typeof(string)]);
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Internal\XamlDiagnosticSource.cs (1)
23string IDiagnosticSource.ToDisplayString() => $"{this.GetType().Name}: {document.FilePath ?? document.Name} in {document.Project.Name}";
Microsoft.CodeAnalysis.Features (20)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
121else if (defaultValue.Value?.GetType() is Type t && t.IsEnum)
CodeFixes\RoslynAssemblyHelper.cs (1)
15=> source.GetType().GetTypeInfo().Assembly.GetName().GetPublicKey().SequenceEqual(
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!;
Diagnostics\DiagnosticAnalyzerExtensions.cs (2)
38var typeInfo = analyzer.GetType().GetTypeInfo(); 53=> analyzer.GetType().Assembly.GetName().Name ?? throw ExceptionUtilities.Unreachable();
Diagnostics\DiagnosticAnalyzerTelemetry.cs (1)
54_analyzerInfoMap = _analyzerInfoMap.SetItem(analyzer.GetType(), new Data(analyzerTelemetryInfo, isTelemetryCollectionAllowed));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
317=> TryGetDisplayName(node, editKind) ?? throw ExceptionUtilities.UnexpectedValue(node.GetType().Name); 384throw ExceptionUtilities.UnexpectedValue(node.GetType().Name);
EditAndContinue\DeclarationBody.cs (2)
88GetType() == other?.GetType() && RootNodes.SequenceEqual(other.RootNodes);
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)
171default: throw new InvalidOperationException($"Unable to extract interface for operation of type {extractInterfaceOptions.GetType()}");
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
122var type = codeAction.GetType();
MetadataAsSource\MetadataAsSourceFileService.cs (1)
107var providerTempPath = Path.Combine(_rootTemporaryPathWithGuid, provider.GetType().Name);
Organizing\AbstractOrganizingService.cs (1)
44return n => map.GetOrAdd(n.GetType(), getter);
Structure\Syntax\BlockSpanCollector.cs (1)
65if (_nodeProviderMap.TryGetValue(node.GetType(), out var providers))
Workspace\MiscellaneousFileUtilities.cs (1)
45var projectId = ProjectId.CreateNewId(debugName: $"{workspace.GetType().Name} Files Project for {filePath}");
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
427Node ({newNode.GetType().Name}):
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.Service.cs (1)
663script = serviceState.ReplServiceProvider.CreateScript<object>(code, scriptOptions, serviceState.Globals.GetType(), serviceState.AssemblyLoader);
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\ExtensionManager.cs (1)
20=> _logger.Log(LogLevel.Error, exception, $"{provider.GetType()} threw an exception.");
Microsoft.CodeAnalysis.LanguageServer.Protocol (24)
Features\CodeFixes\CodeFixService.cs (1)
861codeFixProvider.GetType().Name + "." + nameof(CodeFixProvider.FixableDiagnosticIds)));
Handler\CodeActions\CodeActionResolveHelper.cs (1)
59logFunction($"Skipping code action operation for '{data.UniqueIdentifier}'. It was a '{option.GetType().FullName}'");
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (3)
115context.TraceInformation($"{this.GetType()}. Skipping due to {nameof(SolutionCrawlerRegistrationService.EnableSolutionCrawler)}={false}"); 123var handlerName = $"{this.GetType().Name}(category: {category})"; 219context.TraceInformation($"{this.GetType()} finished getting diagnostics");
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (1)
150public string ToDisplayString() => $"{this.GetType().Name}: count={sources.Length}";
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
31public string ToDisplayString() => $"{this.GetType().Name}: {Document.FilePath ?? Document.Name} in {Document.Project.Name}";
Handler\RelatedDocuments\RelatedDocumentsHandler.cs (2)
44context.TraceInformation($"{this.GetType()} started getting related documents"); 88context.TraceInformation($"{this.GetType()} finished getting related documents");
Handler\RequestContextFactory.cs (1)
68throw new InvalidOperationException($"{nameof(IMethodHandler)} implementation {methodHandler.GetType()} does not implement {nameof(ISolutionRequiredHandler)}");
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (1)
59return new SourceGeneratedDocumentCache(this.GetType().Name);
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (3)
42_versionedCache = new(this.GetType().Name); 67context.TraceInformation($"{this.GetType()} started getting spell checking spans"); 133context.TraceInformation($"{this.GetType()} finished getting spans");
LspServices\LspServices.cs (1)
177var handlerType = handler.GetType();
Protocol\Converters\NaturalObjectConverter.cs (1)
20var runtimeType = value.GetType();
Protocol\Extensions\Converters\VSExtensionUtilities.cs (1)
47var existingConverterType = converters[i].GetType();
Protocol\Internal\Converters\VSInternalExtensionUtilities.cs (1)
60var existingConverterType = converters[i].GetType();
Protocol\Internal\VSInternalLocation.cs (1)
39throw new InvalidOperationException($"{value?.GetType()} is an invalid type.");
Protocol\Internal\VSInternalReferenceItem.cs (2)
78throw new InvalidOperationException($"{value.GetType()} is an invalid type."); 166throw new InvalidOperationException($"{value?.GetType()} is an invalid type.");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\HandlerProvider.cs (1)
80var handlerType = handler.GetType();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (1)
217throw new NotImplementedException($"Unrecognized {nameof(IMethodHandler)} implementation {handler.GetType()}.");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
99var noValueType = NoValue.Instance.GetType();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (9)
HandlerTests.cs (8)
324return Task.FromResult(this.GetType().Name); 346return Task.FromResult(this.GetType().Name); 363return Task.FromResult(this.GetType().Name); 378ResultSource.SetResult(this.GetType().Name); 408ResultSource.SetResult(this.GetType().Name); 446return Task.FromResult(this.GetType().Name); 470return Task.FromResult(this.GetType().Name); 489return Task.FromResult(this.GetType().Name);
LspServicesTests.cs (1)
93public ILspService CreateILspService(LspServices lspServices, WellKnownLspServerKinds serverKind) => new TestLspServiceFromFactory(this.GetType().Name);
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
RoundTripUtil.cs (2)
218var type = originalOptions.GetType(); 258var type = originalOptions.GetType();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\BrokeredServiceBase.cs (1)
83=> TraceLogger.TraceEvent(errorType, 0, $"{GetType()}: {message}");
Microsoft.CodeAnalysis.Scripting (14)
Hosting\CommandLine\CommandLineRunner.cs (3)
207var script = Script.CreateInitialScript<int>(_scriptCompiler, code, options, globals.GetType(), assemblyLoaderOpt: null); 233var script = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(initialScriptCodeOpt), options, globals.GetType(), assemblyLoaderOpt: null); 285newScript = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(code ?? string.Empty), options, globals.GetType(), assemblyLoaderOpt: null);
Hosting\ObjectFormatter\CommonObjectFormatter.Visitor.cs (6)
95Type type = obj.GetType(); 258FormatObjectMembers(result, proxy ?? obj, obj.GetType().GetTypeInfo(), includeNonPublic, inlineMembers); 333var type = obj.GetType().GetTypeInfo(); 528TypeInfo type = obj.GetType().GetTypeInfo(); 544result.Append(_formatter.TypeNameFormatter.FormatArrayTypeName(array.GetType(), array, _typeNameOptions)); 548result.Append(_formatter.TypeNameFormatter.FormatTypeName(collection.GetType(), _typeNameOptions));
Hosting\ObjectFormatter\CommonPrimitiveFormatter.cs (1)
55var type = obj.GetType();
Hosting\ObjectFormatter\ObjectFormatterHelpers.cs (2)
108var type = obj.GetType().GetTypeInfo(); 136TypeInfo type = obj.GetType().GetTypeInfo();
Script.cs (1)
596var runtimeType = globals.GetType().GetTypeInfo();
ScriptState.cs (1)
106foreach (var field in state.GetType().GetTypeInfo().DeclaredFields)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
TestRuntimeMetadataReferenceResolver.cs (1)
30string testDir = Path.GetDirectoryName(GetType().GetTypeInfo().Assembly.ManifestModule.FullyQualifiedName);
Microsoft.CodeAnalysis.Test.Utilities (15)
Assert\TestExceptionUtilities.cs (1)
15string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
Compilation\TestOperationVisitor.cs (1)
31throw new NotImplementedException(operation.GetType().ToString());
Diagnostics\DiagnosticDescription.cs (2)
92_errorCodeType = errorCodeType ?? code.GetType(); 117_errorCodeType = errorCodeType ?? code.GetType();
Diagnostics\DiagnosticExtensions.cs (1)
412return new AnalyzerImageReference(ImmutableArray.Create(analyzer), display: analyzer.GetType().FullName);
Diagnostics\OptionsDiagnosticAnalyzer.cs (1)
24Debug.Assert(expectedOptions.AnalyzerConfigOptionsProvider.GetType() == typeof(CompilerAnalyzerConfigOptionsProvider));
Mocks\TestDocumentationCommentProvider.cs (3)
18public override bool Equals(object obj) => obj != null && this.GetType() == obj.GetType(); 19public override int GetHashCode() => GetType().GetHashCode();
Platform\Custom\MetadataSignatureHelper.cs (1)
78if (value.GetType() == typeof(string))
Syntax\NodeHelpers.cs (3)
149var typeObject = node.GetType(); 160var typeObject = token.GetType(); 171var typeObject = trivia.GetType();
TestHelpers.cs (2)
47var valueType = value.GetType(); 118code.GetType(),
Microsoft.CodeAnalysis.UnitTests (70)
AnalyzerAssemblyLoaderTests.cs (35)
312a.GetType().GetMethod("Write")!.Invoke(a, new object[] { sb, "Test A" }); 317b.GetType().GetMethod("Write")!.Invoke(b, new object[] { sb, "Test B" }); 382var writeMethod = b.GetType().GetMethod("Write")!; 542var writeMethod = b.GetType().GetMethod("Write")!; 574var writeMethod = b.GetType().GetMethod("Write")!; 690var writeMethod = b.GetType().GetMethod("Write")!; 739var writeMethod = b.GetType().GetMethod("Write")!; 799g.GetType().GetMethod("Write")!.Invoke(g, new object[] { sb, "Test G" }); 803e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 855e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 914e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 1001e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 1061e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 1115g.GetType().GetMethod("Write")!.Invoke(g, new object[] { sb, "Test G" }); 1119e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 1175g.GetType().GetMethod("Write")!.Invoke(g, new object[] { sb, "Test G" }); 1179var eWrite = e.GetType().GetMethod("Write")!; 1234var prop = a.GetType().GetProperty("Ran", BindingFlags.Public | BindingFlags.Instance); 1354g.GetType().GetMethod("Write")!.Invoke(g, new object[] { sb, "Test G" }); 1358e.GetType().GetMethod("Write")!.Invoke(e, new object[] { sb, "Test E" }); 1384delta1Instance.GetType().GetMethod("Write")!.Invoke(delta1Instance, new object[] { sb, "Test D1" }); 1388delta2Instance.GetType().GetMethod("Write")!.Invoke(delta2Instance, new object[] { sb, "Test D2" }); 1416var ex = Assert.ThrowsAny<Exception>(() => analyzer.GetType().GetMethod("Method")!.Invoke(analyzer, new object[] { sb })); 1421analyzer.GetType().GetMethod("Method")!.Invoke(analyzer, new object[] { sb }); 1440analyzer.GetType().GetMethod("Method")!.Invoke(analyzer, new object[] { sb }); 1477var result = analyzer.GetType().GetMethod("GetFileAttributes")!.Invoke(analyzer, new[] { testFixture.AnalyzerWithNativeDependency }); 1527d!.GetType().GetMethod("Write")!.Invoke(d, new object[] { sb, "Test D" }); 1561var writeMethod = b.GetType().GetMethod("Write")!; 1703analyzer.GetType().GetMethod("Method")!.Invoke(analyzer, new object[] { sb }); 1730var resolver = new TestAnalyzerAssemblyResolver(n => GetType().Assembly); 1741Assert.Collection(resolver.CalledFor, (a => Assert.Equal(GetType().Assembly.GetName().Name, a.Name))); 1748var thisAssemblyName = GetType().Assembly.GetName(); 1749var resolver = new TestAnalyzerAssemblyResolver(n => n == thisAssemblyName ? GetType().Assembly : null); 1792var resolver1 = new TestAnalyzerAssemblyResolver(n => GetType().Assembly); 1802Assert.Collection(resolver1.CalledFor, (a => Assert.Equal(GetType().Assembly.GetName().Name, a.Name)));
Analyzers\AnalyzerFileReferenceTests.cs (5)
127var analyzerNames = analyzers.Select(a => a.GetType().Name); 134analyzerNames = analyzers.Select(a => a.GetType().Name); 519var csharpAnalyzers = reference.GetAnalyzers(LanguageNames.CSharp).Select(a => a.GetType().FullName).ToArray(); 526var vbAnalyzers = reference.GetAnalyzers(LanguageNames.VisualBasic).Select(a => a.GetType().FullName).ToArray(); 534var allAnalyzers = reference.GetAnalyzersForAllLanguages().Select(a => a.GetType().FullName).ToArray();
Collections\DebuggerAttributes.cs (6)
43DebuggerAttributeInfo info = ValidateDebuggerTypeProxyProperties(obj.GetType(), obj); 52return ValidateDebuggerTypeProxyProperties(obj.GetType(), obj); 97public static Type GetProxyType(object obj) => GetProxyType(obj.GetType()); 131var objType = obj.GetType(); 237for (Type? t = obj.GetType(); t != null; t = t.GetTypeInfo().BaseType) 250for (Type? t = obj.GetType(); t != null; t = t.GetTypeInfo().BaseType)
Collections\HashSet\TestingTypes.cs (4)
78if (obj != null && obj.GetType() == typeof(EquatableBackwardsOrder)) 197if (obj?.GetType() == typeof(SimpleInt)) 206if (other?.GetType() == typeof(SimpleInt)) 213if (other?.GetType() == typeof(SimpleInt))
Collections\IdentifierCollectionTests.cs (4)
42Assert.Equal(idcol.GetEnumerator().GetType(), ((System.Collections.IEnumerable)idcol).GetEnumerator().GetType()); 59Assert.Equal(idcol.GetEnumerator().GetType(), ((System.Collections.IEnumerable)idcol).GetEnumerator().GetType());
Collections\ImmutableSegmentedListTest.cs (1)
805var addMethod = list.GetType().GetMethod("Add");
Collections\ImmutablesTestBase.cs (12)
60else if (first.GetType() != second.GetType()) 65else if (first.GetType().IsValueType) 67throw new NotSupportedException($"Unable to compare '{first.GetType()}' for identity."); 80else if (first.GetType() != second.GetType()) 85else if (first.GetType().IsValueType) 87throw new NotSupportedException($"Unable to compare '{first.GetType()}' for identity."); 101else if (first.GetType() != second.GetType()) 106else if (first.GetType().IsValueType) 108throw new NotSupportedException($"Unable to compare '{first.GetType()}' for identity.");
Collections\List\CollectionAsserts.cs (2)
39Assert.IsType(e.Current.GetType(), a.Current); 65Assert.IsType(e.Current.GetType(), a.Current);
Text\TextChangeTests.cs (1)
598var chunkField = text.GetType().GetField("_chunks", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
Microsoft.CodeAnalysis.VisualBasic (15)
CommandLine\VisualBasicCommandLineParser.vb (1)
1802diagnosticBuilder.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)
525Not Me.GetType().Equals(other.GetType()) Then
Symbols\UnboundGenericType.vb (3)
296Return other IsNot Nothing AndAlso other.GetType() = Me.GetType() AndAlso other.OriginalDefinition.Equals(OriginalDefinition, comparison) 300Return Hash.Combine(Me.GetType(), OriginalDefinition.GetHashCode())
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\ConvertTypeofToNameof\VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer.vb (1)
26Dim isParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
ExpressionTrees\Sources\ExprLambdaUtils.vb (1)
64Dim vType = val.GetType()
Microsoft.CodeAnalysis.VisualBasic.Features (1)
src\Analyzers\VisualBasic\Analyzers\ConvertTypeofToNameof\VisualBasicConvertTypeOfToNameOfDiagnosticAnalyzer.vb (1)
26Dim isParentValid = node.Parent.GetType() Is GetType(MemberAccessExpressionSyntax)
Microsoft.CodeAnalysis.VisualBasic.ResultProvider (1)
src\Compilers\VisualBasic\Portable\SymbolDisplay\ObjectDisplay.vb (1)
44Dim type = obj.GetType()
Microsoft.CodeAnalysis.VisualBasic.Scripting (1)
VisualBasicScript.vb (1)
47Return Create(Of T)(code, options, globals?.GetType()).RunAsync(globals, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Semantics\Conversions.vb (1)
1369Select Case System.Type.GetTypeCode(value.GetType())
Semantics\SyntaxTreeRootTests.vb (2)
30Assert.Equal(GetType(CompilationUnitSyntax), tree.GetRoot().GetType()) 39Assert.NotEqual(GetType(CompilationUnitSyntax), root.GetType())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Source\SourceSymbolTests.vb (1)
654Assert.Equal({"MyTemplateLocation", "SourceLocation", "SourceLocation", "SourceLocation", "SourceLocation", "MetadataLocation"}, locations.Select(Function(l) l.GetType().Name))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (2)
Syntax\SyntaxFactoryTests.vb (1)
105Dim literalMethod = literalMethods.Single(Function(m) m.GetParameters().Single().ParameterType = value.GetType())
TestSyntaxNodes.vb (1)
3372Assert.Equal("Microsoft.CodeAnalysis.VisualBasic.Syntax.IfDirectiveTriviaSyntax", x(0).GetType.ToString)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
Extensions.vb (1)
286If Not o.GetType.IsArray Then
VBParser.vb (1)
26Return node.GetType().GetTypeInfo().GetDeclaredProperty("Kind").GetValue(node, Nothing).ToString()
Microsoft.CodeAnalysis.Workspaces (76)
CodeActions\CodeAction.cs (4)
108var type = this.GetType(); 205_providerTypeForTelemetry = provider.GetType(); 218: this.GetType(); 378=> throw new NotSupportedException(GetType().FullName);
CodeFixesAndRefactorings\FixAllLogger.cs (2)
68m[providerKey] = fixAllState.Provider.GetType().FullName!; 74m[providerKey] = fixAllState.Provider.GetType().FullName!.GetHashCode().ToString();
Diagnostics\Extensions.cs (1)
72var type = analyzer.GetType();
ExtensionManager\IExtensionManagerExtensions.cs (1)
110return n => map.TryGetValue(n.GetType(), out var extensions) ? extensions : [];
Log\WorkspaceErrorLogger.cs (1)
24=> 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 (2)
51throw ExceptionUtilities.UnexpectedValue(reference.GetType()); 104throw ExceptionUtilities.UnexpectedValue(reference.GetType());
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
108throw new ObjectDisposedException(this.GetType().FullName);
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\Compilers\Core\Portable\SpecialTypeExtensions.cs (16)
281if (value.GetType() == typeof(int)) 286if (value.GetType() == typeof(string)) 291if (value.GetType() == typeof(bool)) 296if (value.GetType() == typeof(char)) 301if (value.GetType() == typeof(long)) 306if (value.GetType() == typeof(double)) 311if (value.GetType() == typeof(uint)) 316if (value.GetType() == typeof(ulong)) 321if (value.GetType() == typeof(float)) 326if (value.GetType() == typeof(decimal)) 331if (value.GetType() == typeof(short)) 336if (value.GetType() == typeof(ushort)) 341if (value.GetType() == typeof(DateTime)) 346if (value.GetType() == typeof(byte)) 351if (value.GetType() == typeof(sbyte)) 375Debug.Assert(value.GetType().IsPrimitive);
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
100throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
66throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\SegmentedArray.cs (1)
141if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (1)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticAnalyzerExtensions.cs (1)
18var typeString = analyzer.GetType().ToString();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ObjectExtensions.cs (1)
10=> obj == null ? "null" : obj.GetType().Name;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
105(obj.GetType(), name),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (19)
161Debug.Assert(value == null || !value.GetType().GetTypeInfo().IsEnum, "Enum should not be written with WriteValue. Write them as ints instead."); 169var type = value.GetType(); 184if (value.GetType() == typeof(int)) 188else if (value.GetType() == typeof(double)) 193else if (value.GetType() == typeof(bool)) 197else if (value.GetType() == typeof(char)) 202else if (value.GetType() == typeof(byte)) 207else if (value.GetType() == typeof(short)) 212else if (value.GetType() == typeof(long)) 217else if (value.GetType() == typeof(sbyte)) 222else if (value.GetType() == typeof(float)) 227else if (value.GetType() == typeof(ushort)) 232else if (value.GetType() == typeof(uint)) 236else if (value.GetType() == typeof(ulong)) 243throw ExceptionUtilities.UnexpectedValue(value.GetType()); 246else if (value.GetType() == typeof(decimal)) 251else if (value.GetType() == typeof(DateTime)) 256else if (value.GetType() == typeof(string)) 262throw new InvalidOperationException($"Unsupported object type: {value.GetType()}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EnumValueUtilities.cs (2)
129if (existingConstants[0].Equals(Convert.ChangeType(2, existingConstants[0].GetType())) && 130existingConstants[1].Equals(Convert.ChangeType(1, existingConstants[1].GetType())))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
167string.Format(WorkspaceExtensionsResources.Destination_type_must_be_a_0_but_given_one_is_1, typeof(TDeclarationNode).Name, destination.GetType().Name), 186typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, destination.GetType().Name), 207typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, destination.GetType().Name), 225typeof(TDeclarationNode1).Name, typeof(TDeclarationNode2).Name, typeof(TDeclarationNode3).Name, typeof(TDeclarationNode4).Name, destination.GetType().Name),
Workspace\Solution\DocumentId.cs (1)
63=> 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)
72=> string.Format("({0}, #{1} - {2})", this.GetType().Name, this.Id, _debugName);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (6)
149_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 168_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 296_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()) 729_ => throw ExceptionUtilities.UnexpectedValue(state.GetType()), 838throw ExceptionUtilities.UnexpectedValue(state.GetType()); 943throw ExceptionUtilities.UnexpectedValue(state.GetType());
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
410var driverType = generatorDriver.GetType();
Workspace\Solution\SolutionId.cs (1)
59=> 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.BuildHost (9)
Rpc\RpcServer.cs (2)
113var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance); 149result = task.GetType().GetProperty("Result")!.GetValue(task);
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
src\Dependencies\Collections\ImmutableSegmentedDictionary`2+ValueBuilder.cs (1)
100throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedHashSet`1+ValueBuilder.cs (1)
66throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\ImmutableSegmentedList`1+ValueBuilder.cs (1)
76throw new InvalidOperationException($"Unexpected concurrent access to {GetType()}");
src\Dependencies\Collections\SegmentedArray.cs (1)
141if (typeof(T[]) != destinationArray.GetType() && destinationArray.Rank != 1)
src\Dependencies\Collections\SegmentedDictionary`2.cs (2)
154if (enumerable.GetType() == typeof(SegmentedDictionary<TKey, TValue>)) 198else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
src\Workspaces\Core\MSBuild.BuildHost\Rpc\RpcServer.cs (2)
113var method = rpcTarget.GetType().GetMethod(request.Method, BindingFlags.Public | BindingFlags.Instance); 149result = task.GetType().GetProperty("Result")!.GetValue(task);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
ObjectExtensions.cs (2)
21var type = instance.GetType(); 34var type = instance.GetType();
Options\OptionsTestHelpers.cs (2)
126.WithValue(GetDifferentValue(codeStyle.GetType().GetGenericArguments()[0], codeStyle.Value!)!) 129.WithValue(GetDifferentValue(codeStyle.GetType().GetGenericArguments()[0], codeStyle.Value!)!)
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
ObjectSerializationTests.cs (1)
95r => value != null && value.GetType().IsEnum
Options\OptionSerializerTests.cs (4)
81VerifyEnumValues(option, defaultValue.GetType(), allowsPacalCase: true, allowsSnakeCase: false); 84VerifyEnumInvalidParse(option, defaultValue.GetType()); 133VerifyEnumValues(option, defaultValue.GetType(), allowsPacalCase: true, allowsSnakeCase: true); 136VerifyEnumInvalidParse(option, defaultValue.GetType());
Remote\ServiceDescriptorTests.cs (3)
217var deserialized = MessagePackSerializer.Deserialize(original.GetType(), stream, messagePackOptions); 288var deserialized = MessagePackSerializer.Deserialize(original.GetType(), stream, messagePackOptions); 325formatter => formatter.GetType() is { IsGenericType: true } and var formatterType &&
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
558var state = syntaxAndDeclarationsManager.GetType().GetMethod("GetLazyState", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)!.Invoke(syntaxAndDeclarationsManager, null);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
576Assert.Equal(typeof(DefaultDocumentTextDifferencingService), service.GetType());
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
HandlerProvider.cs (1)
80var handlerType = handler.GetType();
QueueItem.cs (1)
217throw new NotImplementedException($"Unrecognized {nameof(IMethodHandler)} implementation {handler.GetType()}.");
RequestExecutionQueue.cs (1)
99var noValueType = NoValue.Instance.GetType();
Microsoft.CSharp (9)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (2)
55tempForIncrement = Expression.Variable(value != null ? value.GetType() : typeof(object), "t0"); 118Expression.Assign(tempForIncrement, Expression.Convert(arg0.Expression, arg0.Value.GetType())),
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (3)
71this.type = value == null ? "<null>" : value.GetType().ToString(); 190delegateSignatureTypes[i + 1] = args[i].GetType(); 213Delegate target = (Delegate)site.GetType().GetField("Target").GetValue(site);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
506arg.RuntimeObjectActualType = SymbolTable.GetCTypeFromType(argument.Value.GetType());
Microsoft\CSharp\RuntimeBinder\Semantics\ConstVal.cs (1)
90Type.GetTypeCode(o.GetType()) switch
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (2)
1511Debug.Assert(Type.GetTypeCode(defValue.GetType()) != TypeCode.Decimal); // Handled above 1512switch (Type.GetTypeCode(defValue.GetType()))
Microsoft.Data.Analysis (1)
PrimitiveDataFrameColumn.cs (1)
239if (value == null || value.GetType() == typeof(T))
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
61ITest test = (ITest)output.GetType().GetField("test", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(output);
Microsoft.DotNet.Arcade.Sdk.Tests (3)
Utilities\TestProjectFixture.cs (3)
34_logOutputDir = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "LogOutputDir").Value; 51var nugetRoot = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "NuGetPackageRoot").Value; 52var pkgVersion = GetType().Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().Single(m => m.Key == "PackageVersion").Value;
Microsoft.DotNet.AsmDiff (1)
DiffApiDefinition.cs (1)
58throw new NotImplementedException("Unknown CCI object type: " + obj.GetType());
Microsoft.DotNet.Build.Tasks.Feed (1)
src\Common\Internal\EnumExtensions.cs (1)
16Type type = value.GetType();
Microsoft.DotNet.Build.Tasks.Packaging (3)
PackageIndex.cs (2)
739throw new JsonSerializationException($"Expected {nameof(InboxFrameworks)} but got {value.GetType()}"); 853throw new JsonSerializationException($"Expected {nameof(MetaPackages)} but got {value.GetType()}");
PackageReport.cs (1)
106throw new JsonSerializationException($"Expected {nameof(NuGetFramework)} but got {value.GetType()}");
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\BaseAnalyzer.cs (1)
29if (StringComparer.OrdinalIgnoreCase.Equals(line.ToString(), GetType().Name))
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\AssertEx.cs (2)
64if (x.GetType() != y.GetType())
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
598Type targetType = d.Target.GetType();
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
ServiceClientCodeFactory.cs (1)
93HelperFactory.RegisterAllForType(hb, language.GetType(), language);
Microsoft.DotNet.XUnitExtensions (1)
XunitParallelTheoryTestCaseRunner.cs (1)
74Aggregator.Add(new InvalidOperationException($"Data discoverer specified for {reflectionAttribute.Attribute.GetType()} on {TestCase.TestMethod.TestClass.Class.Name}.{TestCase.TestMethod.Method.Name} does not implement IDataDiscoverer."));
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.cs (2)
71&& _backendCache.GetType() == typeof(MemoryDistributedCache) 72&& _localCache.GetType() == typeof(MemoryCache))
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (36)
RedisCacheSetAndRemoveTests.cs (10)
22var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 32var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 45var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 62var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 79var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 95var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 105var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 119var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 136var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 159var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
TimeExpirationAsyncTests.cs (13)
40var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 58var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 79var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 92var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 108var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 124var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 144var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 157var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 170var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 186var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 204var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 217var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 242var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
TimeExpirationTests.cs (13)
23var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 41var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 62var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 75var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 91var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 108var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 128var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 141var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 154var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 171var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 189var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 202var cache = RedisTestConfig.CreateCacheInstance(GetType().Name); 227var cache = RedisTestConfig.CreateCacheInstance(GetType().Name);
Microsoft.Extensions.Compliance.Redaction (4)
RedactorProvider.cs (2)
51if (r.GetType() == m.Value) 66if (r.GetType() == defaultRedactorType)
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.Configuration (1)
ConfigurationProvider.cs (1)
125public override string ToString() => GetType().Name;
Microsoft.Extensions.Configuration.Binder (4)
BindingPoint.cs (1)
47return _initialValue?.GetType() is { } initialValueType
ConfigurationBinder.cs (3)
144BindInstance(instance.GetType(), bindingPoint, configuration, options, false); 225List<PropertyInfo> modelProperties = GetAllProperties(instance.GetType()); 244nameof(options.ErrorOnUnknownConfiguration), nameof(BinderOptions), instance.GetType(),
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
54string s = GetType().Name;
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
54=> $"{GetType().Name} for '{Source.Path}' ({(Source.Optional ? "Optional" : "Required")})";
Microsoft.Extensions.Configuration.KeyPerFile (1)
KeyPerFileConfigurationProvider.cs (1)
117=> $"{GetType().Name} for files in '{GetDirectoryName()}' ({(Source.Optional ? "Optional" : "Required")})";
Microsoft.Extensions.DependencyInjection (7)
DependencyInjectionEventSource.cs (1)
267builder.Append(instance.GetType());
ServiceLookup\CallSiteFactory.cs (1)
584if (parameterType != serviceIdentifier.ServiceKey.GetType())
ServiceLookup\CallSiteVisitor.cs (1)
54throw new NotSupportedException(SR.Format(SR.CallSiteTypeNotSupported, callSite.GetType()));
ServiceLookup\ConstantCallSite.cs (2)
18throw new ArgumentException(SR.Format(SR.ConstantCantBeConvertedToServiceType, defaultValue.GetType(), serviceType)); 25public override Type ImplementationType => DefaultValue?.GetType() ?? _serviceType;
ServiceLookup\ILEmit\ILEmitResolverBuilder.cs (1)
94owner: GetType(),
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.DependencyInjection.Abstractions (6)
ActivatorUtilities.cs (2)
182argumentTypes[i] = parameters[i]?.GetType(); 822Type? givenType = givenParameters[givenIndex]?.GetType();
ServiceDescriptor.cs (4)
296return ImplementationInstance.GetType(); 300Type[]? typeArguments = ImplementationFactory.GetType().GenericTypeArguments; 315return KeyedImplementationInstance.GetType(); 319Type[]? typeArguments = KeyedImplementationFactory.GetType().GenericTypeArguments;
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
ExceptionSummarizer.cs (1)
95$"Exception summary provider {exceptionSummaryProvider.GetType().Name} returned invalid short description index {descriptionIndex}");
Microsoft.Extensions.Diagnostics.HealthChecks (1)
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Diagnostics.Probes (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.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 (5)
ResourceMonitorService.cs (1)
118Log.HandlePublishUtilizationException(_logger, e, publisher.GetType().FullName!);
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");
src\Shared\StringSplit\StringRange.cs (1)
73Throw.ArgumentException(nameof(obj), $"Provided value must be of type {typeof(StringRange)}, but was of type {obj.GetType()}.");
Microsoft.Extensions.Diagnostics.Testing (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.FileProviders.Embedded (1)
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.FileProviders.Embedded.Tests (11)
EmbeddedFileProviderTests.cs (11)
26var provider = new EmbeddedFileProvider(GetType().Assembly); 42var provider = new EmbeddedFileProvider(GetType().Assembly); 62var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".SubNamespace"); 76var provider = new EmbeddedFileProvider(GetType().Assembly); 109var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".Resources"); 147var provider = new EmbeddedFileProvider(GetType().Assembly); 185var provider = new EmbeddedFileProvider(GetType().Assembly); 206var provider = new EmbeddedFileProvider(GetType().Assembly, Namespace + ".Resources"); 226var provider = new EmbeddedFileProvider(GetType().Assembly, "Unknown.Namespace"); 243var provider = new EmbeddedFileProvider(GetType().Assembly); 258var provider = new EmbeddedFileProvider(GetType().Assembly);
Microsoft.Extensions.Hosting.Testing (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Http (1)
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)
234Log.EnrichmentError(_logger, e, enricher.GetType().FullName, request.Method, logRecord.Host, logRecord.Path);
Microsoft.Extensions.Http.Resilience (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.Http.Resilience.Tests (1)
Helpers\OptionsUtilities.cs (1)
52.GetType()
Microsoft.Extensions.Identity.Core (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Identity.Stores (2)
src\Shared\ThrowHelpers\ObjectDisposedThrowHelper.cs (1)
50throw new ObjectDisposedException(instance?.GetType().FullName);
src\Shared\TrimmingAttributes.cs (1)
300/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Logging (1)
LoggerInformation.cs (1)
76ProviderType = provider.GetType();
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (1)
38return item == null ? null : GetTypeDisplayName(item.GetType(), fullName);
Microsoft.Extensions.ObjectPool (1)
DisposableObjectPool.cs (1)
34throw new ObjectDisposedException(GetType().Name);
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
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.Resilience (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
98throw new InvalidOperationException($"Endpoints of type {endPoint.GetType()} are not supported");
Microsoft.Extensions.Telemetry (4)
Logging\Import\LoggerInformation.cs (1)
90ProviderType = 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.Abstractions (1)
src\LegacySupport\TrimAttributes\DynamicallyAccessedMembersAttribute.cs (1)
30/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
Microsoft.Extensions.Telemetry.PerformanceTests (1)
BenchLogger.cs (1)
66if (o?.GetType() == typeof(Guid))
Microsoft.Extensions.Telemetry.Tests (3)
Logging\ExtendedLoggerFactoryTests.cs (3)
471Assert.StartsWith(loggerProvider.ScopeProvider!.GetType().FullName, scope!.GetType().FullName); 483Assert.Contains("LoggerExternalScopeProvider+Scope", scope!.GetType().FullName);
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.JSInterop (5)
Infrastructure\DotNetDispatcher.cs (2)
125else if (syncResult?.GetType() is { IsGenericType: true } syncResultType 383var type = objectReference.Value.GetType();
Infrastructure\TaskGenericsUtil.cs (2)
28var getter = _cachedResultGetters.GetOrAdd(task.GetType(), taskInstanceType => 106return _cachedResultSetters.GetOrAdd(taskCompletionSource.GetType(), tcsType =>
JSRuntime.cs (1)
313throw new InvalidOperationException($"{dotNetObjectReference.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}." +
Microsoft.JSInterop.Tests (1)
DotNetObjectReferenceTest.cs (1)
50var expected = $"{objRef.GetType().Name} is already being tracked by a different instance of {nameof(JSRuntime)}. A common cause is caching an instance of {nameof(DotNetObjectReference<string>)}" +
Microsoft.Maui (18)
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)
183 var resultType = result.GetType(); 223 throw new InvalidOperationException($"The method {invokeData.MethodName} 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();
ImageSources\UriImageSourceService\UriImageSourceService.iOS.cs (1)
72 throw new InvalidOperationException($"Unable to load image stream from image source type '{imageSource.GetType()}'.");
Platform\ElementExtensions.cs (3)
75 var viewType = view.GetType(); 87 handlersWithConstructors.Add(view.GetType()); 149 handler = context.Handlers.GetHandler(element.GetType());
Platform\iOS\MauiUISceneDelegate.cs (1)
66 return persistedState.ToUserActivity(window.GetType().FullName!);
Platform\ReflectionExtensions.cs (1)
27 return self.IsAssignableFrom(o.GetType());
Primitives\Font.cs (2)
104 if (obj.GetType() != GetType())
Microsoft.Maui.Controls (74)
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);
Compatibility\Handlers\ListView\iOS\CellRenderer.cs (1)
43 var tvc = reusableCell as CellTableViewCell ?? new CellTableViewCell(UITableViewCellStyle.Default, item.GetType().FullName);
Compatibility\Handlers\ListView\iOS\CellTableViewCell.cs (1)
56 var id = cell.GetType().FullName;
Compatibility\Handlers\ListView\iOS\ContextActionCell.cs (1)
72 throw new InvalidOperationException($"Implement {nameof(INativeElementView)} on cell renderer: {ContentCell.GetType().AssemblyQualifiedName}");
Compatibility\Handlers\ListView\iOS\EntryCellRenderer.cs (1)
32 tvc = new EntryCellTableViewCell(item.GetType().FullName);
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (3)
469 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : _footerRenderer.GetType(); 508 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : _headerRenderer.GetType(); 1394 return item.GetType();
Compatibility\Handlers\ListView\iOS\TextCellRenderer.cs (1)
25 tvc = new CellTableViewCell(UITableViewCellStyle.Subtitle, item.GetType().FullName);
Compatibility\Handlers\ListView\iOS\ViewCellRenderer.cs (3)
28 cell = new ViewTableCell(item.GetType().FullName); 207 var viewHandlerType = MauiContext.Handlers.GetHandlerType(cell.View.GetType()); 209 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : (renderer != null ? renderer.GetType() : typeof(System.Object));
Compatibility\Handlers\TableView\iOS\TableViewModelRenderer.cs (1)
82 var reusable = tableView.DequeueReusableCell(result.GetType().FullName);
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();
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)
84 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);
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)
1000 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_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.Compatibility (16)
iOS\Cells\CellRenderer.cs (1)
28 var tvc = reusableCell as CellTableViewCell ?? new CellTableViewCell(UITableViewCellStyle.Default, item.GetType().FullName);
iOS\Cells\CellTableViewCell.cs (1)
50 var id = cell.GetType().FullName;
iOS\Cells\EntryCellRenderer.cs (1)
28 tvc = new EntryCellTableViewCell(item.GetType().FullName);
iOS\Cells\TextCellRenderer.cs (1)
27 tvc = new CellTableViewCell(UITableViewCellStyle.Subtitle, item.GetType().FullName);
iOS\Cells\ViewCellRenderer.cs (2)
27 cell = new ViewTableCell(item.GetType().FullName); 201 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : renderer.GetType();
iOS\ContextActionCell.cs (1)
77 throw new InvalidOperationException($"Implement {nameof(INativeElementView)} on cell renderer: {ContentCell.GetType().AssemblyQualifiedName}");
iOS\NativeBindingService.cs (1)
20 if (target.GetType().GetProperty(propertyName)?.GetMethod == null)
iOS\Platform.cs (1)
260 handler = Forms.MauiContext.Handlers.GetHandler(element.GetType()) as IViewHandler;
iOS\RendererPool.cs (3)
64 var oldChildType = (oldNativeChildren[i] as IVisualElementRenderer)?.Element?.GetType(); 65 if (oldChildType != newChildren[i].GetType()) 132 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : renderer.GetType();
iOS\Renderers\ListViewRenderer.cs (3)
481 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : _footerRenderer.GetType(); 526 var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : _headerRenderer.GetType(); 1382 return item.GetType();
iOS\Renderers\TableViewModelRenderer.cs (1)
59 var reusable = tableView.DequeueReusableCell(result.GetType().FullName);
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, 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, 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)
333 context.RootElement.GetType().Assembly, out var xpe) is Type parentType
XmlName.cs (1)
32 if (obj.GetType() != typeof(XmlName))
Microsoft.Maui.Essentials (3)
Permissions\Permissions.ios.tvos.watchos.cs (1)
58 throw new PermissionException($"You must set `{requiredInfoPlistKey}` in your Info.plist file to use the Permission: {GetType().Name}.");
Types\Location.shared.cs (2)
256 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 (4)
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)
86serviceKey is null && serviceType is not null && serviceType.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)
393Type optionsType = LightGbmTrainerOptions.GetType();
Microsoft.ML.Maml (1)
HelpCommand.cs (1)
243writer.WriteLine(CmdParser.ArgumentsUsage(_env, args.GetType(), args, false, columns));
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.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.TestUtilities (1)
XUnit\ConditionalTheoryDiscoverer.cs (1)
58var 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.LanguageServices (19)
artifacts\obj\Microsoft.VisualStudio.LanguageServices\Release\net472\GeneratedInternalTypeHelper.g.cs (1)
47return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
CallHierarchy\Finders\AbstractCallFinder.cs (1)
58var asyncToken = _asyncListener.BeginAsyncOperation(this.GetType().Name + ".Search");
ChangeSignature\ChangeSignatureDialogViewModel.cs (1)
376throw ExceptionUtilities.UnexpectedValue(parameter.GetType().ToString());
DebuggerIntelliSense\DebuggerTextView.HACK_CompletionSession.cs (2)
51var shimController = propertyList.Single(x => x.Value != null && x.Value.GetType().Name == "ShimCompletionController").Value; 52var shimControllerType = shimController.GetType();
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.cs (4)
58var extensionManagerType = _extensionManager.GetType(); 64var extensionType = extension.GetType(); 67var extension_HeaderType = extension_Header.GetType(); 114var contentType = content.GetType();
Interactive\VsInteractiveWindowProvider.cs (2)
152c => c.GetType().GetCustomAttributes(typeof(ContentTypeAttribute), inherit: true).Any( 157c => c.GetType().GetCustomAttributes(typeof(ContentTypeAttribute), inherit: true).Any(
LanguageClient\LogHubLspLogger.cs (1)
30Contract.Fail($"{GetType().FullName} was double disposed");
Log\VisualStudioErrorLogger.cs (1)
28var name = source.GetType().Name;
Options\VisualStudioSettingsOptionPersister.cs (1)
226var type = value.GetType();
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (1)
98var token = this.packageInstallerService._listener.BeginAsyncOperation($"{GetType().Name}.{nameof(Do)}");
ProjectSystem\InvisibleEditor.cs (2)
130throw new ObjectDisposedException(GetType().Name); 190=> Debug.Assert(Environment.HasShutdownStarted, GetType().Name + " was leaked without Dispose being called.");
Snippets\AbstractSnippetInfoService.cs (1)
117using var token = _waiter.BeginAsyncOperation(GetType().Name + ".Start");
Venus\ContainedLanguage.IVsContainedLanguage.cs (1)
54var field = intellisenseHost.GetType().GetField("_simpleTextViewWindow", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
artifacts\obj\Microsoft.VisualStudio.LanguageServices.CSharp\Release\net472\GeneratedInternalTypeHelper.g.cs (1)
47return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\FileCodeFunctionTests.cs (1)
227Assert.True(testObject.Parent is CodeClass, testObject.Parent.GetType().ToString());
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
CodeModel\AbstractCodeElementTests`1.vb (1)
454Dim type = obj.GetType()
MSBuild (15)
ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
LogMessagePacketBase.cs (4)
431Type eventDerivedType = _buildEvent.GetType(); 479string assemblyName = _buildEvent.GetType().GetTypeInfo().Assembly.FullName; 510Type eventDerivedType = _buildEvent.GetType(); 679Type eventType = eventArg.GetType();
OutOfProcTaskAppDomainWrapperBase.cs (2)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskHostNode.cs (2)
1188if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1193LogWarningFromResource("ExpectedEventToBeSerializable", e.GetType().Name);
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
XMake.cs (1)
1338Type t1 = loggers[0].GetType();
MSBuildTaskHost (19)
BinaryTranslator.cs (1)
492Type enumType = value.GetType();
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (2)
105if (String.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal)) 107ThrowInternalError("This type does not implement ToString() properly {0}", param.GetType().FullName!);
LogMessagePacketBase.cs (4)
431Type eventDerivedType = _buildEvent.GetType(); 476string assemblyLocation = _buildEvent.GetType().GetTypeInfo().Assembly.Location; 510Type eventDerivedType = _buildEvent.GetType(); 679Type eventType = eventArg.GetType();
OutOfProcTaskAppDomainWrapperBase.cs (2)
328PropertyInfo paramInfo = wrappedTask.GetType().GetProperty(param.Key, BindingFlags.Instance | BindingFlags.Public); 358PropertyInfo[] finalPropertyValues = wrappedTask.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);
OutOfProcTaskHostNode.cs (2)
1188if (!e.GetType().GetTypeInfo().IsSerializable && e is not IExtendedBuildEventArgs) 1193LogWarningFromResource("ExpectedEventToBeSerializable", e.GetType().Name);
ResourceUtilities.cs (3)
435if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 436param.GetType() != typeof(string)) 440param.GetType().FullName);
TaskLoader.cs (1)
138Type taskType = taskInstanceInOtherAppDomain.GetType();
TaskParameter.cs (1)
105Type wrappedParameterType = wrappedParameter.GetType();
Traits.cs (3)
576if (string.Equals(param.GetType().ToString(), param.ToString(), StringComparison.Ordinal) && 577param.GetType() != typeof(string)) 580param.GetType().FullName);
Mvc.Api.Analyzers.Test (24)
ActualApiResponseMetadataFactoryTest.cs (6)
69var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 364var testSource = MvcTestSource.Read(GetType().Name, "TryGetActualResponseMetadataTests"); 365var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source }); 405var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 424var testSource = MvcTestSource.Read(GetType().Name, test); 425var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (2)
84return MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource }); 89return MvcTestSource.Read(GetType().Name, fileName)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest.cs (2)
52var testSource = MvcTestSource.Read(GetType().Name, testMethod); 66var testSource = MvcTestSource.Read(GetType().Name, testMethod);
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (2)
49return MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource }); 54return MvcTestSource.Read(GetType().Name, fileName)
ApiControllerFactsTest.cs (3)
34var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { source }); 128var testSource = MvcTestSource.Read(GetType().Name, testFile); 129var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
ApiConventionAnalyzerIntegrationTest.cs (2)
263var testSource = MvcTestSource.Read(GetType().Name, testMethod); 282var testSource = MvcTestSource.Read(GetType().Name, testMethod);
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (1)
22var project = CreateProjectWithReferencesInBinDir(GetType().Assembly, source);
MvcFactsTest.cs (2)
222var testSource = MvcTestSource.Read(GetType().Name, test); 223var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiConventionMatcherTest.cs (2)
555var testSource = MvcTestSource.Read(GetType().Name, test); 556var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
SymbolApiResponseMetadataProviderTest.cs (2)
476var testSource = MvcTestSource.Read(GetType().Name, test); 477var project = MvcDiagnosticAnalyzerRunner.CreateProjectWithReferencesInBinDir(GetType().Assembly, new[] { testSource.Source });
Mvc.RoutingWebSite (1)
Controllers\RouteDataController.cs (1)
38var routers = RouteData.Routers.Select(r => r.GetType().FullName).ToArray();
PresentationBuildTasks (7)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecords.cs (2)
4703|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4746KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\TemplateXamlParser.cs (1)
1755_previousXamlParser.GetType() != typeof(StyleXamlParser); }
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
1187baseType = dynamicObject.GetType(); 5248_xmlReader.GetType().FullName);
src\Microsoft.DotNet.Wpf\src\WindowsBase\System\IO\Packaging\CompoundFile\VersionPair.cs (2)
250if (obj.GetType() != GetType())
PresentationCore (240)
MS\Internal\Ink\ExtendedProperty.cs (5)
40if (obj == null || obj.GetType() != GetType()) 49Type type1 = this.Value.GetType(); 50Type type2 = that.Value.GetType(); 175Type type = _value.GetType();
MS\Internal\Ink\ExtendedPropertyCollection.cs (2)
25if (o == null || o.GetType() != GetType())
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (10)
62interopTypeInfo = SerializationHelper.ConvertToVarEnum(attribute.Value.GetType(), true); 791if (!(value.GetType() == typeof(int))) 799if (value.GetType() != typeof(DrawingFlags)) 806Type valueType = value.GetType(); 824Type t = value.GetType(); 848if ( value.GetType() != typeof(bool)) 855if ( value.GetType() != typeof(double) ) 879if ( value.GetType() != typeof(byte) ) 892if ( value.GetType() != typeof(byte[]) ) 900VarEnum varEnum = SerializationHelper.ConvertToVarEnum(value.GetType(), true);
MS\Internal\Ink\StrokeFIndices.cs (2)
93if (obj == null || GetType() != obj.GetType())
MS\Internal\Ink\StrokeIntersection.cs (2)
108if (obj == null || GetType() != obj.GetType())
MS\Internal\Media\VisualTreeUtils.cs (3)
178Debug.Fail(String.Format("Unhandled HitTestResult type '{0}'", result.GetType().Name)); 254throw new System.InvalidOperationException(SR.Format(SR.Visual_NotAVisual, element.GetType())); 284element != null ? element.GetType() : null));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (5)
146method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 178method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 232method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 284fieldInfo = obj.GetType().GetField(fieldName); 387Type type = obj.GetType();
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\PerfService.cs (1)
39Type type = key.GetType();
System\Windows\BinaryFormat\BinaryFormatWriter.cs (4)
187Type type = primitive.GetType(); 297Type type = list.GetType(); 398PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(array.GetType().GetElementType()!); 541Type type = value.GetType();
System\Windows\BinaryFormat\MemberPrimitiveTyped.cs (1)
32PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(value.GetType());
System\Windows\dataobject.cs (4)
1528|| (data != null && data.GetType().IsSerializable)) 2086|| (data != null && data.GetType().IsSerializable); 2461SetData(data.GetType(), data); 3444SetData(data.GetType(), data);
System\Windows\Diagnostics\XamlSourceInfoHelper.cs (1)
114if (obj is string || obj.GetType().IsValueType)
System\Windows\FreezableCollection.cs (3)
497throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 640throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T"));
System\Windows\Generated\ContentElement.cs (6)
76throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 84throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 95throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 145throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 152throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 162throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Generated\TextDecorationCollection.cs (3)
405throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 494throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration"));
System\Windows\Generated\UIElement.cs (6)
76throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 84throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 95throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 145throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 152throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 162throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Ink\DrawingAttributes.cs (3)
501if (o == null || o.GetType() != this.GetType()) 706Type t = propertyData.GetType();
System\Windows\Input\Command\CommandManager.cs (3)
318Type classType = targetElement.GetType(); 367Type classType = targetElement.GetType(); 544Type senderType = sender.GetType();
System\Windows\Input\Command\RoutedCommand.cs (2)
123throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType())); 159throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, target.GetType()));
System\Windows\Input\FocusChangedEventArgs.cs (2)
30throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldFocus.GetType())); 33throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, newFocus.GetType()));
System\Windows\Input\KeyboardDevice.cs (3)
124throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, element.GetType())); 402throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 428throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType()));
System\Windows\Input\MouseDevice.cs (2)
302throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, eltDO.GetType())); 552throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (5)
534throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 560throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 625throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 654throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 790throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (1)
553throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispLogic.cs (5)
2075throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldCapture.GetType())); 2104throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType())); 2163throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, oldOver.GetType())); 2192throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusOver.GetType())); 2432throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, _stylusCapture.GetType()));
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
246throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doStylusCapture.GetType())); 1160throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, relativeTo.GetType()));
System\Windows\Input\TouchDevice.cs (1)
332throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), "element");
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
1125Type type = rootVisual?.GetType();
System\Windows\Media\Animation\AnimationStorage.cs (3)
497target.GetType().FullName, 498((AnimationClock)sender).Timeline.GetType().FullName), 994d.GetType().FullName));
System\Windows\Media\Animation\Clock.cs (2)
586timeline.GetType().Name)); 4334builder.Append(GetType().Name);
System\Windows\Media\Animation\Generated\Animatable.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 78throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 89throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 139throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 146throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 156throw 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)
317this.GetType(), 328this.GetType(),
System\Windows\Media\Animation\Generated\PointAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\QuaternionAnimation.cs (2)
317this.GetType(), 328this.GetType(),
System\Windows\Media\Animation\Generated\RectAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Generated\Rotation3DAnimation.cs (2)
317this.GetType(), 328this.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)
404throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 493throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline"));
System\Windows\Media\Animation\Generated\Vector3DAnimation.cs (2)
317this.GetType(), 328this.GetType(),
System\Windows\Media\Animation\Generated\VectorAnimation.cs (2)
316this.GetType(), 327this.GetType(),
System\Windows\Media\Animation\Timeline.cs (1)
1073builder.Append(GetType().Name);
System\Windows\Media\CharacterMetricsDictionary.cs (3)
206Type elementType = array.GetType().GetElementType(); 507throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), "key"); 524throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\CultureSpecificStringDictionary.cs (3)
169Type elementType = array.GetType().GetElementType(); 313throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), "value"); 326throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), "key");
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (3)
404throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 493throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect"));
System\Windows\Media\Effects\Generated\ShaderEffect.cs (1)
143return (Freezable)Activator.CreateInstance(this.GetType());
System\Windows\Media\Effects\ShaderEffect.cs (2)
873Type t = value.GetType(); 955Type t = value.GetType();
System\Windows\Media\FamilyMapCollection.cs (2)
94Type elementType = array.GetType().GetElementType(); 368throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap)));
System\Windows\Media\FamilyTypefaceCollection.cs (2)
360throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); 372Type elementType = array.GetType().GetElementType();
System\Windows\Media\FontFamilyConverter.cs (1)
74if ((o != null) && (o.GetType() == typeof(string)))
System\Windows\Media\Generated\DoubleCollection.cs (3)
372throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 445throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double"));
System\Windows\Media\Generated\DrawingCollection.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, "Drawing"));
System\Windows\Media\Generated\GeneralTransformCollection.cs (3)
402throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 491throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform"));
System\Windows\Media\Generated\GeometryCollection.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, "Geometry"));
System\Windows\Media\Generated\GradientStopCollection.cs (3)
403throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 492throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop"));
System\Windows\Media\Generated\Int32Collection.cs (3)
371throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 444throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int"));
System\Windows\Media\Generated\PathFigureCollection.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, "PathFigure"));
System\Windows\Media\Generated\PathSegmentCollection.cs (3)
402throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 491throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment"));
System\Windows\Media\Generated\PointCollection.cs (3)
371throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 444throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point"));
System\Windows\Media\Generated\TextEffectCollection.cs (3)
402throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 491throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect"));
System\Windows\Media\Generated\TransformCollection.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, "Transform"));
System\Windows\Media\Generated\VectorCollection.cs (3)
371throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 444throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector"));
System\Windows\Media\Imaging\BitmapMetadata.cs (2)
1275if (rating != null && rating.GetType() == typeof(ushort)) 1326if (fileTime != null && fileTime.GetType() == typeof(System.Runtime.InteropServices.ComTypes.FILETIME))
System\Windows\Media\Imaging\PropVariant.cs (2)
240Type type = value.GetType(); 327Type type = value.GetType();
System\Windows\Media\Imaging\WriteableBitmap.cs (2)
1092elementType = exemplar.GetType(); 1120elementType = exemplar.GetType();
System\Windows\Media\Visual.cs (2)
1988hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (3)
402throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 491throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D"));
System\Windows\Media3D\Generated\MaterialCollection.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, "Material"));
System\Windows\Media3D\Generated\Model3DCollection.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, "Model3D"));
System\Windows\Media3D\Generated\Point3DCollection.cs (3)
372throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 445throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D"));
System\Windows\Media3D\Generated\Transform3DCollection.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, "Transform3D"));
System\Windows\Media3D\Generated\Vector3DCollection.cs (3)
372throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 445throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D"));
System\Windows\Media3D\Generated\Visual3D.cs (6)
72throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 80throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 91throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType())); 141throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 148throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation"); 158throw new InvalidOperationException(SR.Format(SR.IAnimatable_CantAnimateSealedDO, dp, this.GetType()));
System\Windows\Media3D\ModelVisual3D.cs (3)
80throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, typeof(Visual3D).Name)); 93throw new System.InvalidOperationException(SR.Format(SR.AddText_Invalid, this.GetType().Name));
System\Windows\Media3D\Viewport3DVisual.cs (1)
502throw new NotSupportedException(SR.Format(SR.HitTest_Invalid, typeof(GeometryHitTestParameters).Name, this.GetType().Name));
System\Windows\Media3D\Visual3D.cs (2)
658hitTestParameters.GetType().Name, this.GetType().Name));
System\Windows\Media3D\Visual3DCollection.cs (2)
455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D"));
System\Windows\PresentationSource.cs (5)
120throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); 164throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 186throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e)); 245throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, o.GetType())); 718throw new InvalidOperationException(SR.Format(SR.Invalid_IInputElement, doTarget.GetType()));
System\Windows\RoutedEvent.cs (1)
88Type handlerType = handler.GetType();
System\Windows\UIElement.cs (6)
677throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_PositiveInfinityReturned, this.GetType().FullName)); 681throw new InvalidOperationException(SR.Format(SR.UIElement_Layout_NaNReturned, this.GetType().FullName)); 807(parent == null ? "" : parent.GetType().FullName), 808this.GetType().FullName)); 1910throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); 1946throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType()));
PresentationFramework (486)
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)
240_selectionProcessor = _locatorManager.GetSelectionProcessor(attachedAnchor.GetType()); 250Debug.Assert(_selectionProcessor != null, SR.Format(SR.NoProcessorForSelectionType, attachedAnchor.GetType()));
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
450throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 456throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 476throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
MS\Internal\Annotations\Anchoring\LocatorManager.cs (3)
352SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 720SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType()); 1047SelectionProcessor selProcessor = GetSelectionProcessor(selection.GetType());
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
73throw new ArgumentException(SR.WrongSelectionType, $"anchor1: type = {anchor1.GetType()}"); 76throw new ArgumentException(SR.WrongSelectionType, $"Anchor2: type = {anchor2.GetType()}");
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (1)
502Type type = component.GetType();
MS\Internal\AppModel\Journaling.cs (3)
544throw new Exception(SR.Format(SR.InvalidPageFunctionType, contentObject.GetType())); 623string typeName = pageFunction.GetType().AssemblyQualifiedName; 655Debug.Assert(contentObject.GetType().AssemblyQualifiedName == this._typeName,
MS\Internal\AppModel\ReturnEventSaver.cs (3)
73returnDelegate.GetType().AssemblyQualifiedName, 74returnDelegate.Target.GetType().AssemblyQualifiedName, 117if (!string.Equals(_returnList[i]._targetTypeName, caller.GetType().AssemblyQualifiedName, StringComparison.Ordinal))
MS\Internal\Data\BindingCollection.cs (1)
115throw new NotSupportedException(SR.Format(SR.BindingCollectionContainsNonBinding, binding.GetType().Name));
MS\Internal\Data\ClrBindingWorker.cs (1)
192ParentBindingExpression.SetupDefaultValueConverter(item.GetType());
MS\Internal\Data\DefaultValueConverter.cs (3)
323((o != null && destinationType.IsAssignableFrom(o.GetType())) || 581if (o != null && _sourceType.IsAssignableFrom(o.GetType())) 619if ((o != null && _targetType.IsAssignableFrom(o.GetType())) ||
MS\Internal\Data\DynamicValueConverter.cs (2)
41Type sourceType = value.GetType(); 66Type targetType = value.GetType();
MS\Internal\Data\EnumerableCollectionView.cs (1)
586TraceData.CollectionChangedWithoutNotification(SourceCollection.GetType().FullName));
MS\Internal\Data\IndexedEnumerable.cs (1)
486Type srcType = collection.GetType();
MS\Internal\Data\PropertyPathWorker.cs (4)
1620throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pi.Name)); 1625throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), pd.Name)); 1630throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dp.Name)); 1635throw new InvalidOperationException(SR.Format(SR.CannotWriteToReadOnly, item.GetType(), dpa.PropertyName));
MS\Internal\Data\ValueTable.cs (1)
223pd = TypeDescriptor.GetProperties(item.GetType())[name];
MS\Internal\Data\ViewManager.cs (3)
597collectionViewType.Name, collection.GetType()), e); 841Type cachedViewType = (cvp == null) ? cv.GetType() : cvp.ProxiedView.GetType();
MS\Internal\Data\XDeferredAxisSource.cs (1)
77MemberInfo[] aryMembers = xda.GetType().GetDefaultMembers();
MS\Internal\Data\XmlBindingWorker.cs (2)
548return $"{node.GetType().Name} ({node.Name})"; 556return string.Create(TypeConverterHelper.InvariantEnglishUS, $"{nodeList.GetType().Name} (hash={AvTrace.GetHashCodeHelper(nodeList)} Count={nodeList.Count})");
MS\Internal\DataStreams.cs (1)
244DependencyProperty dp = DependencyProperty.FromName(subStream._propertyName, element.GetType());
MS\Internal\FrameworkObject.cs (1)
66object arg = (d != null) ? (object)d.GetType() : (object)"NULL";
MS\Internal\Helper.cs (10)
292throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 584Type targetType = targetObject.GetType(); 666!memberType.IsAssignableFrom(markupExtension.GetType())) 669markupExtension.GetType().Name, 686if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 687!typeof(Collection<BindingBase>).IsAssignableFrom(targetProperty.GetType())) 690markupExtension.GetType().Name, 691targetProperty.GetType().Name)); 710if (!typeof(BindingBase).IsAssignableFrom(markupExtension.GetType()) || 714markupExtension.GetType().Name,
MS\Internal\Ink\EraserBehavior.cs (2)
173|| _cachedStylusShape.GetType() != InkCanvas.EraserShape.GetType()) )
MS\Internal\Ink\PenCursorManager.cs (1)
64if (stylusShape.GetType() == typeof(RectangleStylusShape))
MS\Internal\Interop\InternalDispatchObject.cs (1)
129throw new MissingMethodException(GetType().Name, name);
MS\Internal\IO\Packaging\ContentDescriptor.cs (2)
38if (other.GetType() != GetType())
MS\Internal\LayoutDump.cs (15)
205writer.WriteStartElement(visual.GetType().Name); 242writer.WriteStartElement(element.GetType().Name); 264Type t = element.GetType(); 297writer.WriteAttributeString("Type", page.GetType().FullName); 313Type t = page.GetType(); 738writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 760writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 778writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 796writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 813writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 860writer.WriteAttributeString("Type", paragraph.Element.GetType().FullName); 900Type paragraphResultType = paragraph.GetType(); 903Type paraClientType = paraClient.GetType(); 945Type paragraphResultType = paragraph.GetType(); 960Type typeOfCell = cell.GetType();
MS\Internal\Markup\StaticExtension.cs (1)
84throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlTypeResolver"));
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1037throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowedInThisContext, Element.GetType().Name));
MS\Internal\Text\TypographyProperties.cs (2)
692if (this.GetType() != other.GetType())
MS\Internal\TraceData.cs (7)
104traceBuilder.Append(o.GetType().Name); 192traceBuilder.AppendFormat("'{0}' (Name='{1}')", fe.GetType().Name, fe.Name); 196traceBuilder.AppendFormat("'{0}' (HashCode={1})", o.GetType().Name, o.GetHashCode()); 249Type type = o.GetType(); 281DependencyProperty dp => $"{dp.GetType().Name}({dp.Name})", 282PropertyInfo pi => $"{pi.GetType().Name}({pi.Name})", 283PropertyDescriptor pd => $"{pd.GetType().Name}({pd.Name})",
MS\Internal\Utility\TraceLog.cs (1)
61return string.Create(CultureInfo.InvariantCulture, $"{o.GetType().Name}.{o.GetHashCode()}");
MS\Internal\WeakHashtable.cs (1)
54Debug.Assert(!key.GetType().IsValueType, "WeakHashtable doesn't support value-type keys. Use WeakObjectHashtable instead.");
MS\Internal\WeakObjectHashtable.cs (1)
51if (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)
818if (value.GetType() == HelperType)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\WindowsRuntime\ReflectionHelper.cs (5)
146method = obj.GetType().GetMethod(methodName, Type.EmptyTypes); 178method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1) }); 232method = obj.GetType().GetMethod(methodName, new Type[] { typeof(TArg1), typeof(TArg2) }); 284fieldInfo = obj.GetType().GetField(fieldName); 387Type type = obj.GetType();
System\Windows\Application.cs (5)
450if (bamlStream == null || bamlStream.Assembly != component.GetType().Assembly) 452throw new Exception(SR.Format(SR.UriNotMatchWithRootType, component.GetType( ), resourceLocator)); 1710throw new InvalidOperationException(SR.Format(SR.CannotCallRunMultipleTimes, this.GetType().FullName)); 1717throw new ArgumentException(SR.Format(SR.WindowPassedShouldBeOnApplicationThread, window.GetType().FullName, this.GetType().FullName));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
172return this.Owner.GetType().Name;
System\Windows\Automation\Peers\CalendarButtonAutomationPeer.cs (1)
55return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridAutomationPeer.cs (1)
72return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridCellAutomationPeer.cs (1)
48return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeaderAutomationPeer.cs (1)
45return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
48return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridDetailsPresenterAutomationPeer.cs (1)
32return this.Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowAutomationPeer.cs (1)
47return Owner.GetType().Name;
System\Windows\Automation\Peers\DataGridRowHeaderAutomationPeer.cs (1)
45return Owner.GetType().Name;
System\Windows\Automation\Peers\DatePickerAutomationPeer.cs (1)
110return Owner.GetType().Name;
System\Windows\Automation\Peers\GridViewCellAutomationPeer.cs (1)
35return Owner.GetType().Name;
System\Windows\Automation\Peers\ItemAutomationPeer.cs (1)
660if (value != null && !value.GetType().IsValueType &&
System\Windows\Automation\Peers\UserControlAutomationPeer.cs (1)
19return Owner.GetType().Name;
System\Windows\ColorConvertedBitmapExtension.cs (1)
93throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IUriContext" ));
System\Windows\Condition.cs (1)
136value.GetType().Name));
System\Windows\Controls\AdornedElementPlaceholder.cs (3)
60throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"); 63throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ComboBox.cs (1)
728undoManager.OpenedUnit.GetType() != typeof(TextParentUndoUnit))
System\Windows\Controls\DataErrorValidationRule.cs (1)
100idei.GetType().FullName,
System\Windows\Controls\DataGridAutoGeneratingColumnEventArgs.cs (2)
107typeof(PropertyDescriptor).IsAssignableFrom(value.GetType()) || 108typeof(PropertyInfo).IsAssignableFrom(value.GetType()),
System\Windows\Controls\Decorator.cs (3)
66throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"); 71throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\FlowDocumentReader.cs (1)
1957throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1605if(scrollInfo.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter)) 1856throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\Frame.cs (1)
1203Debug.Assert(JournalEntry.GetType().IsSerializable);
System\Windows\Controls\Grid.cs (1)
80throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"));
System\Windows\Controls\GridView.cs (1)
89return SR.Format(SR.ToStringFormatString_GridView, this.GetType(), Columns.Count);
System\Windows\Controls\GridViewColumn.cs (1)
62return SR.Format(SR.ToStringFormatString_GridViewColumn, this.GetType(), Header);
System\Windows\Controls\GridViewColumnHeader.cs (1)
757System.Reflection.Assembly assembly = this.GetType().Assembly;
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1177Type headerType = (srcHeader != null ? srcHeader.GetType() : typeof(GridViewColumnHeader));
System\Windows\Controls\GridViewRowPresenter.cs (3)
36this.GetType(), 89Type oldType = (e.OldValue != null) ? e.OldValue.GetType() : null; 90Type newType = (e.NewValue != null) ? e.NewValue.GetType() : null;
System\Windows\Controls\GroupItem.cs (1)
190throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, this.GetType().Name));
System\Windows\Controls\HeaderedContentControl.cs (1)
386string typeText = this.GetType().ToString();
System\Windows\Controls\HeaderedItemsControl.cs (1)
333string typeText = this.GetType().ToString();
System\Windows\Controls\InkCanvas.cs (2)
766|| oldShape.Rotation != _eraserShape.Rotation || oldShape.GetType() != _eraserShape.GetType())
System\Windows\Controls\ItemContainerGenerator.cs (4)
113string.Create(CultureInfo.InvariantCulture, $"ItemContainerGenerator for {Host.GetType().Name} {label} - {_itemsGenerated} items")); 330_containerType = container.GetType(); 332else if (_containerType != container.GetType()) 1108Type sourceType = source.GetType();
System\Windows\Controls\ItemsControl.cs (2)
3508throw new InvalidOperationException(SR.Format(SR.StyleForWrongType, style.TargetType.Name, container.GetType().Name)); 3998return SR.Format(SR.ToStringFormatString_ItemsControl, this.GetType(), itemsCount);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
156throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ItemsPresenter", templatedParent.GetType().Name));
System\Windows\Controls\ItemsPresenter.cs (1)
325if (oldPanel != null && oldPanel.GetType() == type)
System\Windows\Controls\MenuItem.cs (1)
2109throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\PageRanges.cs (1)
171if (obj == null || obj.GetType() != typeof(PageRange))
System\Windows\Controls\Panel.cs (1)
92throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\PasswordTextContainer.cs (1)
886Invariant.Assert(false, $"Unexpected type: {strongReference.GetType()}");
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (1)
36this.GetType(),
System\Windows\Controls\Primitives\MenuBase.cs (1)
505throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(MenuItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\Popup.cs (1)
1287throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\Primitives\RangeBase.cs (1)
365string typeText = this.GetType().ToString();
System\Windows\Controls\Primitives\Selector.cs (2)
601Type selectedType = (value != null) ? value.GetType() : null; 629Type itemType = itemValue.GetType();
System\Windows\Controls\Primitives\StatusBar.cs (1)
124throw new InvalidOperationException(SR.Format(SR.InvalidItemContainer, this.GetType().Name, typeof(StatusBarItem).Name, typeof(Separator).Name, itemContainer));
System\Windows\Controls\Primitives\ToggleButton.cs (1)
288string typeText = this.GetType().ToString();
System\Windows\Controls\RichTextBox.cs (3)
154throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value"); 159throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\ScrollViewer.cs (1)
2254if(isi.GetType() == typeof(System.Windows.Controls.ScrollContentPresenter))
System\Windows\Controls\TextBlock.cs (3)
130throw new ArgumentException(SR.Format(SR.TextPanelIllegalParaTypeForIAddChild, "value", value.GetType())); 135Type parentType = _complexContent.TextContainer.Parent.GetType(); 137Type valueType = value.GetType();
System\Windows\Controls\ToolBar.cs (3)
467Type feType = fe.GetType(); 603throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarPanel, child.GetType())); 626throw new NotSupportedException(SR.Format(SR.ToolBar_InvalidStyle_ToolBarOverflowPanel, child.GetType()));
System\Windows\Controls\ToolBarTray.cs (1)
273throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), "value");
System\Windows\Controls\UIElementCollection.cs (3)
37throw new ArgumentNullException(SR.Format(SR.Panel_NoNullVisualParent, "visualParent", this.GetType())); 392throw new System.ArgumentException(SR.Format(SR.Collection_BadType, "UIElementCollection", value.GetType().Name, "UIElement")); 522throw 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)), "value");
System\Windows\Controls\VirtualizingStackPanel.cs (3)
6588Debug.Fail($"Unexpected container type: {((container == null) ? "null" : container.GetType().Name)}"); 8941if (this.GetType().Name != "RibbonMenuItemsPanel") 12252for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Controls\WebBrowser.cs (1)
427Type t = value.GetType();
System\Windows\ControlTemplate.cs (1)
68throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, _targetType.Name, templatedParent.GetType().Name));
System\Windows\CornerRadiusConverter.cs (1)
137throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), "value");
System\Windows\Data\BindingExpression.cs (4)
1323&& !targetType.IsAssignableFrom(value.GetType())) 1663string name = String.IsNullOrEmpty(stringFormat) ? converter.GetType().Name : "StringFormat"; 1679converter.GetType().Name, 2196if (sourceType.IsAssignableFrom(value.GetType()))
System\Windows\Data\BindingExpressionBase.cs (4)
135Type type = parent.GetType(); 937target.GetType().FullName, dp.Name, AvTrace.GetHashCodeHelper(target)), 1321undoManager.OpenedUnit.GetType() != typeof(System.Windows.Documents.TextParentUndoUnit)) 2190if (converter != null && converter.CanConvertFrom(value.GetType()))
System\Windows\Data\BindingGroup.cs (1)
580TraceData.BindingGroupWrongProperty(name, context.GetType().FullName));
System\Windows\Data\CollectionView.cs (2)
68if (this.GetType() == typeof(CollectionView)) 1511Type collectionType = SourceCollection.GetType();
System\Windows\Data\MultiBinding.cs (2)
57throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\MultiBindingExpression.cs (3)
527Converter.GetType().Name, 555traceParameters: new object[] { Converter.GetType().Name, count, values.Length, TraceData.DescribeTarget(target, TargetProperty) }); 585Converter.GetType().Name,
System\Windows\Data\ObjectDataProvider.cs (2)
159Debug.Assert((_objectInstance == null) ? (_objectType == null) : (_objectType == _objectInstance.GetType())); 354SetObjectType((value != null) ? value.GetType() : null);
System\Windows\Data\PriorityBinding.cs (2)
54throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\XmlNamespaceMapping.cs (6)
47throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Prefix", this.GetType().Name)); 49throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Prefix", this.GetType().Name)); 66throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "Uri", this.GetType().Name)); 68throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "Uri", this.GetType().Name)); 144throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Prefix", this.GetType().Name)); 148throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "Uri", this.GetType().Name));
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
51throw new ArgumentException(SR.Format(SR.RequiresXmlNamespaceMapping, value.GetType().FullName), "value");
System\Windows\DataTemplate.cs (1)
193throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ContentPresenter", templatedParent.GetType().Name));
System\Windows\DataTrigger.cs (1)
79value.GetType().Name));
System\Windows\Diagnostics\ResourceDictionaryDiagnostics.cs (2)
374if (result.Requester.GetType() == typeof(StaticResourceExtension)) 424if (result.Requester.GetType() == typeof(StaticResourceExtension))
System\Windows\Documents\DocumentSequence.cs (1)
109throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), "value");
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
70throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 115throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(), 153throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), "value"); 202throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value)); 244throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 297throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), "value"); 339throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value)); 382throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value)); 426throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\DocumentStructures\StoryFragments.cs (2)
47throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), "value"); 107throw 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)), "value");
System\Windows\Documents\FixedLineResult.cs (2)
45if (o.GetType() != typeof(FixedLineResult)) 47throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o");
System\Windows\Documents\FixedNode.cs (2)
150if (o.GetType() != typeof(FixedNode)) 152throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedNode)), "o");
System\Windows\Documents\FixedPage.cs (1)
186throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Documents\FixedSOMContainer.cs (1)
38throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMContainer)), "comparedObj");
System\Windows\Documents\FixedSOMGroup.cs (1)
40throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMGroup)), "comparedObj");
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
95throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedSOMSemanticBox)), "o");
System\Windows\Documents\FixedTextPointer.cs (1)
535return e.IsTextElement ? e.Type : ((ITextContainer)_flowPosition.TextContainer).Parent.GetType();
System\Windows\Documents\FlowDocument.cs (3)
1640if (!TextSchema.IsValidChildOfContainer(/*parentType:*/_typeofThis, /*childType:*/value.GetType())) 1642throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, _typeofThis.Name, value.GetType().Name)); 1648throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, value.GetType().Name));
System\Windows\Documents\FlowNode.cs (3)
90if (o == null || this.GetType() != o.GetType()) 114throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowNode)), "o");
System\Windows\Documents\FlowPosition.cs (1)
70throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowPosition)), "o");
System\Windows\Documents\InlineCollection.cs (4)
166if (!TextSchema.IsValidChildOfContainer(this.Parent.GetType(), child.GetType())) 168throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.Parent.GetType().Name, child.GetType().Name));
System\Windows\Documents\PageContent.cs (2)
177throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), "value"); 612throw 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)
126throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name)); 130throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, nonMergeableAncestor.GetType().Name));
System\Windows\Documents\Speller.cs (1)
848Document = {start.TextContainer.Parent.GetType().Name}
System\Windows\Documents\Table.cs (1)
76throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroup)), "value"));
System\Windows\Documents\TableCell.cs (1)
89throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRow.cs (2)
66throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCell)), "value")); 90throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TableRowGroup.cs (2)
79throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRow)), "value")); 304throw new InvalidOperationException(SR.Format(SR.TableInvalidParentNodeType, newParent.GetType().ToString()));
System\Windows\Documents\TextElement.cs (12)
804Type valueType = value.GetType(); 823throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name)); 835throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name)); 851throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 858throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 898throw new InvalidOperationException(SR.Format(SR.TextSchema_TextIsNotAllowed, this.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (6)
249throw new InvalidOperationException(SR.Format(SR.TextElementCollection_PreviousSiblingDoesNotBelongToThisCollection, previousSibling.GetType().Name)); 254throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 288throw new InvalidOperationException(SR.Format(SR.TextElementCollection_NextSiblingDoesNotBelongToThisCollection, nextSibling.GetType().Name)); 293throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 464throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 600Type elementType = array.GetType().GetElementType();
System\Windows\Documents\TextPointer.cs (8)
1420Type containerType = this.TextContainer.Parent.GetType(); 1432throw new InvalidOperationException(SR.Format(SR.TextSchema_CannotSplitElement, ancestor.GetType().Name)); 1614TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1724while (ancestor != null && TextSchema.IsMergeableInline(ancestor.GetType())) 2421return element != null ? element.GetType() : null; 3541bool isValidChild = TextSchema.ValidateChild(position, /*childType*/inline.GetType(), false /* throwIfIllegalChild */, true /* throwIfIllegalHyperlinkDescendent */); 3568Invariant.Assert(TextSchema.IsValidChild(position, /*childType*/inline.GetType())); 3619return element != null ? element.GetType() : null;
System\Windows\Documents\TextRange.cs (1)
809throw new ArgumentException(SR.Format(SR.TextEditorTypeOfParameterIsNotAppropriateForFormattingProperty, value == null ? "null" : value.GetType().Name, formattingProperty.Name), "value");
System\Windows\Documents\TextRangeBase.cs (2)
1828while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType())) 1870while (outerAnchoredBlock != null && !typeof(AnchoredBlock).IsAssignableFrom(outerAnchoredBlock.GetType()))
System\Windows\Documents\TextRangeEdit.cs (32)
31TextElement newElement = (TextElement)Activator.CreateInstance(element.GetType()); 56Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 172while (inline != null && inline.IsEmpty && !TextSchema.IsFormattingType(inline.GetType())) 185(inline.GetType() == typeof(Run) || inline.GetType() == typeof(Span)) && 196((inline.NextInline != null && TextSchema.IsFormattingType(inline.NextInline.GetType())) || 197(inline.PreviousInline != null && TextSchema.IsFormattingType(inline.PreviousInline.GetType())))) 264TextSchema.IsMergeableInline(position.Parent.GetType())) 269TextSchema.IsMergeableInline(position.Parent.GetType())) 283if (TextSchema.IsFormattingType(firstInline.GetType()) && firstInline.TextRange.IsEmpty) 288else if (TextSchema.IsFormattingType(secondInline.GetType()) && secondInline.TextRange.IsEmpty) 293else if (TextSchema.IsKnownType(firstInline.GetType()) && TextSchema.IsKnownType(secondInline.GetType()) && 295TextSchema.IsMergeableInline(firstInline.GetType()) && TextSchema.IsMergeableInline(secondInline.GetType()) 328TextSchema.IsMergeableInline(inline.Parent.GetType()) && 329TextSchema.IsKnownType(inline.Parent.GetType()) && 432else if (parent is Span && TextSchema.IsKnownType(parent.GetType())) 592Invariant.Assert(position.TextContainer.Parent == null || TextSchema.IsValidChildOfContainer(position.TextContainer.Parent.GetType(), typeof(Paragraph))); 790if (TextSchema.IsParagraphOrBlockUIContainer(block.GetType())) 1279TextSchema.IsMergeableInline(position.Parent.GetType())) 1284TextSchema.IsMergeableInline(position.Parent.GetType())) 1299TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1308TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1444if (parent is Inline || TextSchema.AllowsParagraphMerging(parent.GetType())) 1766while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 2022if (TextSchema.IsMergeableInline(topmostSpan.GetType()) && TextSchema.IsKnownType(topmostSpan.GetType()) && !HasWriteableLocalPropertyValues(topmostSpan)) 2037parent != null && TextSchema.IsMergeableInline(parent.GetType()); 2119TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2267if (!TextSchema.IsMergeableInline(parent.GetType())) 2278if (!TextSchema.IsMergeableInline(parent.GetType()))
System\Windows\Documents\TextRangeEditLists.cs (4)
80Invariant.Assert(TextSchema.AllowsParagraphMerging(parentBlock.GetType())); 110Invariant.Assert(TextSchema.AllowsParagraphMerging(previousBlock.GetType())); 636if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 656if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (1)
634if (ancestor is List || ancestor is Inline && !TextSchema.IsMergeableInline(ancestor.GetType()))
System\Windows\Documents\TextRangeSerialization.cs (11)
237TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(nextElement.GetType(), typeof(TextElementEditingBehaviorAttribute)); 617string complexPropertyName = $"{table.GetType().Name}.Columns"; 1115Type elementTypeStandardized = TextSchema.GetStandardElementType(element.GetType(), reduceElement); 1415TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1420TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1516Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1518Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1525Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1528Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1573if (TextSchema.IsBlock(propertyBag.GetType())) 1622else if (targetType.IsAssignableFrom(element.GetType()))
System\Windows\Documents\TextSchema.cs (13)
110bool isValidChild = IsValidChild(parent.GetType(), child.GetType()); 114throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, child.GetType().Name)); 141bool isValidChild = IsValidChild(parent.GetType(), childType); 145throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 164return (leftElement == null || IsValidSibling(leftElement.GetType(), childType)) && 165(rightElement == null || IsValidSibling(rightElement.GetType(), childType)); 173bool isValidChild = IsValidChild(parent.GetType(), childType); 177throw new InvalidOperationException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parent.GetType().Name, childType.Name)); 623if (value1.GetType() != value2.GetType()) 903throw new InvalidOperationException(SR.Format(SR.TextSchema_IllegalHyperlinkChild, nextElement.GetType()));
System\windows\Documents\TextSelection.cs (1)
1486TextElementEditingBehaviorAttribute att = (TextElementEditingBehaviorAttribute)Attribute.GetCustomAttribute(element.GetType(), typeof(TextElementEditingBehaviorAttribute));
System\Windows\Documents\TextStore.cs (1)
4830for (Type t = o.GetType(); !isWPFControl && t != null; t = t.BaseType)
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (2)
276container = new ElementContentContainer(elementNode.TextElement.GetType(), 462base(table.GetType(), localValues, table.Resources, childContainer)
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
27_type = elementNode.TextElement.GetType();
System\Windows\Documents\ValidationHelper.cs (4)
106if (!TextSchema.IsValidChild(/*position:*/position, /*childType:*/child.GetType())) 108throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name)); 116throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, child.GetType().Name));
System\Windows\EventSetter.cs (1)
102if (_handler.GetType() != _event.HandlerType)
System\Windows\EventSetterHandlerConverter.cs (1)
59if (typeDescriptorContext.GetType() != s_ServiceProviderContextType)
System\Windows\EventTrigger.cs (1)
58throw new ArgumentException(SR.Format(SR.EventTriggerBadAction, value.GetType().Name));
System\Windows\FrameworkContentElement.cs (3)
522object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 589string TypeAndName = $"[{GetType().Name}]{dp.Name}"; 711PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElement.cs (3)
1878object implicitValue = FrameworkElement.FindImplicitStyleResource(this, this.GetType(), out source); 1994string TypeAndName = string.Create(CultureInfo.InvariantCulture, $"[{GetType().Name}]{dp.Name}({base.GetHashCode()})"); 2081PerfService.GetPerfElementID(this), GetType().Name, GetValue(dp));
System\Windows\FrameworkElementFactory.cs (7)
227throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, dp.Name, GetType().Name)); 313if (handler.GetType() != routedEvent.HandlerType) 349if (handler.GetType() != routedEvent.HandlerType) 654parent.GetType().Name)); 909parent.GetType().Name)); 955frameworkObject.DO.GetType().Name)); 1115parent.GetType().Name));
System\Windows\FrameworkTemplate.cs (2)
1131throw new InvalidOperationException(SR.Format(SR.TemplateMustBeFE, new object[] { rootObject.GetType().FullName })); 1145rootObject.GetType(), feResult != null, feResult, fceResult);
System\Windows\Input\Command\CommandValueSerializer.cs (4)
76throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 83throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name )); 133throw new InvalidOperationException(SR.Format(SR.ValueSerializerContextUnavailable, this.GetType().Name )); 140throw new InvalidOperationException(SR.Format(SR.TypeValueSerializerUnavailable, this.GetType().Name ));
System\Windows\Interop\ActiveXHost.cs (1)
670throw new TargetInvocationException(SR.Format(SR.AXNohWnd, GetType().Name), e);
System\Windows\Markup\Baml2006\Baml2006Reader.cs (1)
1131Type rootType = _root.GetType();
System\Windows\Markup\BamlReader.cs (1)
1072TypeConverter converter = TypeDescriptor.GetConverter(value.GetType());
System\Windows\Markup\BamlRecordReader.cs (23)
1010flags = GetFlagsFromType(element.GetType()); 1293short elementId = BamlMapTable.GetKnownTypeIdFromType(parent.GetType()); 1599paramInfo.ParameterType != param.GetType()) 1611converter.GetType(), 1633if (!paramInfo.ParameterType.IsAssignableFrom(param.GetType())) 1665converter.GetType(), 2672ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.Name, valueType.Name), e); 2914ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, element.GetType().FullName, propertyDefinition.AttributeInfo.Name, attribValue), e); 3051expectedType = CurrentContext.ObjectData.GetType(); 3390element.GetType().ToString(), holder.PropertyDefinition.Name), e); 3492parent.GetType().FullName, 3736ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, currentTarget.GetType().FullName, attribInfo.Name, o), e); 3762o.GetType().FullName); 3781if (genericType != o.GetType()) 3875ThrowExceptionWithLine(SR.Format(SR.ParserCannotSetValue, parentObject.GetType().FullName, memberInfo.Name, o), e); 4772ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4790ThrowException( nameof(SR.ParserCannotAddAnyChildren2), typeName, currentObject.GetType().FullName ); 4811return parent.GetType(); 4872elementType = element == null ? null : element.GetType(); 5014value.GetType().Name, 5015container.GetType().Name), 5107currentParentType = currentParent.GetType(); 5763Type currentParentType = currentParent.GetType();
System\Windows\Markup\BamlRecords.cs (2)
4703|| (KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(propertyMember.GetType())), 4746KnownTypes.Types[(int)KnownElements.DependencyProperty].IsAssignableFrom(PropertyMember.GetType( )) )
System\Windows\Markup\Primitives\ElementMarkupObject.cs (6)
49get { return _instance.GetType(); } 235if (!TryGetShouldSerializeMethod(new ShouldSerializeKey(instance.GetType(), pd.Name), out shouldSerializeMethod)) 237Type instanceType = instance.GetType(); 483(!PropertyIsAttached(PropertyDescriptor) && PropertyType == value.GetType() && 685Type type = value.GetType(); 933string typeName = typeSerializer.ConvertToString(enumValue.GetType(), context);
System\Windows\Markup\Primitives\MarkupWriter.cs (2)
691throw new InvalidOperationException(SR.Format(SR.UnserializableKeyValue, property.Value.GetType().FullName)); 1031Type tagType = property.Value.GetType();
System\Windows\Markup\XamlTypeMapper.cs (2)
597else if (typeConvert.GetType() == typeof(TypeConverter)) 626if(!propType.IsAssignableFrom(obj.GetType()))
System\Windows\Media\Animation\Generated\ThicknessAnimation.cs (2)
315this.GetType(), 326this.GetType(),
System\Windows\Media\Animation\Storyboard.cs (11)
276SR.Format(SR.Storyboard_NameNotFound, targetName, nameScopeUsed.GetType().ToString())); 318SR.Format(SR.Storyboard_NameNotFound, targetName, nameScope.GetType().ToString())); 327SR.Format(SR.Storyboard_NameNotFound, targetName, fe.GetType().ToString())); 336SR.Format(SR.Storyboard_NameNotFound, targetName, fce.GetType().ToString())); 444throw new InvalidOperationException(SR.Format(SR.Storyboard_NoTarget, currentTimeline.GetType().ToString() )); 452throw new InvalidOperationException(SR.Format(SR.Storyboard_TargetPropertyRequired, currentTimeline.GetType().ToString() )); 574$"Internal error - clockMappings table contains an unexpected object {((mappedObject == null) ? "" : mappedObject.GetType().ToString())}"); 615$"Internal error - clockMappings table contains unexpected object of type{value.GetType()}"); 723throw new InvalidOperationException(SR.Format(SR.Storyboard_PropertyPathFrozenCheckFailed, AccessorName(path, i-1), path.Path, intermediateFreezable.GetType().ToString() )); 795throw new InvalidOperationException(SR.Format(SR.Storyboard_AnimationMismatch, animationClock.Timeline.GetType(), targetProperty.Name, targetProperty.PropertyType)); 944throw new InvalidOperationException(SR.Format(SR.Storyboard_ComplexPathNotSupported, targetObject.GetType().ToString()));
System\Windows\Navigation\Journal.cs (1)
468Debug.Assert(je.GetType().IsSerializable);
System\Windows\Navigation\NavigationService.cs (3)
1449_bp != null ? _bp.GetType().ToString() : "null")); 3281Type type = ccs.GetType(); 3960Debug.Fail($"Unhandled scenario: PageFunction returning to {parentEntry.GetType().Name}");
System\Windows\PropertyPath.cs (3)
562(accessor != null) ? accessor.GetType().FullName : "null")); 640accessor = SystemCoreHelper.NewDynamicPropertyAccessor(item.GetType(), propertyName); 728args[i].type = value.GetType();
System\Windows\PropertyPathConverter.cs (3)
106throw new ArgumentException(SR.Format(SR.CannotConvertType, source.GetType().FullName, typeof(PropertyPath))); 143throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), "value"); 229type = pathPart.GetType();
System\Windows\ResourceDictionary.cs (1)
545valueType = value.GetType();
System\Windows\Setter.cs (2)
78throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, property.Name, GetType().Name)); 123value.GetType().Name));
System\Windows\Standard\Utilities.cs (2)
228DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType()); 241DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(property, component.GetType());
System\Windows\Standard\Verify.cs (1)
280foreach (var ifaceType in parameter.GetType().GetInterfaces())
System\Windows\StaticResourceExtension.cs (2)
199throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlSchemaContextProvider")); 205throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IAmbientProvider"));
System\Windows\Style.cs (4)
407throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), "value"); 477Type elementType = element.GetType(); 673"Unsupported SetterBase subclass in style triggers ({0})", setterBase.GetType().ToString()); 811throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInStyle, trigger.GetType().Name));
System\Windows\StyleHelper.cs (14)
987throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1004throw new InvalidOperationException(SR.Format(SR.UnsupportedTriggerInTemplate, triggerBase.GetType().Name)); 1601throw new InvalidOperationException(SR.Format(SR.CrossThreadAccessOfUnshareableFreezable, freezable.GetType().FullName)); 1832$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 1872$"Style.InstantiateSubTree for {container.GetType().Name} {label}"); 2078if( walkNode.GetType() == container.GetType() ) 2085SR.Format(SR.TemplateCircularReferenceFound, name, walkNode.GetType())); 2342throw new InvalidOperationException(SR.Format(SR.MustBeFrameworkDerived, d.GetType())); 4348$"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?"); 5059$"FrugalMap for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5105$"HybridDictionary for holding List<TriggerBase> is holding an instance of unexpected type {existing.GetType()}"); 5278$"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?"); 5889Type stateType = (state != null) ? state.GetType() : null;
System\Windows\SystemResources.cs (2)
1804return _keyOrValue != null ? _keyOrValue.GetType() : null; 2024return value != null ? value.GetType() : null;
System\Windows\TemplateContent.cs (5)
695if (staticResource.GetType() == typeof(StaticResourceExtension)) 701else if (staticResource.GetType() == typeof(StaticResourceHolder)) 846Type typeofValue = xamlReader.Value.GetType(); 978if (xamlReader.Value != null && typeof(StaticResourceExtension).IsAssignableFrom(xamlReader.Value.GetType())) 1075if (value != null && !IsTypeShareable(value.GetType()))
System\Windows\TemplateKey.cs (6)
51throw new InvalidOperationException(SR.Format(SR.PropertyMustHaveValue, "DataType", this.GetType().Name)); 70throw new InvalidOperationException(SR.Format(SR.PropertyIsInitializeOnly, "DataType", this.GetType().Name)); 72throw new InvalidOperationException(SR.Format(SR.PropertyIsImmutable, "DataType", this.GetType().Name)); 120? string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}({DataType})") 121: string.Create(TypeConverterHelper.InvariantEnglishUS, $"{this.GetType().Name}(null)"); 164result = new ArgumentException(SR.Format(SR.MustBeTypeOrString, dataType.GetType().Name), argName);
System\Windows\ThemeDictionaryExtension.cs (1)
75throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IProvideValueTarget" ));
System\Windows\ThicknessConverter.cs (1)
127throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), nameof(value));
System\Windows\Trigger.cs (2)
81value.GetType().Name)); 182throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), "o");
System\Windows\TriggerBase.cs (1)
305throw new InvalidOperationException(SR.Format(SR.VisualTriggerSettersIncludeUnsupportedSetterType, setters[i].GetType().Name));
PresentationFramework-SystemData (6)
SystemDataExtension.cs (6)
71s_DataTablePropertyDescriptorType = pdc["Table1"].GetType(); 74s_DataRelationPropertyDescriptorType = pdc["IDRelation"].GetType(); 77Type pdType = pd.GetType(); 121if (pd.GetType() == s_DataTablePropertyDescriptorType) 130else if (pd.GetType() == s_DataRelationPropertyDescriptorType) 146if (useFollowParent && pd.GetType() == s_DataRelationPropertyDescriptorType)
PresentationFramework-SystemXmlLinq (6)
SystemXmlLinqExtension.cs (6)
24s_XElementElementsPropertyDescriptorType = pdc["Elements"].GetType(); 25s_XElementDescendantsPropertyDescriptorType = pdc["Descendants"].GetType(); 26s_XElementAttributePropertyDescriptorType = pdc["Attribute"].GetType(); 27s_XElementElementPropertyDescriptorType = pdc["Element"].GetType(); 48Type pdType = pd.GetType(); 62Type pdType = pd.GetType();
PresentationUI (6)
MS\Internal\Documents\Application\ChainOfDependencies.cs (2)
81member.GetType(), 114member.GetType(),
MS\Internal\Documents\Application\ChainOfResponsibility.cs (4)
71member.GetType().Name, 72subject.GetType().Name); 81member.GetType().Name, 82subject.GetType().Name);
ReachFramework (69)
AlphaFlattener\BrushProxy.cs (3)
385str = str + _brush.GetType(); 675Debug.Assert(false, "IsOpaque(" + _brush.GetType() + ") not handled"); 771Debug.Assert(false, "IsTransparent not handled " + _brush.GetType());
AlphaFlattener\Primitive.cs (1)
533Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
AlphaFlattener\PrimitiveList.cs (1)
93string typ = p.GetType().ToString();
AlphaFlattener\Utility.cs (1)
921Type typ = segment.GetType();
Packaging\XpsFixedDocumentReaderWriter.cs (1)
315if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedDocumentSequenceReaderWriter.cs (1)
243if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsFixedPageReaderWriter.cs (1)
512if (!value.GetType().Equals(typeof(PrintTicket)))
Packaging\XpsInterleavingPolicy.cs (3)
283if (!_flushOrderItems.ContainsKey(node.GetType()) || 585FlushItem xOrder = (FlushItem)_orderTable[x.Node.GetType()]; 586FlushItem yOrder = (FlushItem)_orderTable[y.Node.GetType()];
PrintSystemExceptions\PrintSystemException.cs (3)
811committedAttributes = (Collection<String>)(info.GetValue("CommittedAttributes", committedAttributes.GetType())); 812failedAttributes = (Collection<String>)(info.GetValue("FailedAttributes", failedAttributes.GetType())); 813printObjectName = (String)(info.GetValue("ObjectName", printObjectName.GetType()));
Serialization\ColorTypeConverter.cs (1)
107if (!IsSupportedType(value.GetType()))
Serialization\FontTypeConverter.cs (1)
105if (!IsSupportedType(value.GetType()))
Serialization\ImageSourceTypeConverter.cs (1)
111if (!IsSupportedType(value.GetType()))
Serialization\Manager\MetroSerializationManager.cs (3)
154return TypeDescriptor.GetConverter(serializedObject.GetType()); 698Type type = serializableObject.GetType(); 757Type type = serializableObject.GetType();
Serialization\Manager\NGCSerializationManager.cs (2)
657Type serializedObjectType = serializedObject.GetType(); 690Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\NGCSerializationManagerAsync.cs (6)
157if(objectOnStack.GetType() == 165else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 280if(objectOnStack.GetType() == 288else if(typeof(System.Windows.Xps.Serialization.NGCSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 928Type serializedObjectType = serializedObject.GetType(); 989Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\ReachFixedPageSerializer.cs (1)
153String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachFixedPageSerializerAsync.cs (1)
178String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\ReachObjectContext.cs (1)
186serializableObjectContext.Name = serializableObjectContext.TargetObject.GetType().Name;
Serialization\Manager\ReachSerializableProperties.cs (2)
429Type valueType = Value.GetType(); 774Type valueType = Value.GetType();
Serialization\Manager\ReachSerializationUtils.cs (10)
304if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 305(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 306&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 313else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 338else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType())) 356if((_serializedObject.GetType() == typeof(System.Windows.Documents.FixedDocument)) || 357(typeof(System.Windows.Documents.DocumentPaginator).IsAssignableFrom(_serializedObject.GetType()) 358&& (_serializedObject.GetType() != typeof(System.Windows.Documents.FixedDocumentSequence)))) 362else if(_serializedObject.GetType() == typeof(System.Windows.Documents.FixedPage)) 367else if(typeof(System.Windows.Media.Visual).IsAssignableFrom(_serializedObject.GetType()))
Serialization\Manager\XpsOMFixedPageSerializer.cs (1)
143String xmlnsForType = SerializationManager.GetXmlNSForType(serializableObjectContext.TargetObject.GetType());
Serialization\Manager\XpsOMSerializationManager.cs (5)
79serializedObject.GetType().ToString().Contains("FixedDocumentPaginator")) 85serializedObject.GetType().ToString().Contains("FixedDocumentSequencePaginator")) 216if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 220else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 224else if (typeof(Color).IsAssignableFrom(serializedObject.GetType()))
Serialization\Manager\XpsOMSerializationManagerAsync.cs (4)
118if (objectOnStack.GetType() == 126else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 215if (objectOnStack.GetType() == 223else if (typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\Manager\XpsSerializationManager.cs (8)
110serializedObject.GetType().ToString().Contains( "FixedDocumentPaginator") ) 116serializedObject.GetType().ToString().Contains( "FixedDocumentSequencePaginator") ) 372if (typeof(BitmapSource).IsAssignableFrom(serializedObject.GetType())) 376else if (typeof(GlyphRun).IsAssignableFrom(serializedObject.GetType())) 380else if (typeof(Color).IsAssignableFrom(serializedObject.GetType())) 759TypeSerializableDependencyProperties[serializableObject.GetType()]; 810TypeNoneSerializableClrProperties[serializableObject.GetType()]; 1065Type serializedObjectType = serializedObject.GetType();
Serialization\Manager\XpsSerializationManagerAsync.cs (4)
144if(objectOnStack.GetType() == 152else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType())) 263if(objectOnStack.GetType() == 271else if(typeof(System.Windows.Xps.Serialization.ReachSerializerContext).IsAssignableFrom(objectOnStack.GetType()))
Serialization\VisualSerializer.cs (1)
821WriteBrushHeader(brush.GetType().ToString(), brush);
Serialization\VisualTreeFlattener.cs (2)
431_dcf.Comment(visual.GetType().ToString()); 748Console.WriteLine("Drawing of type '" + d.GetType() + "' not handled.");
Roslyn.VisualStudio.Next.UnitTests (4)
Options\VisualStudioSettingsOptionPersisterTests.cs (1)
104=> (bool)array.GetType().GetMethod("get_IsDefault").Invoke(array, [])!;
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (3)
165analyzerReference.GetAnalyzers(project.Language).Where(a => a.GetType() == analyzerType).ToImmutableArray(), 199var analyzers = analyzerReference.GetAnalyzers(project.Language).Where(a => a.GetType() == analyzerType).ToImmutableArray(); 236analyzerReference.GetAnalyzers(project.Language).Where(a => a.GetType() == analyzerType).ToImmutableArray(),
SemanticSearch.BuildTask (1)
src\Compilers\Core\Portable\InternalUtilities\ExceptionUtilities.cs (1)
21string output = string.Format("Unexpected value '{0}' of type '{1}'", o, (o != null) ? o.GetType().FullName : "<unknown>");
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()}.");
StaticFilesAuth (1)
Startup.cs (1)
61throw new InvalidOperationException($"Unknown resource type '{context.Resource.GetType()}'");
System.CodeDom (13)
Microsoft\CSharp\CSharpCodeGenerator.cs (3)
616throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 753throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e)); 1242throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
System\CodeDom\Compiler\CodeGenerator.cs (3)
619throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 962throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 1474throw 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)); 461throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 655string message = SR.Format(SR.InvalidTypeName, typeName, propertyName, e.GetType().FullName); 664string message = SR.Format(SR.InvalidLanguageIdentifier, identifier, propertyName, e.GetType().FullName); 779throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 950throw 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.ComponentModel.Annotations (12)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
151(value != null ? value.GetType().ToString() : "null"),
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (2)
43Type valueType = value.GetType(); 69Debug.Assert(valueType == value.GetType(), "The valueType should equal the Type of the value");
System\ComponentModel\DataAnnotations\LengthAttribute.cs (1)
67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType()));
System\ComponentModel\DataAnnotations\MaxLengthAttribute.cs (2)
84throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType())); 127PropertyInfo? property = value.GetType().GetRuntimeProperty("Count");
System\ComponentModel\DataAnnotations\MinLengthAttribute.cs (1)
67throw new InvalidCastException(SR.Format(SR.LengthAttribute_InvalidValueType, value.GetType()));
System\ComponentModel\DataAnnotations\RangeAttribute.cs (3)
202Type operandType = minimum.GetType(); 239conversion = value => value.GetType() == type 245conversion = value => value.GetType() == type ? value : converter.ConvertFrom(value);
System\ComponentModel\DataAnnotations\ValidationContext.cs (1)
120public Type ObjectType => ObjectInstance.GetType();
System\ComponentModel\DataAnnotations\Validator.cs (1)
519var properties = TypeDescriptor.GetProperties(instance.GetType());
System.ComponentModel.Composition (36)
Microsoft\Internal\Collections\CollectionServices.CollectionOfObject.cs (1)
27if (typeof(IList).IsAssignableFrom(collectionObject.GetType()))
Microsoft\Internal\GenerationServices.cs (6)
85Type valueType = value.GetType(); 91valueType = rawValue.GetType(); 156SR.Format(SR.InvalidMetadataValue, value.GetType().FullName)); 222if (ReflectionServices.TryGetGenericInterfaceType(enumerable.GetType(), GenerationServices.s_iEnumerableTypeofT, out Type? closedType)) 252ilGenerator.Emit(OpCodes.Box, value!.GetType()); 269return value.GetType().IsValueType;
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (2)
41ReflectionComposablePartDefinition definition = AttributedModelDiscovery.CreatePartDefinition(attributedPart.GetType(), PartCreationPolicyAttribute.Shared, true, (ICompositionElement?)null); 52var mappedType = reflectionContext.MapType(IntrospectionExtensions.GetTypeInfo(attributedPart.GetType()));
System\ComponentModel\Composition\AttributedModel\AttributedPartCreationInfo.cs (1)
269if (exportAttribute.GetType() == CompositionServices.InheritedExportAttributeType)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
49throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType());
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
32return new ObjectDisposedException(instance.GetType().ToString());
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (1)
174$"{GetType().Name} (Path=\"{AppDomain.CurrentDomain.BaseDirectory}\") (PrivateProbingPath=\"{AppDomain.CurrentDomain.RelativeSearchPath}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (1)
541$"{GetType().Name} (Assembly=\"{Assembly.FullName}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
398throw new ObjectDisposedException(GetType().Name);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (4)
281Type attrType = attr.GetType(); 308if (value != null && !IsValidAttributeType(value.GetType())) 310throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_MetadataContainsValueWithInvalidType, pi.GetDisplayName(), value.GetType().GetDisplayName()); 385itemType = item.GetType();
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
725$"{GetType().Name} (Path=\"{_path}\")"; // NOLOC
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
361GetType().Name,
System\ComponentModel\Composition\MetadataViewGenerator.cs (2)
158if ((defaultAttribute.Value != null) && (defaultAttribute.Value.GetType().IsValueType)) 160IL.Emit(OpCodes.Box, defaultAttribute.Value.GetType());
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (3)
198collection!.GetType().FullName), 228collection.GetType().FullName), 245collection.GetType().FullName),
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (10)
24throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 37throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 51SR.Format(SR.ReflectionModel_InvalidExportDefinition, exportDefinition.GetType()), 66SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, importDefinition.GetType()), 81SR.Format(SR.ReflectionModel_InvalidParameterImportDefinition, importDefinition.GetType()), 97SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 119SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 310throw ExceptionBuilder.CreateReflectionModelInvalidPartDefinition(nameof(partDefinition), partDefinition.GetType()); 420SR.Format(SR.ReflectionModel_InvalidExportDefinition, export.GetType())); 446SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, import.GetType()));
System.ComponentModel.Composition.Registration (1)
System\ComponentModel\Composition\Registration\PartBuilder.cs (1)
239Type attrType = attr.GetType();
System.ComponentModel.Primitives (6)
System\ComponentModel\Component.cs (2)
127return GetType().FullName!; 130return s.Name + " [" + GetType().FullName + "]";
System\ComponentModel\Design\Serialization\DesignerSerializerAttribute.cs (1)
77_typeId = GetType().FullName + baseType;
System\ComponentModel\DesignerAttribute.cs (1)
108_typeId = GetType().FullName + baseType;
System\ComponentModel\DesignerCategoryAttribute.cs (1)
67public override object TypeId => GetType().FullName + Category;
System\ComponentModel\EditorAttribute.cs (1)
91_typeId = GetType().FullName + baseType;
System.ComponentModel.TypeConverter (104)
System\ComponentModel\ArrayConverter.cs (2)
22return SR.Format(SR.UsingResourceKeys() ? "{0} Array" : SR.Array, value.GetType().Name); 47Type arrayType = value.GetType();
System\ComponentModel\AttributeCollection.cs (2)
176Type aType = attribute.GetType(); 212Attribute? attr = this[attribute.GetType()];
System\ComponentModel\ComponentResourceManager.cs (2)
70ApplyResources(value, value.GetType(), objectName, culture); 85Type typeFromValue = value.GetType();
System\ComponentModel\Design\DesignerOptionService.cs (2)
478public override Type ComponentType => _option.GetType(); 482public override Type PropertyType => _option.GetType();
System\ComponentModel\Design\Serialization\RootDesignerSerializerAttribute.cs (1)
88_typeId = string.Concat(GetType().FullName, baseType);
System\ComponentModel\Design\ServiceContainer.cs (2)
83if (!(serviceInstance is ServiceCreatorCallback) && !serviceInstance.GetType().IsCOMObject && !serviceType.IsInstanceOfType(serviceInstance)) 193if (service != null && !service.GetType().IsCOMObject && !serviceType!.IsInstanceOfType(service))
System\ComponentModel\LicenseException.cs (1)
33public LicenseException(Type? type, object? instance) : this(type, null, SR.Format(SR.LicExceptionTypeAndInstance, type?.FullName, instance?.GetType().FullName))
System\ComponentModel\LicenseManager.cs (1)
104Type providerType = provider.GetType();
System\ComponentModel\LicenseProviderAttribute.cs (1)
84return GetType().FullName + typeName;
System\ComponentModel\MarshalByValueComponent.cs (2)
165return s.Name + " [" + GetType().FullName + "]"; 167return GetType().FullName;
System\ComponentModel\MaskedTextProvider.cs (2)
461if (GetType() == typeof(MaskedTextProvider)) 483clonedProvider = (Activator.CreateInstance(GetType(), parameters) as MaskedTextProvider)!;
System\ComponentModel\MemberDescriptor.cs (2)
254if (obj.GetType() != GetType())
System\ComponentModel\NullableConverter.cs (1)
60if (value == null || value.GetType() == UnderlyingType)
System\ComponentModel\ProvidePropertyAttribute.cs (1)
64public override object TypeId => GetType().FullName + PropertyName;
System\ComponentModel\ReflectEventDescriptor.cs (1)
193if (EventType != value.GetType())
System\ComponentModel\ReflectPropertyDescriptor.cs (6)
202if (_defaultValue != null && PropertyType.IsEnum && PropertyType.GetEnumUnderlyingType() == _defaultValue.GetType()) 302bool storedAsUnderlyingType = defaultValue != null && PropertyType.IsEnum && PropertyType.GetEnumUnderlyingType() == defaultValue.GetType(); 903Debug.WriteLine($"[{Name}]: GetValue({component?.GetType().Name ?? "(null)"})"); 931name ??= component.GetType().FullName; 1080Debug.WriteLine($"[{Name}]: SetValue({component?.GetType().Name ?? "(null)"}, {value?.GetType().Name ?? "(null)"})");
System\ComponentModel\ReflectTypeDescriptionProvider.cs (8)
263argTypes[idx] = arg.GetType(); 491return GetClassName(instance.GetType()); 510return GetConverter(instance.GetType(), instance); 536return GetEditor(instance.GetType(), instance, editorBaseType); 563Type componentType = instance.GetType(); 814return GetPropertyOwner(instance.GetType(), instance); 1254Type providerType = provider.GetType(); 1627return (converter.GetType() != typeof(TypeConverter));
System\ComponentModel\ReflectTypeDescriptionProvider.ReflectedTypeData.cs (1)
376Debug.Fail($"Editor {editor.GetType().FullName} is not an instance of {editorBaseType.FullName} but it is in that base types table.");
System\ComponentModel\RefreshEventArgs.cs (1)
18TypeChanged = componentChanged?.GetType();
System\ComponentModel\ToolboxItemFilterAttribute.cs (1)
81public override object TypeId => _typeId ??= GetType().FullName + FilterString;
System\ComponentModel\TypeConverter.cs (5)
194string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 195throw new NotSupportedException(SR.Format(SR.ConvertFromException, GetType().Name, valueTypeName)); 204string? valueTypeName = value == null ? (SR.UsingResourceKeys() ? "(null)" : SR.Null) : value.GetType().FullName; 205throw new NotSupportedException(SR.Format(SR.ConvertToException, GetType().Name, valueTypeName, destinationType.FullName)); 315if (value == null || CanConvertFrom(context, value.GetType()))
System\ComponentModel\TypeDescriptionProvider.cs (3)
196return GetReflectionType(instance.GetType(), instance); 270return GetTypeDescriptor(instance.GetType(), instance); 334return GetTypeDescriptorFromRegisteredType(instance.GetType(), instance);
System\ComponentModel\TypeDescriptor.cs (56)
1742Type type = instance.GetType(); 1853Type keyType = key as Type ?? key.GetType(); 2320Type type = component.GetType(); 2734Attribute? memberAttribute = member.Attributes[attribute.GetType()]; 2789throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance)); 3297Type type = instance.GetType(); 3446if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3448if (attrs == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3469if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3470string? name = desc.GetClassName() ?? _instance.GetType().FullName; 3491if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3512if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3514if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3530return rp.GetConverterFromRegisteredType(_instance.GetType(), _instance); 3534if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3536if (converter == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3557if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3577if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3599if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3619if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3621if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3640if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptorFromRegisteredType")); 3642if (events == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 3667if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3669if (evts == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 3689if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3691if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3710if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3712if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3737if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3739if (properties == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 3761if (desc == null) throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetExtendedTypeDescriptor")); 3809throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3812throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetAttributes")); 3836throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3861throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3887throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3890throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverter")); 3914throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3917throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetConverterFromRegisteredType")); 3942throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3968throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 3996throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4021throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4024throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4048throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptorFromRegisteredType")); 4051throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEventsFromRegisteredType")); 4076throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4079throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetEvents")); 4104throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4108throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4132throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4137throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetPropertiesFromRegisteredType")); 4162throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor")); 4165throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetProperties")); 4189throw new InvalidOperationException(SR.Format(SR.TypeDescriptorProviderError, _node.Provider.GetType().FullName, "GetTypeDescriptor"));
System.Composition.Convention (1)
System\Composition\Convention\PartConventionBuilder.cs (1)
478Type attrType = attr.GetType();
System.Composition.TypedParts (5)
System\Composition\CompositionContextExtensions.cs (2)
60var objType = objectWithLooseImports.GetType(); 81var importsSatisfiedMethods = objectWithLooseImports.GetType().GetRuntimeMethods().Where(m =>
System\Composition\TypedParts\ContractHelpers.cs (1)
66var attrType = attr.GetType();
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
112var valueType = ema.Value?.GetType() ?? typeof(object); 150var attrType = attribute.GetType();
System.Configuration.ConfigurationManager (31)
System\Configuration\ApplicationSettingsBase.cs (4)
406SettingChangingEventArgs e = new SettingChangingEventArgs(propertyName, this.GetType().FullName, SettingsKey, value, false); 510settingsProperty.Attributes[attribute.GetType()] = attribute; 547Type type = GetType(); 646_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)
211if (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)
280if (!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)
116Type currentType = traceSource.Switch.GetType();
System.Data.Common (161)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
312return Argument(SR.Format(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 328return InvalidCast(SR.Format(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 398return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 402return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
src\libraries\Common\src\System\Data\Common\DbConnectionPoolKey.cs (1)
44if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey))
System\Data\ColumnTypeConverter.cs (1)
113if (value != null && value.GetType() == typeof(string))
System\Data\Common\AdapterUtil.Common.cs (2)
368return CollectionIndexInt32(index, collection.GetType(), collection.Count); 408return CollectionIndexInt32(index, collection.GetType(), collection.Count);
System\Data\Common\BigIntegerStorage.cs (11)
64if (value.GetType() == typeof(BigInteger)) { return (BigInteger)value; } 65else if (value.GetType() == typeof(string)) { return BigInteger.Parse((string)value, formatProvider); } 66else if (value.GetType() == typeof(long)) { return (long)value; } 67else if (value.GetType() == typeof(int)) { return (int)value; } 68else if (value.GetType() == typeof(short)) { return (short)value; } 69else if (value.GetType() == typeof(sbyte)) { return (sbyte)value; } 70else if (value.GetType() == typeof(ulong)) { return (ulong)value; } 71else if (value.GetType() == typeof(uint)) { return (uint)value; } 72else if (value.GetType() == typeof(ushort)) { return (ushort)value; } 73else if (value.GetType() == typeof(byte)) { return (byte)value; } 74else { throw ExceptionBuilder.ConvertFailed(value.GetType(), typeof(System.Numerics.BigInteger)); }
System\Data\Common\DataAdapter.cs (1)
207DataAdapter clone = (DataAdapter)Activator.CreateInstance(GetType())!;
System\Data\Common\DbConnectionStringBuilder.cs (9)
316if ((GetType() != connectionStringBuilder.GetType()) || (CurrentValues.Count != connectionStringBuilder.CurrentValues.Count)) 437GetType(); 481vtype = value.GetType(); 524GetType(), vtype, false, useAttributes!); 564Attribute? attr = property.Attributes[attribute.GetType()]; 593GetType(); 602GetType(); 647GetType();
System\Data\Common\DbConnectionStringCommon.cs (1)
21throw ADP.ConvertFailed(value.GetType(), typeof(string), e);
System\Data\Common\DbProviderFactories.cs (1)
129string factoryTypeAssemblyQualifiedName = factory.GetType().AssemblyQualifiedName!;
System\Data\Common\ObjectStorage.cs (9)
74if (value!.GetType() == valueNo1.GetType()) 127Families Family1 = GetFamily(valueNo1.GetType()); 128Families Family2 = GetFamily(valueNo2.GetType()); 246Type valType = value.GetType(); 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); 1484Type leftType = value.GetType(); 1485Type rightType = _storage!.Get(record1).GetType(); 1523DataColumn clone = (DataColumn)Activator.CreateInstance(GetType())!; 1631(DataStorage.IsTypeCustomType(value.GetType()) && !(value is Type)); 1964Debug.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)!; 2282if (root.ChildNodes.Count == 0 || ((root.ChildNodes.Count == 1) && root.FirstChild!.GetType() == typeof(System.Xml.XmlText))) 3524if (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)
480SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName), 506SR.Format(SR.DataMerge_MissingConstraint, src.GetType().FullName, src.ConstraintName),
System\Data\PrimaryKeyTypeConverter.cs (1)
28Array.Empty<DataColumn>().GetType().Name :
System\Data\ProviderBase\SchemaMapping.cs (2)
702Type fieldType = chapterValue.GetType(); 1049Type fieldType = chapterValue.GetType();
System\Data\Select.cs (4)
662StorageType leftType = DataStorage.GetStorageType(vLeft.GetType()); 671StorageType rightType = DataStorage.GetStorageType(vRight.GetType()); 683BinaryNode.SetTypeMismatchError(expr._op, vLeft.GetType(), vRight.GetType());
System\Data\SQLTypes\SQLBinary.cs (1)
341throw ADP.WrongType(value!.GetType(), typeof(SqlBinary));
System\Data\SQLTypes\SQLBoolean.cs (1)
448throw ADP.WrongType(value!.GetType(), typeof(SqlBoolean));
System\Data\SQLTypes\SQLByte.cs (1)
457throw ADP.WrongType(value!.GetType(), typeof(SqlByte));
System\Data\SQLTypes\SQLDateTime.cs (1)
599throw ADP.WrongType(value!.GetType(), typeof(SqlDateTime));
System\Data\SQLTypes\SQLDecimal.cs (1)
3283throw ADP.WrongType(value!.GetType(), typeof(SqlDecimal));
System\Data\SQLTypes\SQLDouble.cs (1)
373throw ADP.WrongType(value!.GetType(), typeof(SqlDouble));
System\Data\SQLTypes\SQLGuid.cs (1)
264throw ADP.WrongType(value!.GetType(), typeof(SqlGuid));
System\Data\SQLTypes\SQLInt16.cs (1)
458throw ADP.WrongType(value!.GetType(), typeof(SqlInt16));
System\Data\SQLTypes\SQLInt32.cs (1)
473throw ADP.WrongType(value!.GetType(), typeof(SqlInt32));
System\Data\SQLTypes\SQLInt64.cs (1)
532throw ADP.WrongType(value!.GetType(), typeof(SqlInt64));
System\Data\SQLTypes\SQLMoney.cs (1)
527throw ADP.WrongType(value!.GetType(), typeof(SqlMoney));
System\Data\SQLTypes\SQLSingle.cs (1)
383throw ADP.WrongType(value!.GetType(), typeof(SqlSingle));
System\Data\SQLTypes\SQLString.cs (1)
848throw ADP.WrongType(value!.GetType(), typeof(SqlString));
System\Data\TypeLimiter.cs (1)
214throw new ObjectDisposedException(GetType().FullName);
System\Data\xmlsaver.cs (9)
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\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
312return Argument(SR.Format(SR.ADP_CollectionRemoveInvalidObject, itemType.Name, collection.GetType().Name)); 328return InvalidCast(SR.Format(SR.ADP_CollectionInvalidType, collection.Name, itemType.Name, invalidValue.GetType().Name)); 398return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name)); 402return Argument(SR.Format(SR.ADP_CollectionIsNotParent, parameterType.Name, collection.GetType().Name));
src\libraries\Common\src\System\Data\Common\DbConnectionPoolKey.cs (1)
44if (obj == null || obj.GetType() != typeof(DbConnectionPoolKey))
System\Data\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.Diagnostics.DiagnosticSource (8)
System\Diagnostics\DsesFilterAndTransform.cs (2)
417Type argType = args.GetType(); 681Type? objType = obj?.GetType();
System\Diagnostics\Metrics\AggregationManager.cs (2)
301Type aggregatorType = createAggregatorFunc.GetType().GenericTypeArguments[0]; 308Type type = instrument.GetType();
System\Diagnostics\Metrics\Meter.cs (1)
529if (instrument.GetType() == instrumentType && instrument.Unit == unit &&
System\Diagnostics\Metrics\MetricsEventSource.cs (3)
465beginInstrumentMeasurements: (i, state) => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 467endInstrumentMeasurements: (i, state) => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 469instrumentPublished: (i, state) => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description,
System.Diagnostics.Process (1)
System\Diagnostics\Process.cs (1)
99if (GetType() == typeof(Process))
System.Diagnostics.TraceSource (1)
System\Diagnostics\TraceUtils.cs (1)
34throw new ArgumentException(SR.Format(SR.AttributeNotSupported, key, parent.GetType().FullName));
System.Drawing.Common.Tests (23)
System\Drawing\IconConverterTests.cs (12)
39Assert.True(_icoConv.CanConvertFrom(null, _iconBytes.GetType()), "_iconBytes.GetType()"); 52Assert.True(_icoConvFrmTD.CanConvertFrom(null, _iconBytes.GetType()), "TD _iconBytes.GetType()"); 69Assert.True(_icoConv.CanConvertTo(null, _iconStr.GetType()), "_iconStr.GetType()"); 72Assert.True(_icoConv.CanConvertTo(null, _iconBytes.GetType()), "_iconBytes.GetType()"); 87Assert.True(_icoConvFrmTD.CanConvertTo(null, _iconStr.GetType()), "TD _iconStr.GetType()"); 90Assert.True(_icoConvFrmTD.CanConvertTo(null, _iconBytes.GetType()), "TD _iconBytes.GetType()"); 138byte[] newIconBytes = (byte[])_icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, _iconBytes.GetType()); 141newIconBytes = (byte[])_icoConv.ConvertTo(_icon, _iconBytes.GetType()); 145Assert.Throws<NotSupportedException>(() => _icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, _icon.GetType())); 155newIconBytes = (byte[])_icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, _iconBytes.GetType()); 158newIconBytes = (byte[])_icoConvFrmTD.ConvertTo(_icon, _iconBytes.GetType()); 162Assert.Throws<NotSupportedException>(() => _icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, _icon.GetType()));
System\Drawing\ImageConverterTests.cs (11)
63Assert.True(_imgConv.CanConvertFrom(null, _imageBytes.GetType()), "_imageBytes.GetType()"); 78Assert.True(_imgConvFrmTD.CanConvertFrom(null, _imageBytes.GetType()), "TD _imageBytes.GetType()"); 95Assert.True(_imgConv.CanConvertTo(null, _imageStr.GetType()), "_imageStr.GetType()"); 98Assert.True(_imgConv.CanConvertTo(null, _imageBytes.GetType()), "_imageBytes.GetType()"); 109Assert.True(_imgConvFrmTD.CanConvertTo(null, _imageStr.GetType()), "TD _imageStr.GetType()"); 112Assert.True(_imgConvFrmTD.CanConvertTo(null, _imageBytes.GetType()), "TD _imageBytes.GetType()"); 175byte[] newImageBytes = (byte[])_imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType()); 178newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, _imageBytes.GetType()); 181newImageBytes = (byte[])_imgConvFrmTD.ConvertTo(_image, _imageBytes.GetType()); 198Assert.Throws<NotSupportedException>(() => _imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, _image.GetType())); 207Assert.Throws<NotSupportedException>(() => _imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, _image.GetType()));
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
40WriteEnumeratedValue(tag?.AsPrimitive() ?? Asn1Tag.Enumerated, value.GetType(), value);
System\Formats\Asn1\AsnWriter.NamedBitList.cs (1)
44WriteNamedBitList(tag, value.GetType(), value);
System.Formats.Nrbf (1)
System\Formats\Nrbf\NullsRecord.cs (1)
15public override TypeName TypeName => TypeName.Parse(GetType().Name.AsSpan());
System.IO.Compression (16)
System\IO\Compression\DeflateZLib\DeflateStream.cs (6)
279if (GetType() != typeof(DeflateStream)) 411if (GetType() != typeof(DeflateStream)) 512if (GetType() != typeof(DeflateStream)) 527if (GetType() != typeof(DeflateStream)) 750return GetType() == typeof(DeflateStream) ? 818if (GetType() != typeof(DeflateStream))
System\IO\Compression\GZipStream.cs (6)
100if (GetType() != typeof(GZipStream)) 128if (GetType() != typeof(GZipStream)) 144if (GetType() != typeof(GZipStream)) 182if (GetType() != typeof(GZipStream)) 207if (GetType() != typeof(GZipStream)) 229if (GetType() != typeof(GZipStream))
System\IO\Compression\ZipArchiveEntry.cs (1)
1225throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System\IO\Compression\ZipCustomStreams.cs (3)
72throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 275throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName); 480throw new ObjectDisposedException(GetType().ToString(), SR.HiddenStreamName);
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (1)
221GetType() != typeof(IsolatedStorageFileStream) ? base.DisposeAsync() :
System.IO.Pipelines (1)
System\IO\Pipelines\PipeAwaitable.cs (1)
132if (sc != null && sc.GetType() != typeof(SynchronizationContext))
System.Linq (2)
System\Linq\Enumerable.cs (2)
50if (source.GetType() == typeof(TSource[])) 54else if (source.GetType() == typeof(List<TSource>))
System.Linq.Expressions (25)
System\Dynamic\DynamicMetaObject.cs (2)
87return Value?.GetType(); 294throw System.Linq.Expressions.Error.InvalidMetaObjectCreated(ido.GetType());
System\Dynamic\DynamicMetaObjectBinder.cs (2)
103throw System.Linq.Expressions.Error.DynamicObjectResultNotAssignable(body.Type, target.Value.GetType(), this, expectedResult); 118throw System.Linq.Expressions.Error.DynamicBindingNeedsRestrictions(target.Value!.GetType(), this);
System\Dynamic\DynamicObject.cs (3)
588this.Value.GetType(), 589binder.GetType(), 816MemberInfo[] methods = Value.GetType().GetMember(method.Name, MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance);
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (2)
568EmitConstant(value, value.GetType()); 594Type siteType = site.GetType();
System\Linq\Expressions\ConstantExpression.cs (2)
33return Value.GetType(); 113Type valueType = value.GetType();
System\Linq\Expressions\DebugViewWriter.cs (1)
1129Out($".Extension<{node.GetType()}>");
System\Linq\Expressions\DynamicExpression.cs (1)
24Debug.Assert(delegateType.GetInvokeMethod().GetReturnType() == typeof(object) || GetType() != typeof(DynamicExpression));
System\Linq\Expressions\Error.cs (1)
1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System\Linq\Expressions\ExpressionStringBuilder.cs (3)
361else if (sValue == node.Value.GetType().ToString()) 783MethodInfo toString = node.GetType().GetMethod("ToString", Type.EmptyTypes)!; 793Out(node.NodeType == ExpressionType.Extension ? node.GetType().FullName : node.NodeType.ToString());
System\Linq\Expressions\Interpreter\Instruction.cs (1)
35o!.GetType();
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
121Type exceptionType = unwrappedException.GetType();
System\Linq\Expressions\Interpreter\TypeOperations.cs (2)
108frame.Push((object?)obj?.GetType() == type); 303Type valueType = value.GetType();
System\Linq\Expressions\MethodCallExpression.cs (1)
1363!(TypeUtils.IsSameOrSubclass(typeof(LambdaExpression), pType) && pType.IsAssignableFrom(arg.GetType())))
System\Linq\Expressions\TypeBinaryExpression.cs (1)
148return Utils.Constant(TypeOperand.GetNonNullableType() == ce.Value.GetType());
System\Runtime\CompilerServices\CallSiteHelpers.cs (2)
14private static readonly Type s_knownNonDynamicMethodType = typeof(object).GetMethod(nameof(ToString))!.GetType(); 32if (mb.Name == CallSite.CallSiteTargetMethodName && mb.GetType() != s_knownNonDynamicMethodType)
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (1)
207Type t = GetPublicType(sq.Enumerable.GetType());
System\Linq\Queryable.cs (1)
36Type? enumType = TypeHelper.FindGenericType(typeof(IEnumerable<>), source.GetType());
System.Memory.Data (4)
System\BinaryData.cs (4)
85/// <param name="type">The type to use when serializing the data. If not specified, <see cref="object.GetType"/> will 91JsonSerializer.SerializeToUtf8Bytes(jsonSerializable, type ?? jsonSerializable?.GetType() ?? typeof(object), options), 104/// <param name="type">The type to use when serializing the data. If not specified, <see cref="object.GetType"/> will 108JsonSerializer.SerializeToUtf8Bytes(jsonSerializable, type ?? jsonSerializable?.GetType() ?? typeof(object), context),
System.Net.Http (36)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Http\ByteArrayContent.cs (2)
49GetType() == typeof(ByteArrayContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 68GetType() == typeof(ByteArrayContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System\Net\Http\FormUrlEncodedContent.cs (2)
92GetType() == typeof(FormUrlEncodedContent) ? SerializeToStreamAsyncCore(stream, cancellationToken) : 96GetType() == typeof(FormUrlEncodedContent) ? CreateMemoryStreamForByteArray() : // type check ensures we use possible derived type's CreateContentReadStreamAsync override
System\Net\Http\Headers\HttpHeaders.cs (10)
447Debug.Assert(parsedValue.GetType() == value.GetType(), 463Debug.Assert(item.GetType() == value.GetType(), 525Debug.Assert(parsedValue.GetType() == value.GetType(), 537Debug.Assert(item.GetType() == value.GetType(), 557Debug.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)
296throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpContent), nameof(SerializeToStream)));
System\Net\Http\HttpMessageHandler.cs (1)
24throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpMessageHandler), nameof(Send)));
System\Net\Http\HttpRequestMessage.cs (1)
163sb.Append(_content == null ? "<null>" : _content.GetType().ToString());
System\Net\Http\HttpResponseMessage.cs (1)
192sb.Append(_content == null ? "<null>" : _content.GetType().ToString());
System\Net\Http\MultipartContent.cs (2)
197GetType() == typeof(MultipartContent) ? SerializeToStreamAsyncCore(stream, context, cancellationToken) : 246GetType() == typeof(MultipartContent) ? CreateContentReadStreamAsyncCore(async: true, cancellationToken).AsTask() :
System\Net\Http\MultipartFormDataContent.cs (1)
69GetType() == typeof(MultipartFormDataContent) ? SerializeToStreamAsyncCore(stream, context, cancellationToken) :
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
407if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, $"Exception from {_proxy.GetType().Name}.GetProxy({request.RequestUri}): {ex}");
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (1)
44Debug.Fail($"DrainAsync should not be called for this response stream: {GetType()}");
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
585throw 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.HttpListener (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.Mail (7)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.NameResolution (6)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\NameResolutionTelemetry.cs (1)
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\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\IPEndPoint.cs (3)
160throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 166throw new ArgumentException(SR.Format(SR.net_InvalidSocketAddressSize, socketAddress.GetType().FullName, GetType().FullName), nameof(socketAddress));
System.Net.Quic (9)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Quic\QuicConnection.cs (3)
385throw new ArgumentException(SR.Format(SR.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options)); 677Exception 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)
433_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System.Net.Requests (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.Security (8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
30_trace = "WARNING! GC-ed >>" + this.GetType().ToString() + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\DebugSafeHandleZeroOrMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Security\SslStream.Protocol.cs (1)
282if (certificate.GetType() == typeof(X509Certificate2))
System.Net.Sockets (12)
src\libraries\Common\src\System\Net\DebugSafeHandleMinusOneIsInvalid.cs (1)
19_trace = "WARNING! GC-ed >>" + this.GetType().FullName + "<< (should be explicitly closed) \r\n";
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System\Net\Sockets\NetworkStream.cs (2)
252if (GetType() != typeof(NetworkStream)) 324if (GetType() != typeof(NetworkStream))
System\Net\Sockets\Socket.Unix.cs (1)
167throw new ObjectDisposedException(GetType().FullName);
System\Net\Sockets\SocketAsyncContext.Unix.cs (1)
2292public 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 (5)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (5)
112public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; 137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; 143return $"{c.GetType().Name}({c.Count})"; 149return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; 161if (toString == null || toString == value.GetType().FullName)
System.Net.WebSockets.Client (2)
System\Net\WebSockets\ClientWebSocket.cs (2)
111throw new ObjectDisposedException(GetType().FullName); 141throw new ObjectDisposedException(GetType().FullName);
System.Numerics.Tensors (6)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (3)
85if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 179if (array.GetType().GetElementType() != typeof(T)) 227if (array.GetType().GetElementType() != typeof(T))
System\Numerics\Tensors\netcore\TensorSpan.cs (3)
87if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 181if (array.GetType().GetElementType() != typeof(T)) 231if (array.GetType().GetElementType() != typeof(T))
System.Private.CoreLib (287)
src\libraries\System.Private.CoreLib\src\System\Array.cs (2)
1086if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 1116if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Attribute.cs (8)
26if (this.GetType() != obj.GetType()) 29Type thisType = this.GetType(); 57Type type = GetType(); 72if (fieldValue != null && !fieldValue.GetType().IsArray) 97Type thisValueType = thisValue.GetType(); 102if (!thisValueType.Equals(thatValue.GetType())) 138public virtual object TypeId => GetType();
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (2)
22if (src.GetType() != typeof(byte[])) 33if (dst.GetType() != typeof(byte[]))
src\libraries\System.Private.CoreLib\src\System\CodeDom\Compiler\IndentedTextWriter.cs (1)
68GetType() != typeof(IndentedTextWriter) ? FlushAsync() :
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (1)
2564_isArrayList = (list.GetType() == typeof(ArrayList));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Comparer.cs (12)
71obj != null && GetType() == obj.GetType(); 74GetType().GetHashCode(); 106obj != null && GetType() == obj.GetType(); 109GetType().GetHashCode(); 124obj != null && GetType() == obj.GetType(); 127GetType().GetHashCode(); 142obj != null && GetType() == obj.GetType(); 145GetType().GetHashCode();
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (2)
117if (enumerable.GetType() == typeof(Dictionary<TKey, TValue>)) 162else if (enumerable.GetType() == typeof(List<KeyValuePair<TKey, TValue>>))
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\EqualityComparer.cs (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\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
209Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
139Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
174if (ReferenceEquals(value.GetType(), targetType)) 219throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, value.GetType().FullName, targetType.FullName)); 244if (value.GetType() == conversionType)
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
87argTypes[i] = args[i]!.GetType(); 221if (argTypes[index] == null || !CanChangePrimitive(args[index]!.GetType(), pCls)) 259if (argTypes[j] == null || !CanChangePrimitive(args[j]?.GetType(), paramArrayType)) 467valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Diagnostics\CodeAnalysis\DynamicallyAccessedMembersAttribute.cs (1)
21/// <see cref="object.GetType"/> on instances of that class, interface, or struct.
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (1)
416Type underlyingType = Enum.GetUnderlyingType(data.GetType());
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (6)
766Type myType = this.GetType(); 2123if ((arg != null && !pType.IsAssignableFrom(arg.GetType())) 2873m_rawManifest = CreateManifestAndDescriptors(this.GetType(), Name, this); 3166if (source?.GetType() == typeof(NativeRuntimeEventSource)) 4248if (eventSource.GetType() == typeof(NativeRuntimeEventSource)) 4266if (eventSource.GetType() == typeof(NativeRuntimeEventSource))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\XplatEventLogger.cs (1)
171if (eventData.EventSource.GetType() == typeof(NativeRuntimeEventSource))
src\libraries\System.Private.CoreLib\src\System\Enum.cs (18)
403if (GetType() != flag.GetType() && !GetType().IsEquivalentTo(flag.GetType())) 404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1150Type valueType = value.GetType(); 1198if (this.GetType() != obj.GetType()) 1288if (GetType() != target.GetType()) 1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1356RuntimeType enumType = (RuntimeType)GetType(); 1404RuntimeType enumType = (RuntimeType)GetType(); 1631Type valueType = value.GetType(); 1689RuntimeType enumType = (RuntimeType)GetType(); 2211Type valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
202public new Type GetType() => base.GetType();
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (2)
170_isInherited = GetType() != typeof(CultureInfo); 211_isInherited = GetType() != typeof(CultureInfo);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (1)
1168if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (1)
2109if (Calendar.GetType() != typeof(JapaneseCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
3955if (dtfi.Calendar.GetType() != typeof(GregorianCalendar))
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
95throw new TypeInitializationException(this.GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
51throw new TypeInitializationException(GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
52throw new TypeInitializationException(GetType().ToString(), e);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
58_isMemoryStream = _stream.GetType() == typeof(MemoryStream);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (2)
87if (GetType() == typeof(BinaryWriter)) 386if (GetType() == typeof(BinaryWriter))
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
347if (GetType() != typeof(MemoryStream)) 442if (GetType() != typeof(MemoryStream)) 477if (GetType() != typeof(MemoryStream)) 623if (GetType() != typeof(MemoryStream))
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
39=> fileStream.GetType() == typeof(FileStream)
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (3)
61ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 95ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name); 999ThrowHelper.ThrowObjectDisposedException_StreamClosed(destination.GetType().Name);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (9)
363GetType() == typeof(StreamReader) ? ReadSpan(buffer) : 445if (GetType() != typeof(StreamReader)) 892if (GetType() != typeof(StreamReader)) 1020if (GetType() != typeof(StreamReader)) 1064if (GetType() != typeof(StreamReader)) 1080if (GetType() != typeof(StreamReader)) 1275if (GetType() != typeof(StreamReader)) 1291if (GetType() != typeof(StreamReader)) 1407void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_ReaderClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (27)
165Debug.Assert(GetType() == typeof(NullStreamWriter)); 245GetType() != typeof(StreamWriter) ? 252Debug.Assert(GetType() == typeof(StreamWriter)); 386if (GetType() == typeof(StreamWriter)) 488if (GetType() == typeof(StreamWriter)) 517if (GetType() == typeof(StreamWriter)) 529if (GetType() == typeof(StreamWriter)) 542if (GetType() == typeof(StreamWriter)) 555if (GetType() == typeof(StreamWriter)) 576if (GetType() == typeof(StreamWriter)) 588if (GetType() == typeof(StreamWriter)) 600if (GetType() == typeof(StreamWriter)) 613if (GetType() == typeof(StreamWriter)) 626if (GetType() == typeof(StreamWriter)) 644if (GetType() == typeof(StreamWriter)) 660if (GetType() != typeof(StreamWriter)) 708if (GetType() != typeof(StreamWriter)) 744if (GetType() != typeof(StreamWriter)) 760if (GetType() != typeof(StreamWriter)) 822if (GetType() != typeof(StreamWriter)) 842if (GetType() != typeof(StreamWriter)) 867if (GetType() != typeof(StreamWriter)) 896if (GetType() != typeof(StreamWriter)) 912if (GetType() != typeof(StreamWriter)) 933if (GetType() != typeof(StreamWriter)) 948if (GetType() != typeof(StreamWriter)) 1016void ThrowObjectDisposedException() => throw new ObjectDisposedException(GetType().Name, SR.ObjectDisposed_WriterClosed);
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (1)
117if (GetType() != typeof(StringReader))
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (6)
108if (GetType() != typeof(StringWriter)) 142if (GetType() != typeof(StringWriter)) 160if (GetType() != typeof(StringWriter)) 179if (GetType() != typeof(StringWriter)) 229if (GetType() != typeof(StringWriter)) 264if (GetType() != typeof(StringWriter))
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (2)
344if (GetType() == typeof(UnmanagedMemoryStream)) 612if (GetType() == typeof(UnmanagedMemoryStream))
src\libraries\System.Private.CoreLib\src\System\Memory.cs (4)
47if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 65if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 97if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 286if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (3)
33if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 55if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 82if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Object.cs (1)
42return GetType().ToString();
src\libraries\System.Private.CoreLib\src\System\Random.cs (3)
33_impl = GetType() == typeof(Random) ? new XoshiroImpl() : new CompatDerivedImpl(this); 44_impl = GetType() == typeof(Random) ? new CompatSeedImpl(Seed) : new CompatDerivedImpl(this, Seed); 208if ((impl is null || impl.GetType() == typeof(XoshiroImpl)) &&
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
208if (typeof(T) == typeof(char) && tmpObject.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
423else if (!ReferenceEquals(arg.GetType(), sigType))
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
31_argumentType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (2)
375else if (!ReferenceEquals(value.GetType(), _fieldInfo.FieldType)) 486throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, fieldInfo.Name, fieldInfo.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
108Debug.Assert(dstObject.GetType() == dstType);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (3)
333Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 374else if (!ReferenceEquals(arg.GetType(), sigType)) 395ReferenceEquals(sigElementType, arg.GetType()))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (2)
451Debug.Assert(((RuntimeType)copyOfParameters[i]!.GetType()).IsNullableOfT); 476else if (!ReferenceEquals(arg.GetType(), sigType))
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvokerCommon.cs (1)
99throw new TargetException(SR.Format(SR.RFLCT_Targ_ITargMismatch_WithType, method.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionContext.cs (1)
18return MapType(value.GetType().GetTypeInfo());
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (2)
87if (graph.GetType() != type) 88throw new BadImageFormatException(SR.Format(SR.BadImageFormat_ResType_SerBlobMismatch, type.FullName, graph.GetType().FullName));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncMethodBuilderCore.cs (1)
93Type stateMachineType = stateMachine.GetType();
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (2)
233AsyncMethodBuilderCore.LogTraceOperationBegin(box, stateMachine.GetType()); 342Debug.Assert(m_stateObject is null or ExecutionContext, $"Expected {nameof(m_stateObject)} to be null or an ExecutionContext but was {(m_stateObject is object o ? o.GetType().ToString() : "(null)")}.");
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (1)
507provider.GetType() != typeof(CultureInfo) && // optimization to avoid GetFormat in the majority case
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
37if (typeof(T[]) == array.GetType()) 54dest = Unsafe.As<T[]>(Array.CreateInstanceFromArrayType(array.GetType(), length));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (2)
86if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext)) 130if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
37Debug.Assert(typeof(T[]) == list._items.GetType(), "Implementation depends on List<T> always using a T[] and not U[] where U : T.");
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
133if (target.GetType() == typeof(string))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (2)
94return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true); 101return SizeOfHelper((RuntimeType)structure.GetType(), throwIfNotMarshalable: true);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (2)
278(typeof(T) == typeof(char) && obj.GetType() == typeof(string)) 609if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (1)
118Internal.Console.WriteLine($"{Environment.NewLine}*** #{count} {GetType()} (0x{handle.ToInt64():x}) finalized! Ctor stack:{Environment.NewLine}{_ctorStackTrace}{Environment.NewLine}");
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
270public override string ToString() => $"\"{Name}\" {GetType()} #{_id}"; 407if (stream.GetType() == typeof(MemoryStream) && ((MemoryStream)stream).TryGetBuffer(out ArraySegment<byte> memoryStreamBuffer))
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
149AddValue(name, value, value.GetType());
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (5)
102RuntimeType valueType = (RuntimeType)value.GetType(); 209RuntimeType valueType = (RuntimeType)value.GetType(); 822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 913Debug.Assert(type.IsEquivalentTo(value.GetType()));
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.T.cs (1)
54string display = $"{GetType().Name}, Count = {values.Length}";
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasickNode.cs (1)
42if (children.GetType() == typeof(int[]))
src\libraries\System.Private.CoreLib\src\System\Span.cs (2)
46if (!typeof(T).IsValueType && array.GetType() != typeof(T[])) 75if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
925if (values.GetType() == typeof(List<string?>)) // avoid accidentally bypassing a derived type's reimplementation of IEnumerable<T>
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
242throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (3)
1099SR.Format(SR.Argument_EncodingConversionOverflowBytes, _codePage, EncoderFallback.GetType()), "bytes"); 1127SR.Format(SR.Argument_EncodingConversionOverflowChars, _codePage, DecoderFallback.GetType()), "chars"); 1439_encoder.Encoding.EncodingName, _encoder.Fallback!.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (1)
465ThrowHelper.ThrowObjectDisposedException_StreamClosed(GetType().Name);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (3)
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\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\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (1)
873GetType() != typeof(UTF8Encoding) ? new ReadOnlySpan<byte>(GetPreamble()) : // in case a derived UTF8Encoding overrode GetPreamble
src\libraries\System.Private.CoreLib\src\System\Threading\AsyncLocal.cs (1)
105Debug.Assert(asyncLocalValueMap == Empty || asyncLocalValueMap.GetType() != typeof(EmptyAsyncLocalValueMap));
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
309return Task.FromException(new ObjectDisposedException(GetType().FullName, SR.CancellationTokenSource_Disposed));
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
139if (userData.GetType() == typeof(object[])) 165if (userData.GetType() == typeof(object[]))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
551if (m_pair.CompletionRequested) throw new InvalidOperationException(GetType().ToString());
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
136sc.GetType() != typeof(SynchronizationContext))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (3)
2502if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 2575if (SynchronizationContext.Current is SynchronizationContext syncCtx && syncCtx.GetType() != typeof(SynchronizationContext)) 6727if (tasks.GetType() == typeof(List<TTask>))
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (1)
611if (ctx != null && ctx.GetType() != typeof(SynchronizationContext)) return false;
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (1)
132if (pinData is object[] objArray && objArray.GetType() == typeof(object[]))
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 458throw new ObjectDisposedException(instance?.GetType().FullName);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (4)
21public new Type GetType() => base.GetType(); 477return o.GetType().TypeHandle; 489cls[i] = args[i].GetType(); 602public virtual bool IsInstanceOfType([NotNullWhen(true)] object? o) => o == null ? false : IsAssignableFrom(o.GetType());
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (2)
28Type valueType = value.GetType(); 73Type valueType = value.GetType();
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (1)
30RuntimeType targetType = (RuntimeType)target.GetType();
src\libraries\System.Private.CoreLib\src\System\WeakReference.cs (1)
223Debug.Assert(this.GetType() != typeof(WeakReference));
src\System\Array.CoreCLR.cs (5)
45if (sourceArray.GetType() != destinationArray.GetType() && sourceArray.Rank != destinationArray.Rank) 67if (sourceArray.GetType() == destinationArray.GetType() 684RuntimeType arrayType = (RuntimeType)GetType();
src\System\Attribute.CoreCLR.cs (5)
257Type objType = objAttr[i]!.GetType(); 285Type objType = objAttr[i]!.GetType(); 351Type objType = objAttr[i].GetType(); 373Type attrType = attributes[i].GetType(); 401Type attrType = attributes[i].GetType();
src\System\Delegate.CoreCLR.cs (10)
48if (!BindToMethodName(target, (RuntimeType)target.GetType(), method, 83RuntimeMethodInfo invoke = (RuntimeMethodInfo)RuntimeType.GetMethodBase((RuntimeType)this.GetType(), method)!; 154return (_target != null ? RuntimeHelpers.GetHashCode(_target) * 33 : 0) + GetType().GetHashCode(); 156return GetType().GetHashCode(); 189for (currentType = _target!.GetType(); currentType != null; currentType = currentType.BaseType) 205|| _target.GetType().IsCOMObject 211MethodInfo invoke = this.GetType().GetMethod("Invoke")!; 244if (!d.BindToMethodName(target, (RuntimeType)target.GetType(), method, 444if (a.GetType() == b.GetType())
src\System\Enum.CoreCLR.cs (1)
116Debug.Assert(values!.GetType() == typeof(TStorage[]));
src\System\MulticastDelegate.CoreCLR.cs (2)
170MulticastDelegate result = Unsafe.As<MulticastDelegate>(RuntimeTypeHandle.InternalAllocNoChecks((RuntimeType)GetType())); 530RuntimeType reflectedType = (RuntimeType)GetType();
src\System\Reflection\Emit\CustomAttributeBuilder.cs (6)
112VerifyTypeAndPassedObjectType(paramTypes[i], constructorArg.GetType(), $"{nameof(constructorArgs)}[{i}]"); 173VerifyTypeAndPassedObjectType(propType, propertyValue.GetType(), $"{nameof(propertyValues)}[{i}]"); 225VerifyTypeAndPassedObjectType(fldType, fieldValue.GetType(), $"{nameof(fieldValues)}[{i}]"); 420throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 488Type ot = value == null ? typeof(string) : value is Type ? typeof(Type) : value.GetType(); 503typename = value.GetType().ToString();
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
188Type type = value.GetType();
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
399Type type = pca.GetType(); 1569type = (RuntimeType)value.GetType();
src\System\Runtime\CompilerServices\CastHelpers.cs (1)
457if (array.GetType() == typeof(object[]))
src\System\Runtime\InteropServices\DynamicInterfaceCastableHelpers.cs (2)
20throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType)); 30throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, castable.GetType(), interfaceType));
src\System\RuntimeType.CoreCLR.cs (2)
3761RuntimeType srcType = pointer != null ? pointer.GetPointerType() : (RuntimeType)value.GetType(); 3897argsType[i] = arg.GetType();
src\System\StubHelpers.cs (6)
913Type elementType = pManagedHome.GetType().GetElementType()!; 1099int allocSize = Marshal.SizeOfHelper((RuntimeType)pManagedHome.GetType(), false); 1111layoutType = pManagedHome.GetType(); 1128if (pManagedHome.GetType().IsArray) 1145else if (pManagedHome.GetType().IsLayoutSequential || pManagedHome.GetType().IsExplicitLayout)
src\System\ValueType.cs (4)
34if (GetType() != obj.GetType()) 49FieldInfo[] thisFields = GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); 170return this.GetType().ToString();
System.Private.DataContractSerialization (52)
System\Runtime\Serialization\CodeGenerator.cs (3)
187return var.GetType(); 696throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CanOnlyStoreIntoArgOrLocGot0, DataContract.GetClrTypeFullName(var.GetType()))); 800Type valueType = o.GetType();
System\Runtime\Serialization\DataContract.cs (4)
171throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 178throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 185throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 190throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType)));
System\Runtime\Serialization\DataContractSerializer.cs (3)
374Type graphType = (graph == null) ? declaredType : graph.GetType(); 515return (graph == null) ? _rootType : graph.GetType(); 531objType = obj != null ? obj.GetType() : Globals.TypeOfObject;
System\Runtime\Serialization\ExtensionDataReader.cs (1)
635type = dataNode.Value.GetType();
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (2)
425return (graph == null) ? _rootType : graph.GetType(); 498Type graphType = (graph == null) ? declaredType : graph.GetType();
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
223Type traditionalDataContractType = traditionalDataContract.GetType();
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
81ReflectionJsonClassWriter.ReflectionWriteValue(jsonWriter, context, dictionaryValueType ?? value.GetType(), value, false, primitiveContractForParamType: null);
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
1430else if (value.GetType().IsArray)
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (3)
316SR.Format(SR.JsonDuplicateMemberInInput, DataContract.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex])); 337SR.JsonOneRequiredMemberNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString())); 342SR.JsonRequiredMembersNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()));
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (5)
312DataContract dc = GetDataContract(dataNode.Value.GetType()); 322Type contractType = contract.GetType(); 325throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.XmlObjectAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 330throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CollectionAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 339Type objType = obj.GetType();
System\Runtime\Serialization\PrimitiveDataContract.cs (2)
128Type thisType = GetType(); 129Type otherType = other.GetType();
System\Runtime\Serialization\ReflectionClassWriter.cs (4)
62ReflectionInternalSerialize(xmlWriter, context, memberValue, memberValue.GetType().TypeHandle.Equals(memberType.TypeHandle), writeXsiType, memberType); 77memberType = memberValue.GetType(); 102ReflectionInternalSerialize(xmlWriter, context, memberValue!, memberValue!.GetType().TypeHandle.Equals(memberType.TypeHandle), writeXsiType, memberType, originValueIsNullableOfT); 154Type type = obj.GetType();
System\Runtime\Serialization\ReflectionReader.cs (2)
441Type objType = obj.GetType(); 584Type collectionType = resultCollectionObject.GetType();
System\Runtime\Serialization\XmlObjectSerializer.cs (1)
465return graph?.GetType();
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
367string oldType = (oldObj != null) ? DataContract.GetClrTypeFullName(oldObj.GetType()) : SR.UnknownNullType; 368string newType = (newObj != null) ? DataContract.GetClrTypeFullName(newObj.GetType()) : SR.UnknownNullType;
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (11)
100SerializeWithXsiType(xmlWriter, obj, obj.GetType().TypeHandle, null/*type*/, -1, declaredType.TypeHandle, declaredType); 109RuntimeTypeHandle objTypeHandle = obj.GetType().TypeHandle; 383throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotSerializeObjectWithCycles, DataContract.GetClrTypeFullName(obj.GetType()))); 446return obj.GetType().TypeHandle.Equals(memberType.TypeHandle); 499throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownXmlType, DataContract.GetClrTypeFullName(obj.GetType()))); 517Type objType = obj.GetType(); 606throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedFalse, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 616throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 621throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 731InternalSerialize(xmlWriter, o, false /*isDeclaredType*/, false /*writeXsiType*/, -1, o.GetType().TypeHandle); 748Type declaredType = (dataNode.DataContractName == null) ? o.GetType() : Globals.TypeOfObject;
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
223RuntimeTypeHandle objTypeHandle = isDeclaredType ? declaredTypeHandle : obj.GetType().TypeHandle;
System\Runtime\Serialization\XmlSerializableWriter.cs (3)
27throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableMissingEndElements, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 56throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 64throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType()))));
System\Runtime\Serialization\XmlWriterDelegator.cs (1)
279WriteAnyType(value, value.GetType());
System\Xml\XmlBaseWriter.cs (1)
1225else if (value.GetType().IsArray)
System.Private.Uri (7)
System\Uri.cs (2)
1600throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, GetType())); 2636throw new UriFormatException(SR.Format(SR.net_uri_PortOutOfRange, _syntax.GetType(), portStr));
System\UriExt.cs (1)
445throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));
System\UriScheme.cs (3)
74throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, uri._syntax.GetType())); 101throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType())); 144throw new InvalidOperationException(SR.Format(SR.net_uri_UserDrivenParsing, this.GetType()));
System\UriSyntax.cs (1)
232Type type = this.GetType();
System.Private.Windows.Core (13)
System\DisposalTracking.cs (1)
57throw new InvalidOperationException($"Did not dispose `{GetFriendlyTypeName(GetType())}`. Originating stack:\n{_originatingStack}");
System\Private\Windows\Core\BinaryFormat\BinaryFormatWriter.cs (4)
294Type type = primitive.GetType(); 403Type type = list.GetType(); 506PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(array.GetType().GetElementType()!); 679Type type = value.GetType();
System\Private\Windows\Core\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (1)
35Type elementType = _arrayOfClassRecords.GetType();
System\Private\Windows\Core\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
86Type type = value.GetType();
System\Private\Windows\Core\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (1)
94|| (Deserializer.IncompleteObjects.Contains(valueRecord) && value.GetType().IsValueType));
System\Private\Windows\Core\BinaryFormat\Deserializer\PendingSerializationInfo.cs (1)
33Type type = @object.GetType();
System\Private\Windows\Core\BinaryFormat\Deserializer\SerializationInfoValueUpdater.cs (1)
24_info.UpdateValue(_name, newValue, newValue.GetType());
System\Private\Windows\Core\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
33PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(value.GetType());
System\Value.cs (1)
52type = _object.GetType();
Windows\Win32\System\Com\ComHelpers.cs (1)
109Debug.WriteLine($"Did not find IUnknown for {@object.GetType().Name}. {ex.Message}");
System.Private.Windows.Core.Tests (30)
System\Value\StoringBoolean.cs (2)
165Assert.Equal(typeof(bool), o.GetType()); 171Assert.Equal(typeof(bool), o.GetType());
System\Value\StoringByte.cs (2)
136Assert.Equal(typeof(byte), o.GetType()); 142Assert.Equal(typeof(byte), o.GetType());
System\Value\StoringChar.cs (2)
136Assert.Equal(typeof(char), o.GetType()); 142Assert.Equal(typeof(char), o.GetType());
System\Value\StoringDateTime.cs (2)
88Assert.Equal(typeof(DateTime), o.GetType()); 94Assert.Equal(typeof(DateTime), o.GetType());
System\Value\StoringDateTimeOffset.cs (2)
88Assert.Equal(typeof(DateTimeOffset), o.GetType()); 94Assert.Equal(typeof(DateTimeOffset), o.GetType());
System\Value\StoringDecimal.cs (2)
86Assert.Equal(typeof(decimal), o.GetType()); 92Assert.Equal(typeof(decimal), o.GetType());
System\Value\StoringDouble.cs (2)
140Assert.Equal(typeof(double), o.GetType()); 146Assert.Equal(typeof(double), o.GetType());
System\Value\StoringFloat.cs (2)
140Assert.Equal(typeof(float), o.GetType()); 146Assert.Equal(typeof(float), o.GetType());
System\Value\StoringInt.cs (2)
136Assert.Equal(typeof(int), o.GetType()); 142Assert.Equal(typeof(int), o.GetType());
System\Value\StoringLong.cs (2)
137Assert.Equal(typeof(long), o.GetType()); 143Assert.Equal(typeof(long), o.GetType());
System\Value\StoringSByte.cs (2)
112Assert.Equal(typeof(sbyte), o.GetType()); 118Assert.Equal(typeof(sbyte), o.GetType());
System\Value\StoringShort.cs (2)
137Assert.Equal(typeof(short), o.GetType()); 143Assert.Equal(typeof(short), o.GetType());
System\Value\StoringUInt.cs (2)
136Assert.Equal(typeof(uint), o.GetType()); 142Assert.Equal(typeof(uint), o.GetType());
System\Value\StoringUlong.cs (2)
136Assert.Equal(typeof(ulong), o.GetType()); 142Assert.Equal(typeof(ulong), o.GetType());
System\Value\StoringUShort.cs (2)
136Assert.Equal(typeof(ushort), o.GetType()); 142Assert.Equal(typeof(ushort), o.GetType());
System.Private.Windows.Core.TestUtilities (9)
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)
118args.Select(a => a!.GetType()).ToArray(),
TestAccessors.cs (1)
57typeof(TestAccessor<>).MakeGenericType(instanceOrType.GetType()),
XUnit\CommonMemberDataAttribute.cs (1)
34throw new ArgumentException($"Property {MemberName} on {MemberType ?? testMethod.DeclaringType} yielded an item that is not an object[], but {item.GetType().Name}");
System.Private.Xml (171)
System\Xml\Core\XmlReaderSettings.cs (1)
400throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
System\Xml\Core\XmlWriterSettings.cs (1)
494throw new XmlException(SR.Xml_ReadOnlyProperty, $"{GetType().Name}.{propertyName}");
System\Xml\Dom\XmlDocument.cs (1)
156if (imp.NameTable.GetType() == typeof(NameTable))
System\Xml\Dom\XmlElement.cs (2)
430if (GetType() == typeof(XmlElement)) 462if (e != null && e.GetType() == typeof(XmlElement))
System\Xml\Dom\XmlLoader.cs (1)
27if (reader.GetType() == typeof(System.Xml.XmlTextReader))
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
66Assembly asm = GetType().Assembly;
System\Xml\Schema\DataTypeImplementation.cs (3)
431Type derivedType = this.GetType(); 432Type baseType = datatype.GetType(); 583if (value.GetType() != this.ValueType)
System\Xml\Schema\Inference\Infer.cs (3)
971if (((XmlSchemaSequence)ct.Particle).Items[lastUsedSeqItem].GetType() != typeof(XmlSchemaElement)) 1038if (ct.Particle!.GetType() == typeof(XmlSchemaSequence)) 1054if (xss.Items[0].GetType() == typeof(XmlSchemaChoice))
System\Xml\Schema\Preprocessor.cs (1)
350Type returnType = obj.GetType();
System\Xml\Schema\XmlSchemaDataType.cs (1)
174Type t = value.GetType();
System\Xml\Schema\XmlValueConverter.cs (49)
514throw CreateInvalidClrMappingException(value.GetType(), destinationType); 906Type sourceType = value.GetType(); 931Type sourceType = value.GetType(); 956Type sourceType = value.GetType(); 996Type sourceType = value.GetType(); 1078Type sourceType = value.GetType(); 1124Type sourceType = value.GetType(); 1172Type sourceType = value.GetType(); 1216Type sourceType = value.GetType(); 1245Type sourceType = value.GetType(); 1294Type sourceType = value.GetType(); 1358Type sourceType = value.GetType(); 1398Type sourceType = value.GetType(); 1477Type sourceType = value.GetType(); 1526Type sourceType = value.GetType(); 1574Type sourceType = value.GetType(); 1638Type sourceType = value.GetType(); 1684Type sourceType = value.GetType(); 1723Type sourceType = value.GetType(); 1804Type sourceType = value.GetType(); 1920Type sourceType = value.GetType(); 1952Type sourceType = value.GetType(); 1983Type sourceType = value.GetType(); 2036Type sourceType = value.GetType(); 2058Type sourceType = value.GetType(); 2080Type sourceType = value.GetType(); 2101Type sourceType = value.GetType(); 2123Type sourceType = value.GetType(); 2145Type sourceType = value.GetType(); 2167Type sourceType = value.GetType(); 2189Type sourceType = value.GetType(); 2237Type sourceType = value.GetType(); 2364Type sourceType = value.GetType(); 2464Type sourceType = value.GetType(); 2486Type sourceType = value.GetType(); 2548Type sourceType = value.GetType(); 2564Type sourceType = value.GetType(); 2579Type sourceType = value.GetType(); 2595Type sourceType = value.GetType(); 2611Type sourceType = value.GetType(); 2627Type sourceType = value.GetType(); 2643Type sourceType = value.GetType(); 2659Type sourceType = value.GetType(); 2754Type sourceType = value.GetType(); 2834Type sourceType = value.GetType(); 2880if (!(value is IEnumerable) || value.GetType() == StringType || value.GetType() == ByteArrayType) 2945Type sourceType = value.GetType(); 3177Type sourceType = value.GetType();
System\Xml\Serialization\CodeGenerator.cs (2)
168return var.GetType(); 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)
74string key = $"{item.GetType().Name}:{qname}"; 94Warnings.Add(SR.Format(SR.XmlMismatchSchemaObjects, item.GetType().Name, qname.Name, qname.Namespace)); 107if (o1.GetType() != o2.GetType()) 261Type t = item.GetType();
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (7)
432Type = refObj.GetType(), 603Type type = o.GetType(); 612MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveSetInfo(o.GetType(), memberName); 647MethodInfo getSetMemberValueDelegateWithTypeMi = getSetMemberValueDelegateWithTypeGenericMi.MakeGenericMethod(o.GetType(), memberType); 1690MethodInfo? specifiedMethodInfo = o!.GetType().GetMethod($"set_{specifiedMemberName}"); 1753MemberInfo[] memberInfos = o!.GetType().GetMember(member.Mapping.Name); 1962if (memberType == value.GetType())
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (9)
219if (o != null && o.GetType() == element.Mapping!.TypeDesc!.Type) 228if (o!.GetType() == td.Type) 520&& o.GetType() != mapping.TypeDesc!.Type) 590MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!; 622MethodInfo method = o!.GetType().GetMethod(methodInvoke, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly)!; 655MemberInfo memberInfo = ReflectionXmlSerializationHelper.GetEffectiveGetInfo(o.GetType(), memberName); 662Type objType = o.GetType(); 908Type t = o.GetType(); 1309WritePotentiallyReferencingElement(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)
2159throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2198throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (4)
681throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 1074throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name));
System\Xml\Serialization\XmlSchemaImporter.cs (3)
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)
233if (ret == null || !type.IsAssignableFrom(ret.GetType())) 395throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 530item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType() == typeof(XmlSchemaSimpleType) ? "simpleType" : "complexType", ((XmlSchemaType)o).Name, null); 557string itemType = o is XmlSchemaImport ? "import" : o is XmlSchemaInclude ? "include" : o is XmlSchemaRedefine ? "redefine" : o.GetType().Name; 566item = SR.Format(SR.XmlSchemaNamedItem, ns, o.GetType().Name, null, details); 579XmlSerializer s = new XmlSerializer(o.GetType()); 603Type type = o.GetType(); 609if (item.GetType() == type && name == ItemName(item))
System\Xml\Serialization\XmlSerializationReader.cs (4)
1328return new InvalidCastException(SR.Format(SR.XmlInvalidCast, value.GetType().FullName, type.FullName)); 1330return new InvalidCastException(SR.Format(SR.XmlInvalidCastWithId, value.GetType().FullName, type.FullName, id)); 1547throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayRef, id, o.GetType().FullName, i.ToString(CultureInfo.InvariantCulture))); 1721Type currItemType = currItem.GetType();
System\Xml\Serialization\XmlSerializationReaderILGen.cs (1)
3620WriteSourceEnd(source, value == null ? typeof(object) : value.GetType());
System\Xml\Serialization\XmlSerializationWriter.cs (12)
264Type t = o.GetType(); 500if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 658if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 782if (typeof(XmlAttribute).IsAssignableFrom(node.GetType())) 814return CreateUnknownTypeException(o.GetType()); 855return CreateInvalidAnyTypeException(o.GetType()); 1336Type t = o.GetType(); 1387Type t = o.GetType(); 2456if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 4266Type type = value.GetType(); 4355Writer.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)
888Type type = defaultValue.GetType();
System.Reflection.Metadata (20)
System\Reflection\Internal\Utilities\ExceptionUtilities.cs (2)
10if (value?.GetType().FullName != null) 12return new InvalidOperationException(SR.Format(SR.UnexpectedValue, value, value.GetType().FullName));
System\Reflection\Metadata\BlobBuilder.cs (1)
538throw new InvalidOperationException(SR.Format(SR.ReturnedBuilderSizeTooSmall, GetType(), nameof(AllocateChunk)));
System\Reflection\Metadata\BlobWriterImpl.cs (2)
156var type = value.GetType(); 229var type = value.GetType();
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (15)
19Debug.Assert(!value.GetType().GetTypeInfo().IsEnum); 24if (value.GetType() == typeof(int)) 29if (value.GetType() == typeof(string)) 34if (value.GetType() == typeof(bool)) 39if (value.GetType() == typeof(char)) 44if (value.GetType() == typeof(byte)) 49if (value.GetType() == typeof(long)) 54if (value.GetType() == typeof(double)) 59if (value.GetType() == typeof(short)) 64if (value.GetType() == typeof(ushort)) 69if (value.GetType() == typeof(uint)) 74if (value.GetType() == typeof(sbyte)) 79if (value.GetType() == typeof(ulong)) 84if (value.GetType() == typeof(float)) 89throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, value.GetType()), nameof(value));
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\CustomAttributes\RoCustomAttributeData.cs (1)
25public sealed override string ToString() => GetType().ToString(); // Does not match .NET Framework output - however, doing so can prematurely
System.Resources.Extensions (12)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
443Type type = value.GetType(); 602if (sw.Stream.GetType() == typeof(MemoryStream))
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
201throw 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)
109Debug.Assert(primitiveValue.GetType() == primitiveType);
System.Resources.Writer (2)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (2)
443Type type = value.GetType(); 602if (sw.Stream.GetType() == typeof(MemoryStream))
System.Runtime.Caching (2)
System\Runtime\Caching\MemoryCache.cs (1)
861string 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)
79if (GetOrCreateInterfaceDetailsStrategy().GetComExposedTypeDetails(obj.GetType().TypeHandle) is { } details)
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.Cryptography (7)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
875$"Unexpected cipher characteristics by {cipher.GetType().FullName}, KeySize={cipher.KeySize}, BlockSize={cipher.BlockSize}");
System\Security\Cryptography\CryptoStream.cs (2)
198if (GetType() != typeof(CryptoStream)) 802return GetType() != typeof(CryptoStream) ?
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (1)
530Debug.Fail($"Key was of no known type: {_key?.GetType().FullName ?? "null"}");
System\Security\Cryptography\X509Certificates\FindPal.cs (1)
166if (findValue.GetType() != typeof(T))
System\Security\Cryptography\X509Certificates\X509Certificate.cs (1)
530return GetType().ToString();
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1300Debug.Assert(rawSAN.GetType() == typeof(X509Extension));
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
304_ => throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType()), nameof(key))
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
875$"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)
144if (requestedObjectType.Equals(tempObj.GetType()))
System\Security\Cryptography\Xml\SignedXml.cs (1)
1118Type 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.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.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)
58FeedType = feedToWrite.GetType();
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
39ItemType = itemToWrite.GetType();
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
51_inlineDocumentType = documentToWrite.GetType(); 56_referencedDocumentType = documentToWrite.GetType();
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
44_documentType = documentToWrite.GetType();
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
59FeedType = feedToWrite.GetType();
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
52ItemType = itemToWrite.GetType();
System\ServiceModel\Syndication\SyndicationElementExtension.cs (6)
70dataContractSerializer ??= new DataContractSerializer(dataContractExtension.GetType()); 84serializer ??= new XmlSerializer(xmlSerializerExtension.GetType()); 132if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) 149if (_extensionData != null && typeof(TExtension).IsAssignableFrom(_extensionData.GetType())) 275XmlQualifiedName qName = dcExporter.GetRootElementName(_extensionData.GetType()); 291XmlTypeMapping typeMapping = importer.ImportTypeMapping(_extensionData.GetType());
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (2)
71dataContractSerializer ??= new DataContractSerializer(dataContractExtension.GetType()); 82serializer ??= new XmlSerializer(xmlSerializerExtension.GetType());
System\ServiceModel\Syndication\SyndicationFeedFormatter.cs (1)
57public override string ToString() => $"{GetType()}, SyndicationVersion={Version}";
System\ServiceModel\Syndication\SyndicationItemFormatter.cs (1)
37public 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.Text.Encoding.CodePages (5)
System\Text\DBCSCodePageEncoding.cs (2)
541throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType())); 657throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType()));
System\Text\EncodingByteBuffer.cs (1)
42throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, _encoder.Encoding.EncodingName, _encoder.Fallback.GetType()));
System\Text\EncodingNLS.cs (2)
351throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes"); 359throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowChars, EncodingName, DecoderFallback.GetType()), "chars");
System.Text.Encodings.Web (2)
System\Text\Encodings\Web\OptimizedInboxTextEncoder.cs (1)
491if (GetType() == typeof(OptimizedInboxTextEncoder)) { /* intentionally left blank */ }
System\Text\Encodings\Web\TextEncoderSettings.cs (1)
219if (GetType() == typeof(TextEncoderSettings))
System.Text.Json (18)
System\ReflectionExtensions.cs (1)
66if (attribute.GetType().FullName == fullName)
System\Text\Json\Serialization\Converters\Object\ObjectConverter.cs (1)
56Type 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_SerializerConverterFactoryReturnsJsonConverterFactorty(GetType());
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (2)
77Type runtimeType = value.GetType(); 129ThrowHelper.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)
169Type runtimeType = rootValue.GetType();
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (1)
166ThrowHelper.ThrowInvalidOperationException_SerializationConverterNotCompatible(converter.GetType(), typeToConvert);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.cs (1)
125=> _modifiers is null or { Count: 0 } && GetType() == typeof(DefaultJsonTypeInfoResolver);
System\Text\Json\Serialization\Metadata\FSharpCoreReflectionProxy.cs (1)
217Type attributeType = attr.GetType();
System\Text\Json\ThrowHelper.Serialization.cs (4)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); 46throw new NotSupportedException(SR.Format(SR.DictionaryKeyTypeNotSupported, keyType, converter.GetType())); 394throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.Type, runtimePropertyType)); 945throw new InvalidOperationException(SR.Format(SR.PipeWriter_DoesNotImplementUnflushedBytes, pipeWriter.GetType().Name));
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexCompiler.cs (1)
6217Call(MakeUnsafeAs(list[index].GetType())); // provide JIT with details necessary to devirtualize calls on this instance
System.Threading.Channels (1)
System\Threading\Channels\AsyncOperation.cs (1)
234if (sc != null && sc.GetType() != typeof(SynchronizationContext))
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\TimerAwaitable.cs (1)
114throw new ObjectDisposedException(GetType().FullName);
System.Threading.Tasks.Dataflow (1)
Internal\Common.cs (1)
125string blockName = block.GetType().Name;
System.Transactions.Local (23)
System\Transactions\EnlistmentState.cs (8)
59Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 65Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 71Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 77Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 83Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 89Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 95Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}"); 101Debug.Fail($"Invalid Event for InternalEnlistment State; Current State: {GetType()}");
System\Transactions\TransactionsEtwProvider.cs (1)
227public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance;
System\Transactions\TransactionState.cs (14)
185Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 299Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 311Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 323Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 335Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 347Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 359Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 371Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 383Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 395Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 411Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 417Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 423Debug.Fail($"Invalid Event for State; Current State: {GetType()}"); 2023serializationInfo.FullTypeName = serializableTx.GetType().FullName!;
System.Windows.Controls.Ribbon (25)
Microsoft\Windows\Automation\Peers\RibbonAutomationPeer.cs (1)
40return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextMenuAutomationPeer.cs (1)
36return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonContextualTabGroupAutomationPeer.cs (1)
65return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlAutomationPeer.cs (1)
33return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonControlGroupAutomationPeer.cs (1)
41return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupAutomationPeer.cs (1)
54return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonGroupHeaderAutomationPeer.cs (1)
46return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuButtonAutomationPeer.cs (1)
85return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonMenuItemAutomationPeer.cs (1)
61return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonQuickAccessToolBarAutomationPeer.cs (1)
74return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonSeparatorAutomationPeer.cs (1)
40return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabAutomationPeer.cs (1)
59return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTabHeaderAutomationPeer.cs (1)
36return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTitleAutomationPeer.cs (1)
41return Owner.GetType().Name;
Microsoft\Windows\Automation\Peers\RibbonTwoLineTextAutomationPeer.cs (1)
41return Owner.GetType().Name;
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenu.cs (1)
242throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationMenuItem.cs (1)
76throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonApplicationSplitMenuItem.cs (1)
74throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidApplicationMenuOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonContextMenu.cs (1)
516throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (3)
1896object clone = Activator.CreateInstance(original.GetType()); 1967return (FrameworkElement)Activator.CreateInstance(original.GetType()); 2040if (clone.GetType().IsInstanceOfType(original))
Microsoft\Windows\Controls\Ribbon\RibbonMenuButton.cs (2)
558throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer)); 1485Debug.Assert(GetType().IsSubclassOf(type)); // RibbonMenuButton is a subclass of MenuBase
Microsoft\Windows\Controls\Ribbon\RibbonMenuItem.cs (1)
520throw new InvalidOperationException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidMenuButtonOrItemContainer, this.GetType().Name, itemContainer));
System.Windows.Forms (238)
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)
316RuntimeTypeHandle 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); 1461throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 1529throw new NotSupportedException(string.Format(SR.AXNohWnd, GetType().Name)); 1608throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 2314throw new LicenseException(GetType(), this, SR.AXNoLicenseToUse); 2434TypeDescriptor.Refresh(GetType()); 2512TypeDescriptor.Refresh(GetType()); 2579PropertyInfo[] propInfos = GetType().GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance); 3832return 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)
3508Exception ex = new ObjectDisposedException(GetType().Name); 4656Exception ex = new ObjectDisposedException(GetType().Name); 9156Debug.WriteLineIf(CoreSwitches.PerfTrack.Enabled, $"RecreateHandle: {GetType().FullName} [Text={Text}]"); 10842if (this is TabControl || GetType() == typeof(Control)) 11201string 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)
2595Type? editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 2628Type? editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 2659&& !_latestEditingControl.GetType().IsSubclassOf(editControlType)) 21905editingCellInterface = dataGridViewCell.GetType().GetInterface("System.Windows.Forms.IDataGridViewEditingCell"); 25304|| (dataGridViewCurrentCell.FormattedValueType is not null && dataGridViewCurrentCell.FormattedValueType.IsAssignableFrom(nullValue.GetType()))) 25370&& dataGridViewCurrentCell.ValueType.IsAssignableFrom(dgvcpe.Value.GetType()))
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (1)
720DataGridViewBand 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)
940DataGridViewCell dataGridViewCell = (DataGridViewCell)Activator.CreateInstance(GetType())!; 1118Type editingControlType = DataGridView.EditingControl.GetType(); 1612(formattedValue is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 1645(formattedValue is null || FormattedValueType is null || !FormattedValueType.IsAssignableFrom(formattedValue.GetType()))) 3726!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(); 1566Debug.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)
161public Type? CellType => CellTemplate?.GetType(); 815DataGridViewColumn 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(); 916if (value is null || ((ValueType is not null && !ValueType.IsAssignableFrom(value.GetType())) && value != DBNull.Value))
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxColumn.cs (1)
499Type 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)
1040Type 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)
968if (GetType() == typeof(Label))
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (1)
433Type 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 (9)
963Type newType = newObject.GetType(); 1058Type objectType = currentObject.GetType(); 1697throw new ArgumentException(string.Format(SR.PropertyGridNoBitmap, tab.GetType().FullName)); 1702throw new ArgumentException(string.Format(SR.PropertyGridTabName, tab.GetType().FullName)); 2430if (!TypeDescriptorHelper.TryGetAttribute(e.Component.GetType(), out PropertyTabAttribute? tabAttribute)) 2477if (!TypeDescriptorHelper.TryGetAttribute(e.Component.GetType(), out PropertyTabAttribute? tabAttribute)) 3453if (TypeDescriptorHelper.TryGetAttribute(components.GetType(), out PropertyTabAttribute? tabAttribute)) 3648Debug.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)
745public virtual Type? PropertyType => PropertyValue?.GetType(); 1476public override int GetHashCode() => HashCode.Combine(PropertyLabel, PropertyType, GetType()); 2267public 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)
2439if (value is not null && currentValue is not null && value.GetType() != currentValue.GetType() 2440&& entry.TypeConverter.CanConvertTo(entry, value.GetType())) 2442currentValue = 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)
487throw new ArgumentException(string.Format(SR.TabControlTabPageNotOnTabControl, value.GetType().FullName));
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
1516_currentRendererType = _renderer.GetType(); 1530_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)
468CurrentRendererType = (value is null) ? s_defaultRendererType : value.GetType(); 624LoadSettings(targetForm, targetForm.GetType().FullName!); 647SaveSettings(sourceForm, sourceForm.GetType().FullName!); 1099&& (sourceToolStrip.GetType().IsAssignableFrom(targetToolStrip.GetType()) 1100|| targetToolStrip.GetType().IsAssignableFrom(sourceToolStrip.GetType())));
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
50throw 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)
1346Type clonedType = GetType(); 2090if (_userData is not null && _userData.GetType().IsSerializable) 2092si.AddValue("UserData", _userData, _userData.GetType());
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
482if (!Marshal.IsTypeVisibleFromCom(value.GetType()))
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
946throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t); 989throw new TargetInvocationException(string.Format(SR.AXNohWnd, GetType().Name), t);
System\Windows\Forms\DataBinding\Binding.cs (12)
481Type controlClass = BindableComponent.GetType(); 701(value is null ? _propInfo!.PropertyType : value.GetType()), 715if (e.Value is not null && (e.Value.GetType().IsSubclassOf(type) || e.Value.GetType() == type || e.Value is DBNull)) 721TypeConverter typeConverter = TypeDescriptor.GetConverter(value is not null ? value.GetType() : typeof(object)); 731if (ret is not null && (ret.GetType().IsSubclassOf(type) || ret.GetType() == type)) 789if (ret is not null && (ret.GetType().IsSubclassOf(type) || ret.GetType() == type)) 795TypeConverter typeConverter = TypeDescriptor.GetConverter(value is not null ? value.GetType() : typeof(object)); 805if (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)
68internal 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)
6188Type? closestMatchingSourceType = FindClosestStockType(sourceToolStrip.GetType()); 6191Type? closestMatchingTargetType = FindClosestStockType(thisToolstrip.GetType()); 6194thisToolstrip.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)
137Type sourceType = value.GetType(); 338else if (value is not null && targetType.IsAssignableFrom(value.GetType())) 495Equals(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\Clipboard.cs (1)
425string.Format(SR.ITypeDataObject_Not_Implemented, dataObject.GetType().FullName));
System\Windows\Forms\OLE\DataObject.Composition.BinaryFormatUtilities.cs (1)
42throw new SerializationException(string.Format(SR.UnexpectedTypeForClipboardFormat, data.GetType().FullName));
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (1)
326_ when format == DataFormats.SerializableConstant || data is ISerializable || data.GetType().IsSerializable
System\Windows\Forms\OLE\DataObject.DataStore.cs (1)
122SetData(data.GetType(), data);
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.Analyzers.CSharp.Tests (2)
Generators\ApplicationConfigurationGeneratorTests.cs (1)
223File.ReadAllText($@"Generators\MockData\{GetType().Name}.{testName}.cs"),
Generators\ApplicationConfigurationInitializeBuilderTests.cs (1)
33string expected = File.ReadAllText($@"Generators\MockData\{GetType().Name}.{expectedFileName}.cs");
System.Windows.Forms.Design (169)
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)
85Type 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)
51_methodInfo ??= _actionList?.GetType()?.GetMethod(MemberName, BindingFlags.Default | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
System\ComponentModel\Design\DesignerActionPanel.cs (3)
673list.GetType().FullName)); 864if (oldLine.GetType() == newLineInfo.LineType) 880Debug.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, 250throw new InvalidOperationException(string.Format(SR.DesignerHostNoTopLevelDesigner, component.GetType().FullName)) 398if (string.Equals(reflectType.FullName, component.GetType().FullName, StringComparison.Ordinal)) 400reflectType = component.GetType(); 705helpService.RemoveContextAttribute("Keyword", $"Designer_{designer.GetType().FullName}"); 1001string name = component.Site?.Name ?? component.GetType().Name; 1106helpService.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)
212_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)
798Debug.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()) 1631Error(manager, string.Format(SR.SerializerNoSuchProperty, lhs.GetType().FullName, propertyReferenceEx.PropertyName), SR.SerializerNoSuchProperty); 1760AttributeCollection typeAttributes = GetAttributesFromTypeHelper(manager, value.GetType()); 1830Type? t = value?.GetType(); 1984if (arg is not null && !parameters[i].ParameterType.IsAssignableFrom(arg.GetType())) 2028Debug.Fail($"Unrecognized reflection type in instance descriptor: {descriptor.MemberInfo.GetType().Name}"); 2035Type targetType = value.GetType(); 2112MemberCodeDomSerializer? memberSerializer = manager.GetSerializer<MemberCodeDomSerializer>(descriptor.GetType()); 2258MemberCodeDomSerializer? memberSerializer = manager.GetSerializer<MemberCodeDomSerializer>(propertyToSerialize.GetType()); 2414valueName = manager.GetName(value) ?? value.GetType().Name; 2423manager.ReportError(string.Format(SR.SerializerNoSerializerForComponent, value is null ? "(null)" : value.GetType().FullName)); 2542if (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)
519if (value is not null && (!value.GetType().IsSerializable)) 521Debug.Fail($"Cannot save a non-serializable value into resources. Add serializable to {(value is null ? "(null)" : value.GetType().Name)}"); 604if (value is not null && (!value.GetType().IsSerializable)) 606Debug.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)
2630if (lastComp is null || curComp.GetType() != lastComp.GetType()) 2669if (lastComp is null || curComp.GetType() != lastComp.GetType()) 2737if (lastComp is null || lastComp.GetType() != curComp.GetType()) 2768if (lastComp.GetType() != curComp.GetType())
System\Windows\Forms\Design\ComponentTray.cs (4)
958PropertyDescriptor loc = TypeDescriptor.GetProperties(receiver.GetType())["Location"]; 1544PropertyDescriptor loc = TypeDescriptor.GetProperties(receiver.GetType())["Location"]; 1941ds?.SetValue(GetType(), this); 1946name ??= 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)
915PropertyDescriptorCollection props = TypeDescriptor.GetProperties(component.GetType()); 2482typeName = 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()) 877ComponentDesigner columnDesigner = DataGridViewAddColumnDialog.GetComponentDesignerForType(tr, _columnsPrivateCopy[i].GetType())!; 1362return item.DataGridViewColumn.GetType().Name; 1373if (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)
1270bindingSourceName = ToolStripDesigner.NameFromText(bindingSourceName, bs.GetType(), _serviceProvider); 1274bindingSourceName += bs.GetType().Name; 1384return dataSource.GetType().Name; 1433if (dsType is not null && dsType.Equals(comp.GetType()))
System\Windows\Forms\Design\DesignerFrame.cs (3)
420Debug.Assert(_overlayList.IndexOf(control) == -1, $"Duplicate overlay in overlay service: {control.GetType().FullName}"); 438Debug.Assert(_overlayList.IndexOf(control) != -1, $"Control is not in overlay service: {control.GetType().FullName}"); 449Debug.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( 163string? path = (string?)reference.GetType().InvokeMember("Path", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, reference, null, CultureInfo.InvariantCulture); 233string? name = ext.GetType().InvokeMember("Name", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, ext, null, CultureInfo.InvariantCulture)!.ToString(); 235object? project = ext.GetType().InvokeMember("ContainingProject", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, ext, null, CultureInfo.InvariantCulture); 238object? vsproject = project.GetType().InvokeMember("Object", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, project, null, CultureInfo.InvariantCulture); 241object? references = vsproject.GetType().InvokeMember("References", BindingFlags.GetProperty | BindingFlags.Public | BindingFlags.Instance, null, vsproject, null, CultureInfo.InvariantCulture);
System\Windows\Forms\Design\DocumentDesigner.cs (1)
676PropertyDescriptor 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)
2356string error = string.Format(SR.DesignerCantParentType, component.GetType().Name, Component.GetType().Name);
System\Windows\Forms\Design\SelectionUIService.cs (2)
273name = objects[0].GetType().Name; 297name = 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)
215Debug.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)
1401AttributeCollection attribs = TypeDescriptor.GetAttributes(Component.GetType());
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
343Type toolType = component.GetType();
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1842name = 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)
396_menuItem.Text = (_dropDown is not null) ? _dropDown.GetType().Name : _menuItem.Name;
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
666name = dragComponents[0].GetType().Name;
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (1)
302if (t != _currentItem.GetType())
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
2702name = dragComponents[0].GetType().Name;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
305Type toolType = component.GetType();
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
806designer.CommitEdit(_designer.Component.GetType(), text, commit, enterKeyPressed, tabKeyPressed);
System.Windows.Forms.Design.Tests (80)
EnsureEditorsTests.cs (2)
74Assert.Equal(expectedEditorType, editor.GetType()); 158Assert.Equal(expectedEditorType, editor.GetType());
System\ComponentModel\Design\ArrayEditorTests.cs (1)
157Assert.IsType(expected.GetType(), items);
System\ComponentModel\Design\CollectionEditorTests.cs (1)
831Assert.IsType(expected.GetType(), items);
System\ComponentModel\Design\DesignerHostTests.cs (2)
1666host.Container.Add(component, component.GetType().FullName); 1667Assert.Equal(component.GetType().FullName, host.RootComponentClassName);
System\ComponentModel\Design\DesignSurfaceTests.cs (2)
265Assert.Same(container, container.GetService(container.GetType())); 1531Assert.Same(surface.ServiceContainer, surface.GetService(surface.ServiceContainer.GetType()));
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (50)
135SerializationInfo info = new(store.GetType(), new FormatterConverter()); 238SerializationInfo info = new(store.GetType(), new FormatterConverter()); 340SerializationInfo info = new(store.GetType(), new FormatterConverter()); 385SerializationInfo info = new(store.GetType(), new FormatterConverter()); 436SerializationInfo info = new(store.GetType(), new FormatterConverter()); 482SerializationInfo info = new(store.GetType(), new FormatterConverter()); 526SerializationInfo info = new(store.GetType(), new FormatterConverter()); 575SerializationInfo info = new(store.GetType(), new FormatterConverter()); 645SerializationInfo info = new(store.GetType(), new FormatterConverter()); 664SerializationInfo info = new(store.GetType(), new FormatterConverter()); 717SerializationInfo info = new(store.GetType(), new FormatterConverter()); 728info = new SerializationInfo(store.GetType(), new FormatterConverter()); 754SerializationInfo info = new(store.GetType(), new FormatterConverter()); 767info = new SerializationInfo(store.GetType(), new FormatterConverter()); 802SerializationInfo info = new(store.GetType(), new FormatterConverter()); 816info = new SerializationInfo(store.GetType(), new FormatterConverter()); 862SerializationInfo info = new(store.GetType(), new FormatterConverter()); 875info = new SerializationInfo(store.GetType(), new FormatterConverter()); 925SerializationInfo info = new(store.GetType(), new FormatterConverter()); 936info = new SerializationInfo(store.GetType(), new FormatterConverter()); 962SerializationInfo info = new(store.GetType(), new FormatterConverter()); 975info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1010SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1024info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1070SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1083info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1135SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1146info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1157info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1185SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1198info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1211info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1248SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1262info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1276info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1324SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1337info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1350info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1414SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1425info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1436info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1464SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1477info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1490info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1527SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1541info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1555info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1603SerializationInfo info = new(store.GetType(), new FormatterConverter()); 1616info = new SerializationInfo(store.GetType(), new FormatterConverter()); 1629info = new SerializationInfo(store.GetType(), new FormatterConverter());
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (12)
420.Setup(p => p.GetSerializer(manager, null, objectType, mockDesignerSerializationProvider.Object.GetType())) 424Assert.Same(expected, iManager.GetSerializer(objectType, mockDesignerSerializationProvider.Object.GetType())); 425mockDesignerSerializationProvider.Verify(p => p.GetSerializer(manager, null, objectType, mockDesignerSerializationProvider.Object.GetType()), Times.Once()); 428Assert.Same(expected, iManager.GetSerializer(objectType, mockDesignerSerializationProvider.Object.GetType())); 429mockDesignerSerializationProvider.Verify(p => p.GetSerializer(manager, null, objectType, mockDesignerSerializationProvider.Object.GetType()), Times.Exactly(2)); 1842.Setup(p => p.GetSerializer(manager, null, typeof(int), mockDesignerSerializationProvider.Object.GetType())) 1846Assert.Same(serializer, iManager.GetSerializer(typeof(int), mockDesignerSerializationProvider.Object.GetType())); 1847mockDesignerSerializationProvider.Verify(p => p.GetSerializer(manager, null, typeof(int), mockDesignerSerializationProvider.Object.GetType()), Times.Once()); 1850Assert.Null(iManager.GetSerializer(typeof(int), mockDesignerSerializationProvider.Object.GetType())); 1851mockDesignerSerializationProvider.Verify(p => p.GetSerializer(manager, null, typeof(int), mockDesignerSerializationProvider.Object.GetType()), Times.Once()); 1855Assert.Null(iManager.GetSerializer(typeof(int), mockDesignerSerializationProvider.Object.GetType())); 1856mockDesignerSerializationProvider.Verify(p => p.GetSerializer(manager, null, typeof(int), mockDesignerSerializationProvider.Object.GetType()), Times.Once());
System\ComponentModel\Design\SiteNestedContainerTests.cs (2)
583container.Add(component, component.GetType().FullName); 584Assert.Equal(component.GetType().FullName, host.RootComponentClassName);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
606Assert.Equal(typeof(TypeConverter), converter.GetType()); 609Assert.Equal(typeof(AxHost.StateConverter), converter.GetType());
System\Windows\Forms\Design\AnchorEditorTests.cs (1)
88var item = (Control)anchorUI.GetType()
System\Windows\Forms\Design\ContentAlignmentEditorTests.cs (2)
25Type type = editor.GetType() 28var item = (Control)contentUI.GetType()
System\Windows\Forms\Design\ListBoxDesignerTests.cs (1)
128actionList[0]!.GetType().Name.Should().Be(nameof(ListControlUnboundActionList));
System\Windows\Forms\Design\MaskDesignerDialogTests.cs (2)
87maskDescriptors.Should().ContainSingle(descriptor => descriptor.GetType() == descriptorType); 91maskDescriptors.Should().NotContain(descriptor => descriptor.GetType() == descriptorType);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
700if (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.Windows.Forms.Primitives.TestUtilities (2)
Metafiles\Validators\EmfValidator.cs (2)
43$"\nValidator index {currentIndex}: {currentValidator!.GetType().Name} failed\n\n{emf.RecordsToString()}", 60$"{currentValidator.GetType().Name} did not receive expected records\n\n{emf.RecordsToString()}");
System.Windows.Forms.Tests (53)
misc\CollectionHelperTests.cs (4)
79Assert.Equal(typeof(KeyValuePair<string, string>), firstTargetItem.GetType()); 84Assert.Equal(typeof(KeyValuePair<string, string>), secondTargetItem.GetType()); 102Assert.Equal(typeof(DictionaryEntry), firstTargetItem.GetType()); 107Assert.Equal(typeof(DictionaryEntry), secondTargetItem.GetType());
System\Resources\ResXResourceReaderTests.cs (1)
31Assert.Equal(typeof(AxHost.State), value.GetType());
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (4)
1668control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, false); 1689control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, true); 1711control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, false); 1719control.GetType().GetProperty(nameof(Label.UseMnemonic)).SetValue(control, true);
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
263Type type = dataGridView.AccessibilityObject.GetType();
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (1)
205Type type = accessibleObject.GetType();
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxControlAccessibleObjectTests.cs (2)
17Type type = toolStripTextBox.GetType().GetNestedType("ToolStripTextBoxControlAccessibleObject", BindingFlags.NonPublic); 28Type type = toolStripTextBox.GetType().GetNestedType("ToolStripTextBoxControlAccessibleObject", BindingFlags.NonPublic);
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (2)
70string name = value.GetType().FullName!; 73HRESULT hr = bag.Write(value.GetType().FullName!, variant); // CodeQL[SM02229] : Testing legacy feature. This is a safe use of VARIANT because the data is trusted and the types are controlled and validated.
System\Windows\Forms\BindingContextTests.cs (2)
974MethodInfo m = oldManager.Bindings.GetType().GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance); 1002MethodInfo m = oldManager.Bindings.GetType().GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance);
System\Windows\Forms\ClipboardTests.cs (11)
275dataObject.GetData(data.GetType()).Should().Be(data); 276Clipboard.ContainsData(data.GetType().FullName).Should().BeTrue(); 288actual.GetData(data.GetType()).Should().Be(data); 289Clipboard.ContainsData(data.GetType().FullName).Should().BeTrue(); 302dataObject.GetData(data.GetType()).Should().Be(data); 303Clipboard.ContainsData(data.GetType().FullName).Should().BeTrue(); 317actual.GetData(data.GetType()).Should().Be(data); 318Clipboard.ContainsData(data.GetType().FullName).Should().BeTrue(); 331dataObject.GetData(data.GetType()).Should().Be(data); 332Clipboard.ContainsData(data.GetType().FullName).Should().BeTrue(); 1147_formatToTypeName.Add(format, data!.GetType().AssemblyQualifiedName!);
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
98Assert.Equal(value.GetType().GetConstructor(parameterTypes), descriptor.MemberInfo);
System\Windows\Forms\DataGridViewColumnTests.cs (3)
67Assert.Equal(cellTemplate?.GetType(), column.CellType); 509Assert.Same(value?.GetType(), column.CellType); 514Assert.Same(value?.GetType(), column.CellType);
System\Windows\Forms\DataObjectTests.cs (5)
1105string format = data1.GetType().FullName; 1125dataObject.GetData(data2.GetType().FullName, autoConvert: false).Should().Be(data2); 1126dataObject.GetData(data2.GetType().FullName, autoConvert: true).Should().Be(data2); 1130dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: false).Should().BeTrue(); 1131dataObject.GetDataPresent(data2.GetType().FullName, autoConvert: true).Should().BeTrue();
System\Windows\Forms\HtmlDocumentTests.cs (1)
564Assert.True(domDocument.GetType().IsCOMObject);
System\Windows\Forms\HtmlElementTests.cs (1)
168Assert.True(domElement.GetType().IsCOMObject);
System\Windows\Forms\HtmlWindowTests.cs (1)
59domWindow.GetType().IsCOMObject.Should().BeTrue();
System\Windows\Forms\ListBindingHelperTests.cs (1)
202.Setup(p => p.GetTypeDescriptor(instance.GetType(), instance))
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
31Assert.Equal(typeof(PropertyGridView.DropDownHolder.DropDownHolderAccessibleObject), firstChild.GetType());
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (3)
42Assert.Equal("GridViewTextBoxAccessibleObject", editFieldAccessibleObject.GetType().Name); 67Assert.Equal("GridViewTextBoxAccessibleObject", editFieldAccessibleObject.GetType().Name); 77Assert.Equal("DropDownHolderAccessibleObject", dropDownHolderAccessibleObject.GetType().Name);
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (1)
37Assert.Equal("DropDownHolderAccessibleObject", accessibleObject.GetType().Name);
System\Windows\Forms\PropertyGridInternal\PropertyGridView.GridViewListBoxTests.cs (1)
28Type gridViewListBoxAccessibleObjectType = gridViewListBoxAccessibleObject.GetType();
System\Windows\Forms\PropertyGridTests.cs (1)
4298Reflection.MemberInfo[] properties = component.GetType().GetMembers();
System\Windows\Forms\SpecialFolderEnumConverterTests.cs (2)
90TypeConverter converter = (TypeConverter)Activator.CreateInstance(descriptor.Converter.GetType(), new Type[] { typeof(CustomEnum) }); 97return (TypeConverter)Activator.CreateInstance(descriptor.Converter.GetType(), new Type[] { typeof(Environment.SpecialFolder) });
System\Windows\Forms\ToolStripComboBoxTests.cs (1)
379_toolStripComboBox.ToString().Should().Be($"{_toolStripComboBox.GetType().FullName}, Items.Count: 2");
ToolStripContainerTests.cs (2)
46PropertyInfo propertyInfo = _toolStripContainer.GetType().GetProperty(propertyName); 218PropertyInfo propertyInfo = _toolStripContainer.GetType().GetProperty(propertyName);
System.Windows.Forms.TestUtilities (1)
PropertyGridInternal\SubPropertyGrid.cs (1)
32string categoryName = SelectedObject!.GetType().GetProperty(propertyName)!
System.Windows.Forms.UI.IntegrationTests (3)
DataGridViewTests.cs (1)
67object? actual = toolTip.GetType().GetProperty("Activated")?.GetValue(toolTip);
Infra\ControlTestBase.cs (1)
49var type = testOutputHelper.GetType();
Infra\SendInput.cs (1)
64throw new ArgumentException($"Unexpected type encountered: {key.GetType()}", nameof(keys));
System.Xaml (55)
System\Windows\Markup\ArrayExtension.cs (1)
47Type = elements.GetType().GetElementType();
System\Windows\Markup\StaticExtension.cs (1)
86throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\TypeExtension.cs (1)
73throw new InvalidOperationException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver)));
System\Windows\Markup\ValueSerializer.cs (5)
139if (converter.GetType() == typeof(DateTimeConverter2)) 246text = value.GetType().FullName; 248return new NotSupportedException(SR.Format(SR.ConvertToException, base.GetType().Name, text, destinationType.FullName)); 263text = value.GetType().FullName; 265return new NotSupportedException(SR.Format(SR.ConvertFromException, base.GetType().Name, text));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (12)
298_context.CurrentInstance = inst ?? throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.GetObjectNull, parentInstance.GetType(), parentProperty.Name))); 365XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); 759XamlType valueXamlType = GetXamlType(value.GetType()); 770XamlType valueXamlType = GetXamlType(value.GetType()); 1060SchemaContext.GetType(), clrType)); 1168XamlType instType = GetXamlType(inst.GetType()); 1702ctx.CurrentType = GetXamlType(value.GetType()); 1765if(me is not null && !Logic_WillParentCollectionAdd(ctx, value.GetType(), true)) 1778currentType = value is null ? collectionType.ItemType : GetXamlType(value.GetType()); 2176Type rootInstanceType = (curInstance is not null) ? curInstance.GetType() : ctx.CurrentType.UnderlyingType; 2206childThatHasUnresolvedChildren.GetType(), property, namesString))); 2563pendingAdd.ItemType = (item is not null) ? GetXamlType(item.GetType()) : null;
System\Xaml\Runtime\ClrObjectRuntime.cs (6)
181throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex); 197throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex); 376if (genericIEnumerator.IsAssignableFrom(enumerator.GetType())) 497throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e); 633if (_ignoreCanConvert && value.GetType() == typeof(string)) 639if (typeConverter.CanConvertFrom(value.GetType()))
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
177Type targetType = target.GetType();
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (3)
427return xamlType.Invoker.GetType() == typeof(XamlTypeInvoker); 433return xamlMember.Invoker.GetType() == typeof(XamlMemberInvoker); 440return converter.GetType() == typeof(XamlValueConverter<TConverterBase>);
System\Xaml\Schema\BuiltInValueConverter.cs (2)
196s_Uri = new BuiltInValueConverter<TypeConverter>(stdConverter.GetType(), () => TypeDescriptor.GetConverter(typeof(Uri))); 214s_StringSerializer = new BuiltInValueConverter<ValueSerializer>(stringSerializer.GetType(), () => stringSerializer);
System\Xaml\Schema\XamlTypeInvoker.cs (2)
75itemType = _xamlType.SchemaContext.GetXamlType(item.GetType()); 107itemType = _xamlType.SchemaContext.GetXamlType(item.GetType());
System\Xaml\XamlObjectReader.cs (18)
52var context = new SerializerContext(schemaContext, this.settings) { RootType = instance?.GetType() }; 442actualKeyType = context.GetXamlType(entry.Key.GetType()); 476XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); 1290else if (!parameterInfo.ParameterType.IsAssignableFrom(argument.GetType())) 1292throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, argument.GetType(), parameterInfo.ParameterType)); 1428var valueType = value.GetType(); 1583AddFactoryMethodAndValidateArguments(value.GetType(), member, arguments, context, out methodParams); 1693throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType())); 1695throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType())); 1762var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); 1800var type = context.LocalAssemblyAwareGetXamlType(value.GetType()); 1926XamlType valueType = context.GetXamlType(value.GetType()); 2012XamlType xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType()); 2054var xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType()); 2504string ns = GetXamlType(obj.GetType()).PreferredXamlNamespace; 2628schemaContext.GetType(), clrType)); 2686XamlType valueXamlType = context.GetXamlType(value.GetType()); 2728XamlType type = GetXamlType(objectToName.GetType());
System\Xaml\XamlSchemaContext.cs (2)
975typeof(object).Assembly.GetType().IsAssignableFrom(assembly.GetType());
System\Xaml\XamlType.cs (1)
1557Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties");
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
Templates.Tests (1)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
54var assemblyPath = GetType().Assembly;
UIAutomationClient (4)
System\Windows\Automation\ItemContainerPattern.cs (1)
139|| (value != null && !expectedType.IsAssignableFrom(value.GetType()))))
System\Windows\Automation\PropertyCondition.cs (1)
137|| (val != null && !expectedType.IsAssignableFrom(val.GetType()))))
System\Windows\Automation\Text\TextRange.cs (2)
187if (value.GetType() != ai.Type) 189throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), "value");
UIAutomationClientSideProviders (119)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (55)
409return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 416new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 424return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 438return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 444return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 450return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 466return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 473bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 485bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 506new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 513new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 520new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 539new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 550new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 561new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 584new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 595new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 606new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 631return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 643return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 655return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 690return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 708return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 726return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 752return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 759bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 772bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 793return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 800new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 808return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 834return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 841bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 854bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 875return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 883Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 890return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 916return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 923bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 936bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 957return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 963return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 969return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 991Marshal.SizeOf(hitTestInfo.GetType()), XSendMessage.ErrorValue.Zero)) 1000Marshal.SizeOf(hitTestInfo32.GetType()), XSendMessage.ErrorValue.Zero)) 1009Marshal.SizeOf(hitTestInfo64.GetType()), XSendMessage.ErrorValue.Zero)) 1028return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1036Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1043return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1069return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1076bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1089bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1127Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1135Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1144Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1172int cMem = Marshal.SizeOf(rectW32.GetType());
MS\Internal\AutomationProxies\Misc.cs (3)
1086gui.cbSize = Marshal.SizeOf(gui.GetType()); 1186ti.cbSize = Marshal.SizeOf(ti.GetType()); 1202ti.cbSize = Marshal.SizeOf(ti.GetType());
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
344throw new InvalidOperationException(SR.Format(SR.EditControlsHaveNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
41throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1069throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1081throw new InvalidOperationException(SR.Format(SR.InvalidRangeEndpoint, GetType().FullName)); 1115throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName)); 1146throw new InvalidOperationException(SR.Format(SR.InvalidTextRangeOffset, GetType().FullName));
MS\Internal\AutomationProxies\WindowsHyperlink.cs (3)
216bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 399return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 496bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
MS\Internal\AutomationProxies\WindowsListView.cs (7)
1273if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1423result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1432result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1496if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1669scrollBarInfo.cbSize = Marshal.SizeOf(scrollBarInfo.GetType()); 1680si.cbSize = Marshal.SizeOf (si.GetType ()); 1797if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType())))
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (1)
307XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (3)
384while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 701new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType())); 812sbi.cbSize = Marshal.SizeOf(sbi.GetType());
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
76XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
136if (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)
55si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsMenu.cs (6)
508mbi.cbSize = Marshal.SizeOf(mbi.GetType()); 1892menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 1907menuItemInfo.cbSize = Marshal.SizeOf (menuItemInfo.GetType ()); 1951menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2558menuItemInfo.cbSize = Marshal.SizeOf(menuItemInfo.GetType()); 2599int readSize = Marshal.SizeOf(msaaMenuInfo.GetType());
MS\Internal\AutomationProxies\WindowsRebar.cs (3)
205return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 398if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 432if (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)
261throw new InvalidOperationException(SR.Format(SR.RichEditTextPatternHasNoChildren, GetType().FullName));
MS\Internal\AutomationProxies\WindowsScroll.cs (6)
128sbi.cbSize = Marshal.SizeOf(sbi.GetType()); 144si.cbSize = Marshal.SizeOf (si.GetType ()); 195si.cbSize = Marshal.SizeOf (si.GetType ()); 250si.cbSize = Marshal.SizeOf (si.GetType ()); 289si.cbSize = Marshal.SizeOf(si.GetType ()); 363si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsScrollBar.cs (8)
139sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 435si.cbSize = Marshal.SizeOf (si.GetType ()); 449sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 523sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 574si.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)
206si.cbSize = Marshal.SizeOf (si.GetType ()); 224sbi.cbSize = Marshal.SizeOf (sbi.GetType ()); 541si.cbSize = Marshal.SizeOf (si.GetType ());
MS\Internal\AutomationProxies\WindowsSlider.cs (2)
461XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 473XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (2)
164index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 574result = 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)
279index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 659result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1278if (!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)
560if (!XSendMessage.XSend(hwnd, NativeMethods.TVM_GETITEMRECT, partialDisplay, rectangle, Marshal.SizeOf(rc.GetType()))) 940if (Marshal.SizeOf(_hItem.GetType()) > sizeof(int)) 1597int readSize = Marshal.SizeOf(ent.GetType());
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
53Logger.Log($"Received request {request.RequestId} of type {request.GetType()}");
VBCSCompiler.UnitTests (1)
NamedPipeTestUtil.cs (1)
41var listeningSocketProperty = sharedServer!.GetType()?.GetProperty("ListeningSocket", BindingFlags.NonPublic | BindingFlags.Instance);
WindowsFormsIntegration (3)
System\Windows\Integration\PropertyMap.cs (2)
141throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName)); 182return SourceObject.GetType().GetProperty(propertyName, Type.EmptyTypes);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
110PropertyInfo propertyInfo = childControl.GetType().GetProperty("RightToLeftLayout", memberAccess);
WinFormsControlsTest (8)
CollectionEditors.cs (1)
40label1.Text = sender.GetType().FullName;
CustomComCtl32Button.cs (3)
57if (control.GetType().Name == "Button") 78if (sender.GetType().Name == "CheckBox") 85if (sender.GetType().Name == "Button")
Dialogs.cs (3)
23TypeDescriptor.AddProvider(new AssociatedMetadataTypeTypeDescriptionProvider(openFileDialog1.GetType(), typeof(ExposedClientGuidMetadata)), openFileDialog1); 24TypeDescriptor.AddProvider(new AssociatedMetadataTypeTypeDescriptionProvider(saveFileDialog1.GetType(), typeof(ExposedClientGuidMetadata)), saveFileDialog1); 25TypeDescriptor.AddProvider(new AssociatedMetadataTypeTypeDescriptionProvider(folderBrowserDialog1.GetType(), typeof(ExposedClientGuidMetadata)), folderBrowserDialog1);
MainForm.cs (1)
255Debug.WriteLine($"Why did we get a {control.GetType().Name} instead a {nameof(Button)} on {nameof(MainForm)}?");
XmlFileLogger (1)
LogProcessNode.cs (1)
96var type = childNode.GetType();
xunit.assert (45)
EqualityAsserts.cs (6)
272 var expectedType = expected?.GetType(); 273 var actualType = actual?.GetType(); 317 var expectedType = expected?.GetType(); 318 var actualType = actual?.GetType(); 786 var expectedType = expected?.GetType(); 787 var actualType = actual?.GetType();
EventAsserts.cs (10)
70 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 71 throw RaisesException.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType()); 95 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 96 throw RaisesException.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType()); 126 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 127 throw RaisesException.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType()); 298 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 299 throw RaisesException.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType()); 323 if (raisedEvent.Arguments != null && !raisedEvent.Arguments.GetType().Equals(typeof(T))) 324 throw RaisesException.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
Sdk\ArgumentFormatter.cs (4)
222 if (value.GetType().GetTypeInfo().IsEnum) 251 var type = value.GetType(); 293 return string.Format(CultureInfo.CurrentCulture, "{0} was thrown formatting an object of type \"{1}\"", ex.GetType().Name, value.GetType()); 587 (from @interface in obj.GetType().GetTypeInfo().ImplementedInterfaces
Sdk\AssertEqualityComparer.cs (4)
339 var xKeyType = xKey.GetType(); 340 var yKeyType = yKey?.GetType(); 362 var xValueType = xValue.GetType(); 363 var yValueType = yValue?.GetType();
Sdk\AssertHelper.cs (10)
452 var expectedType = expected.GetType(); 454 var actualType = actual.GetType(); 541 ArgumentFormatter.FormatTypeName(expected.GetType()), 542 ArgumentFormatter.FormatTypeName(actual.GetType()) 606 var expectedType = expected.GetType(); 607 var actualType = actual.GetType(); 671 if (!result && TryConvert(expected, actual.GetType(), out converted)) 673 if (!result && TryConvert(actual, expected.GetType(), out converted)) 698 var expectedGetters = GetGettersForType(expected.GetType()); 699 var actualGetters = GetGettersForType(actual.GetType());
Sdk\AssertRangeComparer.cs (2)
47 if (x.GetType() != y.GetType())
Sdk\CollectionTracker.cs (3)
225 var valueXType = valueX.GetType(); 226 var valueYType = valueY.GetType(); 807 return item?.GetType().FullName;
Sdk\Exceptions\IsAssignableFromException.cs (1)
53 ArgumentFormatter.Format(actual?.GetType())
Sdk\Exceptions\IsNotAssignableFromException.cs (1)
45 ArgumentFormatter.Format(Assert.GuardArgumentNotNull(nameof(actual), actual).GetType())
TypeAsserts.cs (4)
67 if (@object == null || !expectedType.GetTypeInfo().IsAssignableFrom(@object.GetType().GetTypeInfo())) 101 if (@object != null && expectedType.GetTypeInfo().IsAssignableFrom(@object.GetType().GetTypeInfo())) 136 if (@object != null && expectedType.Equals(@object.GetType())) 178 var actualType = @object.GetType();