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