1499 references to IsEmpty
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
334if (!analyzers.TryGetValue(project.Language, out var languageAnalyzers) || languageAnalyzers.IsEmpty)
ConfigurationSchemaGenerator (1)
RuntimeSource\SourceGenerators\TypeModelHelper.cs (1)
31if (!current.TypeArguments.IsEmpty)
illink (2)
ILLink.RoslynAnalyzer (5)
DataFlow\DynamicallyAccessedMembersBinder.cs (1)
395 if (!type.Interfaces.IsEmpty) {
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (1)
1387 if (genericParameters.IsEmpty)
TrimAnalysis\MethodProxy.cs (1)
38 if (Method.TypeParameters.IsEmpty)
TrimAnalysis\TrimAnalysisMethodCallPattern.cs (1)
35 if (arguments.IsEmpty) {
TrimAnalysis\TypeProxy.cs (1)
17 namedType.TypeParameters.IsEmpty)
Metrics (23)
MetricsOutputWriter.cs (1)
121if (data.Children.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Metrics.Legacy (23)
src\RoslynAnalyzers\Tools\Metrics\MetricsOutputWriter.cs (1)
121if (data.Children.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Microsoft.Analyzers.Extra (1)
CallAnalysis\Split.cs (1)
18if (memExt == null || memExt.GetMembers("Split").IsEmpty)
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
336if (diags.IsEmpty)
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
337if (diags.IsEmpty)
Microsoft.AspNetCore.App.Analyzers (9)
Mvc\DetectAmbiguousActionRoutes.cs (2)
234if (httpMethods1.IsEmpty || httpMethods2.IsEmpty)
Mvc\MvcAnalyzer.cs (2)
128if (!attribute.ConstructorArguments.IsEmpty) 172if (attribute.ConstructorArguments.IsEmpty || attribute.ApplicationSyntaxReference is null)
RouteHandlers\DetectAmbiguousRoutes.cs (2)
216if (httpMethods1.IsEmpty || httpMethods2.IsEmpty)
RouteHandlers\DisallowMvcBindArgumentsOnParameters.cs (1)
30if (!parameter.DeclaringSyntaxReferences.IsEmpty)
RouteHandlers\RouteHandlerAnalyzer.cs (1)
124if (!methodReference.Method.DeclaringSyntaxReferences.IsEmpty)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
Microsoft.AspNetCore.Http.ValidationsGenerator (3)
Extensions\IncrementalValuesProviderExtensions.cs (3)
20if (values.IsEmpty) 48if (tuple.Left.IsEmpty && tuple.Right.IsEmpty)
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
185else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
Microsoft.Build (1)
BuildCheck\Infrastructure\EditorConfig\EditorConfigGlobsMatcher.cs (1)
40if (_numberRangePairs.IsEmpty)
Microsoft.CodeAnalysis (193)
CodeGen\ILBuilder.cs (2)
1193HasDynamicLocal |= !local.DynamicTransformFlags.IsEmpty; 1202HasDynamicLocal |= !localConstant.DynamicTransformFlags.IsEmpty;
CodeGen\SwitchIntegralJumpTableEmitter.cs (1)
100Debug.Assert(!_sortedCaseLabels.IsEmpty);
Collections\ImmutableArrayExtensions.cs (4)
423if (array.IsEmpty) 441if (array.IsEmpty) 519if (self.IsEmpty) 1111if (items.IsEmpty)
CommandLine\AnalyzerConfig.SectionNameMatching.cs (1)
39if (_numberRangePairs.IsEmpty)
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
120var message = lockedBy.IsEmpty
CommandLine\CommonCompiler.cs (7)
427if (Arguments.EmbeddedFiles.IsEmpty) 489if (arguments.EmbeddedFiles.IsEmpty) 1139if (!analyzers.IsEmpty || !generators.IsEmpty) 1144if (!generators.IsEmpty) 1153bool hasAnalyzerConfigs = !Arguments.AnalyzerConfigPaths.IsEmpty; 1216if (!analyzers.IsEmpty)
CommandLine\ReportAnalyzerUtil.cs (1)
114if (driverTimingInfo.GeneratorTimes.IsEmpty)
CommandLine\SarifV2ErrorLogger.cs (1)
350if (effectiveSeverities.IsEmpty)
Compilation\Compilation.cs (2)
282!options.CryptoPublicKey.IsEmpty || 3654if (locations.IsEmpty)
Compilation\CompilationOptions.cs (1)
566if (!CryptoPublicKey.IsEmpty)
Compilation\LoadDirective.cs (2)
20RoslynDebug.Assert((resolvedPath != null) || !diagnostics.IsEmpty); 22RoslynDebug.Assert(diagnostics.IsEmpty || diagnostics.All(d => d.Severity == DiagnosticSeverity.Error));
DiagnosticAnalyzer\AnalysisResultBuilder.cs (8)
65if (additionalFiles.IsEmpty) 271if (!syntaxDiagnostics.IsEmpty) 277if (!semanticDiagnostics.IsEmpty) 282if (!compilationDiagnostics.IsEmpty) 334if (diagnostics.IsEmpty) 369if (diagnostics.IsEmpty) 545if (!diagnostics.IsEmpty) 575if (!diagnostics.IsEmpty)
DiagnosticAnalyzer\AnalyzerDriver.cs (18)
1027if (reportedDiagnostics.IsEmpty || 1039Debug.Assert(!reportedDiagnostics.IsEmpty); 1105if (!suppressableDiagnostics.IsEmpty) 1134if (supportedSuppressions.IsEmpty) 1202if (diagnostics.IsEmpty) 1231if (reportedDiagnostics.IsEmpty) 1780return subsetProcessedAnalyzers.IsEmpty ? EventProcessedState.NotProcessed : EventProcessedState.CreatePartiallyProcessed(subsetProcessedAnalyzers); 1821if (symbolEndActions.IsEmpty || !analysisScope.ShouldAnalyze(symbolEvent, s_getTopmostNodeForAnalysis, cancellationToken)) 1843if (!symbolEndActionsForAnalyzer.IsEmpty && 2693if (!executableCodeBlocks.IsEmpty) 2707if (!operationsToAnalyze.IsEmpty) 2794if (analyzerActions.OperationBlockStartActions.IsEmpty && 2795analyzerActions.OperationBlockActions.IsEmpty && 2796analyzerActions.OperationBlockEndActions.IsEmpty) 2815if (executableCodeBlocks.IsEmpty || !shouldExecuteCodeBlockActions) 2822if (analyzerActions.CodeBlockStartActions.IsEmpty && 2823analyzerActions.CodeBlockActions.IsEmpty && 2824analyzerActions.CodeBlockEndActions.IsEmpty)
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActions.cs (1)
47Debug.Assert(isEmpty || !GroupedActionsByAnalyzer.IsEmpty);
DiagnosticAnalyzer\AnalyzerDriver.GroupedAnalyzerActionsForAnalyzer.cs (8)
147public bool HasCodeBlockStartActions => !CodeBlockStartActions.IsEmpty; 148public bool HasOperationBlockStartActions => !OperationBlockStartActions.IsEmpty; 170if (!OperationBlockStartActions.IsEmpty || 171!OperationBlockActions.IsEmpty || 172!OperationBlockEndActions.IsEmpty || 173!CodeBlockStartActions.IsEmpty || 174!CodeBlockActions.IsEmpty || 175!CodeBlockEndActions.IsEmpty)
DiagnosticAnalyzer\AnalyzerExecutor.cs (5)
289if (reportedDiagnostics.IsEmpty) 747Debug.Assert(!executableCodeBlocks.IsEmpty); 849Debug.Assert(!operationBlocks.IsEmpty); 1052RoslynDebug.Assert(!actionsForKind.IsEmpty, $"Unexpected empty action collection in {nameof(nodeActionsByKind)}"); 1150RoslynDebug.Assert(!actionsForKind.IsEmpty, $"Unexpected empty action collection in {nameof(operationActionsByKind)}");
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
545var hasAnalyzers = !analyzers.IsEmpty;
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (1)
434Debug.Assert(!symbolEndActions.IsEmpty);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (8)
372if (!suppressors.IsEmpty) 782Debug.Assert(!symbolStartAnalyzers.IsEmpty); 788if (!otherAnalyzers.IsEmpty) 976if (pendingAnalyzers.IsEmpty) 1008if (!additionalFiles.IsEmpty) 1067if (!additionalFiles.IsEmpty) 1136if (compilationEvents.IsEmpty) 1184if (diagnostics.IsEmpty)
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (3)
124if (symbolKinds.IsEmpty) 138if (syntaxKinds.IsEmpty) 151if (operationKinds.IsEmpty)
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (1)
185if (!declaredSymbols.IsEmpty)
Emit\MethodInstrumentation.cs (1)
28=> Kinds.IsEmpty;
Generated\Operations.Generated.cs (64)
4023if (!Operations.IsEmpty) return (true, 0, 0); 4039if (!Operations.IsEmpty) return (true, 0, Operations.Length - 1); 4078if (!Declarations.IsEmpty) return (true, 0, 0); 4094if (!Declarations.IsEmpty) return (true, 0, Declarations.Length - 1); 4145if (!Cases.IsEmpty) return (true, 1, 0); 4161if (!Cases.IsEmpty) return (true, 1, Cases.Length - 1); 4245if (!NextVariables.IsEmpty) return (true, 3, 0); 4261if (!NextVariables.IsEmpty) return (true, 3, NextVariables.Length - 1); 4324if (!Before.IsEmpty) return (true, 0, 0); 4335if (!AtLoopBottom.IsEmpty) return (true, 3, 0); 4351if (!AtLoopBottom.IsEmpty) return (true, 3, AtLoopBottom.Length - 1); 4362if (!Before.IsEmpty) return (true, 0, Before.Length - 1); 4443if (!NextVariables.IsEmpty) return (true, 5, 0); 4459if (!NextVariables.IsEmpty) return (true, 5, NextVariables.Length - 1); 4755if (!Catches.IsEmpty) return (true, 1, 0); 4777if (!Catches.IsEmpty) return (true, 1, Catches.Length - 1); 5038if (!Arguments.IsEmpty) return (true, 1, 0); 5054if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5189if (!Arguments.IsEmpty) return (true, 1, 0); 5205if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5256if (!Indices.IsEmpty) return (true, 1, 0); 5272if (!Indices.IsEmpty) return (true, 1, Indices.Length - 1); 5487if (!Arguments.IsEmpty) return (true, 1, 0); 5503if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 5946if (!Arguments.IsEmpty) return (true, 0, 0); 5968if (!Arguments.IsEmpty) return (true, 0, Arguments.Length - 1); 6065if (!DimensionSizes.IsEmpty) return (true, 0, 0); 6087if (!DimensionSizes.IsEmpty) return (true, 0, DimensionSizes.Length - 1); 6601if (!Parts.IsEmpty) return (true, 0, 0); 6617if (!Parts.IsEmpty) return (true, 0, Parts.Length - 1); 6657if (!Initializers.IsEmpty) return (true, 0, 0); 6673if (!Initializers.IsEmpty) return (true, 0, Initializers.Length - 1); 6713if (!Initializers.IsEmpty) return (true, 0, 0); 6729if (!Initializers.IsEmpty) return (true, 0, Initializers.Length - 1); 6887if (!Elements.IsEmpty) return (true, 0, 0); 6903if (!Elements.IsEmpty) return (true, 0, Elements.Length - 1); 7730if (!ElementValues.IsEmpty) return (true, 0, 0); 7746if (!ElementValues.IsEmpty) return (true, 0, ElementValues.Length - 1); 7792if (!IgnoredArguments.IsEmpty) return (true, 0, 0); 7814if (!IgnoredArguments.IsEmpty) return (true, 0, IgnoredArguments.Length - 1); 7863if (!IgnoredDimensions.IsEmpty) return (true, 0, 0); 7868if (!Declarators.IsEmpty) return (true, 1, 0); 7890if (!Declarators.IsEmpty) return (true, 1, Declarators.Length - 1); 7895if (!IgnoredDimensions.IsEmpty) return (true, 0, IgnoredDimensions.Length - 1); 8081if (!Clauses.IsEmpty) return (true, 0, 0); 8086if (!Body.IsEmpty) return (true, 1, 0); 8102if (!Body.IsEmpty) return (true, 1, Body.Length - 1); 8107if (!Clauses.IsEmpty) return (true, 0, Clauses.Length - 1); 9126if (!Clauses.IsEmpty) return (true, 0, 0); 9142if (!Clauses.IsEmpty) return (true, 0, Clauses.Length - 1); 9189if (!DimensionSizes.IsEmpty) return (true, 1, 0); 9205if (!DimensionSizes.IsEmpty) return (true, 1, DimensionSizes.Length - 1); 9258if (!DeconstructionSubpatterns.IsEmpty) return (true, 0, 0); 9263if (!PropertySubpatterns.IsEmpty) return (true, 1, 0); 9279if (!PropertySubpatterns.IsEmpty) return (true, 1, PropertySubpatterns.Length - 1); 9284if (!DeconstructionSubpatterns.IsEmpty) return (true, 0, DeconstructionSubpatterns.Length - 1); 9348if (!Arms.IsEmpty) return (true, 1, 0); 9364if (!Arms.IsEmpty) return (true, 1, Arms.Length - 1); 10319if (!Arguments.IsEmpty) return (true, 1, 0); 10335if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 10383if (!Patterns.IsEmpty) return (true, 0, 0); 10399if (!Patterns.IsEmpty) return (true, 0, Patterns.Length - 1); 10694if (!Elements.IsEmpty) return (true, 0, 0); 10710if (!Elements.IsEmpty) return (true, 0, Elements.Length - 1);
MetadataReader\MetadataReaderExtensions.cs (3)
130if (!publicKeyOrToken.IsEmpty && 143hasPublicKey = !publicKeyOrToken.IsEmpty; 150if (publicKeyOrToken.IsEmpty)
MetadataReference\MetadataImageReference.cs (1)
61if (!Properties.Aliases.IsEmpty)
NativePdbWriter\PdbWriter.cs (1)
78bool emitAllDebugInfo = isKickoffMethod || !methodBody.SequencePoints.IsEmpty ||
Operations\ControlFlowGraphBuilder.cs (11)
531r.Locals.IsEmpty && !r.HasLocalFunctions && !r.HasCaptureIds) 767if (@try.Locals.IsEmpty && !@try.HasLocalFunctions && !@try.HasCaptureIds) 1755Debug.Assert(toMerge.Locals.IsEmpty); 3652if (operation.Catches.IsEmpty && operation.Finally == null) 3671bool haveCatches = !operation.Catches.IsEmpty; 4464if (!operation.Locals.IsEmpty && operation.LoopControlVariable.Kind == OperationKind.VariableDeclarator) 6018if (initializer == null || initializer.Initializers.IsEmpty) 6371if (operation.Initializers.IsEmpty) 6393Debug.Assert(propertyReference.Arguments.IsEmpty); 7244if (!propertySymbol.Parameters.IsEmpty) 7997Debug.Assert(propertyReference.Arguments.IsEmpty);
Operations\OperationExtensions.cs (1)
319if (argumentRefKinds.IsEmpty)
Operations\OperationNodes.cs (10)
43if (!Children.IsEmpty) return (true, 0, 0); 58int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 114if (!Children.IsEmpty) return (true, 0, 0); 129int.MaxValue when !Children.IsEmpty => (true, 0, Children.Length - 1), 279if (!Arguments.IsEmpty) return (true, 0, 0); 307if (!Arguments.IsEmpty) return (true, 0, Arguments.Length - 1); 361if (!Arguments.IsEmpty) return (true, 1, 0); 381if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1); 447if (!Arguments.IsEmpty) return (true, 1, 0); 467if (!Arguments.IsEmpty) return (true, 1, Arguments.Length - 1);
PEWriter\CustomDebugInfoWriter.cs (2)
230return !dynamicTransformFlags.IsEmpty && 249local => !local.TupleElementNames.IsEmpty,
PEWriter\MetadataWriter.cs (2)
3784Debug.Assert(signature.RefCustomModifiers.IsEmpty); 3791Debug.Assert(signature.RefCustomModifiers.IsEmpty || signature.ReturnValueIsByRef);
PEWriter\MetadataWriter.PortablePdb.cs (3)
66bool emitAllDebugInfo = isKickoffMethod || !bodyOpt.SequencePoints.IsEmpty; 490if (!dynamicFlags.IsEmpty) 501if (!tupleElementNames.IsEmpty)
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
1053Debug.Assert(definitionData.Identity.PublicKeyToken.IsEmpty);
ReferenceManager\CommonReferenceManager.State.cs (1)
502if (!referenceMap[i].MergedReferences.IsEmpty)
ReferenceManager\MergedAliases.cs (1)
69if (aliases.Count == 0 ^ newAliases.IsEmpty)
RuleSet\RuleSet.cs (2)
72if (!_includes.IsEmpty) 111if (_includes.IsEmpty)
SourceGeneration\GeneratorDriver.cs (3)
216if (_state.Generators.IsEmpty) 288if (!generatorState.InputNodes.IsEmpty) 421if (generatorDiagnostics.IsEmpty)
SourceGeneration\GlobalAliases.cs (1)
31return aliasAndSymbolNames.IsEmpty ? Empty : new GlobalAliases(aliasAndSymbolNames);
SourceGeneration\Nodes\NodeStateTable.cs (1)
84public bool IsEmpty => _states.IsEmpty;
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
102if (!syntaxNodes.IsEmpty)
SourceGeneration\RunResults.cs (1)
91Debug.Assert(exception is null || (generatedSources.IsEmpty && diagnostics.Length == 1));
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
493if (importStrings.IsEmpty)
Symbols\Attributes\CustomAttributesBag.cs (1)
57_customAttributes.IsEmpty &&
Text\SourceText.cs (1)
443return !_precomputedEmbeddedTextBlob.IsEmpty;
Text\TextChangeRangeExtensions.cs (2)
120if (oldChanges.IsEmpty) 125if (newChanges.IsEmpty)
Microsoft.CodeAnalysis.Analyzers (31)
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (3)
235else if (!method.TypeArguments.IsEmpty) 245else if (method.ReducedFrom != null && !method.ReducedFrom.TypeArguments.IsEmpty) 266!createdType.TypeArguments.IsEmpty &&
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
59if (appliedTargetFrameworkAttribute.ConstructorArguments.IsEmpty)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (3)
338if (invocation.Arguments.IsEmpty) 437!field.Locations.IsEmpty && 545!method.Parameters.IsEmpty &&
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (1)
99if (unshippedDocument == null || diagnostics.IsEmpty)
MetaAnalyzers\RegisterActionAnalyzer.cs (1)
379if (!method.TypeParameters.IsEmpty &&
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Microsoft.CodeAnalysis.AnalyzerUtilities (55)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\BasicBlockExtensions.cs (2)
21if (!predecessorBranch.FinallyRegions.IsEmpty) 197basicBlock.Predecessors.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (2)
299else if (!targetMethod.Parameters.IsEmpty && 300!arguments.IsEmpty &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (1)
948if (!visitedArguments.IsEmpty &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\ConstructorMapper.cs (1)
92if (!this.PropertyAbstractValues.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (1)
154if (!constructorMapper.PropertyAbstractValues.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\StringTransferSources.cs (1)
36!arguments.IsEmpty &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (3)
128if (!parameter.DeclaringSyntaxReferences.IsEmpty) 132else if (!parameter.ContainingSymbol.DeclaringSyntaxReferences.IsEmpty) 579&& !subResult.TaintedDataSourceSinks.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (1)
285if (operation.Parts.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (5)
50Debug.Assert(symbol != null || !indices.IsEmpty || instanceReferenceOperationSyntax != null || captureId.HasValue); 51Debug.Assert(parent == null || parent.Type.HasValueCopySemantics() || !indices.IsEmpty); 72Debug.Assert(symbol != null || !indices.IsEmpty); 97Debug.Assert(symbol != null || !indices.IsEmpty); 151else if (!Indices.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (1)
161if (!entity.Indices.IsEmpty &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (6)
94if (!indices.IsEmpty) 261if (symbol != null || !indices.IsEmpty) 296if (!propertyReference.Arguments.IsEmpty || 301indices = !propertyReference.Arguments.IsEmpty ? 398Debug.Assert(!indices.IsEmpty); 441Debug.Assert(symbol != null || !indices.IsEmpty);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (6)
573if (block.Predecessors.IsEmpty || !HasUnprocessedPredecessorBlock(block)) 651if (!branch.FinallyRegions.IsEmpty) 668if (!branch.FinallyRegions.IsEmpty) 680if (!branch.LeavingRegions.IsEmpty) 691if (!branch.FinallyRegions.IsEmpty) 820if (!branch.FinallyRegions.IsEmpty)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (3)
553!method.Parameters.IsEmpty) 991var validationMethods = requiresMethods.Concat(assumeMethods).Concat(assertMethods).OfType<IMethodSymbol>().Where(m => m.IsStatic && m.ReturnsVoid && !m.Parameters.IsEmpty && (m.Parameters[0].Type.SpecialType == SpecialType.System_Boolean)); 3239Debug.Assert(!arguments.IsEmpty);
Microsoft.CodeAnalysis.BannedApiAnalyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Microsoft.CodeAnalysis.CodeStyle (35)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
115if (additionalUnnecessaryLocations.IsEmpty) 186if (additionalUnnecessaryLocations.IsEmpty)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
524if (suppressionInfo == null || !suppressionInfo.ProgrammaticSuppressions.IsEmpty) 691if (intersect.IsEmpty)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
126return !resolvedSymbols.IsEmpty;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
868if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 918return ((IPropertySymbol)memberSymbol).ExplicitInterfaceImplementations.IsEmpty; 921return ((IEventSymbol)memberSymbol).ExplicitInterfaceImplementations.IsEmpty; 938return methodSymbol.Parameters.IsEmpty &&
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
87if (HasSyntaxErrors() || context.OperationBlocks.IsEmpty)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
214!method.ExplicitOrImplicitInterfaceImplementations().IsEmpty ||
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
90return postMatches.IsEmpty ? default : new(preMatches, postMatches, mayChangeSemantics);
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
423if (array.IsEmpty) 441if (array.IsEmpty) 519if (self.IsEmpty) 1111if (items.IsEmpty)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
120if (oldChanges.IsEmpty) 125if (newChanges.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
302if (_numberRangePairs.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
149if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
170!branch.FinallyRegions.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
352if (!basicBlock.Predecessors.IsEmpty ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (8)
311Contract.ThrowIfFalse(serializableRules.IsEmpty == namingStyles.IsEmpty); 312Contract.ThrowIfFalse(serializableRules.IsEmpty == symbolSpecifications.IsEmpty); 330Contract.ThrowIfFalse(namingRules.IsEmpty == namingStyles.IsEmpty); 331Contract.ThrowIfFalse(namingRules.IsEmpty == symbolSpecifications.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
22Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty); 61Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
140dictionary[key] = existingArray.IsEmpty && value.Equals(defaultArray[0]) ? defaultArray : existingArray.Add(value);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
231if (diagnostics.IsEmpty)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
168&& TypeToGenerateIn.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName).IsEmpty;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
266baseName, n => containingType.GetMembers(n).IsEmpty);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
835if (originalDeclStatementsToMoveOrRemove.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (1)
72baseName, n => containingType.GetMembers(n).IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (2)
18if (result.IsEmpty && nameOpt != null) 29if (result.IsEmpty && nameOpt != null)
Microsoft.CodeAnalysis.CSharp (272)
Binder\Binder.cs (4)
860return (locals.IsEmpty) 875if (locals.IsEmpty) 891if (locals.IsEmpty && localFunctions.IsEmpty)
Binder\Binder.WithQueryLambdaParametersBinder.cs (1)
45if (path.IsEmpty)
Binder\Binder_Conversions.cs (1)
1423result = !addMethods.IsEmpty;
Binder\Binder_Crefs.cs (6)
177if (sortedSymbols.IsEmpty) 199if (sortedSymbols.IsEmpty) 247if (sortedSymbols.IsEmpty) 293if (sortedSymbols.IsEmpty) 485Debug.Assert(!symbols.IsEmpty); 671Debug.Assert(!symbols.IsEmpty);
Binder\Binder_Expressions.cs (3)
3683Debug.Assert(handlerParameterIndexes.IsEmpty); 3714if (handlerParameterIndexes.IsEmpty) 6436Debug.Assert(!boundElementInitializerExpressions.IsEmpty);
Binder\Binder_Initializers.cs (1)
48if (initializers.IsEmpty)
Binder\Binder_InterpolatedString.cs (2)
900if (partsArray.IsEmpty && partsArray.All(p => p.IsEmpty))
Binder\Binder_Lookup.cs (2)
1136if (interfaces.IsEmpty) 1185if (!baseInterfaces.IsEmpty)
Binder\Binder_Statements.cs (2)
203Debug.Assert(!declarations.IsEmpty); 2727Debug.Assert(originalUserDefinedOperators.IsEmpty, "How could overload resolution fail if a user-defined true operator was found?");
Binder\Binder_Symbols.cs (1)
1584Debug.Assert(!typeArguments.IsEmpty);
Binder\ForLoopBinder.cs (1)
111if (!locals.IsEmpty)
Binder\Imports.cs (5)
95if (!previousSubmissionUsings.IsEmpty) 149public bool IsEmpty => UsingAliases.IsEmpty && Usings.IsEmpty && ExternAliases.IsEmpty; 160if (usingAliases.IsEmpty && usings.IsEmpty && externs.IsEmpty)
Binder\InMethodBinder.cs (3)
246Debug.Assert(!locations.IsEmpty || parameter.IsImplicitlyDeclared); 345if (parameters.IsEmpty && typeParameters.IsEmpty)
Binder\PatternExplainer.cs (7)
319if (evaluations.IsEmpty && constraints.Length == 1) 371if (constraints.IsEmpty && evaluations.IsEmpty) 470constraints.IsEmpty && 498if (evaluations.IsEmpty && 523if (constraints.IsEmpty && evaluations.IsEmpty)
Binder\Semantics\Conversions\Conversion.cs (1)
153_uncommonData = conversionResult.Kind == UserDefinedConversionResultKind.NoApplicableOperators && conversionResult.Results.IsEmpty
Binder\Semantics\Conversions\UserDefinedImplicitConversions.cs (2)
549if (items.IsEmpty) 806if (items.IsEmpty)
Binder\UsingStatementBinder.cs (1)
130Debug.Assert(!declarationsOpt.IsEmpty && declarationsOpt[0].DeclaredTypeOpt != null);
BoundTree\BoundNode_Source.cs (1)
87if (statements.Length == 1 && block.Locals.IsEmpty)
BoundTree\Constructors.cs (1)
134if (!originalMethods.IsEmpty)
BoundTree\InterpolatedStringHandlerData.cs (1)
40Debug.Assert(placeholders.IsEmpty || placeholders.AsSpan()[..^1].All(item => item.ArgumentIndex != BoundInterpolatedStringArgumentPlaceholder.TrailingConstructorValidityParameter));
BoundTree\TupleBinaryOperatorInfo.cs (1)
114Debug.Assert(operators.IsEmpty || operators.Length > 1); // an empty array is used for error cases, otherwise tuples must have cardinality > 1
BoundTree\UnboundLambda.cs (4)
119if (!InferredReturnType.UseSiteDiagnostics.IsEmpty) 124if (!InferredReturnType.Dependencies.IsEmpty) 1102if (parameterTypes.IsEmpty && parameterRefKinds.IsEmpty && taskLikeReturnTypeOpt is null)
CodeGen\EmitExpression.cs (5)
441((TypeParameterSymbol)receiverType).EffectiveInterfacesNoUseSiteDiagnostics.IsEmpty) || // This could be a nullable value type, which must be copied in order to not mutate the original value 871if (sequence.Locals.IsEmpty) 886if (sequence.Locals.IsEmpty) 905if (sequence.Locals.IsEmpty) 926if (sequence.Locals.IsEmpty)
CodeGen\EmitStatement.cs (4)
741var hasLocals = !block.Locals.IsEmpty; 753DefineLocal(local, !declaringReferences.IsEmpty ? (CSharpSyntaxNode)declaringReferences[0].GetSyntax() : block.Syntax); 794Debug.Assert(!block.Locals.IsEmpty); 1117var localSyntax = !declaringReferences.IsEmpty ? (CSharpSyntaxNode)declaringReferences[0].GetSyntax() : catchBlock.Syntax;
CodeGen\Optimizer.cs (1)
2263if (receiverOpt is BoundTypeExpression { AliasOpt: null, BoundContainingTypeOpt: null, BoundDimensionsOpt: { IsEmpty: true }, Type: { TypeKind: TypeKind.TypeParameter } } typeExpression)
Compilation\CSharpCompilation.cs (3)
1576if (usingsFromoptions.UsingNamespacesOrTypes.IsEmpty) 1580else if (previousSubmissionImports.IsEmpty) 3030Debug.Assert(!loadDirectives.IsEmpty);
Compilation\SyntaxAndDeclarationManager.cs (5)
395Debug.Assert(!oldLoadDirectives.IsEmpty); 418Debug.Assert(!loadDirectives.IsEmpty); 448Debug.Assert(!nestedLoadDirectives.IsEmpty); 573Debug.Assert(!oldLoadDirectives.IsEmpty); 687Debug.Assert(!loadDirectives.IsEmpty);
Compilation\SyntaxTreeSemanticModel.cs (1)
240else if (!info.CandidateSymbols.IsEmpty)
Compiler\ClsComplianceChecker.cs (3)
555System.Diagnostics.Debug.Assert(typeParameters.IsEmpty || IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols"); 574System.Diagnostics.Debug.Assert(parameters.IsEmpty || IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols"); 676if (parameters.IsEmpty) return;
Compiler\DocumentationCommentCompiler.cs (2)
298if (docCommentNodes.IsEmpty) 1158if (referencedSymbols.IsEmpty)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
83if (sourceIncludeElementNodes.IsEmpty)
Compiler\MethodCompiler.cs (4)
292Debug.Assert(codeCoverageSpans.IsEmpty); 602if (containingType.StaticConstructors.IsEmpty) 1297Debug.Assert(initializerCodeCoverageSpans.IsEmpty); 1974Debug.Assert(constructor.Locals.IsEmpty);
Declarations\MergedNamespaceDeclaration.cs (1)
23: base(declarations.IsEmpty ? string.Empty : declarations[0].Name)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (8)
569Debug.Assert(type.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 570Debug.Assert(other.ElementTypeWithAnnotations.CustomModifiers.IsEmpty); 626Debug.Assert(type.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.All(t => t.CustomModifiers.IsEmpty)); 627Debug.Assert(other.TypeArgumentsWithAnnotationsNoUseSiteDiagnostics.All(t => t.CustomModifiers.IsEmpty)); 664Debug.Assert(type.PointedAtTypeWithAnnotations.CustomModifiers.IsEmpty); 665Debug.Assert(other.PointedAtTypeWithAnnotations.CustomModifiers.IsEmpty); 696Debug.Assert(type.CustomModifiers.IsEmpty); 708return modifiers.IsEmpty;
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
252Debug.Assert(EmitOptions.InstrumentationKinds.IsEmpty);
Emitter\Model\AttributeDataAdapter.cs (2)
22if (commonArgs.IsEmpty) 59if (commonArgs.IsEmpty)
Emitter\Model\ExpandedVarargsMethodReference.cs (1)
28Debug.Assert(!argListParams.IsEmpty);
Emitter\Model\GenericMethodInstanceReference.cs (1)
36Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\MethodSymbolAdapter.cs (1)
255Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\SpecializedGenericMethodInstanceReference.cs (1)
37Debug.Assert(arg.CustomModifiers.IsEmpty);
Emitter\Model\SymbolAdapter.cs (1)
120if (userDefined.IsEmpty && synthesized == null)
FlowAnalysis\AbstractFlowPass.cs (2)
2733if (node.Parts.IsEmpty) 3165if (!sideEffects.IsEmpty)
FlowAnalysis\ControlFlowPass.cs (1)
276if (node.CatchBlocks.IsEmpty)
FlowAnalysis\FlowAnalysisPass.cs (2)
56Debug.Assert(!implicitlyInitializedFields.IsEmpty); 112Debug.Assert(!implicitlyInitializedFields.IsEmpty);
FlowAnalysis\NullableWalker.cs (9)
652var exitLocation = method is SynthesizedPrimaryConstructor || method.DeclaringSyntaxReferences.IsEmpty ? null : method.TryGetFirstLocation(); 1229if (!parameters.IsEmpty) 4374if (slot >= 0 && !initializer.Initializers.IsEmpty) 6832if (node is BoundCollectionElementInitializer { AddMethod: { TypeArgumentsWithAnnotations: { IsEmpty: false } } }) 6837if (node is BoundForEachStatement { EnumeratorInfoOpt: { GetEnumeratorInfo: { Method: { TypeArgumentsWithAnnotations: { IsEmpty: false } } } } }) 7320&& !(notNullWhenTrueMembers.IsEmpty && notNullWhenFalseMembers.IsEmpty)) 7333if (members.IsEmpty) 9433Debug.Assert(handlerData.ArgumentPlaceholders.IsEmpty
Lowering\BoundTreeToDifferentEnclosingContextRewriter.cs (1)
76if (locals.IsEmpty) return locals;
Lowering\ClosureConversion\ClosureConversion.Analysis.Tree.cs (1)
717if (!locals.IsEmpty && _currentScope.BoundNode != node)
Lowering\ClosureConversion\ClosureConversion.cs (2)
969if (typeArguments.IsEmpty) 1205Debug.Assert(!node.Locals.IsEmpty);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
133Debug.Assert(block.Locals.IsEmpty);
Lowering\DiagnosticsPass_ExpressionTrees.cs (3)
611if (!lambda.GetAttributes().IsEmpty || !lambda.GetReturnTypeAttributes().IsEmpty) 628if (!reportedAttributes && !p.GetAttributes().IsEmpty)
Lowering\ExtensionMethodBodyRewriter.cs (1)
125if (!node.LocalFunctions.IsEmpty)
Lowering\InitializerRewriter.cs (2)
108{ WasCompilerGenerated = !fieldInit.Locals.IsEmpty || fieldInit.WasCompilerGenerated }; 110if (!fieldInit.Locals.IsEmpty)
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
180if (dynamicAnalysisSpans.IsEmpty)
Lowering\IteratorRewriter\IteratorMethodToStateMachineRewriter.cs (1)
388Debug.Assert(node.CatchBlocks.IsEmpty, "try with yields must have no catches");
Lowering\LocalRewriter\DelegateCacheContainer.cs (2)
74var fieldType = TypeParameters.IsEmpty ? delegateType : TypeMap.SubstituteType(delegateType).Type; 80if (!TypeParameters.IsEmpty)
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
623if (cases.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
373Debug.Assert(invokedAsExtensionMethod && !arguments.IsEmpty); 725if (arguments.IsEmpty) 1198Debug.Assert(!argumentRefKindsOpt.IsEmpty);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
69if (node.Elements.IsEmpty &&
Lowering\LocalRewriter\LocalRewriter_DoStatement.cs (1)
55if (node.Locals.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (1)
547Debug.Assert(methodArgumentInfo.Arguments.IsEmpty);
Lowering\LocalRewriter\LocalRewriter_ForStatement.cs (1)
179if (node.InnerLocals.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (1)
714if (!arguments.IsEmpty || propertySymbol.IsIndexedProperty)
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
147if (section.Locals.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_PropertyAccess.cs (1)
82if (_inExpressionLambda && rewrittenArguments.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
98Debug.Assert(!parts.IsEmpty);
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
104if (arm.Locals.IsEmpty)
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (1)
130Debug.Assert(node.Locals.IsEmpty); // TODO: This might not be a valid assumption in presence of semicolon operator.
Lowering\LocalRewriter\LocalRewriter_WhileStatement.cs (1)
115if (locals.IsEmpty)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
697if (!synthesizedContainer.TypeParameters.IsEmpty)
Lowering\SpillSequenceSpiller.cs (1)
544Locals.IsEmpty: true,
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (1)
749Debug.Assert(!node.Locals.IsEmpty);
Lowering\StateMachineRewriter\SynthesizedStateMachineProperty.cs (1)
63get { return !_getter.Parameters.IsEmpty; }
Lowering\SynthesizedMethodBaseSymbol.cs (2)
151Debug.Assert(base.GetAttributes().IsEmpty); 159Debug.Assert(base.GetReturnTypeAttributes().IsEmpty);
Operations\CSharpOperationFactory.cs (2)
509if (!boundAttribute.NamedArguments.IsEmpty) 880if (!boundObjectInitializerMember.Arguments.IsEmpty)
SymbolDisplay\SymbolDisplayVisitor.Members.cs (3)
595if (symbol.CallingConvention != SignatureCallingConvention.Unmanaged || !conventionTypes.IsEmpty) 1054if (Format.MemberOptions.IncludesOption(SymbolDisplayMemberOptions.IncludeExplicitInterface) && !implementedMembers.IsEmpty) 1070if (this.Format.CompilerInternalOptions.IncludesOption(SymbolDisplayCompilerInternalOptions.IncludeCustomModifiers) && !customModifiers.IsEmpty)
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
560return modifiers.Any(static m => !m.IsEmpty); 875return !typeParam.ConstraintTypes.IsEmpty || typeParam.HasConstructorConstraint ||
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (1)
242if (this.IsMinimizing && !symbol.Locations.IsEmpty)
Symbols\AliasSymbol.cs (1)
57Debug.Assert(locations.Length == 1 || (locations.IsEmpty && aliasName == "global")); // It looks like equality implementation depends on this condition.
Symbols\ArrayTypeSymbol.cs (1)
641Debug.Assert(lowerBounds.IsDefaultOrEmpty || (!lowerBounds.IsEmpty && (lowerBounds.Length != rank || !lowerBounds.All(b => b == 0))));
Symbols\ConstraintsHelper.cs (1)
366if (clauses.All(clause => clause.ConstraintTypes.IsEmpty))
Symbols\ErrorTypeSymbol.cs (1)
70if (!CandidateSymbols.IsEmpty)
Symbols\ExtendedErrorTypeSymbol.cs (3)
79Debug.Assert(candidateSymbols.IsEmpty || resultKind != LookupResultKind.Viable, "Shouldn't use LookupResultKind.Viable with candidate symbols"); 90var candidate = candidateSymbols.IsEmpty ? null : candidateSymbols[0] as ErrorTypeSymbol; 91return ((object?)candidate != null && !candidate.CandidateSymbols.IsEmpty) ? candidate.CandidateSymbols : candidateSymbols;
Symbols\Extensions\RewrittenMethodSymbol.cs (1)
21Debug.Assert(originalMethod.ExplicitInterfaceImplementations.IsEmpty);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (3)
607if (!Parameters.IsEmpty) 649if (modifiersToSearch.IsEmpty) 672if (modifiersToSearch.IsEmpty || CallingConvention != CallingConvention.Unmanaged)
Symbols\MemberSignatureComparer.cs (3)
593(unsubstitutedReturnType1.CustomModifiers.IsEmpty && unsubstitutedReturnType2.CustomModifiers.IsEmpty)) 618return typeParameters.IsEmpty ?
Symbols\MemberSymbolExtensions.cs (1)
28return !@params.IsEmpty && @params.Last().IsParams;
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
46Debug.Assert(!dynamicTransformFlags.IsEmpty);
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
305if (targetCustomModifiers.IsDefault || targetCustomModifiers.IsEmpty) 307return candidateCustomModifiers.IsDefault || candidateCustomModifiers.IsEmpty;
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
333if (customModifiersArray.IsEmpty && IsFixedBuffer(out fixedSize, out fixedElementType))
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1053if (!attributeData.IsEmpty) 1282if (!SyntaxFacts.IsValidIdentifier(this.Name) && !this.ExplicitInterfaceImplementations.IsEmpty)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
489var typeMap = combinedTypeParameters.IsEmpty ? null : new TypeMap(combinedTypeParameters, candidate.TypeParameters);
Symbols\Metadata\PE\PEParameterSymbol.cs (2)
439Debug.Assert(_refCustomModifiers.IsEmpty || isByRef); 872if (paramNames.IsEmpty)
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
743if (!attributes.IsEmpty)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (2)
356if (constraintTypes.IsEmpty) 534else if (GetDeclaredConstraintTypes(ConsList<PETypeParameterSymbol>.Empty).IsEmpty)
Symbols\Metadata\PE\TupleTypeDecoder.cs (1)
308if (typeArgs.IsEmpty)
Symbols\NamedTypeSymbol.cs (4)
212if (candidates.IsEmpty) 268if (instanceCandidates.IsEmpty && staticCandidates.IsEmpty) 305if (candidates.IsEmpty)
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
506Debug.Assert(overriddenMembers.IsEmpty);
Symbols\OverriddenOrHiddenMembersResult.cs (2)
44if (overriddenMembers.IsEmpty && hiddenMembers.IsEmpty)
Symbols\ReducedExtensionMethodSymbol.cs (1)
87Debug.Assert(!method.TypeArgumentsWithAnnotations.IsEmpty);
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
111if (impls.IsEmpty)
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
314if (impls.IsEmpty)
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
170if (impls.IsEmpty)
Symbols\Source\LocalFunctionSymbol.cs (1)
101=> _typeParameters.IsEmpty ? _binder : new WithMethodTypeParametersBinder(this, _binder);
Symbols\Source\SourceAssemblySymbol.cs (5)
145if (!compilation.Options.CryptoPublicKey.IsEmpty) 496Debug.Assert(!DeclaringCompilation.Options.Errors.IsEmpty); 619DeclaringCompilation.Options.CryptoPublicKey.IsEmpty && 2318if (identity.PublicKey.IsEmpty) 2926if (GetAttributeDeclarations().IsEmpty)
Symbols\Source\SourceComplexParameterSymbol.cs (2)
1727Debug.Assert(!refCustomModifiers.IsEmpty); 1732Debug.Assert(refKind != RefKind.None || _refCustomModifiers.IsEmpty);
Symbols\Source\SourceCustomEventSymbol.cs (1)
226if (!_explicitInterfaceImplementations.IsEmpty)
Symbols\Source\SourceEventSymbol.cs (1)
740if (!explicitInterfaceImplementations.IsEmpty)
Symbols\Source\SourceMemberContainerSymbol.cs (4)
1023if (IsImplicitlyDeclared && declarations.IsEmpty) 1182if (!group.IsEmpty && 2452Debug.Assert(!newMembers.IsEmpty); 3247if (initializers.IsEmpty)
Symbols\Source\SourceMethodSymbol.cs (3)
206if (!target.NotNullMembers.IsEmpty) 214if (!target.NotNullWhenTrueMembers.IsEmpty || !target.NotNullWhenFalseMembers.IsEmpty)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
1504&& boundAttributes.IsEmpty
Symbols\Source\SourceModuleSymbol.cs (1)
721if (attributesDeclarations.IsEmpty)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
373if (results.All(clause => clause.ConstraintTypes.IsEmpty))
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
664Debug.Assert(GetDeclaredInterfaces(basesBeingResolved: null).IsEmpty, "Computation skipped for enums");
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (11)
120Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty); 130Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetExternAliases(this, declarationSyntax).IsEmpty); 151Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty); 161Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingAliases(this, declarationSyntax, basesBeingResolved).IsEmpty); 225Debug.Assert(GetAliasesAndUsingsForAsserts(declarationSyntax).GetUsingNamespacesOrTypes(this, declarationSyntax, basesBeingResolved).IsEmpty); 321if (!namespacesOrTypes.IsEmpty) 447Debug.Assert(result.IsEmpty); 580Debug.Assert(calculated.UsingAliases.IsEmpty); 582Debug.Assert(calculated.UsingNamespacesOrTypes.IsEmpty); 779diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ? 805diagnostics.Add(!globalUsingNamespacesOrTypes.IsEmpty && getOrCreateUniqueGlobalUsingsNotInTree(ref uniqueGlobalUsings, globalUsingNamespacesOrTypes, declarationSyntax.SyntaxTree).Contains(imported) ?
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
84Debug.Assert(_lazyReturnType.CustomModifiers.IsEmpty); 146Debug.Assert(_lazyReturnType.CustomModifiers.IsEmpty);
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
172Debug.Assert(declaredConstraints.All(clause => clause.ConstraintTypes.IsEmpty)); 1019_typeParameterInfo = typeParameters.IsEmpty
Symbols\Source\SourceParameterSymbol.cs (1)
129if (newRefCustomModifiers.IsEmpty)
Symbols\Source\SourcePropertySymbolBase.cs (2)
276Debug.Assert(isExplicitInterfaceImplementation || _lazyExplicitInterfaceImplementations.IsEmpty); 689Debug.Assert(_lazyExplicitInterfaceImplementations.IsEmpty);
Symbols\Source\SourceTypeParameterSymbol.cs (7)
36Debug.Assert(!syntaxRefs.IsEmpty); 340this.ConstraintTypesNoUseSiteDiagnostics.IsEmpty && 419else if (!this.HasValueTypeConstraint && this.ConstraintTypesNoUseSiteDiagnostics.IsEmpty && this.IsNotNullable == false) 591if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.None) 767var constraintTypes = constraints.IsEmpty ? ImmutableArray<TypeWithAnnotations>.Empty : constraints[Ordinal]; 769if (constraintTypes.IsEmpty && GetConstraintKinds() == TypeParameterConstraintKind.None) 780return constraintKinds.IsEmpty ? TypeParameterConstraintKind.None : constraintKinds[Ordinal];
Symbols\Source\TypeParameterConstraintClause.cs (1)
87if (constraintTypes.IsEmpty)
Symbols\SubstitutedParameterSymbol.cs (3)
62if (substituted.CustomModifiers.IsEmpty && 63this._underlyingParameter.TypeWithAnnotations.CustomModifiers.IsEmpty && 64this._underlyingParameter.RefCustomModifiers.IsEmpty)
Symbols\SubstitutedPropertySymbol.cs (1)
151if (unsubstitutedParameters.IsEmpty)
Symbols\SubstitutedTypeParameterSymbol.cs (1)
155if (_underlyingTypeParameter.ConstraintTypesNoUseSiteDiagnostics.IsEmpty)
Symbols\Symbol.cs (2)
424return locations.IsEmpty ? null : locations[0]; 496if (locations.IsEmpty)
Symbols\SymbolExtensions.cs (2)
35Debug.Assert(type.TypeParameters.IsEmpty == (typeArguments.Length == 0)); 36return type.TypeParameters.IsEmpty ? type : type.Construct(typeArguments, unbound: false);
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (3)
134if (printableMembers.IsEmpty) 165if (printableMembers.IsEmpty) 180Debug.Assert(!printableMembers.IsEmpty);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
265if (!allAttributeSyntaxNodes.IsEmpty && _property.IsAutoPropertyOrUsesFieldKeyword)
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
361Debug.Assert(isParams || !refCustomModifiers.IsEmpty || baseParameterForAttributes is object || defaultValue is not null || hasUnscopedRefAttribute);
Symbols\Tuples\TupleErrorFieldSymbol.cs (1)
211_locations.IsEmpty ? null : GetFirstLocation(),
Symbols\TypeParameterSymbol.cs (1)
557if (constraintTypes.IsEmpty)
Symbols\TypeSymbol.cs (2)
109if (!interfaces.IsEmpty) 1161if (allInterfaces.IsEmpty)
Symbols\TypeSymbolExtensions.cs (2)
861if (fields.IsEmpty) 892if (typeArguments.IsEmpty)
Symbols\TypeWithAnnotations.cs (9)
196Debug.Assert(CustomModifiers.IsEmpty); 451Debug.Assert(newTypeWithModifiers.CustomModifiers.IsEmpty); 460newCustomModifiers.IsEmpty) 564CustomModifiers.IsEmpty; 844if (customModifiers.IsEmpty) 1069Debug.Assert(underlying.CustomModifiers.IsEmpty); 1103Debug.Assert(resolvedType.IsNullableType() && CustomModifiers.IsEmpty); 1114if (customModifiers.IsEmpty) 1163newUnderlying.CustomModifiers.IsEmpty)
Utilities\TypeSymbolExtensions.cs (2)
113if (!funcPtr.Signature.RefCustomModifiers.IsEmpty || checkTypeWithAnnotations(funcPtr.Signature.ReturnTypeWithAnnotations, flagNonDefaultArraySizesOrLowerBounds)) 120if (!param.RefCustomModifiers.IsEmpty || checkTypeWithAnnotations(param.TypeWithAnnotations, flagNonDefaultArraySizesOrLowerBounds))
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
49if (context.SemanticModel.AnalyzeDataFlow(anonymousFunction) is { Succeeded: true, Captured.IsEmpty: true })
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (2)
41&& dataFlow.CapturedInside.IsEmpty; 47!dataFlow.CapturedInside.IsEmpty)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
99if (!lastSection.IsEmpty)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
359GetAccessibleInstanceConstructor(constructors, c => c.Parameters.IsEmpty) ??
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
136return !deconstructionInfoOpt.HasValue || !deconstructionInfoOpt.Value.Nested.IsEmpty || deconstructionInfoOpt.Value.Method != null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
229if (memberGroup[0] is not IMethodSymbol { TypeParameters.IsEmpty: true } method)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (12)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
61if (positionalParameterInfos.IsEmpty) 511if (expressions.IsEmpty)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
81methodSymbol.Parameters.IsEmpty && 373Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true },
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
129if (symbolInfo.CandidateReason == CandidateReason.OverloadResolutionFailure && !symbolInfo.CandidateSymbols.IsEmpty)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
85if (info.Method != null || !info.Nested.IsEmpty)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
439if (fileHeader.IsEmpty)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
84if (preMatches is [{ Node: ExpressionSyntax } preMatch] && postMatches.IsEmpty) 88else if (preMatches.IsEmpty && postMatches is [{ Node: ExpressionSyntax } postMatch])
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
144if (matches.IsEmpty)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
142if (capturedVariables.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
148symbol.Signature.UnmanagedCallingConventionTypes.IsEmpty
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
CodeActions\InlineMethod\CSharpInlineMethodTests_CrossLanguage.cs (1)
26Assert.True(actions.IsEmpty);
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
767if (!nugetAnalyzers.IsEmpty) 772if (!nugetSuppressors.IsEmpty)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
194if (diagnostics.IsEmpty)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenOperators.cs (1)
5423for (int count = start; count <= limit && diagnostics.IsEmpty; count += step)
CodeGen\CodeGenTupleTest.cs (2)
6374Assert.True(tupleWithoutNames.GetMembers("Item1").Single().Locations.IsEmpty); 14468Assert.True(v2Type.Interfaces.IsEmpty);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (13)
Attributes\InternalsVisibleToAndStrongNameTests.cs (9)
145Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 175Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 304Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 351Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 373Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 387Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 406Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 454Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 465Assert.True(other.Assembly.Identity.PublicKey.IsEmpty);
Semantics\PrimaryConstructorTests.cs (4)
3251Assert.True(c.Constructors.All(ctor => ctor.GetAttributes().IsEmpty)); 3252Assert.True(c.Constructors.All(ctor => ctor.GetReturnTypeAttributes().IsEmpty)); 3381Assert.True(c.Constructors.All(ctor => ctor.GetAttributes().IsEmpty)); 3402Assert.True(c.Constructors.All(ctor => ctor.GetAttributes().IsEmpty));
Microsoft.CodeAnalysis.CSharp.Features (30)
AddImport\CSharpAddImportFeatureService.cs (1)
571if (aliases.IsEmpty)
ChangeSignature\CSharpChangeSignatureService.cs (2)
316if (updatedLeadingTrivia != default && !updatedLeadingTrivia.IsEmpty) 804if (permutedParamNodes.IsEmpty)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
365if (commitRules.IsEmpty)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
297if (overloads.IsEmpty)
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (1)
256Contract.ThrowIfTrue(group.IsEmpty);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
2557IMethodSymbol { ExplicitInterfaceImplementations.IsEmpty: false }
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (3)
562if (statements.IsEmpty) 874Contract.ThrowIfTrue(variableInfos.IsEmpty); 891Contract.ThrowIfTrue(variableInfos.IsEmpty && !needsControlFlowValue);
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
50var iteratorName = NameGenerator.GenerateUniqueName(s_iteratorBaseNames, n => semanticModel.LookupSymbols(syntaxContext.Position, name: n).IsEmpty);
Snippets\AbstractCSharpMainMethodSnippetProvider.cs (1)
38!semanticModel.LookupSymbols(context.Position, container: enclosingTypeSymbol, name: WellKnownMemberNames.EntryPointMethodName).IsEmpty)
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
78"item", name => semanticModel.LookupSymbols(position, name: name).IsEmpty);
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
49if (context.SemanticModel.AnalyzeDataFlow(anonymousFunction) is { Succeeded: true, Captured.IsEmpty: true })
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticHelper.cs (2)
41&& dataFlow.CapturedInside.IsEmpty; 47!dataFlow.CapturedInside.IsEmpty)
src\Analyzers\CSharp\Analyzers\RemoveUnreachableCode\RemoveUnreachableCodeHelpers.cs (1)
99if (!lastSection.IsEmpty)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
359GetAccessibleInstanceConstructor(constructors, c => c.Parameters.IsEmpty) ??
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
490if (namedType.GetMembers(leftIdentifier.Identifier.ValueText).IsEmpty)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
61if (positionalParameterInfos.IsEmpty) 511if (expressions.IsEmpty)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
81methodSymbol.Parameters.IsEmpty && 373Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true },
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (1)
129if (symbolInfo.CandidateReason == CandidateReason.OverloadResolutionFailure && !symbolInfo.CandidateSymbols.IsEmpty)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
85if (info.Method != null || !info.Nested.IsEmpty)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (1)
439if (fileHeader.IsEmpty)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (2)
84if (preMatches is [{ Node: ExpressionSyntax } preMatch] && postMatches.IsEmpty) 88else if (preMatches.IsEmpty && postMatches is [{ Node: ExpressionSyntax } postMatch])
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
144if (matches.IsEmpty)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
142if (capturedVariables.IsEmpty)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\BreakpointSpansTests.cs (1)
85var expectedEnvelope = expectedSpans.IsEmpty ? default : TextSpan.FromBounds(expectedSpans[0].Start, expectedSpans[^1].End);
ExtractClass\ExtractClassTests.cs (1)
3134if (selectedMembers.IsEmpty)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\BindingTests.cs (5)
3391Assert.True(model.LookupSymbols(node1.SpanStart, name: "MathMin").IsEmpty); 3394Assert.True(model.LookupSymbols(node1.SpanStart, name: "F2").IsEmpty); 3395Assert.True(model.LookupSymbols(node1.SpanStart, name: "MathMax2").IsEmpty); 3396Assert.True(model.LookupSymbols(node1.SpanStart, name: "MathMax3").IsEmpty); 3746Assert.True(symbolInfo1.CandidateSymbols.IsEmpty);
Semantics\FieldInitializerBindingTests.cs (1)
264Assert.True(!boundInitializers.IsEmpty, "Expected non-null non-empty bound initializers");
Semantics\LookupPositionTests.cs (1)
2274Assert.True(symbols.IsEmpty);
Semantics\OperatorTests.cs (1)
3274if (arguments == null || arguments.Value.IsEmpty)
SourceGeneration\GeneratorDriverTests.cs (2)
2701Assert.True(driver.GetRunResult().Diagnostics.IsEmpty); 2711Assert.True(driver.GetRunResult().Diagnostics.IsEmpty);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (17)
Compilation\CompilationAPITests.cs (1)
368Assert.True(ref1.Properties.Aliases.IsEmpty);
Compilation\GetSemanticInfoTests.cs (3)
4297Assert.True(info.CandidateSymbols.IsEmpty); 4302Assert.True(info.MemberGroup.IsEmpty); 4303Assert.True(info.MethodGroup.IsEmpty);
Compilation\ReferenceManagerTests.cs (3)
906Assert.True(dr1.Properties.Aliases.IsEmpty); 907Assert.True(dr2.Properties.Aliases.IsEmpty); 908Assert.True(dr3.Properties.Aliases.IsEmpty);
Symbols\AnonymousTypesSymbolTests.cs (2)
1645Assert.False(sym.Symbol.Locations.IsEmpty, "Symbol Location"); 1654Assert.False(m.Locations.IsEmpty, String.Format("No Location: {0}", m));
Symbols\CustomModifiersTests.cs (7)
74Assert.True(nullable.GetTypeArgumentCustomModifiers(0).IsEmpty); 84Assert.True(nullable.GetTypeArgumentCustomModifiers(0).IsEmpty); 139Assert.True(type.GetTypeArgumentCustomModifiers(0).IsEmpty); 149Assert.True(dictionary.GetTypeArgumentCustomModifiers(0).IsEmpty); 150Assert.True(dictionary.GetTypeArgumentCustomModifiers(1).IsEmpty); 157Assert.True(dictionary.GetTypeArgumentCustomModifiers(0).IsEmpty); 158Assert.True(dictionary.GetTypeArgumentCustomModifiers(1).IsEmpty);
Symbols\Source\NullablePublicAPITests.cs (1)
2634Assert.True(info.CandidateSymbols.IsEmpty);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
CompilationTestUtils.cs (1)
458if (allAnnotations.IsEmpty)
CSharpTestBase.cs (1)
1998if (localInfos.IsEmpty)
MockCSharpCompiler.cs (1)
86if (!_additionalReferences.IsEmpty)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Simplification\Simplifiers\ExpressionSimplifier.cs (2)
245if (speculativeSymbols.IsEmpty && speculativeNamespacesAndTypes.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
136return !deconstructionInfoOpt.HasValue || !deconstructionInfoOpt.Value.Nested.IsEmpty || deconstructionInfoOpt.Value.Method != null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
229if (memberGroup[0] is not IMethodSymbol { TypeParameters.IsEmpty: true } method)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
148symbol.Signature.UnmanagedCallingConventionTypes.IsEmpty
Microsoft.CodeAnalysis.Debugging.Package (1)
CustomDebugInfoReader.cs (1)
493if (importStrings.IsEmpty)
Microsoft.CodeAnalysis.EditorFeatures (7)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
360var firstDocumentReplacements = documentReplacements.FirstOrDefault(d => !d.Item2.IsEmpty); 378if (document == firstDocumentReplacements.document || replacements.IsEmpty) 414if (document == firstDocumentReplacements.document || replacements.IsEmpty)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
285if (!_snapshotData.Defaults.IsEmpty)
IntelliSense\AsyncCompletion\ItemManager.cs (1)
167|| !data.Defaults.IsEmpty;
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (2)
325if (_dataSource.Options.IsEmpty && _dataSource.FeatureOptions.IsEmpty)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
CommentSelection\AbstractToggleCommentTestBase.cs (1)
74if (!expectedSpans.IsEmpty)
CompleteStatement\AbstractCompleteStatementTests.cs (2)
41Contract.ThrowIfTrue(positions.IsEmpty && spans.IsEmpty, "Expected at least one test position"); 42Contract.ThrowIfTrue(!positions.IsEmpty && !spans.IsEmpty, "Cannot test positions and spans at the same time");
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
39if (!ExpectedPrecheckedMembers.IsEmpty)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\StackFrameUtils.cs (1)
98if (triviaArray.IsEmpty)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (4)
ExpressionCompiler.cs (2)
462Debug.Assert(missingAssemblyIdentities.IsEmpty); 475if (!missingAssemblyIdentities.IsEmpty)
FrameDecoder.cs (2)
114if (!typeParameters.IsEmpty) 125if (!typeArguments.IsEmpty)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
MetadataResolver.cs (1)
80if (memberTypeParameters.IsEmpty)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (1)
Internal\NavigateTo\FSharpNavigateToSearchService.cs (1)
58Contract.ThrowIfTrue(projects.IsEmpty);
Microsoft.CodeAnalysis.Features (85)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (2)
57parametersForSelectedMembers.IsEmpty) 65return !ConstructorCandidates.IsEmpty;
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (2)
100=> methodSymbol is { Name: nameof(ToString), Arity: 0, Parameters.IsEmpty: true }; 103=> methodSymbol is { Name: DebuggerDisplayMethodName, Arity: 0, Parameters.IsEmpty: true };
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
137if (!codeStyleOptionValues.IsEmpty) 350if (!codeStyleOptions.IsEmpty)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (1)
68if (codeStyleOptions.IsEmpty)
CodeFixes\Service\CodeFixService.cs (4)
210if (diagnostics.IsEmpty) 213if (!diagnostics.IsEmpty) 382if (!filteredFixers.IsEmpty) 647if (!applicableDiagnostics.IsEmpty)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
79if (fixes.IsEmpty)
CodeRefactorings\CodeRefactoring.cs (1)
40if (CodeActions.IsEmpty)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
82if (parts.IsEmpty)
Completion\CompletionChange.cs (1)
70if (TextChanges.IsEmpty)
Completion\CompletionItem.cs (1)
67internal bool HasAdditionalFilterTexts => !AdditionalFilterTexts.IsEmpty;
Completion\Providers\AbstractSymbolCompletionProvider.cs (1)
348if (relatedDocumentIds.IsEmpty)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
172=> aliases.IsEmpty || aliases.Any(static alias => alias == MetadataReferenceProperties.GlobalAlias);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
218if (methodSymbol.ReturnsVoid || methodSymbol.ReturnType == null || targetTypeSymbols.IsEmpty)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
397if (!method.IsExtensionMethod || method.Parameters.IsEmpty || !IsAccessible(method, internalsVisible))
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
320if (countImpl.ExplicitInterfaceImplementations.IsEmpty && 321indexerImpl.ExplicitInterfaceImplementations.IsEmpty)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
412return typeParameters.IsEmpty
Diagnostics\DiagnosticsUpdatedArgs.cs (1)
35Debug.Assert(kind != DiagnosticsUpdatedKind.DiagnosticsRemoved || diagnostics.IsEmpty);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (4)
679if (!finalDiagnostics.IsEmpty) 967Debug.Assert(newActiveStatementSpans.IsEmpty || oldActiveStatements.Length == newActiveStatementSpans.Length); 968Debug.Assert(oldActiveStatements.IsEmpty || oldActiveStatements.Length == newActiveStatements.Count); 2537Debug.Assert(inBreakState || newActiveStatementSpans.IsEmpty);
EditAndContinue\DebuggingSession.cs (1)
843if (newDocumentActiveStatementSpans.IsEmpty)
EditAndContinue\DocumentAnalysisResults.cs (1)
205hasBlockingRudeEdits: !rudeEdits.IsEmpty);
EditAndContinue\EditAndContinueService.cs (2)
145Contract.ThrowIfTrue(captureAllMatchingDocuments && !captureMatchingDocuments.IsEmpty); 149if (captureAllMatchingDocuments || !captureMatchingDocuments.IsEmpty)
EditAndContinue\EditSession.cs (5)
157Contract.ThrowIfTrue(documentAnalyses.IsEmpty); 267if (newDocumentIds.IsEmpty) 270return !oldSolution.GetDocumentIdsWithFilePath(sourceFilePath).IsEmpty; 974if (!createBaselineErrors.IsEmpty) 1051if (!emitResult.Diagnostics.IsEmpty)
EditAndContinue\EditSessionTelemetry.cs (1)
109if (errorsIds.IsEmpty && _projectsWithValidDelta.Count < MaxReportedProjectIds)
EmbeddedLanguages\Json\JsonParser.cs (1)
165if (sequence.IsEmpty)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexDocumentHighlighter.cs (1)
53if (!referencesOnTheRight.IsEmpty)
ExternalAccess\VSTypeScript\Api\VSTypeScriptSignatureHelpProviderBase.cs (2)
23if (TypeScriptTriggerCharacters.IsEmpty) 39if (TypeScriptRetriggerCharacters.IsEmpty)
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
60Contract.ThrowIfTrue(projects.IsEmpty);
ExtractMethod\MethodExtractor.Analyzer.cs (1)
200if (variablesToUseAsReturnValue.IsEmpty)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
78if (implementations.IsEmpty)
FindUsages\DefinitionItem.cs (1)
136Contract.ThrowIfFalse(classifiedSpans.IsEmpty || sourceSpans.Length == classifiedSpans.Length);
FindUsages\DefinitionItemFactory.cs (4)
123if (!metadataLocations.IsEmpty) 129if (sourceLocations.IsEmpty && metadataLocations.IsEmpty) 191Contract.ThrowIfTrue(namespaceSymbol.ConstituentNamespaces.IsEmpty);
FullyQualify\AbstractFullyQualifyService.cs (2)
91if (matchingTypeSearchResults.IsEmpty && matchingNamespaceSearchResults.IsEmpty)
GenerateFromMembers\GenerateFromMembersHelpers.cs (1)
76=> property is { Parameters.IsEmpty: true, CanBeReferencedByName: true };
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
83if (!allDeclarationNodes.IsEmpty) 144if (!symbolAndLineNumbers.IsEmpty)
InheritanceMargin\InheritanceMarginItem.cs (1)
74=> targetItems.IsEmpty ? null : new(lineNumber, topLevelDisplayText, displayTexts, glyph, Order(targetItems));
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
255if (!captures.IsEmpty)
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
31if (selectedMemberNodes.IsEmpty)
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
72Contract.ThrowIfTrue(projects.IsEmpty);
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
33Contract.ThrowIfTrue(projects.IsEmpty);
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
158Contract.ThrowIfTrue(projects.IsEmpty);
NavigationBar\NavigationBarItems\RoslynNavigationBarItem.SymbolItem.cs (1)
88Contract.ThrowIfTrue(inDocumentInfo.Value.spans.IsEmpty, "If location is in document, it must have non-empty spans");
QuickInfo\QuickInfoUtilities.cs (1)
88!remarksDocumentation.IsEmpty)
SignatureHelp\AbstractSignatureHelpProvider.cs (1)
252if (relatedDocuments.IsEmpty)
Snippets\SnippetChange.cs (1)
37if (textChanges.IsEmpty)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (2)
115if (additionalUnnecessaryLocations.IsEmpty) 186if (additionalUnnecessaryLocations.IsEmpty)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
524if (suppressionInfo == null || !suppressionInfo.ProgrammaticSuppressions.IsEmpty)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\SuppressMessageAttributeState.cs (1)
126return !resolvedSymbols.IsEmpty;
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
868if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 918return ((IPropertySymbol)memberSymbol).ExplicitInterfaceImplementations.IsEmpty; 921return ((IEventSymbol)memberSymbol).ExplicitInterfaceImplementations.IsEmpty; 938return methodSymbol.Parameters.IsEmpty &&
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (1)
87if (HasSyntaxErrors() || context.OperationBlocks.IsEmpty)
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
90return postMatches.IsEmpty ? default : new(preMatches, postMatches, mayChangeSemantics);
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (1)
231if (diagnostics.IsEmpty)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
168&& TypeToGenerateIn.GetMembers(WellKnownMemberNames.TopLevelStatementsEntryPointMethodName).IsEmpty;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
266baseName, n => containingType.GetMembers(n).IsEmpty);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
835if (originalDeclStatementsToMoveOrRemove.IsEmpty)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
493if (importStrings.IsEmpty)
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (2)
27return typeArguments.IsEmpty; 30if (typeArguments.IsEmpty)
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
45if (diagnosticsByProject.Values.All(diagnostics => diagnostics.IsEmpty))
TaskList\AbstractTaskListService.cs (1)
53if (descriptors.IsEmpty)
UnusedReferences\UnusedReferencesRemover.cs (1)
98if (unusedReferences.IsEmpty)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
202Assert.True(expectedResult.SemanticEdits.IsEmpty);
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.Service.cs (2)
527var sdkDirectory = s_currentPlatformInfo.PlatformAssemblyPaths.IsEmpty ? RuntimeEnvironment.GetRuntimeDirectory() : null; 564initializationScriptPath = args.SourceFiles.IsEmpty ? null : args.SourceFiles[0].Path;
Microsoft.CodeAnalysis.LanguageServer (2)
HostWorkspace\ProjectDependencyHelper.cs (1)
125if (projectPaths.IsEmpty)
Services\LspExtractClassOptionsService.cs (1)
26var symbolsToUse = selectedMembers.IsEmpty
Microsoft.CodeAnalysis.LanguageServer.Protocol (8)
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
352if (diagnostics.IsEmpty)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (1)
648if (result.IsEmpty)
Handler\CodeActions\CodeActionHelpers.cs (1)
470if (currentActions.IsEmpty)
Handler\Completion\CompletionResultFactory.cs (1)
238if (item.Rules.CommitCharacterRules.IsEmpty)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
77if (configurationsFromClient.IsEmpty)
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
287Contract.ThrowIfFalse(diagnostics.IsEmpty);
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
69if (textChanges.IsEmpty)
Handler\References\FindUsagesLSPContext.cs (1)
256if (symbol == null || symbol.Locations.IsEmpty || symbol.Kind == SymbolKind.Namespace)
Microsoft.CodeAnalysis.PublicApiAnalyzers (18)
DeclarePublicApiAnalyzer.cs (1)
381if (!shippedData.RemovedApiList.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
NullableEnablePublicApiFix.cs (1)
140if (!diagnostics.IsEmpty)
Microsoft.CodeAnalysis.Rebuild (1)
CompilationOptionsReader.cs (1)
334(metadataReferenceInfo.ExternAlias is null && metadataReference.Properties.Aliases.IsEmpty) ||
Microsoft.CodeAnalysis.Remote.ServiceHub (4)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (4)
139if (projectAnalyzers.IsEmpty && hostAnalyzers.IsEmpty) 433Contract.ThrowIfFalse(!projectAnalyzers.IsEmpty || !hostAnalyzers.IsEmpty);
Microsoft.CodeAnalysis.Remote.Workspaces (2)
Serialization\MessagePackFormatters.cs (2)
40=> (additionalFormatters.IsEmpty && additionalResolvers.IsEmpty) ? DefaultResolver : CompositeResolver.Create(Formatters.AddRange(additionalFormatters), s_resolvers.AddRange(additionalResolvers));
Microsoft.CodeAnalysis.ResxSourceGenerator (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Microsoft.CodeAnalysis.Scripting (1)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
206if (paths.IsEmpty)
Microsoft.CodeAnalysis.Scripting.UnitTests (4)
RuntimeMetadataReferenceResolverTests.cs (4)
41Assert.True(actualReferences.IsEmpty); 47Assert.True(actualReferences.IsEmpty); 56Assert.True(actualReferences.IsEmpty); 62Assert.True(actualReferences.IsEmpty);
Microsoft.CodeAnalysis.Test.Utilities (21)
Compilation\ControlFlowGraphVerifier.cs (11)
185if (!predecessors.IsEmpty) 436if (blocks[i + 1].Predecessors.IsEmpty) 1379if (!region.Locals.IsEmpty) 1390if (!region.LocalFunctions.IsEmpty) 1401if (!region.CaptureIds.IsEmpty) 1469Assert.False(region.Locals.IsEmpty && region.LocalFunctions.IsEmpty && region.CaptureIds.IsEmpty); 1585if (!branch.FinallyRegions.IsEmpty) 1591if (!branch.LeavingRegions.IsEmpty) 1602if (!branch.EnteringRegions.IsEmpty)
Compilation\OperationTreeVerifier.cs (6)
400if (!children.IsEmpty || operation.Kind != OperationKind.None) 445var localStr = !operation.Locals.IsEmpty ? $", {operation.Locals.Length} locals" : string.Empty; 449if (operation.Operations.IsEmpty) 496if (!operation.IgnoredArguments.IsEmpty) 508if (!operation.IgnoredDimensions.IsEmpty) 894else if (argumentRefKinds.IsEmpty)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1574context.OperationBlocks.IsEmpty) 1592context.OperationBlocks.IsEmpty)
Diagnostics\DiagnosticExtensions.cs (2)
126Assert.False(assemblyIds.IsEmpty); 137Assert.True(assemblyIds.IsEmpty);
Microsoft.CodeAnalysis.UnitTests (16)
Collections\ImmutableArrayExtensionsTests.cs (2)
57Assert.Throws<NullReferenceException>(() => nullOrEmpty.IsEmpty); 60Assert.True(nullOrEmpty.IsEmpty);
MetadataReferences\MetadataReferencePropertiesTests.cs (2)
21Assert.True(m.Aliases.IsEmpty); 31Assert.True(m.Aliases.IsEmpty);
MetadataReferences\MetadataReferenceTests.cs (12)
107Assert.True(r.Properties.Aliases.IsEmpty); 138Assert.True(r.Properties.Aliases.IsEmpty); 154Assert.True(r.Properties.Aliases.IsEmpty); 170Assert.True(r.Properties.Aliases.IsEmpty); 193Assert.True(r.Properties.Aliases.IsEmpty); 213Assert.True(r.Properties.Aliases.IsEmpty); 263Assert.True(r.Properties.Aliases.IsEmpty); 327Assert.True(r5.Properties.Aliases.IsEmpty); 343Assert.True(r.Properties.Aliases.IsEmpty); 355Assert.True(r2.Properties.Aliases.IsEmpty); 374Assert.True(r.Properties.Aliases.IsEmpty); 386Assert.True(r2.Properties.Aliases.IsEmpty);
Microsoft.CodeAnalysis.VisualBasic (179)
Analysis\FlowAnalysis\AbstractFlowPass.vb (2)
825If Not sideEffects.IsEmpty Then 1114If Not arguments.IsEmpty Then
Analysis\FlowAnalysis\ControlFlowPass.vb (1)
121If node.CatchBlocks.IsEmpty Then
Analysis\FlowAnalysis\DataFlowPass.vb (2)
1109Return If(locations.IsEmpty, Nothing, locations(0)) 2049If declarations.IsEmpty Then
Analysis\ForLoopVerification.vb (1)
101If boundForStatement.NextVariablesOpt.IsEmpty Then
Binding\Binder_Attributes.vb (2)
60Debug.Assert(Not binders.IsEmpty) 61Debug.Assert(Not attributesToBind.IsEmpty)
Binding\Binder_Expressions.vb (2)
1732If Not invocation.ArgumentsOpt.IsEmpty Then 2831If accessibleConstructors.IsEmpty Then
Binding\Binder_Initializers.vb (2)
60If Not Me.BoundInitializers.IsEmpty Then 269Debug.Assert(Not fieldSymbols.IsEmpty)
Binding\Binder_Invocation.vb (6)
785If Not boundArguments.IsEmpty Then 883If Not asyncLambdaSubToFunctionMismatch.IsEmpty Then 1623If boundArguments.IsEmpty AndAlso boundTypeExpression Is Nothing Then 1636If Not boundArguments.IsEmpty Then 2744Debug.Assert(Not candidate.OptionalArguments.IsEmpty, "Optional arguments expected") 2924If Not args.IsEmpty Then
Binding\Binder_Lambda.vb (1)
558If Not block.Locals.IsEmpty Then
Binding\Binder_Latebound.vb (2)
154If Not arguments.IsEmpty Then 167If Not arguments.IsEmpty Then
Binding\Binder_ObjectInitializer.vb (1)
311ElseIf Not boundArguments.IsEmpty Then
Binding\Binder_Query.vb (1)
4691If arguments.IsEmpty Then
Binding\Binder_Statements.vb (3)
379If locals.IsEmpty Then 399If locals.IsEmpty Then 4757If catchBlocks.IsEmpty AndAlso finallyBlockOpt Is Nothing Then
Binding\BlockBaseBinder.vb (4)
38If Me._lazyLocalsMap Is Nothing AndAlso Not Me.Locals.IsEmpty Then 46Debug.Assert(Not locals.IsEmpty) 66If Not locals.IsEmpty AndAlso (options And (LookupOptions.NamespacesOrTypesOnly Or LookupOptions.LabelsOnly Or LookupOptions.MustNotBeLocalOrParameter)) = 0 Then 92If Not locals.IsEmpty AndAlso (options And (LookupOptions.NamespacesOrTypesOnly Or LookupOptions.LabelsOnly)) = 0 Then
Binding\DeclarationInitializerBinder.vb (1)
42Debug.Assert(symbol.Kind <> SymbolKind.Parameter OrElse additionalSymbols.IsEmpty)
Binding\DocumentationCommentBinder.vb (1)
158If Not symbols.IsEmpty Then
Binding\DocumentationCommentTypeParamBinder.vb (2)
63If Not typeParameters.IsEmpty Then 84If Not TypeParameters.IsEmpty Then
Binding\DocumentationCommentTypeParamRefBinder.vb (1)
26If Not result.IsEmpty Then
Binding\ExecutableCodeBinder.vb (2)
88If Not labels.IsEmpty Then 155If Not Labels.IsEmpty AndAlso (options And LookupOptions.LabelsOnly) = LookupOptions.LabelsOnly Then
Binding\MemberSemanticModel.vb (5)
1432If Not binders.IsEmpty Then 1501If Not binders.IsEmpty Then 1542If Not binders.IsEmpty Then 1567If Not binders.IsEmpty Then 1590If Not binders.IsEmpty Then
Binding\SyntheticBoundTrees\SynthesizedPropertyAccessorBase.vb (1)
162If Not handledEvents.IsEmpty Then
BoundTree\BoundCall.vb (1)
95Debug.Assert(DefaultArguments.IsNull OrElse Not Arguments.IsEmpty)
BoundTree\BoundObjectCreationExpression.vb (1)
31Debug.Assert(DefaultArguments.IsNull OrElse Not Arguments.IsEmpty)
BoundTree\BoundPropertyAccess.vb (1)
71Debug.Assert(DefaultArguments.IsNull OrElse Not Arguments.IsEmpty)
CodeGen\EmitAddress.vb (1)
151Dim hasLocals As Boolean = Not sequence.Locals.IsEmpty
CodeGen\EmitExpression.vb (3)
534Dim hasLocals As Boolean = Not sequence.Locals.IsEmpty 1968If Not sequence.Locals.IsEmpty Then 2076If Not sequence.Locals.IsEmpty Then
CodeGen\EmitStatement.vb (7)
821Dim hasLocals As Boolean = Not sequence.Locals.IsEmpty 953Debug.Assert(Not caseBlocks.IsEmpty) 975Debug.Assert(Not caseBlocks.IsEmpty) 976Debug.Assert(Not caseBlockLabels.IsEmpty) 1185Debug.Assert(Not caseBlocks.IsEmpty) 1186Debug.Assert(Not caseBlockLabels.IsEmpty) 1222Dim hasLocals As Boolean = Not scope.Locals.IsEmpty
CodeGen\Optimizer\StackScheduler.Analyzer.vb (1)
330If Not locals.IsEmpty Then
Compilation\ClsComplianceChecker.vb (6)
364Debug.Assert(typeParameters.IsEmpty OrElse IsTrue(GetDeclaredOrInheritedCompliance(context)), "Only call on compliant symbols") 376Debug.Assert(parameters.IsEmpty OrElse 766_diagnostics.ReportUseSite(attributeClass, If(symbol.Locations.IsEmpty, NoLocation.Singleton, symbol.Locations(0))) 834Dim location = If(symbol.Locations.IsEmpty, NoLocation.Singleton, symbol.Locations(0)) 930If parameters.IsEmpty Then 952If parameters.IsEmpty Then
Compilation\DocumentationComments\DocumentationCommentWalker.vb (1)
164If result.IsEmpty Then
Compilation\MethodCompiler.vb (1)
466If Not initializerGroup.IsEmpty Then
Compilation\SymbolInfo.vb (1)
24If symbols.IsEmpty AndAlso Not (reason = CandidateReason.None OrElse reason = CandidateReason.LateBound) Then
Compilation\VisualBasicCompilation.vb (1)
2418Debug.Assert(additionalTypes.IsEmpty)
Declarations\SingleNamespaceDeclaration.vb (1)
84Debug.Assert(Not singleDeclarations.IsEmpty)
Declarations\SingleNamespaceOrTypeDeclaration.vb (1)
49Debug.Assert(Not singleDeclarations.IsEmpty)
Emit\NamedTypeSymbolAdapter.vb (2)
479If Not handledEvents.IsEmpty Then 935If interfaces.IsEmpty Then
Emit\SymbolAdapter.vb (1)
96If userDefined.IsEmpty AndAlso synthesized Is Nothing Then
Lowering\AsyncRewriter\AsyncRewriter.AsyncMethodToClassRewriter.Spilling.vb (2)
38If Not nodes.IsEmpty Then 240If Not sideEffects.IsEmpty Then
Lowering\AsyncRewriter\AsyncRewriter.CapturedSymbolOrExpression.vb (1)
169Debug.Assert(Not indices.IsEmpty)
Lowering\AsyncRewriter\AsyncRewriter.SpillBuilder.vb (2)
93If Not expression.SpillFields.IsEmpty Then 124If other.IsEmpty Then
Lowering\Diagnostics\DiagnosticsPass_ExpressionLambdas.vb (3)
76If Not node.Locals.IsEmpty AndAlso Me.IsInExpressionLambda Then 182If initializer IsNot Nothing AndAlso Not initializer.Initializers.IsEmpty Then 235If innerBlock.Locals.IsEmpty AndAlso innerBlock.Statements.Length = 1 Then
Lowering\ExpressionLambdaRewriter\ExpressionLambdaRewriter.vb (6)
147Debug.Assert(block.Locals.IsEmpty OrElse 168If innerBlock.Locals.IsEmpty AndAlso innerBlock.Statements.Length = 1 Then 705If locals.IsEmpty AndAlso sideEffects.IsEmpty AndAlso value IsNot Nothing Then 738If initializer IsNot Nothing AndAlso Not initializer.Initializers.IsEmpty Then 831If Not typeArgs.IsEmpty Then
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
185If dynamicAnalysisSpans.IsEmpty Then
Lowering\LambdaRewriter\LambdaRewriter.Analysis.vb (1)
244If (locals.IsEmpty) Then
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
506Debug.Assert(typeArguments.IsEmpty)
Lowering\LocalRewriter\LocalRewriter.vb (1)
766If Not temporaries.IsEmpty Then
Lowering\LocalRewriter\LocalRewriter_Block.vb (1)
23If Not node.Locals.IsEmpty Then
Lowering\LocalRewriter\LocalRewriter_Call.vb (2)
135If arguments.IsEmpty Then 163If arguments.IsEmpty Then
Lowering\LocalRewriter\LocalRewriter_LateInvocation.vb (1)
83If Not tempArray.IsEmpty Then
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (1)
54If(body.Locals.IsEmpty,
Lowering\StateMachineRewriter\StateMachineRewriter.StateMachineMethodToClassRewriter.vb (1)
248If locals.IsEmpty Then
Lowering\UseTwiceRewriter.vb (2)
368If node.Arguments.IsEmpty Then 429If node.ArgumentsOpt.IsEmpty Then
SymbolDisplay\SymbolDisplayVisitor.Members.vb (1)
572If Me.Format.CompilerInternalOptions.IncludesOption(SymbolDisplayCompilerInternalOptions.IncludeCustomModifiers) AndAlso Not customModifiers.IsEmpty Then
Symbols\ArrayTypeSymbol.vb (1)
663Debug.Assert(lowerBounds.IsDefaultOrEmpty OrElse (Not lowerBounds.IsEmpty AndAlso (lowerBounds.Length <> rank OrElse Not lowerBounds.All(Function(b) b = 0))))
Symbols\BaseTypeAnalysis.vb (1)
335If Not bases.IsEmpty Then
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (3)
378Debug.Assert(method.ExplicitInterfaceImplementations.IsEmpty) 381Debug.Assert(method.GetReturnTypeAttributes().IsEmpty) 385Debug.Assert(parameter.GetAttributes().IsEmpty)
Symbols\ErrorTypeSymbol.vb (1)
387If CandidateSymbols.IsEmpty Then
Symbols\FieldOrPropertyInitializer.vb (1)
69Debug.Assert(Not fieldsOrProperties.IsEmpty)
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (2)
249If targetReturnTypeCustomModifiers.IsDefault OrElse targetReturnTypeCustomModifiers.IsEmpty Then 250Return candidateReturnTypeCustomModifiers.IsDefault OrElse candidateReturnTypeCustomModifiers.IsEmpty
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
646If Not attributeData.IsEmpty Then 1323If Not conditionalSymbols.IsEmpty Then
Symbols\Metadata\PE\PEParameterSymbol.vb (4)
91If customModifiers.IsEmpty AndAlso refCustomModifiers.IsEmpty Then 229Debug.Assert(_refCustomModifiers.IsEmpty OrElse isByRef) 248Debug.Assert(_refCustomModifiers.IsEmpty OrElse isByRef)
Symbols\Metadata\PE\TupleTypeDecoder.vb (2)
202Return If(decodedType.TypeParameters.IsEmpty, 238If typeArgs.IsEmpty Then
Symbols\NamedTypeSymbol.vb (2)
414If instanceCandidates.IsEmpty AndAlso sharedCandidates.IsEmpty Then
Symbols\OverriddenMembersResult.vb (3)
79If overriddenMembers.IsEmpty AndAlso inexactOverriddenMembers.IsEmpty AndAlso inaccessibleMembers.IsEmpty Then
Symbols\Retargeting\RetargetingEventSymbol.vb (1)
114If impls.IsEmpty Then
Symbols\Retargeting\RetargetingMethodSymbol.vb (1)
471If impls.IsEmpty Then
Symbols\Retargeting\RetargetingPropertySymbol.vb (1)
287If impls.IsEmpty Then
Symbols\Source\OverrideHidingHelper.vb (1)
843If overriddenMembers.IsEmpty Then
Symbols\Source\SourceAssemblySymbol.vb (5)
105If Not compilation.Options.CryptoPublicKey.IsEmpty Then 996If identity.PublicKey.IsEmpty Then 1265DeclaringCompilation.Options.CryptoPublicKey.IsEmpty AndAlso 1712Debug.Assert(Not DeclaringCompilation.Options.Errors.IsEmpty) 1837If GetAttributeDeclarations().IsEmpty Then
Symbols\Source\SourceClonedParameterSymbol.vb (1)
185Debug.Assert(_refCustomModifiers.IsEmpty OrElse IsByRef)
Symbols\Source\SourceComplexParameterSymbol.vb (5)
406If customModifiers.IsEmpty AndAlso refCustomModifiers.IsEmpty Then 433Debug.Assert(Not customModifiers.IsEmpty OrElse Not refCustomModifiers.IsEmpty) 437Debug.Assert(_refCustomModifiers.IsEmpty OrElse IsByRef)
Symbols\Source\SourceEventSymbol.vb (3)
200If Not implementedEvents.IsEmpty Then 381Return Not ExplicitInterfaceImplementations.IsEmpty 392If implementedEvents.IsEmpty Then
Symbols\Source\SourceFile.vb (2)
370If Not dependencies.IsEmpty Then 383Debug.Assert(dependencies.IsEmpty)
Symbols\Source\SourceMemberContainerTypeSymbol.vb (3)
315If Not typeParams.IsEmpty Then 1615If children.IsEmpty Then 2248If typeToTest.Locations.IsEmpty Then
Symbols\Source\SourceMemberMethodSymbol.vb (3)
213If Not Me.ExplicitInterfaceImplementations.IsEmpty Then 420If implementedMethods.IsEmpty Then 782Debug.Assert(Not instanceCtors.IsEmpty, "bind non-type members should have ensured at least one ctor for us")
Symbols\Source\SourceMethodSymbol.vb (1)
2038If (reference.IsEmpty) Then
Symbols\Source\SourceModuleSymbol.vb (1)
1207If mergedAttributes.IsEmpty Then
Symbols\Source\SourceNamedTypeSymbol.vb (1)
1679If Not localInterfaces.IsEmpty Then
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (3)
87If _syntheticInterfaces.IsEmpty Then 97If _syntheticInterfaces.IsEmpty Then 1913If interfaces.IsEmpty Then
Symbols\Source\SourcePropertySymbol.vb (1)
942If implementedProperties.IsEmpty Then
Symbols\Source\SourceSimpleParameterSymbol.vb (5)
163If customModifiers.IsEmpty AndAlso refCustomModifiers.IsEmpty Then 187Debug.Assert(Not customModifiers.IsEmpty OrElse Not refCustomModifiers.IsEmpty) 191Debug.Assert(_refCustomModifiers.IsEmpty OrElse IsByRef)
Symbols\Source\SourceTypeParameterSymbol.vb (1)
240Debug.Assert(Not syntaxRefs.IsEmpty)
Symbols\SubstitutedMethodSymbol.vb (1)
708Debug.Assert(Not typeArguments.IsEmpty)
Symbols\Symbol.vb (2)
367If locations.IsEmpty Then 393If nodes.IsEmpty Then
Symbols\SymbolExtensions.vb (1)
225Not method.ExplicitInterfaceImplementations.IsEmpty Then
Symbols\SynthesizedSymbols\SynthesizedOverridingWitheventsProperty.vb (1)
191Debug.Assert(_baseProperty.Parameters.IsEmpty)
Symbols\SynthesizedSymbols\SynthesizedParameterSymbol.vb (6)
298If customModifiers.IsEmpty AndAlso refCustomModifiers.IsEmpty Then 319If valueParameterCustomModifiers.IsEmpty Then 396Debug.Assert(Not customModifiers.IsEmpty OrElse Not refCustomModifiers.IsEmpty) 400Debug.Assert(Me._refCustomModifiers.IsEmpty OrElse Me.IsByRef)
Symbols\TypeParameterSymbol.vb (1)
206If constraints.IsEmpty Then
Symbols\TypeSubstitution.vb (2)
588Debug.Assert(Not alphaRenamedTypeParameters.IsEmpty) 602Debug.Assert(Not typeParametersDefinitions.IsEmpty AndAlso
Symbols\TypeSymbol.vb (1)
217If declaredInterfaces.IsEmpty Then
Symbols\TypeWithModifiers.vb (2)
63Return TypeSymbol.Equals(Me.Type, other, TypeCompareKind.ConsiderEverything) AndAlso Me.CustomModifiers.IsEmpty 77Debug.Assert(Me.CustomModifiers.IsEmpty)
Symbols\UnboundGenericType.vb (1)
529If originalTypeMembers.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
28If Not method.HandledEvents.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
48Contract.ThrowIfFalse(preMatches.IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (11)
Attributes\InternalsVisibleToAndStrongNameTests.vb (10)
104Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 134Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 210Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 270Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 302Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 350Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 369Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 511Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 540Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 1963Assert.True(emitResult.Diagnostics.IsEmpty)
CodeGen\CodeGenTests.vb (1)
13774If Not diagnostics.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (2)
CompilationContext.vb (2)
64compilation.SyntaxTrees.IsEmpty Then 578If Not importRecordGroups.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.Features (7)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
625If permutedParamNodes.IsEmpty() Then
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (2)
174If foreachOperation.NextVariables.IsEmpty AndAlso foreachStatement.NextStatement Is Nothing Then 179If Not foreachOperation.NextVariables.IsEmpty Then
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (2)
530If syntaxRefs.IsEmpty Then 2008If Not method.HandledEvents.IsEmpty Then
src\Analyzers\VisualBasic\Analyzers\RemoveUnusedMembers\VisualBasicRemoveUnusedMembersDiagnosticAnalyzer.vb (1)
28If Not method.HandledEvents.IsEmpty Then
src\Analyzers\VisualBasic\CodeFixes\UseCollectionInitializer\VisualBasicUseCollectionInitializerCodeFixProvider.vb (1)
48Contract.ThrowIfFalse(preMatches.IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (68)
Compilation\VisualBasicCompilationOptionsTests.vb (8)
147Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithMainTypeName(Nothing).Errors.IsEmpty) 158Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithRootNamespace(Nothing).Errors.IsEmpty) 164Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithRootNamespace("").Errors.IsEmpty) 251Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, mainTypeName:=Nothing).Errors.IsEmpty) 263Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, rootNamespace:=Nothing).Errors.IsEmpty) 270Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication, rootNamespace:="").Errors.IsEmpty) 313Assert.True(options.Errors.IsEmpty) 320Assert.True(New VisualBasicCompilationOptions(OutputKind.ConsoleApplication).WithRootNamespace(rootNs).Errors.IsEmpty)
Semantics\ConditionalAccessTests.vb (9)
675Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1343Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1367Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1378Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1412Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1499Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1521Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1564Assert.True(symbolInfo.CandidateSymbols.IsEmpty) 1607Assert.True(symbolInfo.CandidateSymbols.IsEmpty)
Semantics\FieldInitializerBindingTests.vb (1)
1532Assert.[True](boundInitializers.IsEmpty)
Semantics\MultiDimensionalTest.vb (11)
876Assert.True(szArray.Sizes.IsEmpty) 883Assert.True(mdArray.Sizes.IsEmpty) 2140Assert.True(array.Sizes.IsEmpty) 2141Assert.True(array.LowerBounds.IsEmpty) 2147Assert.True(array.Sizes.IsEmpty) 2148Assert.True(array.LowerBounds.IsEmpty) 2154Assert.True(array.Sizes.IsEmpty) 2155Assert.True(array.LowerBounds.IsEmpty) 2231Assert.True(array.Sizes.IsEmpty) 2238Assert.True(array.Sizes.IsEmpty) 2245Assert.True(array.Sizes.IsEmpty)
Semantics\NameOfTests.vb (39)
70Assert.True(group.IsEmpty) 82Assert.True(group.IsEmpty) 107Assert.True(group.IsEmpty) 119Assert.True(group.IsEmpty) 135Assert.True(group.IsEmpty) 147Assert.True(group.IsEmpty) 467Assert.True(group.IsEmpty) 539Assert.True(group.IsEmpty) 878Assert.True(group.IsEmpty) 955Assert.True(group.IsEmpty) 1068Assert.True(group.IsEmpty) 1136Assert.True(group.IsEmpty) 1201Assert.True(group.IsEmpty) 1283Assert.True(group.IsEmpty) 1365Assert.True(group.IsEmpty) 1446Assert.True(group.IsEmpty) 1526Assert.True(group.IsEmpty) 1657Assert.True(group.IsEmpty) 1750Assert.True(group.IsEmpty) 1807Assert.True(group.IsEmpty) 1864Assert.True(group.IsEmpty) 1921Assert.True(group.IsEmpty) 2063Assert.True(group.IsEmpty) 2162Assert.True(group.IsEmpty) 2263Assert.True(group.IsEmpty) 2369Assert.True(group.IsEmpty) 2473Assert.True(group.IsEmpty) 2806Assert.True(group.IsEmpty) 2881Assert.True(group.IsEmpty) 2946Assert.True(group.IsEmpty) 3008Assert.True(group.IsEmpty) 3069Assert.True(group.IsEmpty) 3130Assert.True(group.IsEmpty) 3190Assert.True(group.IsEmpty) 3254Assert.True(group.IsEmpty) 3315Assert.True(group.IsEmpty) 3372Assert.True(group.IsEmpty) 3430Assert.True(group.IsEmpty) 3486Assert.True(group.IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (7)
SymbolsTests\CustomModifiersTests.vb (7)
70Assert.True(nullable.GetTypeArgumentCustomModifiers(0).IsEmpty) 80Assert.True(nullable.GetTypeArgumentCustomModifiers(0).IsEmpty) 133Assert.True(type.GetTypeArgumentCustomModifiers(0).IsEmpty) 143Assert.True(dictionary.GetTypeArgumentCustomModifiers(0).IsEmpty) 144Assert.True(dictionary.GetTypeArgumentCustomModifiers(1).IsEmpty) 151Assert.True(dictionary.GetTypeArgumentCustomModifiers(0).IsEmpty) 152Assert.True(dictionary.GetTypeArgumentCustomModifiers(1).IsEmpty)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MockVisualBasicCompiler.vb (1)
76If Not _additionalReferences.IsEmpty Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Simplification\Simplifiers\AbstractVisualBasicSimplifier.vb (1)
173Return boundSymbols.IsEmpty
Microsoft.CodeAnalysis.Workspaces (59)
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (1)
100if (allDiagnostics.IsEmpty)
CodeFixesAndRefactorings\FixAllProviderInfo.cs (3)
65if (scopes.IsEmpty) 85if (scopes.IsEmpty) 105if (scopes.IsEmpty)
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
25if (SupportedFixAllScopes.IsEmpty)
Diagnostics\DocumentAnalysisScope.cs (2)
31Debug.Assert(!projectAnalyzers.IsEmpty || !hostAnalyzers.IsEmpty);
Diagnostics\Extensions.cs (3)
211if (!additionalPragmaSuppressionDiagnostics.IsEmpty && 266if (diagnostics.IsEmpty) 310if (diagnosticIdsToFilter.IsEmpty && !filterSpan.HasValue)
Diagnostics\SkippedHostAnalyzersInfo.cs (1)
112if (fullySkippedHostAnalyzers.IsEmpty && filteredDiagnosticIdsForAnalyzers.IsEmpty)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (1)
187if (tokens.IsEmpty)
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (1)
155useResult = accessors.IsEmpty;
Options\GlobalOptionService.cs (1)
227Debug.Assert(!changedOptions.IsEmpty);
Options\LegacyWorkspaceOptionService.cs (1)
81if (!internallyDefinedOptions.IsEmpty || anyExternallyDefinedOptionChanged)
Recommendations\AbstractRecommendationServiceRunner.cs (2)
116if (parameterTypeSymbols.IsEmpty) 439if (constraintTypes.IsEmpty)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
423if (array.IsEmpty) 441if (array.IsEmpty) 519if (self.IsEmpty) 1111if (items.IsEmpty)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
120if (oldChanges.IsEmpty) 125if (newChanges.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\SectionMatcher.cs (1)
302if (_numberRangePairs.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
149if (type.TypeKind == TypeKind.Array && typeArguments.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (1)
170!branch.FinallyRegions.IsEmpty)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (1)
352if (!basicBlock.Predecessors.IsEmpty ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferences.cs (8)
311Contract.ThrowIfFalse(serializableRules.IsEmpty == namingStyles.IsEmpty); 312Contract.ThrowIfFalse(serializableRules.IsEmpty == symbolSpecifications.IsEmpty); 330Contract.ThrowIfFalse(namingRules.IsEmpty == namingStyles.IsEmpty); 331Contract.ThrowIfFalse(namingRules.IsEmpty == symbolSpecifications.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (4)
22Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty); 61Contract.ThrowIfTrue(symbol.DeclaringSyntaxReferences.IsEmpty && symbol.Locations.IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IDictionaryExtensions.cs (1)
140dictionary[key] = existingArray.IsEmpty && value.Equals(defaultArray[0]) ? defaultArray : existingArray.Add(value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\InitializeParameterHelpersCore.cs (1)
72baseName, n => containingType.GetMembers(n).IsEmpty);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.cs (2)
18if (result.IsEmpty && nameOpt != null) 29if (result.IsEmpty && nameOpt != null)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
496if (filePaths.IsEmpty)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1215if (!vsixRazorAnalyzers.IsEmpty)
Workspace\ProjectSystem\ProjectSystemProjectFactory.ProjectUpdateState.cs (1)
103if (projects.IsEmpty)
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
77if (!arguments.IsEmpty)
Workspace\Solution\ProjectState.cs (8)
886if (documents.IsEmpty) 898if (documents.IsEmpty) 910if (documents.IsEmpty) 941if (documentIds.IsEmpty) 954if (documentIds.IsEmpty) 964if (documentIds.IsEmpty) 990Contract.ThrowIfTrue(oldDocuments.IsEmpty); 1016Contract.ThrowIfTrue(oldDocuments.IsEmpty);
Workspace\Solution\SolutionCompilationState.cs (4)
877if (newDocumentStates.IsEmpty) 1391if (documents.IsEmpty) 1765if (documentInfos.IsEmpty) 1784if (documentIds.IsEmpty)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (1)
271if (projectReferenceInfos.IsEmpty)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (6)
MSBuild\ProjectFile\ProjectFile.cs (2)
409if (!aliases.IsEmpty) 487if (!reference.Aliases.IsEmpty)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (4)
423if (array.IsEmpty) 441if (array.IsEmpty) 519if (self.IsEmpty) 1111if (items.IsEmpty)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Options\OptionsTestHelpers.cs (3)
136ImmutableArray<bool> array => array.IsEmpty ? ImmutableArray.Create(true) : [], 138ImmutableArray<int> array => array.IsEmpty ? ImmutableArray.Create(1) : [], 139ImmutableArray<long> array => array.IsEmpty ? ImmutableArray.Create(1L) : [],
Microsoft.CodeAnalysis.Workspaces.UnitTests (21)
SolutionTests\DocumentInfoTests.cs (3)
78Assert.True(((ImmutableArray<string>)info2.Folders).IsEmpty); 81Assert.True(((ImmutableArray<string>)info3.Folders).IsEmpty); 84Assert.True(((ImmutableArray<string>)info4.Folders).IsEmpty);
SolutionTests\ProjectInfoTests.cs (15)
80Assert.True(((ImmutableArray<DocumentInfo>)info2.Documents).IsEmpty); 83Assert.True(((ImmutableArray<DocumentInfo>)info3.Documents).IsEmpty); 86Assert.True(((ImmutableArray<DocumentInfo>)info4.Documents).IsEmpty); 99Assert.True(((ImmutableArray<DocumentInfo>)info2.AdditionalDocuments).IsEmpty); 102Assert.True(((ImmutableArray<DocumentInfo>)info3.AdditionalDocuments).IsEmpty); 105Assert.True(((ImmutableArray<DocumentInfo>)info4.AdditionalDocuments).IsEmpty); 118Assert.True(((ImmutableArray<ProjectReference>)info2.ProjectReferences).IsEmpty); 121Assert.True(((ImmutableArray<ProjectReference>)info3.ProjectReferences).IsEmpty); 124Assert.True(((ImmutableArray<ProjectReference>)info4.ProjectReferences).IsEmpty); 137Assert.True(((ImmutableArray<MetadataReference>)info2.MetadataReferences).IsEmpty); 140Assert.True(((ImmutableArray<MetadataReference>)info3.MetadataReferences).IsEmpty); 143Assert.True(((ImmutableArray<MetadataReference>)info4.MetadataReferences).IsEmpty); 156Assert.True(((ImmutableArray<AnalyzerReference>)info2.AnalyzerReferences).IsEmpty); 159Assert.True(((ImmutableArray<AnalyzerReference>)info3.AnalyzerReferences).IsEmpty); 162Assert.True(((ImmutableArray<AnalyzerReference>)info4.AnalyzerReferences).IsEmpty);
SolutionTests\SolutionInfoTests.cs (3)
38Assert.True(((ImmutableArray<ProjectInfo>)info2.Projects).IsEmpty); 41Assert.True(((ImmutableArray<ProjectInfo>)info3.Projects).IsEmpty); 44Assert.True(((ImmutableArray<ProjectInfo>)info4.Projects).IsEmpty);
Microsoft.Extensions.Options.SourceGeneration (2)
ParserUtilities.cs (2)
83property.Kind == SymbolKind.Property && !property.IsStatic && property.GetMethod != null && property.Parameters.IsEmpty)) 97!property.IsStatic && property.GetMethod != null && property.Parameters.IsEmpty))
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Gen.ContextualOptions (3)
Parser.cs (3)
65if (type.OptionsContextProperties.IsEmpty) 84.Where(prop => prop.Parameters.IsEmpty) 85.Where(prop => prop.ExplicitInterfaceImplementations.IsEmpty)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
475if (diags.IsEmpty)
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
51if (comInterfaceAttribute.ConstructorArguments.IsEmpty)
ComInterfaceGenerator.cs (1)
429if (interfaces.IsEmpty)
VirtualMethodPointerStubGenerator.cs (2)
110FunctionPointerCallingConvention(Token(SyntaxKind.UnmanagedKeyword), callConv.IsEmpty ? null : FunctionPointerUnmanagedCallingConventionList(SeparatedList(callConv))), 280FunctionPointerCallingConvention(Token(SyntaxKind.UnmanagedKeyword), callConv.IsEmpty ? null : FunctionPointerUnmanagedCallingConventionList(SeparatedList(callConv))),
Microsoft.Interop.JavaScript.JSImportGenerator (4)
JSExportGenerator.cs (3)
66if (data.Right.IsEmpty // no attributed methods 117if (generatedSources.IsEmpty) 225if (methods.IsEmpty) return NamespaceDeclaration(IdentifierName(generatedNamespace));
JSImportGenerator.cs (1)
67if (data.Right.IsEmpty // no attributed methods
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
77if (data.Right.IsEmpty // no attributed methods 371if (!forwardedAttributes.IsEmpty)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
265if (!forwardedAttributes.IsEmpty)
Microsoft.Interop.SourceGeneration (17)
IncrementalGeneratorInitializationContextExtensions.cs (3)
28.Select((topLevelAttrs, ct) => !topLevelAttrs.IsEmpty ? EnvironmentFlags.SkipLocalsInit : EnvironmentFlags.None); 40.Select((topLevelAttrs, ct) => !topLevelAttrs.IsEmpty ? EnvironmentFlags.DisableRuntimeMarshalling : EnvironmentFlags.None); 82if (generatedSources.IsEmpty)
ManagedToNativeStubGenerator.cs (9)
112bool shouldInitializeVariables = !statements.GuaranteedUnmarshal.IsEmpty || !statements.CleanupCallerAllocated.IsEmpty || !statements.CleanupCalleeAllocated.IsEmpty; 126if (!(statements.GuaranteedUnmarshal.IsEmpty && statements.CleanupCalleeAllocated.IsEmpty)) 155if (!(statements.GuaranteedUnmarshal.IsEmpty && statements.CleanupCalleeAllocated.IsEmpty)) 166if (!(statements.GuaranteedUnmarshal.IsEmpty && statements.CleanupCalleeAllocated.IsEmpty))
SyntaxExtensions.cs (1)
52if (!fixedStatements.IsEmpty)
UnmanagedToManagedStubGenerator.cs (4)
56Debug.Assert(statements.CleanupCalleeAllocated.IsEmpty); 59!statements.GuaranteedUnmarshal.IsEmpty 60|| !statements.CleanupCallerAllocated.IsEmpty 61|| !statements.ManagedExceptionCatchClauses.IsEmpty;
Microsoft.ML.InternalCodeAnalyzer (1)
InstanceInitializerAnalyzer.cs (1)
69if (syntaxRefs.IsEmpty)
Microsoft.VisualStudio.LanguageServices (8)
InheritanceMargin\InheritanceGlyphFactory.cs (1)
81Contract.ThrowIfTrue(membersOnLine.IsEmpty);
InheritanceMargin\InheritanceMarginTag.cs (1)
39Contract.ThrowIfTrue(membersOnLine.IsEmpty);
Library\ObjectBrowser\ObjectList.cs (1)
445if (typeSymbol.TypeKind == TypeKind.Interface && typeSymbol.Interfaces.IsEmpty)
Progression\GraphQueries\InheritsGraphQuery.cs (1)
42else if (namedType.TypeKind == TypeKind.Interface && !namedType.OriginalDefinition.AllInterfaces.IsEmpty)
SyncNamespaces\SyncNamespacesCommandHandler.cs (1)
126if (projects.IsEmpty)
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
127referenceUpdates.IsEmpty)
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
78if (children.IsEmpty)
Workspace\VisualStudioDocumentNavigationService.cs (1)
221if (!documentIdsForFilePath.IsEmpty)
Roslyn.Diagnostics.Analyzers (24)
ImportingConstructorShouldBeObsolete.cs (1)
122if (attributeData.ConstructorArguments.IsEmpty)
SpecializedEnumerableCreationAnalyzer.cs (1)
85!genericEmptyEnumerableSymbol.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Roslyn.Diagnostics.CSharp.Analyzers (1)
CSharpAvoidOptSuffixForNullableEnableCodeCodeFixProvider.cs (1)
54if (semanticModel.LookupSymbols(diagnostic.Location.SourceSpan.Start, variableSymbol.ContainingType, newName).IsEmpty)
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
361if (patterns.IsEmpty)
System.Collections.Immutable (14)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
305if (items.IsEmpty)
System\Collections\Immutable\ImmutableArray_1.cs (13)
206if (self.IsEmpty) 223if (self.IsEmpty && startIndex == 0) 319if (self.IsEmpty) 352if (self.IsEmpty) 405if (self.IsEmpty) 409if (items.IsEmpty) 425if (self.IsEmpty) 461else if (self.IsEmpty) 754if (self.IsEmpty) 938if (self.IsEmpty) 962if (self.IsEmpty) 985if (items.IsEmpty || self.IsEmpty) 1511Debug.Assert(!IsEmpty);
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\SourceGenerators\TypeModelHelper.cs (1)
31if (!current.TypeArguments.IsEmpty)
Test.Utilities (18)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)
Text.Analyzers (22)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
63Debug.Assert(!child.Children.IsEmpty);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (1)
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
69int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (1)
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (11)
77method.Parameters.IsEmpty && 90method.Parameters.IsEmpty && 123if (method.Name != WellKnownMemberNames.DestructorName || !method.Parameters.IsEmpty || !method.ReturnsVoid) 198method.Parameters.IsEmpty && 220method.Parameters.IsEmpty && 230method.ReturnsVoid && method.Parameters.IsEmpty; 266method.ReturnsVoid && method.Parameters.IsEmpty; 273=> taskType != null && method.Parameters.IsEmpty && method.Name == "CloseAsync" && 286method.Parameters.IsEmpty && 659!method.Parameters.IsEmpty && 813if (!methodSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (1)
38else if (invocation.TargetMethod.IsExtensionMethod && !invocation.TargetMethod.Parameters.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IPropertySymbolExtensions.cs (1)
48if (!propertySymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\ISymbolExtensions.cs (4)
72return symbol.IsConstructor() && symbol.GetParameters().IsEmpty; 568if (symbol is IMethodSymbol methodSymbol && !methodSymbol.ExplicitInterfaceImplementations.IsEmpty) 573if (symbol is IPropertySymbol propertySymbol && !propertySymbol.ExplicitInterfaceImplementations.IsEmpty) 578if (symbol is IEventSymbol eventSymbol && !eventSymbol.ExplicitInterfaceImplementations.IsEmpty)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
84if (symbolNames.IsEmpty)