Implemented interface member:
442 references to Equals
Aspire.Hosting.Analyzers (6)
AppHostAnalyzer.cs (4)
84SymbolEqualityComparer.Default.Equals(parameterData.Symbol.Type, wellKnownTypes.Get(SpecialType.System_String)) 109SymbolEqualityComparer.Default.Equals(a?.AttributeClass, resourceNameAttribute) 111: SymbolEqualityComparer.Default.Equals(a?.AttributeClass, endpointNameAttribute) 124if (SymbolEqualityComparer.Default.Equals(modelNameParameter, argument.Parameter))
Infrastructure\WellKnownTypes.cs (2)
117if (SymbolEqualityComparer.Default.Equals(type, Get(wellKnownType))) 150if (SymbolEqualityComparer.Default.Equals(t, interfaceType))
ConfigurationSchemaGenerator (44)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (27)
88if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.ConfigurationBinder)) 92else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsBuilderConfigurationExtensions)) 96else if (SymbolEqualityComparer.Default.Equals(candidateBinderType, _typeSymbols.OptionsConfigurationServiceCollectionExtensions)) 201else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.IConfigurationSection)) 295if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.CultureInfo)) 299else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateTimeOffset) || 300SymbolEqualityComparer.Default.Equals(type, _typeSymbols.DateOnly) || 301SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeOnly) || 302SymbolEqualityComparer.Default.Equals(type, _typeSymbols.TimeSpan)) 306else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Int128) || 307SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Half) || 308SymbolEqualityComparer.Default.Equals(type, _typeSymbols.UInt128)) 312else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Uri)) 316else if (SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Version) || 317SymbolEqualityComparer.Default.Equals(type, _typeSymbols.Guid)) 547if (SymbolEqualityComparer.Default.Equals(_typeSymbols.IntPtr, type) || 548SymbolEqualityComparer.Default.Equals(_typeSymbols.UIntPtr, type) || 549SymbolEqualityComparer.Default.Equals(_typeSymbols.SerializationInfo, type) || 550SymbolEqualityComparer.Default.Equals(_typeSymbols.ParameterInfo, type) || 674AttributeData? attributeData = property.GetAttributes().FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, _typeSymbols.ConfigurationKeyNameAttribute)); 810&& SymbolEqualityComparer.Default.Equals(unbound, @interface)); 813return type.AllInterfaces.FirstOrDefault(candidate => SymbolEqualityComparer.Default.Equals(candidate, @interface)); 826return SymbolEqualityComparer.Default.Equals(unbound, @interface); 829return SymbolEqualityComparer.Default.Equals(type, @interface); 861SymbolEqualityComparer.Default.Equals(element, method.Parameters[0].Type))) 877SymbolEqualityComparer.Default.Equals(key, method.Parameters[0].Type) && 878SymbolEqualityComparer.Default.Equals(element, method.Parameters[1].Type)))
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (6)
45if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[0].Type)) 62else if (SymbolEqualityComparer.Default.Equals(@params[2].Type, _typeSymbols.ActionOfBinderOptions)) 140if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[0].Type)) 161else if (paramCount is 2 && SymbolEqualityComparer.Default.Equals(@params[1].Type, _typeSymbols.ActionOfBinderOptions)) 179else if (paramCount is 3 && SymbolEqualityComparer.Default.Equals(@params[2].Type, _typeSymbols.ActionOfBinderOptions)) 211else if (paramCount is 3 && SymbolEqualityComparer.Default.Equals(@params[2].Type, type))
RuntimeSource\Configuration.Binder\Parser\OptionsBuilderConfigurationExtensions.cs (4)
23!SymbolEqualityComparer.Default.Equals(_typeSymbols.OptionsBuilderOfT_Unbound, genericType.ConstructUnboundGenericType())) 51if (!SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[1].Type)) 593 when SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type) => 80SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[2].Type))
RuntimeSource\Configuration.Binder\Parser\OptionsConfigurationServiceCollectionExtensions.cs (7)
23!SymbolEqualityComparer.Default.Equals(_typeSymbols.IServiceCollection, @params[0].Type)) 35if (paramCount is 2 && SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[1].Type)) 45SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, thirdParamType)) 49else if (SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, secondParamType) && 50SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, thirdParamType)) 61SymbolEqualityComparer.Default.Equals(_typeSymbols.IConfiguration, @params[2].Type) && 62SymbolEqualityComparer.Default.Equals(_typeSymbols.ActionOfBinderOptions, @params[3].Type))
ILLink.RoslynAnalyzer (19)
DataFlow\LocalStateLattice.cs (1)
21 public bool Equals (LocalKey other) => SymbolEqualityComparer.Default.Equals (Local, other.Local) &&
DynamicallyAccessedMembersAnalyzer.cs (1)
271 if (!implementationType.IsInterface () && !SymbolEqualityComparer.Default.Equals (implementationType, type))
ISymbolExtensions.cs (2)
212 SymbolEqualityComparer.Default.Equals(methodSymbol.ReturnType.OriginalDefinition, compilation.TaskType()) || 213 SymbolEqualityComparer.Default.Equals(methodSymbol.ReturnType.OriginalDefinition, compilation.TaskOfTType()));
RequiresAnalyzerBase.cs (2)
147 if (!implementationType.IsInterface () && !SymbolEqualityComparer.Default.Equals (implementationType, type)) 172 while (member is IMethodSymbol method && method.OverriddenMethod != null && SymbolEqualityComparer.Default.Equals (method.ReturnType, method.OverriddenMethod.ReturnType))
RequiresAssemblyFilesAnalyzer.cs (1)
80 return SymbolEqualityComparer.Default.Equals (propertySymbol, isDynamicCodeSupportedProperty);
RequiresDynamicCodeAnalyzer.cs (1)
139 return SymbolEqualityComparer.Default.Equals (propertySymbol, isDynamicCodeSupportedProperty);
RequiresUnreferencedCodeAnalyzer.cs (1)
82 return SymbolEqualityComparer.Default.Equals (propertySymbol, isDynamicCodeSupportedProperty);
TrimAnalysis\ReflectionAccessAnalyzer.cs (1)
123 if (SymbolEqualityComparer.Default.Equals (containingType, type))
TrimAnalysis\TrimAnalysisAssignmentPattern.cs (1)
46 Debug.Assert (SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisFieldAccessPattern.cs (2)
36 Debug.Assert (SymbolEqualityComparer.Default.Equals (Field, other.Field)); 38 Debug.Assert (SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisGenericInstantiationPattern.cs (2)
36 Debug.Assert (SymbolEqualityComparer.Default.Equals (GenericInstantiation, other.GenericInstantiation)); 37 Debug.Assert (SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (2)
55 Debug.Assert (SymbolEqualityComparer.Default.Equals (CalledMethod, other.CalledMethod)); 56 Debug.Assert (SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
TrimAnalysis\TrimAnalysisReflectionAccessPattern.cs (2)
35 Debug.Assert (SymbolEqualityComparer.Default.Equals (ReferencedMethod, other.ReferencedMethod)); 37 Debug.Assert (SymbolEqualityComparer.Default.Equals (OwningSymbol, other.OwningSymbol));
Microsoft.Analyzers.Extra (25)
AsyncCallInsideUsingBlockAnalyzer.cs (5)
137return SymbolEqualityComparer.Default.Equals(returnType, taskType) || 138SymbolEqualityComparer.Default.Equals(returnType, taskOfTType) || 139SymbolEqualityComparer.Default.Equals(returnType, valueTaskType) || 140SymbolEqualityComparer.Default.Equals(returnType, valueTaskOfTType); 194return SymbolEqualityComparer.Default.Equals(localReference.Local, symbol);
AsyncMethodWithoutCancellation.cs (6)
117return SymbolEqualityComparer.Default.Equals(returnType, taskType) || 118SymbolEqualityComparer.Default.Equals(returnType, taskOfTType) || 119SymbolEqualityComparer.Default.Equals(returnType, valueTaskType) || 120SymbolEqualityComparer.Default.Equals(returnType, valueTaskOfTType); 133SymbolEqualityComparer.Default.Equals(data.AttributeClass, obsoleteAttribute)); 145.Any(implementation => SymbolEqualityComparer.Default.Equals(implementation, method)))
CallAnalysis\Arrays.cs (1)
115if (keyType.GetAttributes().Any(a => a.AttributeClass != null && SymbolEqualityComparer.Default.Equals(a.AttributeClass, flagsAttr)))
CallAnalysis\CallAnalyzer.Handlers.cs (2)
48if (SymbolEqualityComparer.Default.Equals(target, h.Method)) 67if (SymbolEqualityComparer.Default.Equals(target, impl))
CallAnalysis\CallAnalyzer.Registrar.cs (1)
176if (SymbolEqualityComparer.Default.Equals(h.Method, method))
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
200if (SymbolEqualityComparer.Default.Equals(methodAttr.AttributeClass, logMethodAttribute) && 249if (SymbolEqualityComparer.Default.Equals(ctorArg.Type, param.Type)) 639if (SymbolEqualityComparer.Default.Equals(methodAttr.AttributeClass, logMethodAttribute) &&
CallAnalysis\StartsEndsWith.cs (4)
23.Where(m => SymbolEqualityComparer.Default.Equals(m.Parameters[0].Type, stringType)) 26(m.Parameters.Length == 2 && SymbolEqualityComparer.Default.Equals(m.Parameters[1].Type, stringCompType))); 29.Where(m => SymbolEqualityComparer.Default.Equals(m.Parameters[0].Type, stringType)) 32(m.Parameters.Length == 2 && SymbolEqualityComparer.Default.Equals(m.Parameters[1].Type, stringCompType)));
ConditionalAccessAnalyzer.cs (1)
121if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, maybeNull))
Utilities\SymbolExtensions.cs (2)
27if (SymbolEqualityComparer.Default.Equals(t, potentialAncestor)) 70if (SymbolEqualityComparer.Default.Equals(impl, method))
Microsoft.Analyzers.Local (6)
CallAnalysis\CallAnalyzer.Handlers.cs (2)
48if (SymbolEqualityComparer.Default.Equals(target, h.Method)) 67if (SymbolEqualityComparer.Default.Equals(target, impl))
CallAnalysis\CallAnalyzer.Registrar.cs (1)
176if (SymbolEqualityComparer.Default.Equals(h.Method, method))
CallAnalysis\ToInvariantString.cs (2)
32if (method.Parameters.Length == 1 && SymbolEqualityComparer.Default.Equals(method.Parameters[0].Type, formatProvider)) 49if (SymbolEqualityComparer.Default.Equals(invariantCulture, prop.Property))
Utilities\SymbolExtensions.cs (1)
41if (SymbolEqualityComparer.Default.Equals(a.AttributeClass, attribute))
Microsoft.AspNetCore.Analyzers (6)
MiddlewareAnalyzer.cs (1)
36SymbolEqualityComparer.Default.Equals(invocation.Arguments[0].Parameter?.Type, _context.StartupSymbols.IApplicationBuilder))
ServicesAnalyzer.cs (1)
31SymbolEqualityComparer.Default.Equals(invocation.Arguments[0].Parameter?.Type, _context.StartupSymbols.IServiceCollection))
StartupAnalyzer.cs (2)
44if (!StartupFacts.IsStartupClass(symbols, type) && !SymbolEqualityComparer.Default.Equals(entryPoint?.ContainingType, type)) 73var isMain = SymbolEqualityComparer.Default.Equals(entryPoint, context.OwningSymbol);
StartupFacts.cs (2)
77return SymbolEqualityComparer.Default.Equals(symbol.Parameters[0].Type, symbols.IServiceCollection); 112if (SymbolEqualityComparer.Default.Equals(symbol.Parameters[i].Type, symbols.IApplicationBuilder))
Microsoft.AspNetCore.App.Analyzers (68)
Authorization\AddAuthorizationBuilderAnalyzer.cs (13)
57if (SymbolEqualityComparer.Default.Equals(invocation.TargetMethod, addAuthorizationMethod) 58&& SymbolEqualityComparer.Default.Equals(invocation.TargetMethod.ContainingType, policyServiceCollectionExtensions) 148&& SymbolEqualityComparer.Default.Equals(propertyReferenceContainingType, authorizationOptionsTypes.AuthorizationOptions)) 154&& SymbolEqualityComparer.Default.Equals(invokedMethodContainingType, authorizationOptionsTypes.AuthorizationOptions)) 180&& SymbolEqualityComparer.Default.Equals(property, targetProperty.Property)) 185&& SymbolEqualityComparer.Default.Equals(property, valueProperty.Property)) 193if (SymbolEqualityComparer.Default.Equals(property, authorizationOptionsTypes.DefaultPolicy) 194|| SymbolEqualityComparer.Default.Equals(property, authorizationOptionsTypes.FallbackPolicy) 195|| SymbolEqualityComparer.Default.Equals(property, authorizationOptionsTypes.InvokeHandlersAfterFailure)) 207&& SymbolEqualityComparer.Default.Equals(methodReferenceOperation.Member, authorizationOptionsTypes.GetPolicy) 208&& SymbolEqualityComparer.Default.Equals(methodReferenceOperation.Member.ContainingType, authorizationOptionsTypes.AuthorizationOptions)) 214&& SymbolEqualityComparer.Default.Equals(invocationOperation.TargetMethod, authorizationOptionsTypes.GetPolicy) 215&& SymbolEqualityComparer.Default.Equals(invocationOperation.TargetMethod.ContainingType, authorizationOptionsTypes.AuthorizationOptions))
Http\HeaderDictionaryAddAnalyzer.cs (1)
36&& SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IHeaderDictionary), invocation.Instance?.Type))
Http\RequestDelegateReturnTypeAnalyzer.cs (4)
33SymbolEqualityComparer.Default.Equals(parent.Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_RequestDelegate))) 38if (SymbolEqualityComparer.Default.Equals(returnType.OriginalDefinition, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_Task_T))) 49SymbolEqualityComparer.Default.Equals(parent.Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_RequestDelegate))) 64if (returnType != null && SymbolEqualityComparer.Default.Equals(returnType.OriginalDefinition, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_Task_T)))
Mvc\DetectAmbiguousActionRoutes.cs (1)
151if (SymbolEqualityComparer.Default.Equals(actionSymbol1, actionSymbol2))
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
112private static bool IsSameSymbol(ISymbol? x, ISymbol? y) => SymbolEqualityComparer.Default.Equals(x, y);
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
60=> SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Components_Rendering_RenderTreeBuilder), targetMethod.ContainingType)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
374if (SymbolEqualityComparer.Default.Equals(attributeTypeSymbol.ContainingSymbol, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_AsParametersAttribute)))
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (3)
156if (SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_EndpointRouteBuilderExtensions), mapMethodSymbol.ContainingType)) 270a => SymbolEqualityComparer.Default.Equals(a.Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Routing_IEndpointRouteBuilder)) || 291var routeStringParameter = method.Parameters.FirstOrDefault(p => SymbolEqualityComparer.Default.Equals(stringSymbol, p.Type) &&
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
99.Where(i => semanticModel.GetSymbolInfo(i) is var symbolInfo && SymbolEqualityComparer.Default.Equals(symbolInfo.Symbol ?? symbolInfo.CandidateSymbols.FirstOrDefault(), matchingParameter));
RouteHandlers\DetectAmbiguousRoutes.cs (12)
97if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_RoutingEndpointConventionBuilderExtensions))) 109else if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_AuthorizationEndpointConventionBuilderExtensions))) 113else if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_OpenApiRouteHandlerBuilderExtensions))) 128else if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_CorsEndpointConventionBuilderExtensions))) 132else if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_Extensions_DependencyInjection_OutputCacheConventionBuilderExtensions))) 136else if (SymbolEqualityComparer.Default.Equals(method.ContainingType, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_RateLimiterEndpointConventionBuilderExtensions))) 185return SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local); 191return SymbolEqualityComparer.Default.Equals(parameter.Parameter, otherParameter.Parameter); 198SymbolEqualityComparer.Default.Equals(invocation.TargetMethod, otherInvocation.TargetMethod) && 244if (!SymbolEqualityComparer.Default.Equals(local.Local, otherLocal.Local)) 251if (!SymbolEqualityComparer.Default.Equals(parameter.Parameter, otherParameter.Parameter)) 275if (SymbolEqualityComparer.Default.Equals(arguments[i].Parameter, parameter))
RouteHandlers\RouteHandlerAnalyzer.cs (3)
201SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Builder_EndpointRouteBuilderExtensions), targetMethod.ContainingType) && 209if (SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.System_Delegate), parmeterType)) 213if (SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_RequestDelegate), parmeterType))
src\Shared\Roslyn\CodeAnalysisExtensions.cs (5)
102if (SymbolEqualityComparer.Default.Equals(source, target)) 111if (SymbolEqualityComparer.Default.Equals(source, @interface)) 122if (SymbolEqualityComparer.Default.Equals(source, type)) 159Debug.Assert(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method)); 165Debug.Assert(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
src\Shared\Roslyn\MvcFacts.cs (1)
143return SymbolEqualityComparer.Default.Equals(implementedMethod, method);
src\Shared\RoslynUtils\ParsabilityHelper.cs (12)
33if (SymbolEqualityComparer.Default.Equals(typeSymbol, wellKnownTypes.Get(WellKnownType.System_Uri))) 111SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[1].Type, wellKnownTypes.Get(WellKnownType.System_IFormatProvider)) && 119i => SymbolEqualityComparer.Default.Equals(i.ConstructedFrom, iParsableTypeSymbol) 128i => SymbolEqualityComparer.Default.Equals(i.ConstructedFrom, iBindableFromHttpContextTypeSymbol) 131SymbolEqualityComparer.Default.Equals(constructedTypeSymbol.TypeArguments[0].UnwrapTypeSymbol(unwrapNullable: true), typeSymbol); 139SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[0].Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpContext)) && 141SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_ValueTask_T)) && 142SymbolEqualityComparer.Default.Equals(returnType.TypeArguments[0], typeSymbol); 150SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[0].Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpContext)) && 151SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[1].Type, wellKnownTypes.Get(WellKnownType.System_Reflection_ParameterInfo)) && 158return SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_ValueTask_T)) && 159SymbolEqualityComparer.Default.Equals(returnType.TypeArguments[0].UnwrapTypeSymbol(unwrapNullable: true), containingType);
src\Shared\RoslynUtils\SymbolExtensions.cs (5)
56if (SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attributeType)) 74if (SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attributeType)) 129if (SymbolEqualityComparer.Default.Equals(t, interfaceType)) 138=> SymbolEqualityComparer.Default.Equals(type, semanticModel.Compilation.GetTypeByMetadataName(typeName)); 141=> SymbolEqualityComparer.Default.Equals(type, otherType);
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
122if (SymbolEqualityComparer.Default.Equals(type, Get(wellKnownType))) 155if (SymbolEqualityComparer.Default.Equals(t, interfaceType))
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (2)
326if (!SymbolEqualityComparer.Default.Equals(receiverType, disallowedReceiverType)) 352if (SymbolEqualityComparer.Default.Equals(type, methodSymbol.ContainingType))
Microsoft.AspNetCore.Components.Analyzers (8)
ComponentFacts.cs (5)
27return SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute) || SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.CascadingParameterAttribute); 43return property.GetAttributes().Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute)); 58var attribute = property.GetAttributes().FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute)); 87return property.GetAttributes().Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.CascadingParameterAttribute));
ComponentParameterAnalyzer.cs (1)
147.Any(f => f.IsImplicitlyDeclared && SymbolEqualityComparer.Default.Equals(propertySymbol, f.AssociatedSymbol));
InternalUsageAnalyzer.cs (2)
129if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly)) 158if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly))
Microsoft.AspNetCore.Components.SdkAnalyzers (7)
ComponentFacts.cs (5)
27return SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute) || SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.CascadingParameterAttribute); 43return property.GetAttributes().Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute)); 58var attribute = property.GetAttributes().FirstOrDefault(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.ParameterAttribute)); 87return property.GetAttributes().Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, symbols.CascadingParameterAttribute));
InternalUsageAnalyzer.cs (2)
129if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly)) 158if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly))
Microsoft.AspNetCore.Http.RequestDelegateGenerator (46)
src\Shared\RoslynUtils\ParsabilityHelper.cs (12)
33if (SymbolEqualityComparer.Default.Equals(typeSymbol, wellKnownTypes.Get(WellKnownType.System_Uri))) 111SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[1].Type, wellKnownTypes.Get(WellKnownType.System_IFormatProvider)) && 119i => SymbolEqualityComparer.Default.Equals(i.ConstructedFrom, iParsableTypeSymbol) 128i => SymbolEqualityComparer.Default.Equals(i.ConstructedFrom, iBindableFromHttpContextTypeSymbol) 131SymbolEqualityComparer.Default.Equals(constructedTypeSymbol.TypeArguments[0].UnwrapTypeSymbol(unwrapNullable: true), typeSymbol); 139SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[0].Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpContext)) && 141SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_ValueTask_T)) && 142SymbolEqualityComparer.Default.Equals(returnType.TypeArguments[0], typeSymbol); 150SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[0].Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpContext)) && 151SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[1].Type, wellKnownTypes.Get(WellKnownType.System_Reflection_ParameterInfo)) && 158return SymbolEqualityComparer.Default.Equals(returnType.ConstructedFrom, wellKnownTypes.Get(WellKnownType.System_Threading_Tasks_ValueTask_T)) && 159SymbolEqualityComparer.Default.Equals(returnType.TypeArguments[0].UnwrapTypeSymbol(unwrapNullable: true), containingType);
src\Shared\RoslynUtils\SymbolExtensions.cs (5)
56if (SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attributeType)) 74if (SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attributeType)) 129if (SymbolEqualityComparer.Default.Equals(t, interfaceType)) 138=> SymbolEqualityComparer.Default.Equals(type, semanticModel.Compilation.GetTypeByMetadataName(typeName)); 141=> SymbolEqualityComparer.Default.Equals(type, otherType);
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
122if (SymbolEqualityComparer.Default.Equals(type, Get(wellKnownType))) 155if (SymbolEqualityComparer.Default.Equals(t, interfaceType))
StaticRouteHandlerModel\EndpointParameter.cs (21)
95if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormFileCollection))) 100else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormFile))) 105else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormCollection))) 129if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.System_IO_Stream))) 134else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.System_IO_Pipelines_PipeReader))) 196else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormFileCollection))) 203else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormFile))) 210else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IFormCollection))) 234else if (SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_Extensions_Primitives_StringValues))) 260=> SymbolEqualityComparer.Default.Equals(Type, wellKnownTypes.Get(WellKnownType.Microsoft_Extensions_Primitives_StringValues)) 361else if (SymbolEqualityComparer.Default.Equals(parameterType, wellKnownTypes.Get(WellKnownType.System_DateTimeOffset))) 365else if (SymbolEqualityComparer.Default.Equals(parameterType, wellKnownTypes.Get(WellKnownType.System_DateOnly))) 383if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpContext))) 388if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpRequest))) 393if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_HttpResponse))) 398if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.System_IO_Pipelines_PipeReader))) 403if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.System_IO_Stream))) 408if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.System_Security_Claims_ClaimsPrincipal))) 413if (SymbolEqualityComparer.Default.Equals(type, wellKnownTypes.Get(WellKnownType.System_Threading_CancellationToken))) 594SymbolEqualityComparer.IncludeNullability.Equals(other.Type, Type) && 599SymbolEqualityComparer.IncludeNullability.Equals(other.Type, Type) &&
StaticRouteHandlerModel\EndpointResponse.cs (3)
83SymbolEqualityComparer.Default.Equals(ResponseType, resultType); 104SymbolEqualityComparer.Default.Equals(otherEndpointResponse.ResponseType, ResponseType) && 105SymbolEqualityComparer.Default.Equals(otherEndpointResponse.WrappedResponseType, WrappedResponseType) &&
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
34SymbolEqualityComparer.Default.Equals(delegateType, wellKnownTypes.Get(WellKnownTypeData.WellKnownType.System_Delegate)))
StaticRouteHandlerModel\Model\EndpointParameterExtensions.cs (1)
22if (SymbolEqualityComparer.IncludeNullability.Equals(handlerParameterType, bindAsyncReturnType))
StaticRouteHandlerModel\Model\ParameterLookupKey.cs (1)
30return SymbolEqualityComparer.Default.Equals(Type, other.Type) &&
Microsoft.AspNetCore.Mvc.Analyzers (9)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (5)
102if (SymbolEqualityComparer.Default.Equals(source, target)) 111if (SymbolEqualityComparer.Default.Equals(source, @interface)) 122if (SymbolEqualityComparer.Default.Equals(source, type)) 159Debug.Assert(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method)); 165Debug.Assert(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
src\Shared\Roslyn\MvcFacts.cs (1)
143return SymbolEqualityComparer.Default.Equals(implementedMethod, method);
TagHelpersInCodeBlocksAnalyzer.cs (1)
105if (!SymbolEqualityComparer.Default.Equals(method, symbolCache.TagHelperRunnerRunAsyncMethodSymbol))
TopLevelParameterNameAnalyzer.cs (1)
155var nameProperty = SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, symbolCache.BindAttribute) ? "Prefix" : "Name";
ViewFeaturesAnalyzerContext.cs (1)
35if (!SymbolEqualityComparer.Default.Equals(method.ContainingType, HtmlHelperPartialExtensionsType))
Microsoft.AspNetCore.Mvc.Api.Analyzers (12)
ActualApiResponseMetadataFactory.cs (2)
268if (SymbolEqualityComparer.Default.Equals(property.ExplicitInterfaceImplementations[i], statusCodeActionResultStatusProperty)) 275return SymbolEqualityComparer.Default.Equals(implementedProperty, property);
AddResponseTypeAttributeCodeFixAction.cs (3)
75if (statusCode >= 400 && returnType != null && !SymbolEqualityComparer.Default.Equals(returnType, errorResponseType)) 89if (!declaredResponseMetadata.Any(m => m.IsDefault && SymbolEqualityComparer.Default.Equals(m.AttributeSource, context.Method))) 183SymbolEqualityComparer.Default.Equals(declaredMetadata.AttributeSource, context.Method))
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
193if (!SymbolEqualityComparer.Default.Equals(propertyReference.Member.ContainingType, symbolCache.ModelStateDictionary))
src\Shared\Roslyn\CodeAnalysisExtensions.cs (5)
102if (SymbolEqualityComparer.Default.Equals(source, target)) 111if (SymbolEqualityComparer.Default.Equals(source, @interface)) 122if (SymbolEqualityComparer.Default.Equals(source, type)) 159Debug.Assert(method.PartialImplementationPart == null && !SymbolEqualityComparer.Default.Equals(method.PartialDefinitionPart, method)); 165Debug.Assert(!SymbolEqualityComparer.Default.Equals(method.PartialImplementationPart, method));
src\Shared\Roslyn\MvcFacts.cs (1)
143return SymbolEqualityComparer.Default.Equals(implementedMethod, method);
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
89if (!SymbolEqualityComparer.Default.Equals(symbol.TypeArguments[0], symbol.Parameters[1].Type))
HubServerProxyGenerator.Parser.cs (1)
80if (!SymbolEqualityComparer.Default.Equals(symbol.TypeArguments[0], symbol.ReturnType))
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchExpressionHelpers.cs (1)
126hasUnderlyingTypeArm |= SymbolEqualityComparer.Default.Equals(
src\Analyzers\Core\Analyzers\PopulateSwitch\PopulateSwitchStatementHelpers.cs (1)
201hasUnderlyingTypeCase |= SymbolEqualityComparer.Default.Equals(
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
493if (SymbolEqualityComparer.Default.Equals(entryPoint, member))
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
172=> SymbolEqualityComparer.Default.Equals(type, FindType<T>(semanticModel));
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
83if (SymbolEqualityComparer.Default.Equals(firstType, secondType))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (2)
148if (SymbolEqualityComparer.Default.Equals(localType, asType) && 149!SymbolEqualityComparer.IncludeNullability.Equals(localType, asType))
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
241if (!isEnumOrCompletionListType && !SymbolEqualityComparer.Default.Equals(type, symbolType))
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (2)
148if (SymbolEqualityComparer.Default.Equals(localType, asType) && 149!SymbolEqualityComparer.IncludeNullability.Equals(localType, asType))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\OperatorTests.cs (5)
8431Assert.True(SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.Parameters[0].Type) || 8432SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.Parameters[1].Type)); 8435if (SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.ReturnType)) 8440if (SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.Parameters[0].Type)) 8445if (SymbolEqualityComparer.ConsiderEverything.Equals(symbol1.ContainingSymbol, symbol1.Parameters[1].Type))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (8)
Symbols\SymbolEqualityTests.cs (8)
380Assert.False(SymbolEqualityComparer.Default.Equals(symbol1, symbol2)); 381Assert.False(SymbolEqualityComparer.Default.Equals(symbol2, symbol1)); 383Assert.False(SymbolEqualityComparer.ConsiderEverything.Equals(symbol1, symbol2)); 384Assert.False(SymbolEqualityComparer.ConsiderEverything.Equals(symbol2, symbol1)); 387Assert.True(SymbolEqualityComparer.Default.Equals(symbol2, symbol3)); 388Assert.True(SymbolEqualityComparer.Default.Equals(symbol3, symbol2)); 390Assert.True(SymbolEqualityComparer.ConsiderEverything.Equals(symbol2, symbol3)); 391Assert.True(SymbolEqualityComparer.ConsiderEverything.Equals(symbol3, symbol2));
Microsoft.CodeAnalysis.Features (6)
EditAndContinue\Utilities\Extensions.cs (1)
176=> symbol is IMethodSymbol { Parameters: [var parameter] } && SymbolEqualityComparer.Default.Equals(parameter.Type, symbol.ContainingType);
ExtractMethod\MethodExtractor.cs (1)
240if (currentType == null || !SymbolEqualityComparer.Default.Equals(currentType, semanticModel.ResolveType(typeParameter)))
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
138SymbolEqualityComparer.IncludeNullability.Equals(parameter.Type, getMethod.ReturnType) &&
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
493if (SymbolEqualityComparer.Default.Equals(entryPoint, member))
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
172=> SymbolEqualityComparer.Default.Equals(type, FindType<T>(semanticModel));
src\Analyzers\Core\Analyzers\UseConditionalExpression\ForAssignment\UseConditionalExpressionForAssignmentHelpers.cs (1)
83if (SymbolEqualityComparer.Default.Equals(firstType, secondType))
Microsoft.CodeAnalysis.Workspaces (5)
Recommendations\AbstractRecommendationServiceRunner.cs (4)
445if (SymbolEqualityComparer.Default.Equals(originalContainerType, originalConstraintType)) 464if (SymbolEqualityComparer.Default.Equals(constraintTypeInterface.OriginalDefinition, originalConstraintType)) 475if (SymbolEqualityComparer.Default.Equals(interfaceType.OriginalDefinition, originalConstraintType)) 514if (SymbolEqualityComparer.Default.Equals(current.OriginalDefinition, matched))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
134SymbolEqualityComparer.Default.Equals(returnType, valueTaskType)) is IMethodSymbol disposeMethodFromPattern)
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\ResourceUsageAnalyzer.cs (1)
47SymbolEqualityComparer.Default.Equals(memberSymbol.ContainingType, SRSymbol) &&
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
129if (!SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, loggerMessageAttribute))
Microsoft.Extensions.Options.SourceGeneration (19)
Parser.cs (17)
205&& SymbolEqualityComparer.Default.Equals(m.Parameters[1].Type, modelType)); 249if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _symbolHolder.GenericIEnumerableSymbol)) 257if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _compilation.GetSpecialType(SpecialType.System_Collections_Generic_IEnumerable_T))) 355if (SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.ValidateObjectMembersAttributeSymbol)) 408else if (SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.ValidateEnumeratedItemsAttributeSymbol)) 480if (SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.MaxLengthAttributeSymbol) || 481SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.MinLengthAttributeSymbol) || 482(_symbolHolder.LengthAttributeSymbol is not null && SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.LengthAttributeSymbol))) 489else if (SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.CompareAttributeSymbol)) 493else if (SymbolEqualityComparer.Default.Equals(attributeType, _symbolHolder.RangeAttributeSymbol)) 668else if (SymbolEqualityComparer.Default.Equals(namedTypeSymbol, _symbolHolder.TimeSpanSymbol) && 669(SymbolEqualityComparer.Default.Equals(typeSymbol, _symbolHolder.TimeSpanSymbol) || typeSymbol.SpecialType == SpecialType.System_String)) 738if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _symbolHolder.IValidatableObjectSymbol)) 752if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _symbolHolder.ValidateOptionsSymbol)) 765if (SymbolEqualityComparer.Default.Equals(implementingInterface.OriginalDefinition, _symbolHolder.ValidateOptionsSymbol)) 768if (SymbolEqualityComparer.Default.Equals(modelType, t)) 816if (SymbolEqualityComparer.Default.Equals(type, _symbolHolder.TypeSymbol) &&
ParserUtilities.cs (2)
24if (SymbolEqualityComparer.Default.Equals(attribute, item.AttributeClass) && item.AttributeConstructor != null) 62if (SymbolEqualityComparer.Default.Equals(interfaceType, iface))
Microsoft.Gen.ComplianceReports (1)
Parser.cs (1)
209if (SymbolEqualityComparer.Default.Equals(_symbolHolder.LoggerMessageAttribute, a.AttributeClass))
Microsoft.Gen.ContextualOptions (2)
ContextReceiver.cs (1)
49.Where(_ => _.symbol!.GetAttributes().Any(attribute => SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, holder!.OptionsContextAttribute)))
ContextualOptionsGenerator.cs (1)
41.Where(_ => _.symbol!.GetAttributes().Any(attribute => SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, holder!.OptionsContextAttribute)))
Microsoft.Gen.Logging (13)
Parsing\AttributeProcessors.cs (1)
43if (SymbolEqualityComparer.Default.Equals(a.Type, symbols.LogLevelSymbol))
Parsing\Parser.cs (3)
475.Where(x => !SymbolEqualityComparer.Default.Equals(x, symbols.NoDataClassificationAttribute)) 588IsLogLevel = !parsingState.FoundLogLevel && SymbolEqualityComparer.Default.Equals(paramTypeSymbol, symbols.LogLevelSymbol), 610if (attrCtor != null && SymbolEqualityComparer.Default.Equals(attrCtor.ContainingType, symbols.LoggerMessageAttribute))
Parsing\Parser.TagProvider.cs (3)
101&& SymbolEqualityComparer.Default.Equals(tagCollectorType, method.Parameters[0].Type) 163if (SymbolEqualityComparer.Default.Equals(type.WithNullableAnnotation(NullableAnnotation.None), target.WithNullableAnnotation(NullableAnnotation.None))) 170if (SymbolEqualityComparer.Default.Equals(target.WithNullableAnnotation(NullableAnnotation.None), iface.WithNullableAnnotation(NullableAnnotation.None)))
Parsing\TypeSymbolExtensions.cs (4)
13=> (sym.ImplementsInterface(symbols.EnumerableSymbol) || SymbolEqualityComparer.Default.Equals(sym, symbols.EnumerableSymbol)) 28&& SymbolEqualityComparer.Default.Equals(ts.Parameters[0].Type, symbols.FormatProviderSymbol)) 52&& SymbolEqualityComparer.Default.Equals(ts.Parameters[1].Type, symbols.FormatProviderSymbol)) 67return symbols.SpanFormattableSymbol != null && (sym.ImplementsInterface(symbols.SpanFormattableSymbol) || SymbolEqualityComparer.Default.Equals(sym, symbols.SpanFormattableSymbol));
src\Generators\Shared\ParserUtilities.cs (2)
29if (SymbolEqualityComparer.Default.Equals(attribute, item.AttributeClass) && item.AttributeConstructor != null) 67if (SymbolEqualityComparer.Default.Equals(interfaceType, iface))
Microsoft.Gen.Metrics (2)
src\Generators\Shared\ParserUtilities.cs (2)
29if (SymbolEqualityComparer.Default.Equals(attribute, item.AttributeClass) && item.AttributeConstructor != null) 67if (SymbolEqualityComparer.Default.Equals(interfaceType, iface))
Microsoft.Gen.MetricsReports (2)
src\Generators\Shared\ParserUtilities.cs (2)
29if (SymbolEqualityComparer.Default.Equals(attribute, item.AttributeClass) && item.AttributeConstructor != null) 67if (SymbolEqualityComparer.Default.Equals(interfaceType, iface))
Microsoft.Interop.ComInterfaceGenerator (8)
ComInterfaceGenerator.cs (3)
248if (lcidConversionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, lcidConversionAttrType)) 252else if (suppressGCTransitionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, suppressGCTransitionAttrType)) 256else if (unmanagedCallConvAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, unmanagedCallConvAttrType))
ComInterfaceInfo.cs (1)
147if (SymbolEqualityComparer.Default.Equals(baseSymbol.ContainingAssembly, symbol.ContainingAssembly))
VtableIndexStubGenerator.cs (4)
217else if (lcidConversionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, lcidConversionAttrType)) 221else if (suppressGCTransitionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, suppressGCTransitionAttrType)) 225else if (unmanagedCallConvAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, unmanagedCallConvAttrType)) 294bool implementsIUnmanagedInterfaceOfSelf = symbol.ContainingType.AllInterfaces.Any(iface => SymbolEqualityComparer.Default.Equals(iface, expectedUnmanagedInterfaceType));
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSMarshalAsAttributeInfoParser.cs (1)
21public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.IsGenericType && SymbolEqualityComparer.Default.Equals(_jsMarshalAsAttribute, attributeType.ConstructUnboundGenericType());
Microsoft.Interop.LibraryImportGenerator (19)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
123if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, libraryImportAttrType))
Analyzers\ConvertToLibraryImportFixer.cs (1)
664if (SymbolEqualityComparer.Default.Equals(attrLocal.AttributeClass, attributeType))
Analyzers\CustomMarshallerAttributeAnalyzer.cs (11)
894if (!SymbolEqualityComparer.Default.Equals(methods.UnmanagedValuesDestination.Parameters[0].Type, unmanagedType)) 903if (!SymbolEqualityComparer.Default.Equals(methods.ToUnmanaged.ReturnType, methods.ToUnmanagedWithBuffer.ReturnType)) 915if (unmanagedType is not null && !SymbolEqualityComparer.Default.Equals(unmanagedType, toManagedMethod.Parameters[0].Type)) 925if (!SymbolEqualityComparer.Default.Equals(methods.UnmanagedValuesSource.Parameters[0].Type, unmanagedType)) 934if (!SymbolEqualityComparer.Default.Equals(methods.ToManaged.Parameters[1].Type, methods.ToManagedFinally.Parameters[1].Type)) 949&& !SymbolEqualityComparer.Default.Equals(sourceElementType, destinationElementType)) 967&& !SymbolEqualityComparer.Default.Equals(sourceElementType, expectedElementType)) 998if (SymbolEqualityComparer.Default.Equals(spanTypeMaybe.OriginalDefinition, _spanOfT) || SymbolEqualityComparer.Default.Equals(spanTypeMaybe.OriginalDefinition, _readOnlySpanOfT)) 1213if (unmanagedType is not null && !SymbolEqualityComparer.Default.Equals(unmanagedType, fromUnmanagedMethod.Parameters[0].Type)) 1237&& !SymbolEqualityComparer.Default.Equals(sourceElementType, destinationElementType))
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
66&& SymbolEqualityComparer.Default.Equals(constructedMarshallerType, marshallerType));
LibraryImportGenerator.cs (5)
245else if (lcidConversionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, lcidConversionAttrType)) 249else if (suppressGCTransitionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, suppressGCTransitionAttrType)) 253else if (unmanagedCallConvAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, unmanagedCallConvAttrType)) 257else if (defaultDllImportSearchPathsAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, defaultDllImportSearchPathsAttrType)) 261else if (wasmImportLinkageAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, wasmImportLinkageAttrType))
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
180else if (lcidConversionAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, lcidConversionAttrType)) 184else if (defaultDllImportSearchPathsAttrType is not null && SymbolEqualityComparer.Default.Equals(attr.AttributeClass, defaultDllImportSearchPathsAttrType))
Microsoft.Interop.SourceGeneration (41)
IncrementalGeneratorInitializationContextExtensions.cs (1)
37(context, ct) => SymbolEqualityComparer.Default.Equals(context.Attributes[0].AttributeClass.ContainingAssembly, context.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly))
ManualTypeMarshallingHelper.cs (1)
199if (!SymbolEqualityComparer.Default.Equals(managedType, managedTypeInst))
MarshallerShape.cs (35)
221&& SymbolEqualityComparer.Default.Equals(m.Parameters[0].Type, managedType)); 228if (!SymbolEqualityComparer.Default.Equals(spanOfT, namedType.ConstructedFrom) || namedType.TypeArguments.Length != 1) 242&& SymbolEqualityComparer.Default.Equals(currentType.TypeArguments[i], typeArgument)) 263&& SymbolEqualityComparer.Default.Equals(managedType, m.Parameters[0].Type)); 275&& SymbolEqualityComparer.Default.Equals(managedType, m.Parameters[0].Type)); 294&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 303&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 348&& SymbolEqualityComparer.Default.Equals(readOnlySpanOfT, returnType.ConstructedFrom)); 358&& SymbolEqualityComparer.Default.Equals(spanOfT, returnType.ConstructedFrom)); 388&& SymbolEqualityComparer.Default.Equals(spanOfT, returnType.ConstructedFrom)); 398&& SymbolEqualityComparer.Default.Equals(readOnlySpanOfT, returnType.ConstructedFrom)); 429return SymbolEqualityComparer.Default.Equals(method, FromManaged) 430|| SymbolEqualityComparer.Default.Equals(method, FromManagedWithBuffer) 431|| SymbolEqualityComparer.Default.Equals(method, ToManaged) 432|| SymbolEqualityComparer.Default.Equals(method, ToManagedGuaranteed) 433|| SymbolEqualityComparer.Default.Equals(method, FromUnmanaged) 434|| SymbolEqualityComparer.Default.Equals(method, ToUnmanaged) 435|| SymbolEqualityComparer.Default.Equals(method, Free) 436|| SymbolEqualityComparer.Default.Equals(method, OnInvoked) 437|| SymbolEqualityComparer.Default.Equals(method, StatelessGetPinnableReference) 438|| SymbolEqualityComparer.Default.Equals(method, StatefulGetPinnableReference) 439|| SymbolEqualityComparer.Default.Equals(method, ManagedValuesSource) 440|| SymbolEqualityComparer.Default.Equals(method, UnmanagedValuesDestination) 441|| SymbolEqualityComparer.Default.Equals(method, ManagedValuesDestination) 442|| SymbolEqualityComparer.Default.Equals(method, UnmanagedValuesSource); 566&& SymbolEqualityComparer.Default.Equals(managedType, m.Parameters[0].Type)); 577&& SymbolEqualityComparer.Default.Equals(managedType, m.Parameters[0].Type)); 595&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 603&& SymbolEqualityComparer.Default.Equals(managedType, m.ReturnType)); 641if (SymbolEqualityComparer.Default.Equals(candidates[0].Parameters[0].Type, unmanagedType)) 672&& SymbolEqualityComparer.Default.Equals(m.Parameters[0].Type, managedType)); 691&& SymbolEqualityComparer.Default.Equals(readOnlySpanOfT, returnType.ConstructedFrom)); 700&& SymbolEqualityComparer.Default.Equals(spanOfT, returnType.ConstructedFrom)); 710&& SymbolEqualityComparer.Default.Equals(spanOfT, returnType.ConstructedFrom)); 720&& SymbolEqualityComparer.Default.Equals(readOnlySpanOfT, returnType.ConstructedFrom));
TypePositionInfo.cs (2)
127if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, outAttributeType)) 132else if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, inAttributeType))
TypeSymbolExtensions.cs (2)
210(INamedTypeSymbol namedType, INamedTypeSymbol namedOther) => SymbolEqualityComparer.Default.Equals(namedType.ConstructedFrom, namedOther.ConstructedFrom), 211_ => SymbolEqualityComparer.Default.Equals(type, other)
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (2)
214 if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, xmlnsDefinitonAttribute)) 229 else if (SymbolEqualityComparer.Default.Equals(attr.AttributeClass, internalsVisibleToAttribute))
System.Text.Json.SourceGeneration (31)
Helpers\KnownTypeSymbols.cs (13)
274if (cmp.Equals(genericTypeDef, ImmutableArrayType)) 280if (cmp.Equals(genericTypeDef, ImmutableListType) || 281cmp.Equals(genericTypeDef, IImmutableListType)) 287if (cmp.Equals(genericTypeDef, ImmutableStackType) || 288cmp.Equals(genericTypeDef, IImmutableStackType)) 294if (cmp.Equals(genericTypeDef, ImmutableQueueType) || 295cmp.Equals(genericTypeDef, IImmutableQueueType)) 301if (cmp.Equals(genericTypeDef, ImmutableHashSetType) || 302cmp.Equals(genericTypeDef, IImmutableSetType)) 308if (cmp.Equals(genericTypeDef, ImmutableSortedType)) 328if (cmp.Equals(genericTypeDef, ImmutableDictionaryType) || 329cmp.Equals(genericTypeDef, IImmutableDictionaryType)) 335if (cmp.Equals(genericTypeDef, ImmutableSortedDictionaryType))
Helpers\RoslynExtensions.cs (4)
120=> attributeType != null && memberInfo.GetAttributes().Any(attr => SymbolEqualityComparer.Default.Equals(attr.AttributeClass, attributeType)); 142if (SymbolEqualityComparer.Default.Equals(baseType, current)) 183return candidate.IsGenericType && SymbolEqualityComparer.Default.Equals(candidate.ConstructedFrom, baseType); 188=> type is INamedTypeSymbol { IsGenericType: true } namedType && SymbolEqualityComparer.Default.Equals(namedType, namedType.ConstructedFrom);
JsonSourceGenerator.Parser.cs (14)
244if (SymbolEqualityComparer.Default.Equals(attributeClass, _knownSymbols.JsonSerializableAttributeType)) 254else if (SymbolEqualityComparer.Default.Equals(attributeClass, _knownSymbols.JsonSourceGenerationOptionsAttributeType)) 703if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonNumberHandlingAttributeType)) 708else if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonUnmappedMemberHandlingAttributeType)) 713else if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonObjectCreationHandlingAttributeType)) 724if (SymbolEqualityComparer.Default.Equals(attributeType, _knownSymbols.JsonDerivedTypeAttributeType)) 755if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.MemoryType)) 757Debug.Assert(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.MemoryByteType)); 763if (SymbolEqualityComparer.Default.Equals(type.OriginalDefinition, _knownSymbols.ReadOnlyMemoryType)) 765Debug.Assert(!SymbolEqualityComparer.Default.Equals(type, _knownSymbols.ReadOnlyMemoryByteType)); 819needsRuntimeType = SymbolEqualityComparer.Default.Equals(type, actualTypeToConvert); 826needsRuntimeType = SymbolEqualityComparer.Default.Equals(type, actualTypeToConvert); 878needsRuntimeType = SymbolEqualityComparer.Default.Equals(type, actualTypeToConvert); 1022SymbolEqualityComparer.Default.Equals(property.Type, ignoredMember.GetMemberType());
System.Text.RegularExpressions.Generator (4)
RegexGenerator.Parser.cs (2)
119!SymbolEqualityComparer.Default.Equals(regexMethodSymbol.ReturnType, regexSymbol)) 133!SymbolEqualityComparer.Default.Equals(regexPropertySymbol.Type, regexSymbol))
UpgradeToGeneratedRegexAnalyzer.cs (2)
95if (!method.IsStatic || !SymbolEqualityComparer.Default.Equals(method.ContainingType, regexTypeSymbol)) 126if (!SymbolEqualityComparer.Default.Equals(operation.Type, regexTypeSymbol))
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationGenerator.cs (1)
226bool isFlags = enumType.GetAttributes().Any(a => SymbolEqualityComparer.Default.Equals(a.AttributeClass, flagsAttributeType));