2 instantiations of CodeWriter
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\CodeGeneration\CodeRenderingContext.cs (1)
63CodeWriter = new CodeWriter(options);
Language\RazorHtmlWriter.cs (1)
44using var codeWriter = new CodeWriter(options);
163 references to CodeWriter
Microsoft.CodeAnalysis.Razor.Compiler (163)
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 (110)
67public static bool IsAtBeginningOfLine(this CodeWriter writer) 72public static void EnsureNewLine(this CodeWriter writer) 80public static CodeWriter WritePadding(this CodeWriter writer, int offset, SourceSpan? span, CodeRenderingContext context) 122public static CodeWriter WriteVariableDeclaration(this CodeWriter writer, string type, string name, string value) 139public static CodeWriter WriteBooleanLiteral(this CodeWriter writer, bool value) 162public static CodeWriter WriteIntegerLiteral(this CodeWriter writer, int value) 246public static CodeWriter WriteStartAssignment( 247this CodeWriter writer, 248[InterpolatedStringHandlerArgument(nameof(writer))] ref CodeWriter.WriteInterpolatedStringHandler left) 253public static CodeWriter WriteStartAssignment(this CodeWriter writer, string left) 258public static CodeWriter WriteParameterSeparator(this CodeWriter writer) 263public static CodeWriter WriteStartNewObject(this CodeWriter writer, string typeName) 268public static CodeWriter WriteStringLiteral(this CodeWriter writer, string literal, bool utf8 = false) 271public static CodeWriter WriteStringLiteral(this CodeWriter writer, ReadOnlyMemory<char> literal, bool utf8 = false) 285public static CodeWriter WriteUsing(this CodeWriter writer, string name) 290public static CodeWriter WriteUsing(this CodeWriter writer, string name, bool endLine) 303public static CodeWriter WriteEnhancedLineNumberDirective(this CodeWriter writer, SourceSpan span, int characterOffset, bool ensurePathBackslashes) 325public static CodeWriter WriteLineNumberDirective(this CodeWriter writer, SourceSpan span, bool ensurePathBackslashes) 340private static CodeWriter WriteFilePath(this CodeWriter writer, string filePath, bool ensurePathBackslashes) 368public static CodeWriter WriteStartMethodInvocation(this CodeWriter writer, string methodName) 375public static CodeWriter WriteStartMethodInvocation( 376this CodeWriter writer, 377[InterpolatedStringHandlerArgument(nameof(writer))] ref CodeWriter.WriteInterpolatedStringHandler methodName) 384public static CodeWriter WriteEndMethodInvocation(this CodeWriter writer) 389public static CodeWriter WriteEndMethodInvocation(this CodeWriter writer, bool endLine) 401public static CodeWriter WriteInstanceMethodInvocation( 402this CodeWriter writer, 409public static CodeWriter WriteInstanceMethodInvocation( 410this CodeWriter writer, 417public static CodeWriter WriteStartInstanceMethodInvocation(this CodeWriter writer, string instanceName, string methodName) 422public static CodeWriter WriteFieldDeclaration( 423this CodeWriter writer, 436private static CodeWriter WriteModifierList(this CodeWriter writer, ImmutableArray<string> modifiers) 451public static CodeWriter WriteField( 452this CodeWriter writer, 481public static CodeWriter WriteMethodInvocation(this CodeWriter writer, string methodName, params ImmutableArray<string> arguments) 484public static CodeWriter WriteMethodInvocation( 485this CodeWriter writer, 486[InterpolatedStringHandlerArgument(nameof(writer))] ref CodeWriter.WriteInterpolatedStringHandler methodName, 490public static CodeWriter WriteMethodInvocation(this CodeWriter writer, string methodName, bool endLine, params ImmutableArray<string> arguments) 496public static CodeWriter WriteMethodInvocation( 497this CodeWriter writer, 498[InterpolatedStringHandlerArgument(nameof(writer))] ref CodeWriter.WriteInterpolatedStringHandler methodName, 506public static CodeWriter WritePropertyDeclaration( 507this CodeWriter writer, 521public static CodeWriter WriteAutoPropertyDeclaration( 522this CodeWriter writer, 552CodeWriter writer, 566static void WriteToken(CodeWriter writer, string content, SourceSpan? span, CodeRenderingContext context) 585public static CodeWriter WriteIdentifierEscapeIfNeeded(this CodeWriter writer, string identifier) 600public static CSharpCodeWritingScope BuildScope(this CodeWriter writer) 605public static CSharpCodeWritingScope BuildLambda(this CodeWriter writer) 608public static CSharpCodeWritingScope BuildLambda(this CodeWriter writer, string parameterName) 611public static CSharpCodeWritingScope BuildLambda<T>(this CodeWriter writer, T parameterName) 615public static CSharpCodeWritingScope BuildAsyncLambda(this CodeWriter writer) 618public static CSharpCodeWritingScope BuildAsyncLambda(this CodeWriter writer, string parameterName) 621public static CSharpCodeWritingScope BuildAsyncLambda<T>(this CodeWriter writer, T parameterName) 625public static CodeWriter WriteLambdaHeader(this CodeWriter writer) 628public static CodeWriter WriteLambdaHeader(this CodeWriter writer, string parameterName) 631public static CodeWriter WriteLambdaHeader<T>(this CodeWriter writer, T parameterName) 641public static CodeWriter WriteAsyncLambdaHeader(this CodeWriter writer) 644public static CodeWriter WriteAsyncLambdaHeader(this CodeWriter writer, string parameterName) 647public static CodeWriter WriteAsyncLambdaHeader<T>(this CodeWriter writer, T parameterName) 658public static CSharpCodeWritingScope BuildNamespace(this CodeWriter writer, string? name, SourceSpan? span, CodeRenderingContext context) 683this CodeWriter writer, 798var writer = context.CodeWriter; 808this CodeWriter writer, 825this CodeWriter writer, 844public static CodeWriter WriteCommaSeparatedList(this CodeWriter writer, ImmutableArray<string> items) 847public static CodeWriter WriteCommaSeparatedList<T>(this CodeWriter writer, ImmutableArray<T> items, Action<CodeWriter, T> elementWriter) 850public static CodeWriter WriteSeparatedList(this CodeWriter writer, string separator, ImmutableArray<string> items) 871public static CodeWriter WriteSeparatedList<T>(this CodeWriter writer, string separator, ImmutableArray<T> items, Action<CodeWriter, T> elementWriter) 892private static void WriteVerbatimStringLiteral(CodeWriter writer, ReadOnlyMemory<char> literal, bool utf8 = false) 926private static void WriteCStyleStringLiteral(CodeWriter writer, ReadOnlyMemory<char> literal, bool utf8 = false) 989private readonly CodeWriter _writer; 995public CSharpCodeWritingScope(CodeWriter writer, bool autoSpace = true, bool writeBraces = true)
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
433var writer = context.CodeWriter;
Language\CodeGeneration\IWriteableValue.cs (2)
7/// A type that can write itself to a <see cref="CodeWriter"/>. 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) 1403static void QualifyEventCallback(CodeWriter codeWriter, string typeName, bool? explicitType) 1524var codeWriter = context.CodeWriter; 1556var writer = context.CodeWriter; 1594var codeWriter = context.CodeWriter; 1737var 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\DefaultRazorCSharpLoweringPhase.cs (4)
69private CodeWriter CodeWriter => _context.CodeWriter; 77var writer = CodeWriter; 139var writer = CodeWriter; 192var writer = CodeWriter;
Language\Extensions\DefaultTagHelperTargetExtension.cs (4)
501private static CodeWriter WritePropertyAccessor(CodeWriter writer, DefaultTagHelperPropertyIntermediateNode node) 517private static CodeWriter WritePropertyAccessorStartAssignment(CodeWriter writer, DefaultTagHelperPropertyIntermediateNode node)
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)