1 implementation of Initializer
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
6047public IArrayInitializerOperation? Initializer { get; }
19 references to Initializer
ILLink.RoslynAnalyzer (2)
TrimAnalysis\TrimAnalysisVisitor.cs (2)
106 if (operation.Initializer?.ElementValues.Length >= MaxTrackedArrayValues) 110 var elements = operation.Initializer?.ElementValues.Select (val => Visit (val, state)).ToArray () ?? System.Array.Empty<MultiValue> ();
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
402foreach (var e in arrayCreation.Initializer!.ElementValues) 451foreach (var e in arrayCreation.Initializer!.ElementValues) 507foreach (var e in arrayCreation.Initializer!.ElementValues)
Microsoft.CodeAnalysis (3)
Operations\ControlFlowGraphBuilder.cs (3)
6307Debug.Assert(array.Initializer is not null); 6309foreach (var element in array.Initializer.ElementValues) 6488var visitedInitializer = (IArrayInitializerOperation?)Visit(operation.Initializer);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
70if (arrayCreationOperation.Initializer is null) 91var elements = arrayCreationOperation.Initializer.ElementValues;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
120.Where(a => a.Initializer?.ElementValues.FirstOrDefault()?.Syntax.SpanStart == diagnostic.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (2)
70if (arrayCreationOperation.Initializer is null) 91var elements = arrayCreationOperation.Initializer.ElementValues;
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
120.Where(a => a.Initializer?.ElementValues.FirstOrDefault()?.Syntax.SpanStart == diagnostic.Location.SourceSpan.Start)
Microsoft.CodeAnalysis.Features (1)
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
504&& argumentExpressionOperation is IArrayCreationOperation { Initializer: { } initializer }
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\OperationTreeVerifier.cs (1)
1615Visit(operation.Initializer, "Initializer");
Compilation\TestOperationVisitor.cs (2)
1141if (operation.Initializer != null) 1143children = children.Concat(new[] { operation.Initializer });
Diagnostics\OperationTestAnalyzer.cs (1)
564var initializer = arrayArgument.Initializer;