2 instantiations of CodeWriter
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\CodeGeneration\CodeRenderingContext.cs (1)
67
CodeWriter = new
CodeWriter
(options);
Language\RazorHtmlWriter.cs (1)
44
using var codeWriter = new
CodeWriter
(options);
165 references to CodeWriter
Microsoft.CodeAnalysis.Razor.Compiler (165)
Language\CodeGeneration\CodeRenderingContext.cs (1)
18
public
CodeWriter
CodeWriter { get; }
Language\CodeGeneration\CodeRenderingContextExtensions.cs (4)
55
var
writer = context.CodeWriter;
67
var
writer = context.CodeWriter;
91
private static (int originalIndent, bool ensureBackSlashes) WritePreamble(
CodeWriter
writer, RazorCodeGenerationOptions options)
118
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 (112)
68
public static bool IsAtBeginningOfLine(this
CodeWriter
writer)
73
public static void EnsureNewLine(this
CodeWriter
writer)
81
public static
CodeWriter
WritePadding(this
CodeWriter
writer, int offset, SourceSpan? span, CodeRenderingContext context)
123
public static
CodeWriter
WriteVariableDeclaration(this
CodeWriter
writer, string type, string name, string value)
140
public static
CodeWriter
WriteBooleanLiteral(this
CodeWriter
writer, bool value)
163
public static
CodeWriter
WriteIntegerLiteral(this
CodeWriter
writer, int value)
247
public static
CodeWriter
WriteStartAssignment(
248
this
CodeWriter
writer,
249
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler left)
254
public static
CodeWriter
WriteStartAssignment(this
CodeWriter
writer, string left)
259
public static
CodeWriter
WriteParameterSeparator(this
CodeWriter
writer)
264
public static
CodeWriter
WriteStartNewObject(this
CodeWriter
writer, string typeName)
269
public static
CodeWriter
WriteStringLiteral(this
CodeWriter
writer, string literal, bool utf8 = false)
272
public static
CodeWriter
WriteStringLiteral(this
CodeWriter
writer, ReadOnlyMemory<char> literal, bool utf8 = false)
286
public static
CodeWriter
WriteUsing(this
CodeWriter
writer, string name)
291
public static
CodeWriter
WriteUsing(this
CodeWriter
writer, string name, bool endLine)
304
public static
CodeWriter
WriteEnhancedLineNumberDirective(this
CodeWriter
writer, SourceSpan span, int characterOffset, bool ensurePathBackslashes)
326
public static
CodeWriter
WriteLineNumberDirective(this
CodeWriter
writer, SourceSpan span, bool ensurePathBackslashes)
341
public static
CodeWriter
WriteFilePath(this
CodeWriter
writer, string filePath, bool ensurePathBackslashes)
375
private static
CodeWriter
WriteEscapedFilePath(this
CodeWriter
writer, ReadOnlyMemory<char> filePathMemory)
400
public static
CodeWriter
WriteStartMethodInvocation(this
CodeWriter
writer, string methodName)
407
public static
CodeWriter
WriteStartMethodInvocation(
408
this
CodeWriter
writer,
409
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName)
416
public static
CodeWriter
WriteEndMethodInvocation(this
CodeWriter
writer)
421
public static
CodeWriter
WriteEndMethodInvocation(this
CodeWriter
writer, bool endLine)
433
public static
CodeWriter
WriteInstanceMethodInvocation(
434
this
CodeWriter
writer,
441
public static
CodeWriter
WriteInstanceMethodInvocation(
442
this
CodeWriter
writer,
449
public static
CodeWriter
WriteStartInstanceMethodInvocation(this
CodeWriter
writer, string instanceName, string methodName)
454
public static
CodeWriter
WriteFieldDeclaration(
455
this
CodeWriter
writer,
468
private static
CodeWriter
WriteModifierList(this
CodeWriter
writer, ImmutableArray<string> modifiers)
483
public static
CodeWriter
WriteField(
484
this
CodeWriter
writer,
513
public static
CodeWriter
WriteMethodInvocation(this
CodeWriter
writer, string methodName, params ImmutableArray<string> arguments)
516
public static
CodeWriter
WriteMethodInvocation(
517
this
CodeWriter
writer,
518
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName,
522
public static
CodeWriter
WriteMethodInvocation(this
CodeWriter
writer, string methodName, bool endLine, params ImmutableArray<string> arguments)
528
public static
CodeWriter
WriteMethodInvocation(
529
this
CodeWriter
writer,
530
[InterpolatedStringHandlerArgument(nameof(writer))] ref
CodeWriter
.WriteInterpolatedStringHandler methodName,
538
public static
CodeWriter
WritePropertyDeclaration(
539
this
CodeWriter
writer,
553
public static
CodeWriter
WriteAutoPropertyDeclaration(
554
this
CodeWriter
writer,
584
CodeWriter
writer,
598
static void WriteToken(
CodeWriter
writer, string content, SourceSpan? span, CodeRenderingContext context)
617
public static
CodeWriter
WriteIdentifierEscapeIfNeeded(this
CodeWriter
writer, string identifier)
632
public static CSharpCodeWritingScope BuildScope(this
CodeWriter
writer)
637
public static CSharpCodeWritingScope BuildLambda(this
CodeWriter
writer)
640
public static CSharpCodeWritingScope BuildLambda(this
CodeWriter
writer, string parameterName)
643
public static CSharpCodeWritingScope BuildLambda<T>(this
CodeWriter
writer, T parameterName)
647
public static CSharpCodeWritingScope BuildAsyncLambda(this
CodeWriter
writer)
650
public static CSharpCodeWritingScope BuildAsyncLambda(this
CodeWriter
writer, string parameterName)
653
public static CSharpCodeWritingScope BuildAsyncLambda<T>(this
CodeWriter
writer, T parameterName)
657
public static
CodeWriter
WriteLambdaHeader(this
CodeWriter
writer)
660
public static
CodeWriter
WriteLambdaHeader(this
CodeWriter
writer, string parameterName)
663
public static
CodeWriter
WriteLambdaHeader<T>(this
CodeWriter
writer, T parameterName)
673
public static
CodeWriter
WriteAsyncLambdaHeader(this
CodeWriter
writer)
676
public static
CodeWriter
WriteAsyncLambdaHeader(this
CodeWriter
writer, string parameterName)
679
public static
CodeWriter
WriteAsyncLambdaHeader<T>(this
CodeWriter
writer, T parameterName)
690
public static CSharpCodeWritingScope BuildNamespace(this
CodeWriter
writer, string? name, SourceSpan? span, CodeRenderingContext context)
715
this
CodeWriter
writer,
830
var
writer = context.CodeWriter;
840
this
CodeWriter
writer,
857
this
CodeWriter
writer,
876
public static
CodeWriter
WriteCommaSeparatedList(this
CodeWriter
writer, ImmutableArray<string> items)
879
public static
CodeWriter
WriteCommaSeparatedList<T>(this
CodeWriter
writer, ImmutableArray<T> items, Action<
CodeWriter
, T> elementWriter)
882
public static
CodeWriter
WriteSeparatedList(this
CodeWriter
writer, string separator, ImmutableArray<string> items)
903
public static
CodeWriter
WriteSeparatedList<T>(this
CodeWriter
writer, string separator, ImmutableArray<T> items, Action<
CodeWriter
, T> elementWriter)
924
public static void WriteVerbatimStringLiteral(this
CodeWriter
writer, ReadOnlyMemory<char> literal, bool utf8 = false)
958
private static void WriteCStyleStringLiteral(
CodeWriter
writer, ReadOnlyMemory<char> literal, bool utf8 = false)
1021
private readonly
CodeWriter
_writer;
1027
public CSharpCodeWritingScope(
CodeWriter
writer, bool autoSpace = true, bool writeBraces = true)
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
433
var
writer = context.CodeWriter;
Language\CodeGeneration\IWriteableValue.cs (1)
11
void WriteTo(
CodeWriter
writer);
Language\Components\BuilderVariableName.cs (1)
23
public void WriteTo(
CodeWriter
writer)
Language\Components\ComponentNodeWriter.cs (10)
109
var
writer = context.CodeWriter;
344
static void writeConstraints(
CodeWriter
writer, ComponentTypeInferenceMethodIntermediateNode node)
579
public void WriteTo(
CodeWriter
writer)
592
public void WriteTo(
CodeWriter
writer)
613
public void WriteTo(
CodeWriter
writer)
1415
static void QualifyEventCallback(
CodeWriter
codeWriter, string typeName, bool? explicitType)
1536
var
codeWriter = context.CodeWriter;
1568
var
writer = context.CodeWriter;
1606
var
codeWriter = context.CodeWriter;
1749
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\Extensions\DefaultTagHelperTargetExtension.cs (4)
509
private static
CodeWriter
WritePropertyAccessor(
CodeWriter
writer, DefaultTagHelperPropertyIntermediateNode node)
525
private static
CodeWriter
WritePropertyAccessorStartAssignment(
CodeWriter
writer, DefaultTagHelperPropertyIntermediateNode node)
Language\Intermediate\DocumentationIntermediateNode.cs (1)
44
var
writer = context.CodeWriter;
Language\RazorCSharpDocumentWriter.cs (4)
105
private
CodeWriter
CodeWriter => _context.CodeWriter;
113
var
writer = CodeWriter;
177
var
writer = CodeWriter;
230
var
writer = CodeWriter;
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)