2137 references to HasFlag
Aspire.EndToEnd.Tests (3)
IntegrationServicesFixture.cs (2)
122if (ename != TestResourceNames.None && expectedResourceNames.HasFlag(ename) && _resourcesToSkip.HasFlag(ename))
tests\testproject\Common\TestResourceNames.cs (1)
40.Where(ename => ename != TestResourceNames.None && resourceNames.HasFlag(ename)));
Aspire.Hosting.Testing.Tests (1)
tests\testproject\Common\TestResourceNames.cs (1)
40.Where(ename => ename != TestResourceNames.None && resourceNames.HasFlag(ename)));
GenerateDocumentationAndConfigFiles (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (3)
122if (capabilities.HasFlag(IISCapability.PoolEnvironmentVariables)) 133if (capabilities.HasFlag(module.Capability)) 135var available = _modulesAvailable.HasFlag(module.Capability);
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (3)
122if (capabilities.HasFlag(IISCapability.PoolEnvironmentVariables)) 133if (capabilities.HasFlag(module.Capability)) 135var available = _modulesAvailable.HasFlag(module.Capability);
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (3)
122if (capabilities.HasFlag(IISCapability.PoolEnvironmentVariables)) 133if (capabilities.HasFlag(module.Capability)) 135var available = _modulesAvailable.HasFlag(module.Capability);
IIS.NewShim.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (3)
122if (capabilities.HasFlag(IISCapability.PoolEnvironmentVariables)) 133if (capabilities.HasFlag(module.Capability)) 135var available = _modulesAvailable.HasFlag(module.Capability);
IIS.ShadowCopy.Tests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (3)
122if (capabilities.HasFlag(IISCapability.PoolEnvironmentVariables)) 133if (capabilities.HasFlag(module.Capability)) 135var available = _modulesAvailable.HasFlag(module.Capability);
illink (55)
ILLink.CodeFixProvider (6)
BaseAttributeCodeFixProvider.cs (6)
103case PropertyDeclarationSyntax when targets.HasFlag(AttributeableParentTargets.Property): 104case EventDeclarationSyntax when targets.HasFlag(AttributeableParentTargets.Event): 111if (targets.HasFlag(AttributeableParentTargets.MethodOrConstructor)) 116case LocalFunctionStatementSyntax or BaseMethodDeclarationSyntax or AccessorDeclarationSyntax when targets.HasFlag(AttributeableParentTargets.MethodOrConstructor): 117case FieldDeclarationSyntax when targets.HasFlag(AttributeableParentTargets.Field): 118case ClassDeclarationSyntax when targets.HasFlag(AttributeableParentTargets.Class):
ILLink.RoslynAnalyzer (63)
DataFlow\DynamicallyAccessedMembersBinder.cs (22)
33if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicConstructors)) 35bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicConstructorsWithInherited); 40if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicConstructors)) 42bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.PublicConstructorsWithInherited); 47if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)) 53if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicMethods)) 55bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicMethodsWithInherited); 60if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicMethods)) 66if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicFields)) 68bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicFieldsWithInherited); 73if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicFields)) 79if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicNestedTypes)) 81bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicNestedTypesWithInherited); 92if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicNestedTypes)) 94bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.PublicNestedTypesWithInherited); 105if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicProperties)) 107bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicPropertiesWithInherited); 112if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicProperties)) 118if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.NonPublicEvents)) 120bool withInherited = !declaredOnly && memberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicEventsWithInherited); 125if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicEvents)) 131if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.Interfaces))
DataFlow\LocalDataFlowVisitor.cs (15)
197=> ProcessBinderCall(operation, operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write) ? "SetMember" : "GetMember", state); 200=> ProcessBinderCall(operation, operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write) ? "SetIndex" : "GetIndex", state); 422Debug.Assert(flowCaptureReference.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write)); 482Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read), 502Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write), 504Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Reference), 509if (operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write)) 642if (operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write)) 668Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read)); 669if (!operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read)) 680if (operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Write)) 683Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Reference)); 703if (!operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read)) 718Debug.Assert(operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read)); 719if (!operation.GetValueUsageInfo(OwningSymbol).HasFlag(ValueUsageInfo.Read))
DynamicallyAccessedMembersTypeHierarchy.cs (2)
36if (annotation.HasFlag(DynamicallyAccessedMemberTypes.Interfaces)) 41if (FlowAnnotations.GetTypeAnnotation(iface).HasFlag(annotationToApplyToInterfaces))
RequiresAnalyzerBase.cs (5)
224case ILocalFunctionOperation local when targets.HasFlag(DiagnosticTargets.MethodOrConstructor): 227case IMethodBodyBaseOperation when targets.HasFlag(DiagnosticTargets.MethodOrConstructor): 228case IPropertyReferenceOperation when targets.HasFlag(DiagnosticTargets.Property): 229case IFieldReferenceOperation when targets.HasFlag(DiagnosticTargets.Field): 230case IEventReferenceOperation when targets.HasFlag(DiagnosticTargets.Event):
src\tools\illink\src\ILLink.Shared\Annotations.cs (4)
35if (availableMemberTypes.HasFlag(requiredMemberTypes)) 45if (requiredMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicConstructors) && 46!availableMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicConstructors)) 63if (memberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicConstructors))
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (15)
55if (!methodReturnValueWithMemberTypes.DynamicallyAccessedMemberTypes.HasFlag(annotatedMethodReturnValue.DynamicallyAccessedMemberTypes)) 1209if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.PublicConstructorsWithInherited)) 1212if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicConstructorsWithInherited)) 1215if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicEvents)) 1218if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicEventsWithInherited)) 1221if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicFields)) 1224if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicFieldsWithInherited)) 1227if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicMethods)) 1230if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicMethodsWithInherited)) 1235if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.PublicNestedTypesWithInherited)) 1238if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicNestedTypesWithInherited)) 1243if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicProperties)) 1246if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypesEx.NonPublicPropertiesWithInherited)) 1249if (valueWithDynamicallyAccessedMembers.DynamicallyAccessedMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.Interfaces)) 1448if (ctorParameterCount == 0 && requiredMemberTypes.HasFlag(DynamicallyAccessedMemberTypes.PublicConstructors))
InMemory.FunctionalTests (10)
HttpsConnectionMiddlewareTests.cs (1)
1407httpProtocols.HasFlag(HttpProtocols.Http2) ?
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (6)
802bool rootDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoRootCertDistributionUri); 803bool issuerRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaCrl); 804bool issuerRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaOcsp); 805bool issuerDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoIssuerCertDistributionUri); 806bool endEntityRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaCrl); 807bool endEntityRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaOcsp);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
177if (DelayedActions.HasFlag(DelayedActionsFlag.Aia)) 195if (DelayedActions.HasFlag(DelayedActionsFlag.Crl)) 238if (DelayedActions.HasFlag(DelayedActionsFlag.Ocsp))
Metrics (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Metrics.Legacy (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.AspNetCore.Authentication.Certificate (2)
CertificateAuthenticationHandler.cs (2)
122!Options.AllowedCertificateTypes.HasFlag(CertificateTypes.SelfSigned)) 131!Options.AllowedCertificateTypes.HasFlag(CertificateTypes.Chained))
Microsoft.AspNetCore.Components (1)
RenderTree\Renderer.cs (1)
596var callerSpecifiedRenderMode = frame.ComponentFrameFlags.HasFlag(ComponentFrameFlags.HasCallerSpecifiedRenderMode)
Microsoft.AspNetCore.Components.Tests (2)
Rendering\RenderTreeBuilderTest.cs (2)
2122Assert.True(frame.ComponentFrameFlags.HasFlag(ComponentFrameFlags.HasCallerSpecifiedRenderMode)); 2161Assert.False(frame.ComponentFrameFlags.HasFlag(ComponentFrameFlags.HasCallerSpecifiedRenderMode));
Microsoft.AspNetCore.Http.Extensions (2)
RequestDelegateFactory.cs (2)
706if (parameter.Attributes.HasFlag(ParameterAttributes.In)) 710else if (parameter.Attributes.HasFlag(ParameterAttributes.Out))
Microsoft.AspNetCore.HttpLogging (50)
HttpLoggingMiddleware.cs (10)
112if (loggingFields.HasFlag(HttpLoggingFields.RequestProtocol)) 117if (loggingFields.HasFlag(HttpLoggingFields.RequestMethod)) 122if (loggingFields.HasFlag(HttpLoggingFields.RequestScheme)) 127if (loggingFields.HasFlag(HttpLoggingFields.RequestPath)) 133if (loggingFields.HasFlag(HttpLoggingFields.RequestQuery)) 138if (loggingFields.HasFlag(HttpLoggingFields.RequestHeaders)) 153if (loggingFields.HasFlag(HttpLoggingFields.RequestBody)) 202if (loggingFields.HasFlag(HttpLoggingFields.ResponseBody) || _interceptors.Length > 0) 333if (loggingFields.HasFlag(HttpLoggingFields.ResponseStatusCode)) 338if (loggingFields.HasFlag(HttpLoggingFields.ResponseHeaders))
ResponseBufferingStream.cs (1)
126if (_logContext.LoggingFields.HasFlag(HttpLoggingFields.ResponseBody) && _logContext.ResponseBodyLogLimit > 0)
W3CLogger.cs (1)
42if (_loggingFields.HasFlag((W3CLoggingFields)(1 << i)))
W3CLoggerOptions.cs (4)
130if (options.LoggingFields.HasFlag(W3CLoggingFields.Host)) 134if (options.LoggingFields.HasFlag(W3CLoggingFields.Referer)) 138if (options.LoggingFields.HasFlag(W3CLoggingFields.UserAgent)) 142if (options.LoggingFields.HasFlag(W3CLoggingFields.Cookie))
W3CLoggerProcessor.cs (17)
39if (_loggingFields.HasFlag(W3CLoggingFields.Date)) 43if (_loggingFields.HasFlag(W3CLoggingFields.Time)) 47if (_loggingFields.HasFlag(W3CLoggingFields.ClientIpAddress)) 51if (_loggingFields.HasFlag(W3CLoggingFields.UserName)) 55if (_loggingFields.HasFlag(W3CLoggingFields.ServerName)) 59if (_loggingFields.HasFlag(W3CLoggingFields.ServerIpAddress)) 63if (_loggingFields.HasFlag(W3CLoggingFields.ServerPort)) 67if (_loggingFields.HasFlag(W3CLoggingFields.Method)) 71if (_loggingFields.HasFlag(W3CLoggingFields.UriStem)) 75if (_loggingFields.HasFlag(W3CLoggingFields.UriQuery)) 79if (_loggingFields.HasFlag(W3CLoggingFields.ProtocolStatus)) 83if (_loggingFields.HasFlag(W3CLoggingFields.TimeTaken)) 87if (_loggingFields.HasFlag(W3CLoggingFields.ProtocolVersion)) 91if (_loggingFields.HasFlag(W3CLoggingFields.Host)) 95if (_loggingFields.HasFlag(W3CLoggingFields.UserAgent)) 99if (_loggingFields.HasFlag(W3CLoggingFields.Cookie)) 103if (_loggingFields.HasFlag(W3CLoggingFields.Referer))
W3CLoggingMiddleware.cs (17)
82if (options.LoggingFields.HasFlag(W3CLoggingFields.Date)) 87if (options.LoggingFields.HasFlag(W3CLoggingFields.Time)) 92if (options.LoggingFields.HasFlag(W3CLoggingFields.ServerName)) 102if (options.LoggingFields.HasFlag(W3CLoggingFields.ClientIpAddress)) 107if (options.LoggingFields.HasFlag(W3CLoggingFields.ServerIpAddress)) 112if (options.LoggingFields.HasFlag(W3CLoggingFields.ServerPort)) 122if (options.LoggingFields.HasFlag(W3CLoggingFields.ProtocolVersion)) 127if (options.LoggingFields.HasFlag(W3CLoggingFields.Method)) 132if (options.LoggingFields.HasFlag(W3CLoggingFields.UriStem)) 137if (options.LoggingFields.HasFlag(W3CLoggingFields.UriQuery)) 144if (options.LoggingFields.HasFlag(W3CLoggingFields.Host)) 152if (options.LoggingFields.HasFlag(W3CLoggingFields.Referer)) 160if (options.LoggingFields.HasFlag(W3CLoggingFields.UserAgent)) 170if (options.LoggingFields.HasFlag(W3CLoggingFields.Cookie)) 207if (options.LoggingFields.HasFlag(W3CLoggingFields.UserName)) 212if (options.LoggingFields.HasFlag(W3CLoggingFields.ProtocolStatus)) 217if (options.LoggingFields.HasFlag(W3CLoggingFields.TimeTaken))
Microsoft.AspNetCore.HttpLogging.Tests (7)
HttpLoggingMiddlewareTests.cs (5)
1531if (fields.HasFlag(HttpLoggingFields.RequestPropertiesAndHeaders)) 1544if (fields.HasFlag(HttpLoggingFields.ResponsePropertiesAndHeaders)) 1553if (fields.HasFlag(HttpLoggingFields.RequestBody) && hasRequestBody) 1558if (fields.HasFlag(HttpLoggingFields.ResponseBody) && hasResponseBody) 1562if (fields.HasFlag(HttpLoggingFields.Duration))
W3CLoggerOptionsTests.cs (2)
13Assert.False(options.LoggingFields.HasFlag(W3CLoggingFields.UserName)); 14Assert.False(options.LoggingFields.HasFlag(W3CLoggingFields.Cookie));
Microsoft.AspNetCore.HttpOverrides (4)
ForwardedHeadersMiddleware.cs (4)
129if (_options.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor)) 136if (_options.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto)) 148if (_options.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost)) 162if (_options.ForwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix))
Microsoft.AspNetCore.HttpOverrides.Tests (4)
ForwardedHeadersMiddlewareTest.cs (4)
1019if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedFor)) 1023if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedHost)) 1027if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedProto)) 1031if (forwardedHeaders.HasFlag(ForwardedHeaders.XForwardedPrefix))
Microsoft.AspNetCore.Identity (8)
Passkeys\AuthenticatorData.cs (8)
47public bool IsUserPresent => Flags.HasFlag(AuthenticatorDataFlags.UserPresent); 52public bool IsUserVerified => Flags.HasFlag(AuthenticatorDataFlags.UserVerified); 57public bool IsBackupEligible => Flags.HasFlag(AuthenticatorDataFlags.BackupEligible); 62public bool IsBackedUp => Flags.HasFlag(AuthenticatorDataFlags.BackedUp); 67public bool HasExtensionsData => Flags.HasFlag(AuthenticatorDataFlags.HasExtensionData); 73public bool HasAttestedCredentialData => Flags.HasFlag(AuthenticatorDataFlags.HasAttestedCredentialData); 117if (flags.HasFlag(AuthenticatorDataFlags.HasAttestedCredentialData)) 125if (flags.HasFlag(AuthenticatorDataFlags.HasExtensionData))
Microsoft.AspNetCore.InternalTesting (2)
xunit\FrameworkSkipConditionAttribute.cs (2)
35if (excludedFrameworks.HasFlag(RuntimeFrameworks.Mono) && 42if (excludedFrameworks.HasFlag(RuntimeFrameworks.CLR))
Microsoft.AspNetCore.OpenApi (7)
Extensions\JsonNodeSchemaExtensions.cs (7)
117var isArray = MapJsonNodeToSchemaType(schema[OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array); 123var isArray = MapJsonNodeToSchemaType(schema[OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array); 129var isArray = MapJsonNodeToSchemaType(schema[OpenApiSchemaKeywords.TypeKeyword]) is { } schemaTypes && schemaTypes.HasFlag(JsonSchemaType.Array); 197!schemaTypes.HasFlag(JsonSchemaType.Null)) 341schemaTypes.HasFlag(JsonSchemaType.Null)) 444&& !schemaTypes.HasFlag(JsonSchemaType.Null)) 462!schemaTypes.HasFlag(JsonSchemaType.Null))
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (1)
759Assert.False(property.Value.Type?.HasFlag(JsonSchemaType.Null));
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (2)
489Assert.True(parameter.Schema.Items.Type?.HasFlag(innerSchemaType)); 490Assert.Equal(isNullable, parameter.Schema.Items.Type?.HasFlag(JsonSchemaType.Null));
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Internal\Http2\Http2Connection.cs (2)
562if (state.HasFlag(ReadPrefaceState.Preface)) 577if (state.HasFlag(ReadPrefaceState.Http1x))
Internal\Http3\Http3Stream.cs (2)
871if (!_parsedPseudoHeaderFields.HasFlag(PseudoHeaderFields.Authority) || !_parsedPseudoHeaderFields.HasFlag(PseudoHeaderFields.Path))
Internal\HttpConnection.cs (3)
219var http1Enabled = _context.Protocols.HasFlag(HttpProtocols.Http1); 220var http2Enabled = _context.Protocols.HasFlag(HttpProtocols.Http2); 221var http3Enabled = _context.Protocols.HasFlag(HttpProtocols.Http3);
Internal\Infrastructure\HttpUtilities.cs (3)
604var hasHttp1OrHttp2 = protocols.HasFlag(HttpProtocols.Http1) || protocols.HasFlag(HttpProtocols.Http2); 605var hasHttp3 = protocols.HasFlag(HttpProtocols.Http3);
Internal\KestrelServerImpl.cs (3)
141var hasHttp1 = options.Protocols.HasFlag(HttpProtocols.Http1); 142var hasHttp2 = options.Protocols.HasFlag(HttpProtocols.Http2); 143var hasHttp3 = options.Protocols.HasFlag(HttpProtocols.Http3);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (6)
802bool rootDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoRootCertDistributionUri); 803bool issuerRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaCrl); 804bool issuerRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.IssuerRevocationViaOcsp); 805bool issuerDistributionViaHttp = !pkiOptions.HasFlag(PkiOptions.NoIssuerCertDistributionUri); 806bool endEntityRevocationViaCrl = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaCrl); 807bool endEntityRevocationViaOcsp = pkiOptions.HasFlag(PkiOptions.EndEntityRevocationViaOcsp);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (3)
177if (DelayedActions.HasFlag(DelayedActionsFlag.Aia)) 195if (DelayedActions.HasFlag(DelayedActionsFlag.Crl)) 238if (DelayedActions.HasFlag(DelayedActionsFlag.Ocsp))
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (6)
HubServerProxyGenerator.Emitter.cs (5)
168if (methodSpec.Stream.HasFlag(StreamSpec.ServerToClient) && 169!methodSpec.Stream.HasFlag(StreamSpec.AsyncEnumerable)) 174if (methodSpec.Stream.HasFlag(StreamSpec.ServerToClient) && 175methodSpec.Stream.HasFlag(StreamSpec.AsyncEnumerable)) 185if (methodSpec.Stream.HasFlag(StreamSpec.ClientToServer))
HubServerProxyGenerator.Parser.cs (1)
322if (!methodSpec.Stream.HasFlag(StreamSpec.ServerToClient) &&
Microsoft.AspNetCore.StaticFiles (3)
StaticFileContext.cs (3)
91public bool IsHeadMethod => _requestType.HasFlag(RequestType.IsHead); 93public bool IsGetMethod => _requestType.HasFlag(RequestType.IsGet); 97get => _requestType.HasFlag(RequestType.IsRange);
Microsoft.Build (22)
BackEnd\BuildManager\BuildManager.cs (4)
1369submission.BuildRequestData.Flags.HasFlag(BuildRequestDataFlags.ReplaceExistingProjectInstance)); 1975if (submission.BuildRequestData.Flags.HasFlag(BuildRequestDataFlags.IgnoreMissingEmptyAndInvalidImports)) 1980if (submission.BuildRequestData.Flags.HasFlag(BuildRequestDataFlags.FailOnUnresolvedSdk)) 2816if (flags.HasValue && flags.Value.HasFlag(BuildRequestDataFlags.ClearCachesAfterBuild))
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
356if (!request.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.IgnoreExistingProjectState)) 1148if (issuingEntry.Request.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.IgnoreMissingEmptyAndInvalidImports))
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
154if (!targetExists && entry.Request.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.SkipNonexistentTargets)) 196if (_requestEntry.Request.BuildRequestDataFlags.HasFlag(BuildRequestDataFlags.ProvideProjectStateAfterBuild))
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
76bool failOnUnresolvedSdk = !Host.BuildParameters.ProjectLoadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) || Host.BuildParameters.ProjectLoadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk);
BackEnd\Shared\BuildRequestConfiguration.cs (2)
479if (buildRequestDataFlags.HasFlag(BuildRequestDataFlags.IgnoreMissingEmptyAndInvalidImports)) 484if (buildRequestDataFlags.HasFlag(BuildRequestDataFlags.FailOnUnresolvedSdk))
Definition\Project.cs (2)
2747if (!_loadSettings.HasFlag(ProjectLoadSettings.RecordEvaluatedItemElements)) 3803var canEvaluateElementsWithFalseConditions = Traits.Instance.EscapeHatches.EvaluateElementsWithFalseConditionInProjectEvaluation ?? !loadSettings.HasFlag(ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition);
Evaluation\Evaluator.cs (4)
1811failOnUnresolvedSdk: !_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) || _loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk)); 1822if (_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) && !_loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk))
Evaluation\Expander.cs (3)
1479catch (Exception) when (options.HasFlag(ExpanderOptions.LeavePropertiesUnexpandedOnError)) 4021if (options.HasFlag(ExpanderOptions.LeavePropertiesUnexpandedOnError)) 4092if (options.HasFlag(ExpanderOptions.LeavePropertiesUnexpandedOnError))
Instance\ProjectInstance.cs (1)
933bool fastItemLookupNeeded = settings.HasFlag(ProjectInstanceSettings.ImmutableWithFastItemLookup);
Microsoft.Build.Engine.UnitTests (7)
Instance\ProjectInstance_Internal_Tests.cs (1)
869string[] expectedImportPathsIncludingDuplicates = projectLoadSettings.HasFlag(ProjectLoadSettings.RecordDuplicateButNotCircularImports)
ProjectCache\ProjectCacheTests.cs (6)
1173!errorLocations.HasFlag(ErrorLocations.EndBuildAsync)) 1177else if (errorLocations.HasFlag(ErrorLocations.EndBuildAsync)) 1262if (!errorLocations.HasFlag(ErrorLocations.Constructor)) 1294if (errorLocations.HasFlag(ErrorLocations.EndBuildAsync) 1315var expectedQueryOccurrences = errorLocations.HasFlag(ErrorLocations.GetCacheResultAsync) 1652if (errorLocations.HasFlag(typedValue))
Microsoft.Build.Tasks.UnitTests (2)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
3007if (rarSimulationMode.HasFlag(RARSimulationMode.LoadProject)) 3060if (rarSimulationMode.HasFlag(RARSimulationMode.BuildProject))
Microsoft.CodeAnalysis (10)
DiagnosticAnalyzer\AsyncQueue.cs (4)
102Debug.Assert(waiter.Task.CreationOptions.HasFlag(TaskCreationOptions.RunContinuationsAsynchronously)); 200Debug.Assert(tcs.Task.CreationOptions.HasFlag(TaskCreationOptions.RunContinuationsAsynchronously)); 205Debug.Assert(_whenCompleted.Task.CreationOptions.HasFlag(TaskCreationOptions.RunContinuationsAsynchronously)); 316Debug.Assert(taskCompletionSource.Task.CreationOptions.HasFlag(TaskCreationOptions.RunContinuationsAsynchronously));
MetadataReference\ModuleMetadata.cs (1)
232Action? onDispose = options.HasFlag(PEStreamOptions.LeaveOpen)
PEWriter\PeWriter.cs (1)
297if (privateKeyOpt != null && corFlags.HasFlag(CorFlags.StrongNameSigned))
SourceGeneration\GeneratorDriver.cs (2)
361if (outputKind.HasFlag(outputNode.Kind) && !_state.DisabledOutputs.HasFlag(outputNode.Kind))
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithSimpleName.cs (2)
71.Where(static (info, _) => info.Info.HasFlag(SourceGeneratorSyntaxTreeInfo.ContainsGlobalAliases)) 103.Where(static (info, _) => info.Info.HasFlag(SourceGeneratorSyntaxTreeInfo.ContainsAttributeList))
Microsoft.CodeAnalysis.Analyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.AnalyzerUtilities (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.BannedApiAnalyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.CodeStyle (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2+Test.cs (1)
89Assert.True(CodeFixTestBehaviors.HasFlag(Testing.CodeFixTestBehaviors.FixOne), $"'{nameof(DiagnosticSelector)}' can only be used with '{nameof(Testing.CodeFixTestBehaviors)}.{nameof(Testing.CodeFixTestBehaviors.FixOne)}'");
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2+Test.cs (1)
78Assert.True(CodeFixTestBehaviors.HasFlag(Testing.CodeFixTestBehaviors.FixOne), $"'{nameof(DiagnosticSelector)}' can only be used with '{nameof(Testing.CodeFixTestBehaviors)}.{nameof(Testing.CodeFixTestBehaviors.FixOne)}'");
Microsoft.CodeAnalysis.CSharp (5)
Binder\Binder_Symbols.cs (1)
604if (!Flags.HasFlag(BinderFlags.SuppressConstraintChecks))
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1326if (binder.Flags.HasFlag(BinderFlags.AttributeArgument) && !type.IsSZArray())
Parser\LanguageParser.cs (1)
5164if (flags.HasFlag(VariableFlags.ForStatement) && this.PeekToken(1).Kind != SyntaxKind.SemicolonToken)
Parser\LanguageParser_Patterns.cs (2)
550if (@this._termState.HasFlag(TerminatorState.IsExpressionOrPatternInCaseLabelOfSwitchStatement) && @this.CurrentToken.Kind is SyntaxKind.ColonToken) 559if (@this._termState.HasFlag(TerminatorState.IsPatternInSwitchExpressionArm) && @this.CurrentToken.Kind is SyntaxKind.EqualsGreaterThanToken or SyntaxKind.ColonToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle (145)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
74return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (31)
72CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodDeclarationName)) 77CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)) 82CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)) 87CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodCallName)) 92CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodCallParentheses)) 97CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)) 102CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)) 115CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterCast)) 120CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration), 128CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeOpenSquareBracket)) 133CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)) 138CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinSquareBrackets)) 143CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)) 148CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterComma)) 153CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterDot)) 158CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)) 163CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)) 168CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeComma)) 173CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeDot)) 178CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)) 191CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.Braces)) 196CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.BlockContents)) 201CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 206CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 211CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 242CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeElse)) 247CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeCatch)) 252CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeFinally)) 257CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 267CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\NewLineBeforeOpenBracePlacement.cs (18)
28=> (value.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? NewLineBeforeOpenBracePlacement.Types : 0) | 29(value.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods) ? NewLineBeforeOpenBracePlacement.Methods : 0) | 30(value.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) ? NewLineBeforeOpenBracePlacement.Properties : 0) | 31(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods) ? NewLineBeforeOpenBracePlacement.AnonymousMethods : 0) | 32(value.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks) ? NewLineBeforeOpenBracePlacement.ControlBlocks : 0) | 33(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes) ? NewLineBeforeOpenBracePlacement.AnonymousTypes : 0) | 34(value.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers) ? NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers : 0) | 35(value.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody) ? NewLineBeforeOpenBracePlacement.LambdaExpressionBody : 0) | 36(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors) ? NewLineBeforeOpenBracePlacement.Accessors : 0); 39=> (value.HasFlag(NewLineBeforeOpenBracePlacement.Types) ? NewLinePlacement.BeforeOpenBraceInTypes : 0) | 40(value.HasFlag(NewLineBeforeOpenBracePlacement.Methods) ? NewLinePlacement.BeforeOpenBraceInMethods : 0) | 41(value.HasFlag(NewLineBeforeOpenBracePlacement.Properties) ? NewLinePlacement.BeforeOpenBraceInProperties : 0) | 42(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousMethods) ? NewLinePlacement.BeforeOpenBraceInAnonymousMethods : 0) | 43(value.HasFlag(NewLineBeforeOpenBracePlacement.ControlBlocks) ? NewLinePlacement.BeforeOpenBraceInControlBlocks : 0) | 44(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousTypes) ? NewLinePlacement.BeforeOpenBraceInAnonymousTypes : 0) | 45(value.HasFlag(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers) ? NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers : 0) | 46(value.HasFlag(NewLineBeforeOpenBracePlacement.LambdaExpressionBody) ? NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody : 0) | 47(value.HasFlag(NewLineBeforeOpenBracePlacement.Accessors) ? NewLinePlacement.BeforeOpenBraceInAccessors : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (9)
88if (!_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && !_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 94var alwaysIndent = _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock); 98Debug.Assert(_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) != _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 101if (_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock) != firstStatementIsBlock) 238if (node is BlockSyntax && !_options.Indentation.HasFlag(IndentationPlacement.BlockContents)) 244if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(IndentationPlacement.SwitchSection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentUserSettingsFormattingRule.cs (2)
29if (_options.Indentation.HasFlag(IndentationPlacement.Braces) == newOptions.Indentation.HasFlag(IndentationPlacement.Braces)) 49if (_options.Indentation.HasFlag(IndentationPlacement.Braces))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (31)
87if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeElse)) 96if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 105if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 114if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 123if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 138if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 145if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 171? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 172: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 182if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 191if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 200if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 210if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 219if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 228if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks)) 248if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 276if (_options.NewLines.HasFlag(NewLinePlacement.BeforeElse) 290if (_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 303if (_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 316if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 329if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 346if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 372? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 373: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 388if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 401if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 414if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 428if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 441if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 454if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (2)
34if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses) == newOptions.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses)) 159if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (39)
61return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 75return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 88return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 94return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 99return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)); 104return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 109return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 118return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 123return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)); 128return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 133return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 139return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 144return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 149return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 159return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)); 166return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinExpressionParentheses)); 173return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinCastParentheses)); 182|| _options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement))) 184return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 187return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 193return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 198return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 204return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterCast)); 213return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 226return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeOpenSquareBracket)); 234return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)); 240return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 245return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 271return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)); 277return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)); 288return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 299return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeComma)); 305return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterDot)); 311return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeDot)); 317return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 323return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 447return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 454return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 583if (_options.Spacing.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\SpacingWithinParentheses.cs (6)
22=> (placement.HasFlag(SpacePlacement.WithinExpressionParentheses) ? SpacePlacementWithinParentheses.Expressions : 0) | 23(placement.HasFlag(SpacePlacement.WithinCastParentheses) ? SpacePlacementWithinParentheses.TypeCasts : 0) | 24(placement.HasFlag(SpacePlacement.WithinOtherParentheses) ? SpacePlacementWithinParentheses.ControlFlowStatements : 0); 27=> (placement.HasFlag(SpacePlacementWithinParentheses.Expressions) ? SpacePlacement.WithinExpressionParentheses : 0) | 28(placement.HasFlag(SpacePlacementWithinParentheses.TypeCasts) ? SpacePlacement.WithinCastParentheses : 0) | 29(placement.HasFlag(SpacePlacementWithinParentheses.ControlFlowStatements) ? SpacePlacement.WithinOtherParentheses : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (3)
29return !stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 33return !stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 37return !stylePreferences.HasFlag(UseVarPreference.Elsewhere);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (3)
85return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 89return stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 93return stylePreferences.HasFlag(UseVarPreference.Elsewhere);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (2)
1179if (testBehaviors.HasFlag(CodeFixTestBehaviors.FixOne)) 1281if (testBehaviors.HasFlag(CodeFixTestBehaviors.FixOne))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (4)
117if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 121else if (language.HasFlag(Language.CSharp)) 125else if (language.HasFlag(Language.VisualBasic))
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
Emit\CompilationEmitTests.cs (6)
1952Assert.Equal(expectSigned, flags.HasFlag(CorFlags.StrongNameSigned)); 3532Assert.False(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)); 3566Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)); 3616Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)); 3656Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)); 3696Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
597Assert.Equal(expectedToBeSigned, flags.HasFlag(CorFlags.StrongNameSigned));
Microsoft.CodeAnalysis.CSharp.Features (13)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (6)
129if (opPosition.HasFlag(OperatorPosition.Infix)) 132if (opPosition.HasFlag(OperatorPosition.Postfix)) 135if (opPosition.HasFlag(OperatorPosition.Prefix)) 168if (opPosition.HasFlag(OperatorPosition.Postfix)) 171if (opPosition.HasFlag(OperatorPosition.Infix)) 174if (opPosition.HasFlag(OperatorPosition.Prefix))
ConvertCast\CSharpConvertTryCastToDirectCastCodeRefactoringProvider.cs (1)
59if (expression.IsKind(SyntaxKind.NullLiteralExpression) && nullableContext.HasFlag(NullableContext.AnnotationsEnabled) && isReferenceType)
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
65if (declarationModifiers.HasFlag(Modifiers.Partial))
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (3)
144return varPreference.HasFlag(UseVarPreference.ForBuiltInTypes); 149return varPreference.HasFlag(UseVarPreference.WhenTypeIsApparent); 152return varPreference.HasFlag(UseVarPreference.Elsewhere);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (2)
385.WithAppendedTrailingTrivia(newLinePlacement.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? EndOfLine(lineEnding) : Space); 418if (newLinePlacement.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes))
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedValueAssignmentTests.cs (2)
1179if (testBehaviors.HasFlag(CodeFixTestBehaviors.FixOne)) 1281if (testBehaviors.HasFlag(CodeFixTestBehaviors.FixOne))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
3239if (disabledOutput.HasFlag(kind))
Microsoft.CodeAnalysis.CSharp.Workspaces (147)
Formatting\CSharpFormattingOptions.cs (2)
48=> ((NewLineBeforeOpenBracePlacement)internalValue!).HasFlag(_flag); 65=> ((SpacePlacementWithinParentheses)internalValue!).HasFlag(_flag);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
74return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (31)
72CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodDeclarationName)) 77CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)) 82CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)) 87CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodCallName)) 92CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodCallParentheses)) 97CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)) 102CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)) 115CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterCast)) 120CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration), 128CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeOpenSquareBracket)) 133CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)) 138CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinSquareBrackets)) 143CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)) 148CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterComma)) 153CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterDot)) 158CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)) 163CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)) 168CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeComma)) 173CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeDot)) 178CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)) 191CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.Braces)) 196CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.BlockContents)) 201CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 206CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 211CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 242CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeElse)) 247CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeCatch)) 252CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeFinally)) 257CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 267CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\NewLineBeforeOpenBracePlacement.cs (18)
28=> (value.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? NewLineBeforeOpenBracePlacement.Types : 0) | 29(value.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods) ? NewLineBeforeOpenBracePlacement.Methods : 0) | 30(value.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) ? NewLineBeforeOpenBracePlacement.Properties : 0) | 31(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods) ? NewLineBeforeOpenBracePlacement.AnonymousMethods : 0) | 32(value.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks) ? NewLineBeforeOpenBracePlacement.ControlBlocks : 0) | 33(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes) ? NewLineBeforeOpenBracePlacement.AnonymousTypes : 0) | 34(value.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers) ? NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers : 0) | 35(value.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody) ? NewLineBeforeOpenBracePlacement.LambdaExpressionBody : 0) | 36(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors) ? NewLineBeforeOpenBracePlacement.Accessors : 0); 39=> (value.HasFlag(NewLineBeforeOpenBracePlacement.Types) ? NewLinePlacement.BeforeOpenBraceInTypes : 0) | 40(value.HasFlag(NewLineBeforeOpenBracePlacement.Methods) ? NewLinePlacement.BeforeOpenBraceInMethods : 0) | 41(value.HasFlag(NewLineBeforeOpenBracePlacement.Properties) ? NewLinePlacement.BeforeOpenBraceInProperties : 0) | 42(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousMethods) ? NewLinePlacement.BeforeOpenBraceInAnonymousMethods : 0) | 43(value.HasFlag(NewLineBeforeOpenBracePlacement.ControlBlocks) ? NewLinePlacement.BeforeOpenBraceInControlBlocks : 0) | 44(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousTypes) ? NewLinePlacement.BeforeOpenBraceInAnonymousTypes : 0) | 45(value.HasFlag(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers) ? NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers : 0) | 46(value.HasFlag(NewLineBeforeOpenBracePlacement.LambdaExpressionBody) ? NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody : 0) | 47(value.HasFlag(NewLineBeforeOpenBracePlacement.Accessors) ? NewLinePlacement.BeforeOpenBraceInAccessors : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (9)
88if (!_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && !_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 94var alwaysIndent = _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock); 98Debug.Assert(_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) != _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 101if (_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock) != firstStatementIsBlock) 238if (node is BlockSyntax && !_options.Indentation.HasFlag(IndentationPlacement.BlockContents)) 244if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(IndentationPlacement.SwitchSection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentUserSettingsFormattingRule.cs (2)
29if (_options.Indentation.HasFlag(IndentationPlacement.Braces) == newOptions.Indentation.HasFlag(IndentationPlacement.Braces)) 49if (_options.Indentation.HasFlag(IndentationPlacement.Braces))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (31)
87if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeElse)) 96if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 105if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 114if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 123if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 138if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 145if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 171? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 172: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 182if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 191if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 200if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 210if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 219if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 228if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks)) 248if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 276if (_options.NewLines.HasFlag(NewLinePlacement.BeforeElse) 290if (_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 303if (_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 316if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 329if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 346if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 372? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 373: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 388if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 401if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 414if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 428if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 441if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 454if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (2)
34if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses) == newOptions.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses)) 159if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (39)
61return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 75return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 88return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 94return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 99return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)); 104return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 109return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 118return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 123return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)); 128return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 133return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 139return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 144return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 149return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 159return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)); 166return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinExpressionParentheses)); 173return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinCastParentheses)); 182|| _options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement))) 184return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 187return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 193return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 198return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 204return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterCast)); 213return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 226return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeOpenSquareBracket)); 234return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)); 240return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 245return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 271return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)); 277return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)); 288return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 299return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeComma)); 305return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterDot)); 311return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeDot)); 317return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 323return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 447return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 454return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 583if (_options.Spacing.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\SpacingWithinParentheses.cs (6)
22=> (placement.HasFlag(SpacePlacement.WithinExpressionParentheses) ? SpacePlacementWithinParentheses.Expressions : 0) | 23(placement.HasFlag(SpacePlacement.WithinCastParentheses) ? SpacePlacementWithinParentheses.TypeCasts : 0) | 24(placement.HasFlag(SpacePlacement.WithinOtherParentheses) ? SpacePlacementWithinParentheses.ControlFlowStatements : 0); 27=> (placement.HasFlag(SpacePlacementWithinParentheses.Expressions) ? SpacePlacement.WithinExpressionParentheses : 0) | 28(placement.HasFlag(SpacePlacementWithinParentheses.TypeCasts) ? SpacePlacement.WithinCastParentheses : 0) | 29(placement.HasFlag(SpacePlacementWithinParentheses.ControlFlowStatements) ? SpacePlacement.WithinOtherParentheses : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (3)
29return !stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 33return !stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 37return !stylePreferences.HasFlag(UseVarPreference.Elsewhere);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (3)
85return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 89return stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 93return stylePreferences.HasFlag(UseVarPreference.Elsewhere);
Microsoft.CodeAnalysis.EditorFeatures (25)
DocumentationComments\DocumentationCommentSuggestion.cs (1)
59if (reason.HasFlag(ReasonForUpdate.Diverged))
EditorConfigSettings\Updater\NamingStyles\SourceTextExtensions.cs (4)
64if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 68else if (language.HasFlag(Language.CSharp)) 72else if (language.HasFlag(Language.VisualBasic))
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (10)
277return language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && splicedFileExtensions.Contains("cs") && splicedFileExtensions.Length == 1; 282return language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && splicedFileExtensions.Contains("vb") && splicedFileExtensions.Length == 1; 287return language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && splicedFileExtensions.Contains("vb") && splicedFileExtensions.Contains("cs"); 336if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 340else if (language.HasFlag(Language.CSharp)) 344else if (language.HasFlag(Language.VisualBasic))
InlineRename\InlineRenameSession.cs (1)
646Debug.Assert(outcome.HasFlag(RenameLogMessage.UserActionOutcome.Canceled));
InlineRename\UI\Adornment\RenameFlyout.xaml.cs (1)
176_viewModel.PreviewChangesFlag = Keyboard.Modifiers.HasFlag(ModifierKeys.Shift);
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (2)
221if (_dataSource.CaretChangeBehavior.HasFlag(TaggerCaretChangeBehavior.RemoveAllTagsOnCaretMoveOutsideOfTag)) 257if (_dataSource.CaretChangeBehavior.HasFlag(TaggerCaretChangeBehavior.RemoveAllTagsOnCaretMoveOutsideOfTag))
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (3)
39Debug.Assert(_dataSource.CaretChangeBehavior.HasFlag(TaggerCaretChangeBehavior.RemoveAllTagsOnCaretMoveOutsideOfTag)); 79if (_dataSource.TextChangeBehavior.HasFlag(TaggerTextChangeBehavior.RemoveAllTags)) 86if (_dataSource.TextChangeBehavior.HasFlag(TaggerTextChangeBehavior.RemoveTagsThatIntersectEdits))
TextDiffing\EditorTextDifferencingService.cs (3)
52if (differenceTypes.HasFlag(TextDifferenceTypes.Line)) 57if (differenceTypes.HasFlag(TextDifferenceTypes.Word)) 62if (differenceTypes.HasFlag(TextDifferenceTypes.Character))
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (2)
199return value.EvalFlags.HasFlag(DkmEvaluationResultFlags.TruncatedString) || GetUnderlyingString(value, inspectionContext) != null; 239if (value.EvalFlags.HasFlag(DkmEvaluationResultFlags.TruncatedString))
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (2)
192canFavorite: supportsFavorites && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName), 193isFavorite: favoritesMemberNames?.ContainsKey(memberName) == true && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName)));
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (6)
Debugger\Engine\DkmClrValue.cs (2)
467if (field.Attributes.HasFlag(System.Reflection.FieldAttributes.Literal) || field.Attributes.HasFlag(System.Reflection.FieldAttributes.InitOnly))
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (2)
199return value.EvalFlags.HasFlag(DkmEvaluationResultFlags.TruncatedString) || GetUnderlyingString(value, inspectionContext) != null; 239if (value.EvalFlags.HasFlag(DkmEvaluationResultFlags.TruncatedString))
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\TypeHelpers.cs (2)
192canFavorite: supportsFavorites && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName), 193isFavorite: favoritesMemberNames?.ContainsKey(memberName) == true && !previousDeclaration.HasFlag(DeclarationInfo.IncludeTypeInMemberName)));
Microsoft.CodeAnalysis.Features (16)
EditAndContinue\ActiveStatementsMap.cs (2)
130if (activeStatementInfo.Flags.HasFlag(ActiveStatementFlags.Stale)) 137if (activeStatementInfo.Flags.HasFlag(ActiveStatementFlags.MethodUpToDate))
EditAndContinue\EditAndContinueCapabilities.cs (9)
118if (capabilities.HasFlag(EditAndContinueCapabilities.Baseline)) 121if (capabilities.HasFlag(EditAndContinueCapabilities.AddMethodToExistingType)) 124if (capabilities.HasFlag(EditAndContinueCapabilities.AddStaticFieldToExistingType)) 127if (capabilities.HasFlag(EditAndContinueCapabilities.AddInstanceFieldToExistingType)) 130if (capabilities.HasFlag(EditAndContinueCapabilities.NewTypeDefinition)) 133if (capabilities.HasFlag(EditAndContinueCapabilities.ChangeCustomAttributes)) 136if (capabilities.HasFlag(EditAndContinueCapabilities.UpdateParameters)) 139if (capabilities.HasFlag(EditAndContinueCapabilities.AddExplicitInterfaceImplementation)) 142if (capabilities.HasFlag(EditAndContinueCapabilities.AddFieldRva))
EmbeddedLanguages\Json\JsonParser.cs (1)
135var diagnostic3 = options.HasFlag(JsonOptions.Strict)
EmbeddedLanguages\Json\JsonParser.StrictSyntaxChecker.cs (2)
27var allowComments = options.HasFlag(JsonOptions.Comments); 28var allowTrailingCommas = options.HasFlag(JsonOptions.TrailingCommas);
NavigateTo\NavigateToSearcher.cs (2)
237var searchRegularDocuments = documentSupport.HasFlag(NavigateToDocumentSupport.RegularDocuments); 238var searchGeneratedDocuments = documentSupport.HasFlag(NavigateToDocumentSupport.GeneratedDocuments);
Microsoft.CodeAnalysis.Features.UnitTests (7)
EditAndContinue\EditAndContinueCapabilitiesTests.cs (7)
20Assert.True(service.HasFlag(EditAndContinueCapabilities.Baseline)); 21Assert.False(service.HasFlag(EditAndContinueCapabilities.NewTypeDefinition)); 31Assert.False(service.HasFlag(EditAndContinueCapabilities.Baseline)); 41Assert.True(service.HasFlag(EditAndContinueCapabilities.Baseline)); 42Assert.True(service.HasFlag(EditAndContinueCapabilities.NewTypeDefinition)); 52Assert.True(service.HasFlag(EditAndContinueCapabilities.Baseline)); 53Assert.True(service.HasFlag(EditAndContinueCapabilities.NewTypeDefinition));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.PublicApiAnalyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.ResxSourceGenerator (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.CodeAnalysis.Test.Utilities (28)
CompilationVerifier.cs (5)
356if (peVerify.Status.HasFlag(VerificationStatus.PassesOrFailFast)) 427if (verification.Status.HasFlag(VerificationStatus.Skipped)) 438if (verification.Status.HasFlag(VerificationStatus.FailsILVerify) && verification.ILVerifyMessage is null) 453if (verification.Status.HasFlag(VerificationStatus.FailsILVerify) && verification.ILVerifyMessage is null) 465var expectedSuccess = !verification.Status.HasFlag(VerificationStatus.FailsILVerify);
Platform\Custom\MetadataSignatureHelper.cs (21)
46if (typeInfo.GenericParameterAttributes.HasFlag(GenericParameterAttributes.ReferenceTypeConstraint)) 48if (typeInfo.GenericParameterAttributes.HasFlag(GenericParameterAttributes.NotNullableValueTypeConstraint)) 50if (typeInfo.GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint)) 495if (implFlags.HasFlag(MethodImplAttributes.IL)) 497if (implFlags.HasFlag(MethodImplAttributes.ForwardRef)) 499if (implFlags.HasFlag(MethodImplAttributes.InternalCall)) 501if (implFlags.HasFlag(MethodImplAttributes.Managed)) 503if (implFlags.HasFlag(MethodImplAttributes.Native)) 505if (implFlags.HasFlag(MethodImplAttributes.NoInlining)) 507if (implFlags.HasFlag(MethodImplAttributes.NoOptimization)) 509if (implFlags.HasFlag(MethodImplAttributes.OPTIL)) 511if (implFlags.HasFlag(MethodImplAttributes.PreserveSig)) 513if (implFlags.HasFlag(MethodImplAttributes.Runtime)) 515if (implFlags.HasFlag(MethodImplAttributes.Synchronized)) 517if (implFlags.HasFlag(MethodImplAttributes.Unmanaged)) 556if (property.Attributes.HasFlag(PropertyAttributes.SpecialName)) 558if (property.Attributes.HasFlag(PropertyAttributes.RTSpecialName)) 626if (field.Attributes.HasFlag(FieldAttributes.SpecialName)) 628if (field.Attributes.HasFlag(FieldAttributes.RTSpecialName)) 654if (@event.Attributes.HasFlag(EventAttributes.SpecialName)) 656if (@event.Attributes.HasFlag(EventAttributes.RTSpecialName))
Platform\Desktop\DesktopRuntimeEnvironment.cs (2)
178if (verification.Status.HasFlag(VerificationStatus.Skipped)) 183var shouldSucceed = !verification.Status.HasFlag(VerificationStatus.FailsPEVerify);
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (5)
Attributes\InternalsVisibleToAndStrongNameTests.vb (2)
58Assert.Equal(expectedToBeSigned, headers.CorHeader.Flags.HasFlag(CorFlags.StrongNameSigned)) 1969Assert.True(flags.HasFlag(CorFlags.StrongNameSigned))
Emit\CompilationEmitTests.vb (3)
2122Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)) 2183Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware)) 2244Assert.True(peHeaders.CoffHeader.Characteristics.HasFlag(Characteristics.LargeAddressAware))
Microsoft.CodeAnalysis.Workspaces (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Microsoft.DotNet.Build.Manifest (6)
BuildModelFactory.cs (6)
112.Where(b => artifactVisibilitiesToInclude.HasFlag(b.Visibility)); 117.Where(b => artifactVisibilitiesToInclude.HasFlag(b.Visibility)); 122.Where(b => artifactVisibilitiesToInclude.HasFlag(b.Visibility)); 348manifest.Artifacts.Blobs.Where(b => artifactVisibilitiesToInclude.HasFlag(b.Visibility))); 350manifest.Artifacts.Packages.Where(p => artifactVisibilitiesToInclude.HasFlag(p.Visibility))); 352manifest.Artifacts.Pdbs.Where(p => artifactVisibilitiesToInclude.HasFlag(p.Visibility)));
Microsoft.DotNet.Helix.Sdk (1)
XharnessTaskBase.cs (1)
144if (fileSystem.GetAttributes(pathToZip).HasFlag(FileAttributes.Directory))
Microsoft.DotNet.XUnitExtensions (31)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (20)
21(platforms.HasFlag(TestPlatforms.Any)) || 22(platforms.HasFlag(TestPlatforms.FreeBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) || 23(platforms.HasFlag(TestPlatforms.Linux) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) || 24(platforms.HasFlag(TestPlatforms.NetBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"))) || 25(platforms.HasFlag(TestPlatforms.OSX) && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 26(platforms.HasFlag(TestPlatforms.illumos) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"))) || 27(platforms.HasFlag(TestPlatforms.Solaris) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"))) || 28(platforms.HasFlag(TestPlatforms.iOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) && !RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 29(platforms.HasFlag(TestPlatforms.tvOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"))) || 30(platforms.HasFlag(TestPlatforms.MacCatalyst) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) || 32(platforms.HasFlag(TestPlatforms.Android) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"))) || 33(platforms.HasFlag(TestPlatforms.Browser) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))) || 34(platforms.HasFlag(TestPlatforms.Wasi) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI"))) || 35(platforms.HasFlag(TestPlatforms.Haiku) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("HAIKU"))) || 36(platforms.HasFlag(TestPlatforms.Windows) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 39(runtimes.HasFlag(TestRuntimes.Mono) && IsMonoRuntime) || 40(runtimes.HasFlag(TestRuntimes.CoreCLR) && !IsMonoRuntime); // assume CoreCLR if it's not Mono 43(frameworks.HasFlag(TargetFrameworkMonikers.Netcoreapp) && IsRunningOnNetCoreApp) || 44(frameworks.HasFlag(TargetFrameworkMonikers.NetFramework) && IsRunningOnNetFramework);
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCoreClrDiscoverer.cs (11)
62(runtimeConfigurations.HasFlag(RuntimeConfiguration.Checked) && s_isCheckedRuntime.Value) || 63(runtimeConfigurations.HasFlag(RuntimeConfiguration.Release) && s_isReleaseRuntime.Value) || 64(runtimeConfigurations.HasFlag(RuntimeConfiguration.Debug) && s_isDebugRuntime.Value); 68(stressMode.HasFlag(RuntimeTestModes.RegularRun) && !s_isStressTest.Value) || 69(stressMode.HasFlag(RuntimeTestModes.GCStress3) && s_isGCStress3.Value) || 70(stressMode.HasFlag(RuntimeTestModes.GCStressC) && s_isGCStressC.Value) || 71(stressMode.HasFlag(RuntimeTestModes.ZapDisable) && s_isZapDisable.Value) || 72(stressMode.HasFlag(RuntimeTestModes.TailcallStress) && s_isTailCallStress.Value) || 73(stressMode.HasFlag(RuntimeTestModes.JitStressRegs) && s_isJitStressRegs.Value) || 74(stressMode.HasFlag(RuntimeTestModes.JitStress) && s_isJitStress.Value) || 75(stressMode.HasFlag(RuntimeTestModes.JitMinOpts) && s_isJitMinOpts.Value);
Microsoft.DotNet.XUnitV3Extensions (31)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCoreClrAttribute.cs (11)
48(runtimeConfigurations.HasFlag(RuntimeConfiguration.Checked) && s_isCheckedRuntime.Value) || 49(runtimeConfigurations.HasFlag(RuntimeConfiguration.Release) && s_isReleaseRuntime.Value) || 50(runtimeConfigurations.HasFlag(RuntimeConfiguration.Debug) && s_isDebugRuntime.Value); 54(stressMode.HasFlag(RuntimeTestModes.RegularRun) && !s_isStressTest.Value) || 55(stressMode.HasFlag(RuntimeTestModes.GCStress3) && s_isGCStress3.Value) || 56(stressMode.HasFlag(RuntimeTestModes.GCStressC) && s_isGCStressC.Value) || 57(stressMode.HasFlag(RuntimeTestModes.ZapDisable) && s_isZapDisable.Value) || 58(stressMode.HasFlag(RuntimeTestModes.TailcallStress) && s_isTailCallStress.Value) || 59(stressMode.HasFlag(RuntimeTestModes.JitStressRegs) && s_isJitStressRegs.Value) || 60(stressMode.HasFlag(RuntimeTestModes.JitStress) && s_isJitStress.Value) || 61(stressMode.HasFlag(RuntimeTestModes.JitMinOpts) && s_isJitMinOpts.Value);
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (20)
21(platforms.HasFlag(TestPlatforms.Any)) || 22(platforms.HasFlag(TestPlatforms.FreeBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("FREEBSD"))) || 23(platforms.HasFlag(TestPlatforms.Linux) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) || 24(platforms.HasFlag(TestPlatforms.NetBSD) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD"))) || 25(platforms.HasFlag(TestPlatforms.OSX) && RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) || 26(platforms.HasFlag(TestPlatforms.illumos) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ILLUMOS"))) || 27(platforms.HasFlag(TestPlatforms.Solaris) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("SOLARIS"))) || 28(platforms.HasFlag(TestPlatforms.iOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("IOS")) && !RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 29(platforms.HasFlag(TestPlatforms.tvOS) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("TVOS"))) || 30(platforms.HasFlag(TestPlatforms.MacCatalyst) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("MACCATALYST"))) || 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) || 32(platforms.HasFlag(TestPlatforms.Android) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("ANDROID"))) || 33(platforms.HasFlag(TestPlatforms.Browser) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))) || 34(platforms.HasFlag(TestPlatforms.Wasi) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("WASI"))) || 35(platforms.HasFlag(TestPlatforms.Haiku) && RuntimeInformation.IsOSPlatform(OSPlatform.Create("HAIKU"))) || 36(platforms.HasFlag(TestPlatforms.Windows) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)); 39(runtimes.HasFlag(TestRuntimes.Mono) && IsMonoRuntime) || 40(runtimes.HasFlag(TestRuntimes.CoreCLR) && !IsMonoRuntime); // assume CoreCLR if it's not Mono 43(frameworks.HasFlag(TargetFrameworkMonikers.Netcoreapp) && IsRunningOnNetCoreApp) || 44(frameworks.HasFlag(TargetFrameworkMonikers.NetFramework) && IsRunningOnNetFramework);
Microsoft.Extensions.AI.Abstractions (2)
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
292if (((isPrivate || isFamilyAndAssembly) && value.HasFlag(NotAnnotatedStatus.Private)) || 293(isAssembly && value.HasFlag(NotAnnotatedStatus.Internal)))
Microsoft.Extensions.DependencyInjection (3)
ServiceLookup\CallSiteFactory.cs (3)
120bool serviceHasNewConstraint = serviceGenericType.GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint); 121bool implementationHasNewConstraint = implementationGenericType.GenericParameterAttributes.HasFlag(GenericParameterAttributes.DefaultConstructorConstraint); 148return serviceDynamicallyAccessedMembers.HasFlag(implementationDynamicallyAccessedMembers);
Microsoft.Extensions.Diagnostics (10)
Metrics\ListenerSubscription.cs (10)
161if (!(rule.Scopes.HasFlag(MeterScope.Global) && instrument.Meter.Scope == null) 162&& !(rule.Scopes.HasFlag(MeterScope.Local) && instrument.Meter.Scope == meterFactory)) 258if (!rule.Scopes.HasFlag(MeterScope.Global) && best.Scopes.HasFlag(MeterScope.Global)) 262else if (rule.Scopes.HasFlag(MeterScope.Global) && !best.Scopes.HasFlag(MeterScope.Global)) 271if (!rule.Scopes.HasFlag(MeterScope.Local) && best.Scopes.HasFlag(MeterScope.Local)) 275else if (rule.Scopes.HasFlag(MeterScope.Local) && !best.Scopes.HasFlag(MeterScope.Local))
Microsoft.Extensions.Http.Resilience.PerformanceTests (3)
HttpClientFactory.cs (3)
71if (clientType.HasFlag(HedgingClientType.NoRoutes)) 76int routes = clientType.HasFlag(HedgingClientType.ManyRoutes) ? 50 : 2; 78if (clientType.HasFlag(HedgingClientType.Ordered))
Microsoft.Interop.ComInterfaceGenerator (19)
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
130if (method.MethodImplementationFlags.HasFlag(MethodImplAttributes.PreserveSig))
ComClassInfo.cs (1)
49if (attributeData.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper))
ComInterfaceGenerator.cs (6)
310if (!symbol.MethodImplementationFlags.HasFlag(MethodImplAttributes.PreserveSig)) 436if (options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper | ComInterfaceOptions.ComObjectWrapper)) 440if (options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) 444if (options.HasFlag(ComInterfaceOptions.ComObjectWrapper)) 657if (!interfaceMethods.Interface.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) 832if (context.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper))
ComInterfaceGeneratorHelpers.cs (1)
27=> (env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling), direction) switch
ComInterfaceInfo.cs (8)
203if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) 240if ((baseAttr.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || baseAttr.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) 276if ((attrInfo.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper) && !baseAttr.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) 277|| (attrInfo.Options.HasFlag(ComInterfaceOptions.ComObjectWrapper) && !baseAttr.Options.HasFlag(ComInterfaceOptions.ComObjectWrapper)))
VtableIndexStubGenerator.cs (1)
248if (virtualMethodIndexData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling))
VtableIndexStubGeneratorHelpers.cs (1)
25=> (env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling), direction) switch
Microsoft.Interop.LibraryImportGenerator (15)
Analyzers\ConvertToLibraryImportFixer.cs (2)
181if (!methodSymbol.MethodImplementationFlags.HasFlag(System.Reflection.MethodImplAttributes.PreserveSig)) 237if (!methodSymbol.MethodImplementationFlags.HasFlag(System.Reflection.MethodImplAttributes.PreserveSig))
Analyzers\CustomMarshallerAttributeAnalyzer.cs (8)
747if (shape.HasFlag(MarshallerShape.CallerAllocatedBuffer) && mode == MarshalMode.ManagedToUnmanagedIn) 762if (!(shape.HasFlag(MarshallerShape.ToUnmanaged) || (mode == MarshalMode.ManagedToUnmanagedIn && shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)))) 900if (shape.HasFlag(MarshallerShape.ToUnmanaged | MarshallerShape.CallerAllocatedBuffer)) 931if (shape.HasFlag(MarshallerShape.ToManaged | MarshallerShape.GuaranteedUnmarshal)) 1041if (shape.HasFlag(MarshallerShape.CallerAllocatedBuffer) && mode == MarshalMode.ManagedToUnmanagedIn) 1056if (!(shape.HasFlag(MarshallerShape.ToUnmanaged) || (mode == MarshalMode.ManagedToUnmanagedIn && shape.HasFlag(MarshallerShape.CallerAllocatedBuffer))))
LibraryImportGenerator.cs (5)
277if (libraryImportData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling)) 386if (pinvokeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) 401if (pinvokeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) 497if (target.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling)) 505if (target.IsUserDefined.HasFlag(InteropAttributeMember.SetLastError))
Microsoft.Interop.LibraryImportGenerator.Downlevel (5)
DownlevelLibraryImportGenerator.cs (3)
280if (pinvokeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) 372if (target.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling)) 383if (target.IsUserDefined.HasFlag(InteropAttributeMember.SetLastError))
DownlevelLibraryImportGeneratorHelpers.cs (2)
16if (interopAttributeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling)) 26else if (interopAttributeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType))
Microsoft.Interop.SourceGeneration (62)
DefaultMarshallingInfoParser.cs (2)
36if (interopAttributeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling)) 46else if (interopAttributeData.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType))
ManualTypeMarshallingHelper.cs (10)
461if (!ModeOptionallyMatchesShape(mode) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer) && !shape.HasFlag(MarshallerShape.ToUnmanaged)) 484if (!ModeOptionallyMatchesShape(mode) && !shape.HasFlag(MarshallerShape.GuaranteedUnmarshal) && !shape.HasFlag(MarshallerShape.ToManaged)) 516if (!ModeOptionallyMatchesShape(mode) && ModeUsesManagedToUnmanagedShape(mode) && ModeUsesUnmanagedToManagedShape(mode) && !shape.HasFlag(MarshallerShape.ToUnmanaged)) 562if (mode != MarshalMode.Default && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer) && !shape.HasFlag(MarshallerShape.ToUnmanaged)) 580if (mode != MarshalMode.Default && !shape.HasFlag(MarshallerShape.GuaranteedUnmarshal) && !shape.HasFlag(MarshallerShape.ToManaged)) 596if (mode != MarshalMode.Default && ModeUsesManagedToUnmanagedShape(mode) && ModeUsesUnmanagedToManagedShape(mode) && !shape.HasFlag(MarshallerShape.ToUnmanaged))
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (10)
169if (marshallerData.Shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 175if (marshallerData.Shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 185if (freeStrategy != FreeStrategy.NoFree && marshallerData.Shape.HasFlag(MarshallerShape.Free)) 196IBoundMarshallingGenerator marshallingGenerator = new CustomTypeMarshallingGenerator(marshallingStrategy, ByValueMarshalKindSupportDescriptor.Default, marshallerData.Shape.HasFlag(MarshallerShape.StatelessPinnableReference)); 198if (marshallerData.Shape.HasFlag(MarshallerShape.StatelessPinnableReference)) 263if (marshallerData.Shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 288if (marshallerData.Shape.HasFlag(MarshallerShape.Free)) 309if (marshallerData.Shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 318if (freeStrategy != FreeStrategy.NoFree && marshallerData.Shape.HasFlag(MarshallerShape.Free)) 341bool isPinned = marshallerData.Shape.HasFlag(MarshallerShape.StatelessPinnableReference) && elementIsBlittable;
Marshalling\CustomTypeMarshallingGenerator.cs (1)
92=> TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)
Marshalling\DefaultMarshallingGeneratorResolver.cs (4)
30new BlittableMarshallerResolver(env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling)), 48env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling), 62env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling), 75new CharMarshallingGeneratorResolver(useBlittableMarshallerForUtf16: env.HasFlag(EnvironmentFlags.DisableRuntimeMarshalling), stringMarshallingAttribute),
Marshalling\MarshallingGeneratorExtensions.cs (2)
116if (info.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.In)) 120if (info.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
Marshalling\StatefulMarshallingStrategy.cs (16)
30if (!shape.HasFlag(MarshallerShape.Free)) 44if (!shape.HasFlag(MarshallerShape.Free)) 55if (!shape.HasFlag(MarshallerShape.GuaranteedUnmarshal)) 70if (!shape.HasFlag(MarshallerShape.ToUnmanaged)) 84if (!shape.HasFlag(MarshallerShape.ToUnmanaged) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 99if (!shape.HasFlag(MarshallerShape.ToManaged)) 114if (!shape.HasFlag(MarshallerShape.ToManaged) && !shape.HasFlag(MarshallerShape.GuaranteedUnmarshal)) 150if (!shape.HasFlag(MarshallerShape.StatefulPinnableReference)) 166if (!shape.HasFlag(MarshallerShape.OnInvoked)) 370if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 378if (!shape.HasFlag(MarshallerShape.ToUnmanaged) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 424if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 440if (!shape.HasFlag(MarshallerShape.ToManaged))
Marshalling\StatelessMarshallingStrategy.cs (16)
33if (!shape.HasFlag(MarshallerShape.GuaranteedUnmarshal)) 53if (!shape.HasFlag(MarshallerShape.ToUnmanaged) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 105if (!shape.HasFlag(MarshallerShape.ToManaged)) 357if (!shape.HasFlag(MarshallerShape.GuaranteedUnmarshal)) 387if (!shape.HasFlag(MarshallerShape.ToUnmanaged) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 390if (shape.HasFlag(MarshallerShape.ToUnmanaged) 391&& !(shape.HasFlag(MarshallerShape.CallerAllocatedBuffer) 440if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 445if (!shape.HasFlag(MarshallerShape.ToManaged)) 662if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 675if (!shape.HasFlag(MarshallerShape.ToUnmanaged) && !shape.HasFlag(MarshallerShape.CallerAllocatedBuffer)) 700if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.IsByRef && TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out)) 720if (!shape.HasFlag(MarshallerShape.ToManaged))
SignatureContext.cs (1)
151if (env.EnvironmentFlags.HasFlag(EnvironmentFlags.SkipLocalsInit))
Microsoft.Maui.Controls (1)
BindableObjectExtensions.cs (1)
22 if (!ctx.Attributes.HasFlag(BindableObject.BindableContextAttributes.IsBeingSet))
Microsoft.Maui.Essentials (1)
Browser\BrowserLaunchOptions.shared.cs (1)
43 internal bool HasFlag(BrowserLaunchFlags flag) => Flags.HasFlag(flag);
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
275return attr.HasFlag(FileAttributes.Directory);
Microsoft.VisualStudio.LanguageServices (6)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
106if (attr.HasFlag(FileAttributes.Directory))
InheritanceMargin\InheritanceMarginHelpers.cs (1)
91if (inheritanceRelationship.HasFlag(InheritanceRelationship.InheritedImport))
KeybindingReset\KeybindingResetDetector.cs (4)
302if (suspendFlag.HasFlag(OLECMDF.OLECMDF_ENABLED) && !suspendFlag.HasFlag(OLECMDF.OLECMDF_INVISIBLE)) 308if (resumeFlag.HasFlag(OLECMDF.OLECMDF_ENABLED) && !resumeFlag.HasFlag(OLECMDF.OLECMDF_INVISIBLE))
PresentationCore (27)
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (2)
290if (output.interactionFlags.HasFlag(UnsafeNativeMethods.INTERACTION_FLAGS.INTERACTION_FLAG_BEGIN)) 464if (output.interactionFlags.HasFlag(UnsafeNativeMethods.INTERACTION_FLAGS.INTERACTION_FLAG_END))
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (17)
207return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_NEW) ?? false; 215return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) ?? false; 223return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_PRIMARY) ?? false; 231return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FIRSTBUTTON) ?? false; 239return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_SECONDBUTTON) ?? false; 247return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_THIRDBUTTON) ?? false; 255return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FOURTHBUTTON) ?? false; 263return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FIFTHBUTTON) ?? false; 279return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_DOWN) ?? false; 287return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_UPDATE) ?? false; 295return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_UP) ?? false; 303return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_CAPTURECHANGED) ?? false; 311return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_HASTRANSFORM) ?? false; 443return !(_pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) ?? false) 444&& (_pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE) ?? false); 456&& (_pointerData?.PenInfo.penFlags.HasFlag(UnsafeNativeMethods.PEN_FLAGS.PEN_FLAG_INVERTED) ?? false); 467return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE) ?? false;
System\Windows\InterOp\HwndPointerInputProvider.cs (2)
232&& (!data.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) 233&& data.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE)))
System\Windows\Ole\WpfOleServices.cs (2)
32if (mediumType.HasFlag(TYMED.TYMED_GDI) 41if (mediumType.HasFlag(TYMED.TYMED_ENHMF) && format.Equals(DataFormatNames.Emf))
System\Windows\TextDecorationCollectionConverter.cs (4)
96if (decoration.Equals("Overline", StringComparison.OrdinalIgnoreCase) && !matchedDecorations.HasFlag(Decorations.OverlineMatch)) 101else if (decoration.Equals("Baseline", StringComparison.OrdinalIgnoreCase) && !matchedDecorations.HasFlag(Decorations.BaselineMatch)) 106else if (decoration.Equals("Underline", StringComparison.OrdinalIgnoreCase) && !matchedDecorations.HasFlag(Decorations.UnderlineMatch)) 111else if (decoration.Equals("Strikethrough", StringComparison.OrdinalIgnoreCase) && !matchedDecorations.HasFlag(Decorations.StrikethroughMatch))
PresentationFramework (6)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (1)
75if (flags.HasFlag(CreateComInterfaceFlags.CallerDefinedIUnknown))
System\Windows\Documents\NLGSpellerInterop.cs (3)
367if (_mode.HasFlag(SpellerMode.SpellingErrors)) 371if (_mode.HasFlag(SpellerMode.Suggestions)) 380else if (_mode.HasFlag(SpellerMode.WordBreaking))
System\Windows\Documents\WinRTSpellerInterop.cs (2)
371bool spellCheckerNeeded = _mode.HasFlag(SpellerMode.SpellingErrors) || _mode.HasFlag(SpellerMode.Suggestions);
Roslyn.Diagnostics.Analyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
Roslyn.Diagnostics.CSharp.Analyzers (145)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
74return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.cs (31)
72CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodDeclarationName)) 77CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)) 82CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)) 87CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterMethodCallName)) 92CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinMethodCallParentheses)) 97CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)) 102CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)) 115CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterCast)) 120CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration), 128CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeOpenSquareBracket)) 133CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)) 138CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.WithinSquareBrackets)) 143CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)) 148CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterComma)) 153CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterDot)) 158CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)) 163CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)) 168CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeComma)) 173CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeDot)) 178CSharpSyntaxFormattingOptions.SpacingDefault.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)) 191CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.Braces)) 196CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.BlockContents)) 201CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 206CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchSection)) 211CSharpSyntaxFormattingOptions.IndentationDefault.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 242CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeElse)) 247CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeCatch)) 252CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeFinally)) 257CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 267CSharpSyntaxFormattingOptions.NewLinesDefault.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\NewLineBeforeOpenBracePlacement.cs (18)
28=> (value.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes) ? NewLineBeforeOpenBracePlacement.Types : 0) | 29(value.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods) ? NewLineBeforeOpenBracePlacement.Methods : 0) | 30(value.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) ? NewLineBeforeOpenBracePlacement.Properties : 0) | 31(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods) ? NewLineBeforeOpenBracePlacement.AnonymousMethods : 0) | 32(value.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks) ? NewLineBeforeOpenBracePlacement.ControlBlocks : 0) | 33(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes) ? NewLineBeforeOpenBracePlacement.AnonymousTypes : 0) | 34(value.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers) ? NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers : 0) | 35(value.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody) ? NewLineBeforeOpenBracePlacement.LambdaExpressionBody : 0) | 36(value.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors) ? NewLineBeforeOpenBracePlacement.Accessors : 0); 39=> (value.HasFlag(NewLineBeforeOpenBracePlacement.Types) ? NewLinePlacement.BeforeOpenBraceInTypes : 0) | 40(value.HasFlag(NewLineBeforeOpenBracePlacement.Methods) ? NewLinePlacement.BeforeOpenBraceInMethods : 0) | 41(value.HasFlag(NewLineBeforeOpenBracePlacement.Properties) ? NewLinePlacement.BeforeOpenBraceInProperties : 0) | 42(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousMethods) ? NewLinePlacement.BeforeOpenBraceInAnonymousMethods : 0) | 43(value.HasFlag(NewLineBeforeOpenBracePlacement.ControlBlocks) ? NewLinePlacement.BeforeOpenBraceInControlBlocks : 0) | 44(value.HasFlag(NewLineBeforeOpenBracePlacement.AnonymousTypes) ? NewLinePlacement.BeforeOpenBraceInAnonymousTypes : 0) | 45(value.HasFlag(NewLineBeforeOpenBracePlacement.ObjectCollectionArrayInitializers) ? NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers : 0) | 46(value.HasFlag(NewLineBeforeOpenBracePlacement.LambdaExpressionBody) ? NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody : 0) | 47(value.HasFlag(NewLineBeforeOpenBracePlacement.Accessors) ? NewLinePlacement.BeforeOpenBraceInAccessors : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (9)
88if (!_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && !_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)) 94var alwaysIndent = _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) && _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock); 98Debug.Assert(_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContents) != _options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock)); 101if (_options.Indentation.HasFlag(IndentationPlacement.SwitchCaseContentsWhenBlock) != firstStatementIsBlock) 238if (node is BlockSyntax && !_options.Indentation.HasFlag(IndentationPlacement.BlockContents)) 244if (node is SwitchStatementSyntax && !_options.Indentation.HasFlag(IndentationPlacement.SwitchSection))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentUserSettingsFormattingRule.cs (2)
29if (_options.Indentation.HasFlag(IndentationPlacement.Braces) == newOptions.Indentation.HasFlag(IndentationPlacement.Braces)) 49if (_options.Indentation.HasFlag(IndentationPlacement.Braces))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (31)
87if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeElse)) 96if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 105if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 114if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 123if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 138if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 145if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 171? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 172: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 182if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 191if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 200if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 210if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 219if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 228if (!_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks)) 248if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInObjectInitializers)) 262if (_options.NewLines.HasFlag(NewLinePlacement.BeforeMembersInAnonymousTypes)) 276if (_options.NewLines.HasFlag(NewLinePlacement.BeforeElse) 290if (_options.NewLines.HasFlag(NewLinePlacement.BeforeCatch)) 303if (_options.NewLines.HasFlag(NewLinePlacement.BeforeFinally)) 316if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInTypes)) 329if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousTypes)) 346if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 372? _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInProperties) 373: _options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods); 388if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAccessors)) 401if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInAnonymousMethods)) 414if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInMethods)) 428if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInLambdaExpressionBody)) 441if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInObjectCollectionArrayInitializers)) 454if (_options.NewLines.HasFlag(NewLinePlacement.BeforeOpenBraceInControlBlocks))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (2)
34if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses) == newOptions.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses)) 159if (_options.NewLines.HasFlag(NewLinePlacement.BetweenQueryExpressionClauses))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (39)
61return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 75return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 88return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 94return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodDeclarationName)); 99return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodDeclarationParentheses)); 104return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 109return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 118return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 123return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptyMethodCallParentheses)); 128return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 133return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 139return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterMethodCallName)); 144return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 149return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodCallParentheses)); 159return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterControlFlowStatementKeyword)); 166return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinExpressionParentheses)); 173return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinCastParentheses)); 182|| _options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement))) 184return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 187return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 193return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 198return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinOtherParentheses)); 204return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterCast)); 213return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 226return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeOpenSquareBracket)); 234return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BetweenEmptySquareBrackets)); 240return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 245return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinSquareBrackets)); 271return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterColonInBaseTypeDeclaration)); 277return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeColonInBaseTypeDeclaration)); 288return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterComma)); 299return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeComma)); 305return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterDot)); 311return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeDot)); 317return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.AfterSemicolonsInForStatement)); 323return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.BeforeSemicolonsInForStatement)); 447return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 454return AdjustSpacesOperationZeroOrOne(_options.Spacing.HasFlag(SpacePlacement.WithinMethodDeclarationParenthesis)); 583if (_options.Spacing.HasFlag(SpacePlacement.IgnoreAroundVariableDeclaration))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\SpacingWithinParentheses.cs (6)
22=> (placement.HasFlag(SpacePlacement.WithinExpressionParentheses) ? SpacePlacementWithinParentheses.Expressions : 0) | 23(placement.HasFlag(SpacePlacement.WithinCastParentheses) ? SpacePlacementWithinParentheses.TypeCasts : 0) | 24(placement.HasFlag(SpacePlacement.WithinOtherParentheses) ? SpacePlacementWithinParentheses.ControlFlowStatements : 0); 27=> (placement.HasFlag(SpacePlacementWithinParentheses.Expressions) ? SpacePlacement.WithinExpressionParentheses : 0) | 28(placement.HasFlag(SpacePlacementWithinParentheses.TypeCasts) ? SpacePlacement.WithinCastParentheses : 0) | 29(placement.HasFlag(SpacePlacementWithinParentheses.ControlFlowStatements) ? SpacePlacement.WithinOtherParentheses : 0);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (3)
29return !stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 33return !stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 37return !stylePreferences.HasFlag(UseVarPreference.Elsewhere);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (3)
85return stylePreferences.HasFlag(UseVarPreference.ForBuiltInTypes); 89return stylePreferences.HasFlag(UseVarPreference.WhenTypeIsApparent); 93return stylePreferences.HasFlag(UseVarPreference.Elsewhere);
Shared (2)
JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (2)
292if (((isPrivate || isFamilyAndAssembly) && value.HasFlag(NotAnnotatedStatus.Private)) || 293(isAssembly && value.HasFlag(NotAnnotatedStatus.Internal)))
System.ComponentModel.Composition (6)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (2)
95_lock = new CompositionLock(compositionOptions.HasFlag(CompositionOptions.IsThreadSafe)); 96_disableSilentRejection = compositionOptions.HasFlag(CompositionOptions.DisableSilentRejection);
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
47_lock = new CompositionLock(compositionOptions.HasFlag(CompositionOptions.IsThreadSafe));
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (1)
218if (compositionOptions.HasFlag(CompositionOptions.ExportCompositionService))
System\ComponentModel\Composition\Hosting\ImportEngine.cs (2)
54_lock = new CompositionLock(compositionOptions.HasFlag(CompositionOptions.IsThreadSafe)); 90if (_compositionOptions.HasFlag(CompositionOptions.DisableSilentRejection))
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesSamplerBuilder.cs (2)
43return parentContext.TraceFlags.HasFlag(ActivityTraceFlags.Recorded) 84parentContext.TraceFlags.HasFlag(ActivityTraceFlags.Recorded) ? ActivitySamplingResult.AllDataAndRecorded : ActivitySamplingResult.None;
System.IO.Ports (8)
System\IO\Ports\SerialStream.Unix.cs (8)
961if (events.HasFlag(Interop.PollEvents.POLLNVAL) || 962events.HasFlag(Interop.PollEvents.POLLERR)) 969if (events.HasFlag(Interop.PollEvents.POLLIN)) 975if (events.HasFlag(Interop.PollEvents.POLLOUT)) 1045if (signals.HasFlag(Signals.SignalCts)) 1050if (signals.HasFlag(Signals.SignalDsr)) 1055if (signals.HasFlag(Signals.SignalDcd)) 1060if (signals.HasFlag(Signals.SignalRng))
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
1152case HeaderState.ResponseHeaders when descriptor.HeaderType.HasFlag(HttpHeaderType.Content): 1156_response!.Headers.TryAddWithoutValidation(descriptor.HeaderType.HasFlag(HttpHeaderType.Request) ? descriptor.AsCustomHeader() : descriptor, headerValue); 1159_trailingHeaders!.Add((descriptor.HeaderType.HasFlag(HttpHeaderType.Request) ? descriptor.AsCustomHeader() : descriptor, headerValue));
System.Net.Quic (11)
System\Net\Quic\QuicConnection.cs (1)
707QuicStreamType type = data.Flags.HasFlag(QUIC_STREAM_OPEN_FLAGS.UNIDIRECTIONAL) ? QuicStreamType.Unidirectional : QuicStreamType.Bidirectional;
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
216bool checkCertName = !chain!.ChainPolicy!.VerificationFlags.HasFlag(X509VerificationFlags.IgnoreInvalidName);
System\Net\Quic\QuicStream.cs (9)
232_canWrite = !flags.HasFlag(QUIC_STREAM_OPEN_FLAGS.UNIDIRECTIONAL); 238_type = flags.HasFlag(QUIC_STREAM_OPEN_FLAGS.UNIDIRECTIONAL) ? QuicStreamType.Unidirectional : QuicStreamType.Bidirectional; 461if (abortDirection.HasFlag(QuicAbortDirection.Read) && !_receiveTcs.IsCompleted) 465if (abortDirection.HasFlag(QuicAbortDirection.Write) && !_sendTcs.IsCompleted) 488if (abortDirection.HasFlag(QuicAbortDirection.Read)) 492if (abortDirection.HasFlag(QuicAbortDirection.Write)) 566data.Flags.HasFlag(QUIC_RECEIVE_FLAGS.FIN)); 767if (flags.HasFlag(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_RECEIVE) && !_receiveTcs.IsCompleted) 771if (flags.HasFlag(QUIC_STREAM_SHUTDOWN_FLAGS.ABORT_SEND) && !_sendTcs.IsCompleted)
System.Net.Security (7)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (2)
661Debug.Assert(flags.HasFlag(Flags.NegotiateSign) && flags.HasFlag(Flags.NegotiateKeyExchange));
System\Net\Security\SslAuthenticationOptions.cs (1)
54CheckCertName = !(sslClientAuthenticationOptions.CertificateChainPolicy?.VerificationFlags.HasFlag(X509VerificationFlags.IgnoreInvalidName) == true);
System\Net\Security\SslStreamCertificateContext.cs (1)
113if (status.Status.HasFlag(X509ChainStatusFlags.PartialChain))
System\Net\Security\TlsFrameHelper.cs (3)
529(options.HasFlag(ProcessingOptions.ApplicationProtocol) || options.HasFlag(ProcessingOptions.RawApplicationProtocol)))) 539if (options.HasFlag(ProcessingOptions.RawApplicationProtocol))
System.Net.WebSockets (4)
System\Net\WebSockets\ManagedWebSocket.cs (2)
327bool endOfMessage = messageFlags.HasFlag(WebSocketMessageFlags.EndOfMessage); 328bool disableCompression = messageFlags.HasFlag(WebSocketMessageFlags.DisableCompression);
System\Net\WebSockets\WebSocket.cs (1)
63return SendAsync(buffer, messageType, messageFlags.HasFlag(WebSocketMessageFlags.EndOfMessage), cancellationToken);
System\Net\WebSockets\WebSocketStateHelper.cs (1)
19internal static bool IsValidSendState(WebSocketState state) => ValidSendStates.HasFlag(ToFlag(state));
System.Private.CoreLib (22)
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (2)
294if ((isPrivate || isFamilyAndAssembly) && value.HasFlag(NotAnnotatedStatus.Private) || 295isAssembly && value.HasFlag(NotAnnotatedStatus.Internal))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (13)
492public bool IsActivated => _wrapper->Flags.HasFlag(CreateComInterfaceFlagsEx.IsComActivated); 560if (flags.HasFlag(CreateObjectFlags.TrackerObject)) 584_uniqueInstance = flags.HasFlag(CreateObjectFlags.UniqueInstance); 599_aggregatedManagedObjectWrapper = flags.HasFlag(CreateObjectFlags.Aggregation) && TryGetComInterfaceDispatch(_externalComObject) != null; 674Debug.Assert(flags.HasFlag(CreateObjectFlags.TrackerObject)); 683if (flags.HasFlag(CreateObjectFlags.Aggregation)) 1019bool refTrackerInnerScenario = flags.HasFlag(CreateObjectFlags.TrackerObject) 1020&& flags.HasFlag(CreateObjectFlags.Aggregation); 1083if (innerMaybe != IntPtr.Zero && !flags.HasFlag(CreateObjectFlags.Aggregation)) 1099if (flags.HasFlag(CreateObjectFlags.UniqueInstance)) 1123if (flags.HasFlag(CreateObjectFlags.Unwrap)) 1191if (wrapperFlags.HasFlag(CreatedWrapperFlags.NonWrapping)) 1196if (wrapperFlags.HasFlag(CreatedWrapperFlags.TrackerObject))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (6)
152else if (VarType.HasFlag(VarEnum.VT_ARRAY)) 208else if (VarType.HasFlag(VarEnum.VT_VECTOR)) 393if (vt.HasFlag(VarEnum.VT_ARRAY) && !OperatingSystem.IsWindows()) 414_ when vt.HasFlag(VarEnum.VT_BYREF) && sizeof(T) == nint.Size => rawValue, 415_ when vt.HasFlag(VarEnum.VT_VECTOR) && sizeof(T) == sizeof(Vector<byte>) => rawValue, 416_ when vt.HasFlag(VarEnum.VT_ARRAY) && sizeof(T) == nint.Size => rawValue,
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
425Debug.Assert(ThreadState.HasFlag(ThreadState.Unstarted) || this == CurrentThread);
System.Private.Windows.Core (12)
System\Reflection\Metadata\TypeNameComparer.cs (4)
74if (_comparison.HasFlag(TypeNameComparison.AssemblyName)) 79if (_comparison.HasFlag(TypeNameComparison.AssemblyVersion) && info.Version is not null) 84if (_comparison.HasFlag(TypeNameComparison.AssemblyCultureName) && info.CultureName is not null) 89if (_comparison.HasFlag(TypeNameComparison.AssemblyPublicKeyToken) && !info.PublicKeyOrToken.IsDefaultOrEmpty)
System\TypeExtensions.cs (8)
176return (!comparison.HasFlag(TypeNameComparison.AssemblyName) || assemblyName.Name == assemblyNameInfo.Name) 177&& (!comparison.HasFlag(TypeNameComparison.AssemblyCultureName) || assemblyName.CultureName == assemblyNameInfo.CultureName) 178&& (!comparison.HasFlag(TypeNameComparison.AssemblyVersion) || assemblyName.Version == assemblyNameInfo.Version) 179&& (!comparison.HasFlag(TypeNameComparison.AssemblyPublicKeyToken) 209return (!comparison.HasFlag(TypeNameComparison.AssemblyName) || name1.Name == name2.Name) 210&& (!comparison.HasFlag(TypeNameComparison.AssemblyCultureName) || name1.CultureName == name2.CultureName) 211&& (!comparison.HasFlag(TypeNameComparison.AssemblyVersion) || name1.Version == name2.Version) 212&& (!comparison.HasFlag(TypeNameComparison.AssemblyPublicKeyToken)
System.Private.Windows.Core.TestUtilities (6)
CommonTestHelper.cs (4)
79if (!includeType.HasFlag(TestIncludeType.NoPositives)) 86if (!includeType.HasFlag(TestIncludeType.NoNegatives)) 100if (!includeType.HasFlag(TestIncludeType.NoPositives)) 107if (!includeType.HasFlag(TestIncludeType.NoNegatives))
XUnit\SkipOnArchitectureAttribute.cs (2)
31if ((_testArchitectures.HasFlag(TestArchitectures.X86) && RuntimeInformation.ProcessArchitecture == Architecture.X86) 32|| (_testArchitectures.HasFlag(TestArchitectures.X64) && RuntimeInformation.ProcessArchitecture == Architecture.X64))
System.Reflection.Emit (11)
System\Reflection\Emit\ModuleBuilderImpl.cs (5)
647if (field.Attributes.HasFlag(FieldAttributes.HasFieldMarshal) && field._marshallingData != null) 652if (field.Attributes.HasFlag(FieldAttributes.HasDefault) && field._defaultValue != DBNull.Value) 657if (field.Attributes.HasFlag(FieldAttributes.HasFieldRVA) && field._rvaData != null) 801callingConvention.HasFlag(CallingConventions.HasThis) || callingConvention.HasFlag(CallingConventions.ExplicitThis) ? true : false;
System\Reflection\Emit\SignatureHelper.cs (1)
160PropertySignature(isInstanceProperty: property.CallingConventions.HasFlag(CallingConventions.HasThis)).
System\Reflection\Emit\TypeBuilderImpl.cs (5)
804if (!bindingAttr.HasFlag(BindingFlags.DeclaredOnly) && _typeParent != null) 832if (found == null && !bindingAttr.HasFlag(BindingFlags.DeclaredOnly) && _typeParent != null) 870if (match == null && !bindingFlags.HasFlag(BindingFlags.DeclaredOnly) && _typeParent != null) 923if (!bindingAttr.HasFlag(BindingFlags.DeclaredOnly) && _typeParent != null) 1031if (!bindingAttr.HasFlag(BindingFlags.DeclaredOnly) && _typeParent != null)
System.Runtime.InteropServices (4)
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (1)
245if (!_unmanaged.VarType.HasFlag(VarEnum.VT_BYREF))
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (3)
95if (flags.HasFlag(CreateObjectFlags.TrackerObject) 96|| flags.HasFlag(CreateObjectFlags.Aggregation)) 103UniqueInstance = flags.HasFlag(CreateObjectFlags.UniqueInstance)
System.Text.Json (1)
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (1)
497Debug.Assert(state.Current.MetadataPropertyNames is MetadataPropertyName.None || state.Current.MetadataPropertyNames.HasFlag(MetadataPropertyName.Values));
System.Windows.Forms (293)
System\Windows\Forms\Accessibility\AccessibleObject.cs (4)
435if (child is not null && child.State.HasFlag(AccessibleStates.Focused)) 441return State.HasFlag(AccessibleStates.Focused) ? this : null; 503if (child is not null && child.State.HasFlag(AccessibleStates.Selected)) 509return State.HasFlag(AccessibleStates.Selected) ? this : null;
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
39UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
50public override bool IsReadingRTL => WindowExStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_RTLREADING);
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (7)
170bool selected = dwWhich.HasFlag(ENUM_CONTROLS_WHICH_FLAGS.GC_WCH_FSELECTED); 171bool reverse = dwWhich.HasFlag(ENUM_CONTROLS_WHICH_FLAGS.GC_WCH_FREVERSEDIR); 174bool onlyNext = dwWhich.HasFlag(ENUM_CONTROLS_WHICH_FLAGS.GC_WCH_FONLYAFTER); 175bool onlyPrevious = dwWhich.HasFlag(ENUM_CONTROLS_WHICH_FLAGS.GC_WCH_FONLYBEFORE); 303if (control is AxHost hostControl && flags.HasFlag(OLECONTF.OLECONTF_EMBEDDINGS)) 307else if (flags.HasFlag(OLECONTF.OLECONTF_OTHERS)) 581if (((OLECONTF)grfFlags).HasFlag(OLECONTF.OLECONTF_EMBEDDINGS))
System\Windows\Forms\ActiveX\AxHost.cs (3)
3460_axState[s_fOwnWindow] = bits.HasFlag(OLEMISC.OLEMISC_INVISIBLEATRUNTIME) && IsUserMode(); 3463_axState[s_fSimpleFrame] = bits.HasFlag(OLEMISC.OLEMISC_SIMPLEFRAME); 3471if (_miscStatusBits.HasFlag(OLEMISC.OLEMISC_SETCLIENTSITEFIRST))
System\Windows\Forms\ActiveX\AxHost.OleInterfaces.cs (6)
177if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_HIMETRICTOCONTAINER)) 179if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_SIZE)) 184else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_POSITION)) 194else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_CONTAINERTOHIMETRIC)) 196if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_SIZE)) 201else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_POSITION))
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (9)
694if (!dwDrawAspect.HasFlag(DVASPECT.DVASPECT_CONTENT)) 1603if (!aspects.HasFlag(DVASPECT.DVASPECT_CONTENT)) 1609_activeXState[s_viewAdvisePrimeFirst] = advf.HasFlag(ADVF.ADVF_PRIMEFIRST); 1610_activeXState[s_viewAdviseOnlyOnce] = advf.HasFlag(ADVF.ADVF_ONLYONCE); 1677if (!dwDrawAspect.HasFlag(DVASPECT.DVASPECT_CONTENT)) 1996if (flags.HasFlag(SET_WINDOW_POS_FLAGS.SWP_NOMOVE)) 2007if (flags.HasFlag(SET_WINDOW_POS_FLAGS.SWP_NOSIZE)) 2033if (!flags.HasFlag(SET_WINDOW_POS_FLAGS.SWP_NOMOVE)) 2039if (!flags.HasFlag(SET_WINDOW_POS_FLAGS.SWP_NOSIZE))
System\Windows\Forms\ActiveX\Control_ActiveXControlInterfaces.cs (1)
323if (!dwAspect.HasFlag(DVASPECT.DVASPECT_CONTENT))
System\Windows\Forms\Application.cs (1)
1198((WINDOW_STYLE)PInvokeCore.GetWindowLong(handle.Handle, WINDOW_LONG_PTR_INDEX.GWL_STYLE)).HasFlag(WINDOW_STYLE.WS_CHILD),
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
72return useValue == VARIANT_BOOL.VARIANT_TRUE && !_bldrType.HasFlag(CTLBLDTYPE.CTLBLDTYPE_FEDITSOBJIDRECTLY)
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (6)
555if (flags.HasFlag(VARFLAG_FREADONLY)) 560if (flags.HasFlag(VARFLAG_FHIDDEN) 561|| flags.HasFlag(VARFLAG_FNONBROWSABLE) 569if (flags.HasFlag(VARFLAG_FUIDEFAULT)) 574if (flags.HasFlag(VARFLAG_FBINDABLE) && flags.HasFlag(VARFLAG_FDISPLAYBIND))
System\Windows\Forms\Control.cs (11)
1401if (!_state.HasFlag(States.TopLevel)) 1413if (_state.HasFlag(States.TabStop)) 1418if (_state.HasFlag(States.Visible)) 4741.HasFlag(WINDOW_EX_STYLE.WS_EX_MDICHILD)) 5949bErase: !_controlStyle.HasFlag(ControlStyles.Opaque)); 5997bErase: !_controlStyle.HasFlag(ControlStyles.Opaque)); 7727&& (e.KeyCode.HasFlag(Keys.ControlKey) || e.KeyCode == Keys.Escape)) 11088SetState(States.Mirrored, ((WINDOW_EX_STYLE)cp.ExStyle).HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL)); 11135.HasFlag(WINDOW_STYLE.WS_CHILD)) 11669bool fireClick = _controlStyle.HasFlag(ControlStyles.StandardClick) 12078if (_state.HasFlag(States.Recreate))
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildDropDownButtonUiaProvider.cs (1)
82UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildEditUiaProvider.cs (1)
78UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
131UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildTextUiaProvider.cs (1)
106UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (2)
119UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable), 120UIA_PROPERTY_ID.UIA_SelectionItemIsSelectedPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Selected),
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
62=> _owningComboBox.IsHandleCreated && WindowExStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_RTLREADING);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
378&& ((DataGridViewAutoSizeRowsModeInternal)_autoSizeRowsMode).HasFlag(DataGridViewAutoSizeRowsModeInternal.AllColumns))
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (4)
449ButtonState.HasFlag(ButtonState.Pushed); 539if (ButtonState.HasFlag(ButtonState.Pushed) && 567if (!ButtonState.HasFlag(ButtonState.Pushed) && 573else if (ButtonState.HasFlag(ButtonState.Pushed) && !s_mouseInContentBounds)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (2)
689UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focused), // Announce the cell when focusing. 691UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (14)
109get => _flags.HasFlag(DataGridViewCheckBoxCellFlags.ValueChanged); 132if (_flags.HasFlag(DataGridViewCheckBoxCellFlags.Checked)) 141else if (_flags.HasFlag(DataGridViewCheckBoxCellFlags.Indeterminate)) 162bool ret = _flags.HasFlag(DataGridViewCheckBoxCellFlags.Checked); 290get => _flags.HasFlag(DataGridViewCheckBoxCellFlags.ThreeState); 338(_flags.HasFlag(DataGridViewCheckBoxCellFlags.Indeterminate))) 344(_flags.HasFlag(DataGridViewCheckBoxCellFlags.Checked))) 350(_flags.HasFlag(DataGridViewCheckBoxCellFlags.Checked))) 770protected override bool MouseLeaveUnsharesRow(int rowIndex) => ButtonState.HasFlag(ButtonState.Pushed); 892if (ButtonState.HasFlag(ButtonState.Pushed) && 920if (!ButtonState.HasFlag(ButtonState.Pushed) && 926else if (ButtonState.HasFlag(ButtonState.Pushed) && !s_mouseInContentBounds) 1678if (_flags.HasFlag(DataGridViewCheckBoxCellFlags.Checked)) 1682else if ((_flags.HasFlag(DataGridViewCheckBoxCellFlags.Indeterminate)))
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellAccessibleObject.cs (1)
270UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (10)
91get => _flags.HasFlag(DataGridViewComboBoxCellFlags.CellAutoComplete); 412get => _flags.HasFlag(DataGridViewComboBoxCellFlags.CellSorted); 669get => _flags.HasFlag(DataGridViewComboBoxCellFlags.CellCreateItemsFromDataSource); 693Debug.Assert(_flags.HasFlag(DataGridViewComboBoxCellFlags.DataSourceInitializedHookedUp)); 718_flags.HasFlag(DataGridViewComboBoxCellFlags.DropDownHookedUp)) 797if (!_flags.HasFlag(DataGridViewComboBoxCellFlags.DataSourceInitializedHookedUp)) 1108if (dataManager is not null || !_flags.HasFlag(DataGridViewComboBoxCellFlags.DataSourceInitializedHookedUp)) 1317if (!_flags.HasFlag(DataGridViewComboBoxCellFlags.DropDownHookedUp)) 1669if (_flags.HasFlag(DataGridViewComboBoxCellFlags.IgnoreNextMouseClick)) 2447if (DataSource is ISupportInitializeNotification dsInit && _flags.HasFlag(DataGridViewComboBoxCellFlags.DataSourceInitializedHookedUp))
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellAccessibleObject.cs (1)
278UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (1)
95UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (2)
32internal override bool IsItemSelected => State.HasFlag(AccessibleStates.Selected); 170UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ListView\ListView.cs (1)
6252if (header->pitem->mask.HasFlag(HDI_MASK.HDI_ORDER))
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (1)
234UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
427if (!state.HasFlag(LIST_VIEW_GROUP_STATE_FLAGS.LVGS_COLLAPSIBLE)) 432return state.HasFlag(LIST_VIEW_GROUP_STATE_FLAGS.LVGS_COLLAPSED) ? ListViewGroupCollapsedState.Collapsed : ListViewGroupCollapsedState.Expanded;
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (1)
188UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
184return (VARIANT)State.HasFlag(AccessibleStates.Focusable);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
125UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (3)
3218|| keyData.HasFlag(Keys.Control) 3219|| keyData.HasFlag(Keys.Alt)) 3225if (keyData.HasFlag(Keys.Shift))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ArrayElementGridEntry.cs (1)
14SetFlag(Flags.RenderReadOnly, parent.EntryFlags.HasFlag(Flags.RenderReadOnly) || parent.ForceReadOnly);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (1)
116bool bold = EntryFlags.HasFlag(Flags.LabelBold);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (20)
258internal virtual bool Enumerable => EntryFlags.HasFlag(Flags.StandardValuesSupported); 351if (_flags.HasFlag(Flags.Checked)) 395if (!forceReadOnly && !_flags.HasFlag(Flags.TextEditable) && !hasImmutableAttribute) 554if (!_flags.HasFlag(Flags.Checked)) 559if (_flags.HasFlag(Flags.CustomPaint) || _flags.HasFlag(Flags.NoCustomPaint)) 561return _flags.HasFlag(Flags.CustomPaint); 577return EntryFlags.HasFlag(Flags.CustomPaint); 594public bool IsTextEditable => IsValueEditable && EntryFlags.HasFlag(Flags.TextEditable); 629public virtual bool NeedsDropDownButton => EntryFlags.HasFlag(Flags.DropDownEditable); 635=> EntryFlags.HasFlag(Flags.ModalEditable) && (IsValueEditable || EntryFlags.HasFlag(Flags.ReadOnlyEditable)); 750public bool ShouldRenderPassword => EntryFlags.HasFlag(Flags.RenderPassword); 754|| EntryFlags.HasFlag(Flags.RenderReadOnly) 755|| (!IsValueEditable && !EntryFlags.HasFlag(Flags.ReadOnlyEditable)); 1528bool bold = EntryFlags.HasFlag(Flags.LabelBold); 1826if (paintFlags.HasFlag(PaintValueFlags.DrawSelected)) 1860bool valueModified = paintFlags.HasFlag(PaintValueFlags.CheckShouldSerialize) && ShouldSerializePropertyValue(); 1889if (paintFlags.HasFlag(PaintValueFlags.PaintInPlace)) 1907: paintFlags.HasFlag(PaintValueFlags.DrawSelected)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (1)
358UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (2)
119if (_mergedDescriptor.PropertyType.IsValueType || EntryFlags.HasFlag(Flags.Immutable)) 153=> _mergedDescriptor.PropertyType.IsValueType || EntryFlags.HasFlag(Flags.Immutable)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (22)
341&& ((WINDOW_EX_STYLE)PInvokeCore.GetWindowLong(_editTextBox, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE)).HasFlag(WINDOW_EX_STYLE.WS_EX_RTLREADING); 684if (_flags.HasFlag(Flags.IsSplitterMove)) 747if (_flags.HasFlag(Flags.DropDownClosing) || _dropDownHolder is null || !_dropDownHolder.Visible) 756if (_dropDownHolder.Component == DropDownListBox && _flags.HasFlag(Flags.DropDownCommit)) 1316if (_flags.HasFlag(Flags.NeedUpdateUIBasedOnFont)) 1415_dropDownHolder.SetDropDownControl(control, _flags.HasFlag(Flags.ResizableDropDown)); 1945get => _flags.HasFlag(Flags.InPropertySet); 2138if (_flags.HasFlag(Flags.ButtonLaunchedEditor)) 2307e.State.HasFlag(DrawItemState.Selected) ? GridEntry.PaintValueFlags.DrawSelected : default, 2571get => _flags.HasFlag(Flags.EditMouseDown); 3018if (!_flags.HasFlag(Flags.IsSplitterMove)) 3057if (_flags.HasFlag(Flags.IsSplitterMove)) 3062if ((rowMoveCurrent != TipRow || point.X != TipColumn) && !_flags.HasFlag(Flags.IsSplitterMove)) 3105if (TotalProperties != 0 && (SplitterInside(e.X) || _flags.HasFlag(Flags.IsSplitterMove))) 4028if (oldLength > 0 && !_flags.HasFlag(Flags.NoDefault)) 4262if (!_flags.HasFlag(Flags.IsNewSelection)) 4286if (_flags.HasFlag(Flags.IsNewSelection) && GetGridEntryFromRow(_selectedRow) is null) 4359if ((_flags.HasFlag(Flags.IsNewSelection) || !EditTextBox.Focused) && s is not null && !s.Equals(EditTextBox.Text)) 4378if (_flags.HasFlag(Flags.IsSplitterMove) || !gridEntry.HasValue || !FocusInside) 4403if (!_flags.HasFlag(Flags.IsNewSelection) && !_flags.HasFlag(Flags.InPropertySet)) 5130if (!IsHandleCreated || !_flags.HasFlag(Flags.NeedUpdateUIBasedOnFont))
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
3047if (flags.HasFlag(GETTEXTEX_FLAGS.GT_USECRLF)) 3080if (!flags.HasFlag(GETTEXTEX_FLAGS.GT_USECRLF))
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
159e.Effect = keyState.HasFlag(MODIFIERKEYS_FLAGS.MK_CONTROL) ? DragDropEffects.Copy : DragDropEffects.Move; 253e.Effect = grfKeyState.HasFlag(MODIFIERKEYS_FLAGS.MK_CONTROL)
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
122UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focused),
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (1)
216=> Owner is not null && Owner.IsHandleCreated && WindowExStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_RTLREADING);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerAccessibleObject.cs (1)
21UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.ToolStripHostedControlAccessibleObject.cs (1)
59UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focused),
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.ToolStripDropDownAccessibleObject.cs (1)
20UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControlAccessibleObject.cs (1)
24UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focused),
System\Windows\Forms\Controls\TreeView\TreeNode.TreeNodeAccessibleObject.cs (2)
113UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focused), 115UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2927if (hnode != 0 && tvhip.flags.HasFlag(TVHITTESTINFO_FLAGS.TVHT_ONITEM) && NodeFromHandle(hnode) is { } tn && !ShowNodeToolTips)
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
53UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Controls\WebBrowser\HtmlToClrEventProxy.cs (1)
152if (flags.HasFlag(DISPATCH_FLAGS.DISPATCH_PROPERTYGET))
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
898if (hr.Succeeded && bits.HasFlag(OLEMISC.OLEMISC_SETCLIENTSITEFIRST))
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
48if (((OLECONTF)grfFlags).HasFlag(OLECONTF.OLECONTF_EMBEDDINGS))
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (6)
90if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_HIMETRICTOCONTAINER)) 92if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_SIZE)) 97else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_POSITION)) 107else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_CONTAINERTOHIMETRIC)) 109if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_SIZE)) 114else if (coordinates.HasFlag(XFORMCOORDS.XFORMCOORDS_POSITION))
System\Windows\Forms\DataBinding\Binding.cs (15)
295get => _state.HasFlag(BindingStates.FormattingEnabled); 298if (_state.HasFlag(BindingStates.FormattingEnabled) != value) 580_state.HasFlag(BindingStates.DataSourceNullValueSet) ? _dsNullValue : Formatter.GetDefaultDataSourceNullValue(type); 622if (!_state.HasFlag(BindingStates.InOnBindingComplete)) 648if (!_state.HasFlag(BindingStates.FormattingEnabled) && cevent is not null) 661if (!_state.HasFlag(BindingStates.FormattingEnabled) && cevent is not null) 674if (_state.HasFlag(BindingStates.FormattingEnabled)) 749if (_state.HasFlag(BindingStates.FormattingEnabled)) 849if (_propInfo!.SupportsChangeEvents && !_state.HasFlag(BindingStates.Modified)) 862if (_state.HasFlag(BindingStates.InPushOrPull) && _state.HasFlag(BindingStates.FormattingEnabled)) 973if (_state.HasFlag(BindingStates.InPushOrPull) && _state.HasFlag(BindingStates.FormattingEnabled)) 1079_state.HasFlag(BindingStates.DataSourceNullValueSet) && _dsNullValue != Formatter.GetDefaultDataSourceNullValue(null); 1083if (_state.HasFlag(BindingStates.InSetPropValue))
System\Windows\Forms\DataBinding\BindingSource.cs (41)
107if (_state.HasFlag(BindingSourceStates.DisposedOrFinalized)) 112if (_state.HasFlag(BindingSourceStates.AllowNewIsSet)) 114return _state.HasFlag(BindingSourceStates.AllowNewSetValue); 116else if (_state.HasFlag(BindingSourceStates.ListExtractedFromEnumerable)) 120else if (_state.HasFlag(BindingSourceStates.IsBindingList)) 264if (_state.HasFlag(BindingSourceStates.Initializing) || DesignMode) 301if (_state.HasFlag(BindingSourceStates.Initializing) || DesignMode) 614if (_state.HasFlag(BindingSourceStates.EndingEdit)) 637if (!_state.HasFlag(BindingSourceStates.Initializing) && _state.HasFlag(BindingSourceStates.NeedToSetList)) 706if (_state.HasFlag(BindingSourceStates.Initializing)) 736if (!_state.HasFlag(BindingSourceStates.InnerListChanging)) 785if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 843if (!RaiseListChangedEvents || _state.HasFlag(BindingSourceStates.Initializing)) 867if (_state.HasFlag(BindingSourceStates.Initializing)) 873if (_state.HasFlag(BindingSourceStates.ParentsCurrentItemChanging)) 1066if (_state.HasFlag(BindingSourceStates.Initializing)) 1177_state.ChangeFlags(BindingSourceStates.ListRaisesItemChangedEvents, _state.HasFlag(BindingSourceStates.IsBindingList)); 1226internal virtual bool ShouldSerializeAllowNew() => _state.HasFlag(BindingSourceStates.AllowNewIsSet); 1235if (!_state.HasFlag(BindingSourceStates.ListRaisesItemChangedEvents)) 1254if (!_state.HasFlag(BindingSourceStates.ListRaisesItemChangedEvents)) 1403bool ISupportInitializeNotification.IsInitialized => !_state.HasFlag(BindingSourceStates.Initializing); 1432if (_state.HasFlag(BindingSourceStates.DisposedOrFinalized)) 1437if (_state.HasFlag(BindingSourceStates.RecursionDetectionFlag)) 1530if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 1599if (_state.HasFlag(BindingSourceStates.IsBindingList)) 1637get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowEdit : !List.IsReadOnly; 1648if (_state.HasFlag(BindingSourceStates.AllowNewIsSet) && value == _state.HasFlag(BindingSourceStates.AllowNewSetValue)) 1656if (value && !_state.HasFlag(BindingSourceStates.IsBindingList) && !IsListWriteable(checkConstructor: false)) 1673get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).AllowRemove : !List.IsReadOnly && !List.IsFixedSize; 1682get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSearching; 1688get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).SupportsSorting; 1694get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)List).IsSorted; 1701get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortProperty : null; 1708get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)List).SortDirection : ListSortDirection.Ascending; 1713if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 1724if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 1734if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 1744if (!_state.HasFlag(BindingSourceStates.IsBindingList)) 1756if (_state.HasFlag(BindingSourceStates.IsBindingList))
System\Windows\Forms\DataBinding\CurrencyManager.cs (8)
195internal override bool IsBinding => _state.HasFlag(CurrencyManagerStates.Bound); 198internal bool ShouldBind => _state.HasFlag(CurrencyManagerStates.ShouldBind); 400if (_state.HasFlag(CurrencyManagerStates.PullingData)) 834if (!_state.HasFlag(CurrencyManagerStates.InChangeRecordState)) 838if (!_state.HasFlag(CurrencyManagerStates.SuspendPushDataInCurrentChanged)) 891if ((e.Index == listposition || (e.Index == -1 && Position < Count)) && !_state.HasFlag(CurrencyManagerStates.InChangeRecordState)) 1015if (_state.HasFlag(CurrencyManagerStates.Bound) != newBound) 1022ChangeRecordState(newPos, _state.HasFlag(CurrencyManagerStates.Bound), (Position != newPos), true, false);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (2)
398_fileNames = _fileNameFlags.HasFlag(OFN_ALLOWMULTISELECT) 689if (_fileNameFlags.HasFlag(OFN_FILEMUSTEXIST) && !FileExists(fileName))
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (4)
14=> !ShowHelp && Application.VisualStyleState.HasFlag(VisualStyles.VisualStyleState.ClientAreaEnabled); 172if (_fileNameFlags.HasFlag(OFN_HIDEREADONLY)) 271get => _dialogOptions.HasFlag(FOS_OKBUTTONNEEDSINTERACTION); 284get => !_dialogOptions.HasFlag(FOS_HIDEPINNEDPLACES);
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
385private bool GetOption(FILEOPENDIALOGOPTIONS option) => _options.HasFlag(option);
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (1)
75get => _dialogOptions.HasFlag(FOS_FORCEPREVIEWPANEON);
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (3)
55get => _dialogOptions.HasFlag(FOS_DEFAULTNOMINIMODE); 114if (_fileNameFlags.HasFlag(OFN_OVERWRITEPROMPT) 122if (_fileNameFlags.HasFlag(OFN_CREATEPROMPT) && !FileExists(fileName) && !PromptFileCreate(fileName))
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (6)
36get => _state.HasFlag(ErrorProviderStates.ShowIcon); 207get => _state.HasFlag(ErrorProviderStates.RightToLeft); 210if (value == _state.HasFlag(ErrorProviderStates.RightToLeft)) 241if (_state.HasFlag(ErrorProviderStates.InSetErrorManager)) 262if (_state.HasFlag(ErrorProviderStates.Initializing)) 613if (_state.HasFlag(ErrorProviderStates.SetErrorManagerOnEndInit))
System\Windows\Forms\Form.cs (3)
761if (IsHandleCreated && WindowStyle.HasFlag(WINDOW_STYLE.WS_DISABLED)) 5488if ((owner is not null) && !owner.GetExtendedStyle().HasFlag(WINDOW_EX_STYLE.WS_EX_TOPMOST)) 5687if ((owner is not null) && !owner.GetExtendedStyle().HasFlag(WINDOW_EX_STYLE.WS_EX_TOPMOST))
System\Windows\Forms\Input\KeysConverter.cs (2)
248if (keyValue != Keys.None && modifiers.HasFlag(keyValue)) 296if (keyValue != Keys.None && modifiers.HasFlag(keyValue))
System\Windows\Forms\Layout\Containers\SplitContainer.SplitContainerAccessibleObject.cs (1)
22UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\NativeWindow.cs (1)
318&& ((WINDOW_STYLE)(uint)PInvokeCore.GetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_STYLE)).HasFlag(WINDOW_STYLE.WS_CHILD)
System\Windows\Forms\OLE\DropSource.cs (3)
40!grfKeyState.HasFlag(MODIFIERKEYS_FLAGS.MK_LBUTTON) 41&& !grfKeyState.HasFlag(MODIFIERKEYS_FLAGS.MK_RBUTTON) 42&& !grfKeyState.HasFlag(MODIFIERKEYS_FLAGS.MK_MBUTTON))
System\Windows\Forms\OLE\WinFormsOleServices.cs (1)
45if (((TYMED)pformatetc->tymed).HasFlag(TYMED.TYMED_GDI))
System\Windows\Forms\Printing\PrintDialog.cs (5)
331if (!dialogSettings->Flags.HasFlag(PRINTDLGEX_FLAGS.PD_USEDEVMODECOPIESANDCOLLATE)) 334PrinterSettings.Collate = dialogSettings->Flags.HasFlag(PRINTDLGEX_FLAGS.PD_COLLATE); 429PrintToFile = dialogSettings.Flags.HasFlag(PRINTDLGEX_FLAGS.PD_PRINTTOFILE); 440if (!dialogSettings.Flags.HasFlag(PRINTDLGEX_FLAGS.PD_USEDEVMODECOPIESANDCOLLATE)) 443PrinterSettings.Collate = dialogSettings.Flags.HasFlag(PRINTDLGEX_FLAGS.PD_COLLATE);
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibleObject.cs (1)
24UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)State.HasFlag(AccessibleStates.Focusable),
System\Windows\Forms\Rendering\ControlPaint.cs (1)
1032if (flags.HasFlag((DRAW_EDGE_FLAGS)Border3DStyle.Adjust))
System\Windows\Forms\Rendering\DrawingEventArgs.cs (3)
71internal bool IsStateClean => !Flags.HasFlag(DrawingEventFlags.GraphicsStateUnclean); 149if (graphics is null || !flags.HasFlag(DrawingEventFlags.CheckState) 150|| flags.HasFlag(DrawingEventFlags.GraphicsStateUnclean))
System\Windows\Forms\Rendering\PaintEventArgs.cs (2)
107if (_event.Flags.HasFlag(DrawingEventFlags.SaveState) && graphics is not null) 122=> _savedGraphicsState = _event.Flags.HasFlag(DrawingEventFlags.SaveState) ? graphics.Save() : default;
System\Windows\Forms\Rendering\TextExtensions.cs (8)
35TextPaddingOptions padding = flags.HasFlag(TextFormatFlags.LeftAndRightPadding) 37: flags.HasFlag(TextFormatFlags.NoPadding) 161bool isTop = !flags.HasFlag(DRAW_TEXT_FORMAT.DT_BOTTOM) && !flags.HasFlag(DRAW_TEXT_FORMAT.DT_VCENTER); 162if (isTop || flags.HasFlag(DRAW_TEXT_FORMAT.DT_SINGLELINE) || flags.HasFlag(DRAW_TEXT_FORMAT.DT_CALCRECT)) 182if (flags.HasFlag(DRAW_TEXT_FORMAT.DT_VCENTER)) 252if (proposedSize.Height == int.MaxValue && dt.HasFlag(DRAW_TEXT_FORMAT.DT_SINGLELINE))
System\Windows\Forms\Rendering\TextRenderer.cs (5)
372if (flags.HasFlag(TextFormatFlags.ModifyString)) 610if (textFormatFlags.HasFlag(TextFormatFlags.PreserveGraphicsClipping)) 615if (textFormatFlags.HasFlag(TextFormatFlags.PreserveGraphicsTranslateTransform)) 635Debug.Assert(apply.HasFlag(ApplyGraphicsProperties.Clipping) 640Debug.Assert(apply.HasFlag(ApplyGraphicsProperties.TranslateTransform)
System\Windows\Forms\SystemInformation.cs (1)
44&& data.dwFlags.HasFlag(HIGHCONTRASTW_FLAGS.HCF_HIGHCONTRASTON);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
996if (!window.GetExtendedStyle().HasFlag(WINDOW_EX_STYLE.WS_EX_LAYOUTRTL))
System.Windows.Forms.Design (13)
System\Windows\Forms\Design\BorderSidesEditor.BorderSidesEditorUI.cs (6)
341if (sides.HasFlag(ToolStripStatusLabelBorderSides.All)) 352_noneCheckBox.Checked = sides.HasFlag(ToolStripStatusLabelBorderSides.None); 353_topCheckBox.Checked = sides.HasFlag(ToolStripStatusLabelBorderSides.Top); 354_bottomCheckBox.Checked = sides.HasFlag(ToolStripStatusLabelBorderSides.Bottom); 355_leftCheckBox.Checked = sides.HasFlag(ToolStripStatusLabelBorderSides.Left); 356_rightCheckBox.Checked = sides.HasFlag(ToolStripStatusLabelBorderSides.Right);
System\Windows\Forms\Design\CommandSet.CommandSetItem.StatusState.cs (5)
41Debug.Assert(!_statusFlags.HasFlag(StatusFlag.NeedsUpdate), "Updating item when StatusState is not valid."); 43item.Enabled = _statusFlags.HasFlag(StatusFlag.Enabled); 44item.Visible = _statusFlags.HasFlag(StatusFlag.Visible); 45item.Checked = _statusFlags.HasFlag(StatusFlag.Checked); 46item.Supported = _statusFlags.HasFlag(StatusFlag.Supported);
System\Windows\Forms\Design\ControlDesigner.cs (2)
1955if (((MODIFIERKEYS_FLAGS)(nint)m.WParamInternal).HasFlag(MODIFIERKEYS_FLAGS.MK_LBUTTON)) 1959else if (((MODIFIERKEYS_FLAGS)(nint)m.WParamInternal).HasFlag(MODIFIERKEYS_FLAGS.MK_RBUTTON))
System.Windows.Forms.Primitives (6)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
336if (!result.vt.HasFlag(VARENUM.VT_ARRAY & VARENUM.VT_R8)
Windows\Win32\System\Ole\ClassPropertyDispatchAdapter.cs (5)
173if (flags.HasFlag(DISPATCH_FLAGS.DISPATCH_PROPERTYPUT | DISPATCH_FLAGS.DISPATCH_PROPERTYPUTREF)) 177else if (flags.HasFlag(DISPATCH_FLAGS.DISPATCH_PROPERTYPUT)) 181else if (flags.HasFlag(DISPATCH_FLAGS.DISPATCH_PROPERTYPUTREF)) 190Debug.Assert(!bindingFlags.HasFlag(BindingFlags.NonPublic)); 194if (bindingFlags.HasFlag(BindingFlags.PutDispProperty))
System.Windows.Forms.Primitives.Tests (2)
System\Windows\Forms\Automation\UiaTextProviderTests.cs (2)
51Assert.True(actual.HasFlag(WINDOW_STYLE.WS_VISIBLE)); 62Assert.True(actual.HasFlag(WINDOW_EX_STYLE.WS_EX_CLIENTEDGE));
System.Windows.Forms.Tests (7)
System\Windows\Forms\FormTests.cs (3)
207Assert.False(extendedStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_DLGMODALFRAME)); 1095Assert.False(extendedStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_DLGMODALFRAME)); 1101Assert.True(extendedStyle.HasFlag(WINDOW_EX_STYLE.WS_EX_DLGMODALFRAME));
System\Windows\Forms\MonthCalendarTests.cs (2)
4406bool shouldFocus = expectedState.HasFlag(AccessibleStates.Focused); 4407bool selectExactRange = expectedState.HasFlag(AccessibleStates.Selected);
System\Windows\Forms\RichTextBoxTests.cs (2)
1630Assert.True(format1.dwEffects.HasFlag(CFE_EFFECTS.CFE_AUTOBACKCOLOR)); 1631Assert.True(format1.dwEffects.HasFlag(CFE_EFFECTS.CFE_AUTOCOLOR));
Templates.Blazor.Tests (5)
BlazorTemplateTest.cs (5)
118if (!pagesToExclude.HasFlag(BlazorTemplatePages.Home)) 126if (!pagesToExclude.HasFlag(BlazorTemplatePages.Counter)) 139if (authenticationFeatures.HasFlag(AuthenticationFeatures.RegisterAndLogIn)) 204if (authenticationFeatures.HasFlag(AuthenticationFeatures.Passkeys)) 284if (!pagesToExclude.HasFlag(BlazorTemplatePages.Weather))
Test.Utilities (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))
TestProject.AppHost (5)
TestProgram.cs (4)
40if (resourcesToSkip.HasFlag(TestResourceNames.dashboard)) 74if (!resourcesToSkip.HasFlag(TestResourceNames.redis)) 80if (!resourcesToSkip.HasFlag(TestResourceNames.postgres) || !resourcesToSkip.HasFlag(TestResourceNames.efnpgsql))
tests\testproject\Common\TestResourceNames.cs (1)
40.Where(ename => ename != TestResourceNames.None && resourceNames.HasFlag(ename)));
TestProject.IntegrationServiceA (8)
Program.cs (7)
12if (!resourcesToSkip.HasFlag(TestResourceNames.redis)) 16if (!resourcesToSkip.HasFlag(TestResourceNames.postgres) || !resourcesToSkip.HasFlag(TestResourceNames.efnpgsql)) 20if (!resourcesToSkip.HasFlag(TestResourceNames.efnpgsql)) 37if (!resourcesToSkip.HasFlag(TestResourceNames.redis)) 42if (!resourcesToSkip.HasFlag(TestResourceNames.postgres)) 46if (!resourcesToSkip.HasFlag(TestResourceNames.efnpgsql))
tests\testproject\Common\TestResourceNames.cs (1)
40.Where(ename => ename != TestResourceNames.None && resourceNames.HasFlag(ename)));
Text.Analyzers (42)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (4)
52if (language.HasFlag(Language.CSharp) && language.HasFlag(Language.VisualBasic)) 56else if (language.HasFlag(Language.CSharp)) 60else if (language.HasFlag(Language.VisualBasic))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (28)
113=> language.HasFlag(Language.CSharp) && 114!language.HasFlag(Language.VisualBasic) && 118=> language.HasFlag(Language.VisualBasic) && 119!language.HasFlag(Language.CSharp) && 123=> language.HasFlag(Language.CSharp) && 124language.HasFlag(Language.VisualBasic) && 161=> language.HasFlag(Language.CSharp) && 162!language.HasFlag(Language.VisualBasic) && 167=> language.HasFlag(Language.VisualBasic) && 168!language.HasFlag(Language.CSharp) && 210=> language.HasFlag(Language.CSharp) && 211language.HasFlag(Language.VisualBasic) && 257=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 262=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 272=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 276=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 280=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.CSharp) && 289=> language.HasFlag(Language.CSharp) && !language.HasFlag(Language.VisualBasic) && 293=> language.HasFlag(Language.VisualBasic) && !language.HasFlag(Language.CSharp) && 297=> language.HasFlag(Language.VisualBasic) && language.HasFlag(Language.VisualBasic) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (10)
460if (modifier.HasFlag(Modifiers.Abstract)) 464else if (modifier.HasFlag(Modifiers.Static)) 468else if (modifier.HasFlag(Modifiers.Async)) 472else if (modifier.HasFlag(Modifiers.ReadOnly)) 476else if (modifier.HasFlag(Modifiers.Const)) 500if ((Modifiers.HasFlag(Modifiers.Abstract) && symbol.IsAbstract) || 501(Modifiers.HasFlag(Modifiers.Static) && symbol.IsStatic)) 507if (Modifiers.HasFlag(Modifiers.Async) && kind == SymbolKind.Method && ((IMethodSymbol)symbol).IsAsync) 512if (Modifiers.HasFlag(Modifiers.ReadOnly)) 520if (Modifiers.HasFlag(Modifiers.Const))