34 instantiations of CodeWriter
Microsoft.AspNetCore.Razor.Language.UnitTests (32)
CodeGeneration\CSharpCodeWriterTest.cs (32)
34
using var writer = new
CodeWriter
();
50
using var writer = new
CodeWriter
();
67
using var writer = new
CodeWriter
();
85
using var writer = new
CodeWriter
();
106
using var writer = new
CodeWriter
();
126
using var writer = new
CodeWriter
();
146
using var writer = new
CodeWriter
();
166
using var writer = new
CodeWriter
();
187
using var writer = new
CodeWriter
();
208
using var writer = new
CodeWriter
();
229
using var writer = new
CodeWriter
();
250
using var writer = new
CodeWriter
();
271
using var writer = new
CodeWriter
();
289
using var writer = new
CodeWriter
();
304
using var writer = new
CodeWriter
();
325
using var writer = new
CodeWriter
();
346
using var writer = new
CodeWriter
();
372
using var writer = new
CodeWriter
();
389
using var writer = new
CodeWriter
();
410
using var writer = new
CodeWriter
(options);
434
using var writer = new
CodeWriter
(options);
496
using var writer = new
CodeWriter
();
516
using var writer = new
CodeWriter
();
536
using var writer = new
CodeWriter
();
557
using var writer = new
CodeWriter
();
577
using var writer = new
CodeWriter
();
596
using var writer = new
CodeWriter
();
620
using var writer = new
CodeWriter
();
638
using var writer = new
CodeWriter
();
653
using var writer = new
CodeWriter
();
667
using var writer = new
CodeWriter
();
681
using var writer = new
CodeWriter
();
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\CodeGeneration\CodeRenderingContext.cs (1)
63
CodeWriter = new
CodeWriter
(options);
Language\RazorHtmlWriter.cs (1)
44
using var codeWriter = new
CodeWriter
(options);
205 references to CodeWriter
Microsoft.AspNetCore.Razor.Language.UnitTests (35)
CodeGeneration\CSharpCodeWriterTest.cs (34)
34
using
var
writer = new CodeWriter();
50
using
var
writer = new CodeWriter();
67
using
var
writer = new CodeWriter();
85
using
var
writer = new CodeWriter();
106
using
var
writer = new CodeWriter();
126
using
var
writer = new CodeWriter();
146
using
var
writer = new CodeWriter();
166
using
var
writer = new CodeWriter();
187
using
var
writer = new CodeWriter();
208
using
var
writer = new CodeWriter();
229
using
var
writer = new CodeWriter();
250
using
var
writer = new CodeWriter();
271
using
var
writer = new CodeWriter();
289
using
var
writer = new CodeWriter();
304
using
var
writer = new CodeWriter();
325
using
var
writer = new CodeWriter();
346
using
var
writer = new CodeWriter();
372
using
var
writer = new CodeWriter();
389
using
var
writer = new CodeWriter();
410
using
var
writer = new CodeWriter(options);
434
using
var
writer = new CodeWriter(options);
458
var testReader =
CodeWriter
.GetTestTextReader(pages);
481
var testReader =
CodeWriter
.GetTestTextReader(pages);
496
using
var
writer = new CodeWriter();
516
using
var
writer = new CodeWriter();
536
using
var
writer = new CodeWriter();
557
using
var
writer = new CodeWriter();
577
using
var
writer = new CodeWriter();
596
using
var
writer = new CodeWriter();
620
using
var
writer = new CodeWriter();
638
using
var
writer = new CodeWriter();
653
using
var
writer = new CodeWriter();
667
using
var
writer = new CodeWriter();
681
using
var
writer = new CodeWriter();
CodeGeneration\IndentCacheTests.cs (1)
6
using IndentCache = Microsoft.AspNetCore.Razor.Language.CodeGeneration.
CodeWriter
.IndentCache;
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\CodeGeneration\TestCodeRenderingContext.cs (1)
68
private class RenderChildrenVisitor(
CodeWriter
writer) : IntermediateNodeVisitor
Microsoft.CodeAnalysis.Razor.Compiler (169)
Language\CodeGeneration\CodeRenderingContext.cs (1)
18
public
CodeWriter
CodeWriter { get; }
Language\CodeGeneration\CodeRenderingContextExtensions.cs (4)
58
var
writer = context.CodeWriter;
70
var
writer = context.CodeWriter;
94
private static (int originalIndent, bool ensureBackSlashes) WritePreamble(
CodeWriter
writer, RazorCodeGenerationOptions options)
121
var
writer = _context.CodeWriter;
Language\CodeGeneration\CodeWriter.cs (11)
182
public
CodeWriter
Indent(int size)
202
public
CodeWriter
Write(string value)
209
public
CodeWriter
Write(ReadOnlyMemory<char> value)
212
public
CodeWriter
Write(string value, int startIndex, int count)
222
internal
CodeWriter
Write<T>(T value)
230
public
CodeWriter
Write([InterpolatedStringHandlerArgument("")] ref WriteInterpolatedStringHandler handler)
234
private
CodeWriter
WriteCore(ReadOnlyMemory<char> value, bool allowIndent = true)
290
public
CodeWriter
WriteLine()
293
public
CodeWriter
WriteLine(ReadOnlyMemory<char> value)
296
public
CodeWriter
WriteLine(string value)
303
public
CodeWriter
WriteLine([InterpolatedStringHandlerArgument("")] ref WriteInterpolatedStringHandler handler)
Language\CodeGeneration\CodeWriter.WriteInterpolatedStringHandler.cs (2)
18
private readonly
CodeWriter
_writer;
20
public WriteInterpolatedStringHandler(int literalLength, int formattedCount,
CodeWriter
writer)
Language\CodeGeneration\CodeWriterExtensions.cs (110)
67
public static bool IsAtBeginningOfLine(this
CodeWriter
writer)
72
public static void EnsureNewLine(this
CodeWriter
writer)
80
public static
CodeWriter
WritePadding(this
CodeWriter
writer, int offset, SourceSpan? span, CodeRenderingContext context)
122
public static
CodeWriter
WriteVariableDeclaration(this
CodeWriter
writer, string type, string name, string value)
139
public static
CodeWriter
WriteBooleanLiteral(this
CodeWriter
writer, bool value)
162
public static
CodeWriter
WriteIntegerLiteral(this
CodeWriter
writer, int value)
246
public static
CodeWriter
WriteStartAssignment(
247
this
CodeWriter
writer,
248
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler left)
253
public static
CodeWriter
WriteStartAssignment(this
CodeWriter
writer, string left)
258
public static
CodeWriter
WriteParameterSeparator(this
CodeWriter
writer)
263
public static
CodeWriter
WriteStartNewObject(this
CodeWriter
writer, string typeName)
268
public static
CodeWriter
WriteStringLiteral(this
CodeWriter
writer, string literal)
271
public static
CodeWriter
WriteStringLiteral(this
CodeWriter
writer, ReadOnlyMemory<char> literal)
285
public static
CodeWriter
WriteUsing(this
CodeWriter
writer, string name)
290
public static
CodeWriter
WriteUsing(this
CodeWriter
writer, string name, bool endLine)
303
public static
CodeWriter
WriteEnhancedLineNumberDirective(this
CodeWriter
writer, SourceSpan span, int characterOffset, bool ensurePathBackslashes)
325
public static
CodeWriter
WriteLineNumberDirective(this
CodeWriter
writer, SourceSpan span, bool ensurePathBackslashes)
340
private static
CodeWriter
WriteFilePath(this
CodeWriter
writer, string filePath, bool ensurePathBackslashes)
368
public static
CodeWriter
WriteStartMethodInvocation(this
CodeWriter
writer, string methodName)
375
public static
CodeWriter
WriteStartMethodInvocation(
376
this
CodeWriter
writer,
377
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName)
384
public static
CodeWriter
WriteEndMethodInvocation(this
CodeWriter
writer)
389
public static
CodeWriter
WriteEndMethodInvocation(this
CodeWriter
writer, bool endLine)
401
public static
CodeWriter
WriteInstanceMethodInvocation(
402
this
CodeWriter
writer,
409
public static
CodeWriter
WriteInstanceMethodInvocation(
410
this
CodeWriter
writer,
417
public static
CodeWriter
WriteStartInstanceMethodInvocation(this
CodeWriter
writer, string instanceName, string methodName)
422
public static
CodeWriter
WriteFieldDeclaration(
423
this
CodeWriter
writer,
436
private static
CodeWriter
WriteModifierList(this
CodeWriter
writer, ImmutableArray<string> modifiers)
451
public static
CodeWriter
WriteField(
452
this
CodeWriter
writer,
481
public static
CodeWriter
WriteMethodInvocation(this
CodeWriter
writer, string methodName, params ImmutableArray<string> arguments)
484
public static
CodeWriter
WriteMethodInvocation(
485
this
CodeWriter
writer,
486
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName,
490
public static
CodeWriter
WriteMethodInvocation(this
CodeWriter
writer, string methodName, bool endLine, params ImmutableArray<string> arguments)
496
public static
CodeWriter
WriteMethodInvocation(
497
this
CodeWriter
writer,
498
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName,
506
public static
CodeWriter
WritePropertyDeclaration(
507
this
CodeWriter
writer,
521
public static
CodeWriter
WriteAutoPropertyDeclaration(
522
this
CodeWriter
writer,
552
CodeWriter
writer,
566
static void WriteToken(
CodeWriter
writer, string content, SourceSpan? span, CodeRenderingContext context)
585
public static
CodeWriter
WriteIdentifierEscapeIfNeeded(this
CodeWriter
writer, string identifier)
600
public static CSharpCodeWritingScope BuildScope(this
CodeWriter
writer)
605
public static CSharpCodeWritingScope BuildLambda(this
CodeWriter
writer)
608
public static CSharpCodeWritingScope BuildLambda(this
CodeWriter
writer, string parameterName)
611
public static CSharpCodeWritingScope BuildLambda<T>(this
CodeWriter
writer, T parameterName)
615
public static CSharpCodeWritingScope BuildAsyncLambda(this
CodeWriter
writer)
618
public static CSharpCodeWritingScope BuildAsyncLambda(this
CodeWriter
writer, string parameterName)
621
public static CSharpCodeWritingScope BuildAsyncLambda<T>(this
CodeWriter
writer, T parameterName)
625
public static
CodeWriter
WriteLambdaHeader(this
CodeWriter
writer)
628
public static
CodeWriter
WriteLambdaHeader(this
CodeWriter
writer, string parameterName)
631
public static
CodeWriter
WriteLambdaHeader<T>(this
CodeWriter
writer, T parameterName)
641
public static
CodeWriter
WriteAsyncLambdaHeader(this
CodeWriter
writer)
644
public static
CodeWriter
WriteAsyncLambdaHeader(this
CodeWriter
writer, string parameterName)
647
public static
CodeWriter
WriteAsyncLambdaHeader<T>(this
CodeWriter
writer, T parameterName)
658
public static CSharpCodeWritingScope BuildNamespace(this
CodeWriter
writer, string? name, SourceSpan? span, CodeRenderingContext context)
683
this
CodeWriter
writer,
798
var
writer = context.CodeWriter;
819
this
CodeWriter
writer,
836
this
CodeWriter
writer,
855
public static
CodeWriter
WriteCommaSeparatedList(this
CodeWriter
writer, ImmutableArray<string> items)
858
public static
CodeWriter
WriteCommaSeparatedList<T>(this
CodeWriter
writer, ImmutableArray<T> items, Action<
CodeWriter
, T> elementWriter)
861
public static
CodeWriter
WriteSeparatedList(this
CodeWriter
writer, string separator, ImmutableArray<string> items)
882
public static
CodeWriter
WriteSeparatedList<T>(this
CodeWriter
writer, string separator, ImmutableArray<T> items, Action<
CodeWriter
, T> elementWriter)
903
private static void WriteVerbatimStringLiteral(
CodeWriter
writer, ReadOnlyMemory<char> literal)
932
private static void WriteCStyleStringLiteral(
CodeWriter
writer, ReadOnlyMemory<char> literal)
990
private readonly
CodeWriter
_writer;
996
public CSharpCodeWritingScope(
CodeWriter
writer, bool autoSpace = true, bool writeBraces = true)
Language\CodeGeneration\DesignTimeNodeWriter.cs (2)
106
var
writer = context.CodeWriter;
202
var
writer = context.CodeWriter;
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
93
var
writer = context.CodeWriter;
Language\CodeGeneration\IWriteableValue.cs (2)
7
/// A type that can write itself to a <see cref="
CodeWriter
"/>.
11
void WriteTo(
CodeWriter
writer);
Language\Components\BuilderVariableName.cs (1)
23
public void WriteTo(
CodeWriter
writer)
Language\Components\ComponentDesignTimeNodeWriter.cs (4)
190
var
writer = context.CodeWriter;
862
static void QualifyEventCallback(
CodeWriter
codeWriter, string typeName, bool? explicitType)
998
var
codeWriter = context.CodeWriter;
1030
var
writer = context.CodeWriter;
Language\Components\ComponentNodeWriter.cs (5)
111
var
writer = context.CodeWriter;
346
static void writeConstraints(
CodeWriter
writer, ComponentTypeInferenceMethodIntermediateNode node)
581
public void WriteTo(
CodeWriter
writer)
594
public void WriteTo(
CodeWriter
writer)
615
public void WriteTo(
CodeWriter
writer)
Language\Components\ComponentRuntimeNodeWriter.cs (5)
770
static void QualifyEventCallback(
CodeWriter
codeWriter, string typeName, bool? explicitType)
891
var
codeWriter = context.CodeWriter;
923
var
writer = context.CodeWriter;
961
var
codeWriter = context.CodeWriter;
1104
var
writer = context.CodeWriter;
Language\Components\FormNameVariableName.cs (1)
17
public void WriteTo(
CodeWriter
writer)
Language\Components\RenderModeVariableName.cs (1)
17
public void WriteTo(
CodeWriter
writer)
Language\Components\TypeNameHelper.cs (3)
71
public static void WriteGloballyQualifiedName(
CodeWriter
codeWriter, string typeName)
81
internal static void WriteGloballyQualifiedName(
CodeWriter
codeWriter, ReadOnlyMemory<char> typeName)
90
internal static void WriteGlobalPrefixIfNeeded(
CodeWriter
codeWriter, ReadOnlyMemory<char> typeName)
Language\DefaultRazorCSharpLoweringPhase.cs (4)
69
private
CodeWriter
CodeWriter => _context.CodeWriter;
77
var
writer = CodeWriter;
139
var
writer = CodeWriter;
192
var
writer = CodeWriter;
Language\Extensions\DefaultTagHelperTargetExtension.cs (4)
644
private static
CodeWriter
WritePropertyAccessor(
CodeWriter
writer, DefaultTagHelperPropertyIntermediateNode node)
660
private static
CodeWriter
WritePropertyAccessorStartAssignment(
CodeWriter
writer, DefaultTagHelperPropertyIntermediateNode node)
Language\RazorHtmlWriter.cs (3)
22
private readonly
CodeWriter
_codeWriter;
32
private RazorHtmlWriter(RazorSourceDocument source,
CodeWriter
codeWriter)
44
using
var
codeWriter = new CodeWriter(options);
Mvc\ViewComponentTagHelperTargetExtension.cs (1)
43
private void WriteProcessInvokeAsyncArgsMethodString(
CodeWriter
writer, TagHelperDescriptor tagHelper)
Mvc\ViewComponentTagHelperTargetExtensionBase.cs (4)
87
private static void WriteTargetElementString(
CodeWriter
writer, TagHelperDescriptor tagHelper)
99
private void WriteConstructorString(
CodeWriter
writer, string className)
108
private static void WriteAttributeDeclarations(
CodeWriter
writer, TagHelperDescriptor tagHelper)
137
private void WriteProcessMethodString(
CodeWriter
writer, TagHelperDescriptor tagHelper)