34 instantiations of CodeWriter
Microsoft.AspNetCore.Razor.Language.UnitTests (32)
CodeGeneration\CSharpCodeWriterTest.cs (32)
34using var writer = new CodeWriter(); 50using var writer = new CodeWriter(); 67using var writer = new CodeWriter(); 85using var writer = new CodeWriter(); 106using var writer = new CodeWriter(); 126using var writer = new CodeWriter(); 146using var writer = new CodeWriter(); 166using var writer = new CodeWriter(); 187using var writer = new CodeWriter(); 208using var writer = new CodeWriter(); 229using var writer = new CodeWriter(); 250using var writer = new CodeWriter(); 271using var writer = new CodeWriter(); 289using var writer = new CodeWriter(); 304using var writer = new CodeWriter(); 325using var writer = new CodeWriter(); 346using var writer = new CodeWriter(); 372using var writer = new CodeWriter(); 389using var writer = new CodeWriter(); 410using var writer = new CodeWriter(options); 434using var writer = new CodeWriter(options); 496using var writer = new CodeWriter(); 516using var writer = new CodeWriter(); 536using var writer = new CodeWriter(); 557using var writer = new CodeWriter(); 577using var writer = new CodeWriter(); 596using var writer = new CodeWriter(); 620using var writer = new CodeWriter(); 638using var writer = new CodeWriter(); 653using var writer = new CodeWriter(); 667using var writer = new CodeWriter(); 681using var writer = new 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);
205 references to CodeWriter
Microsoft.AspNetCore.Razor.Language.UnitTests (35)
CodeGeneration\CSharpCodeWriterTest.cs (34)
34using var writer = new CodeWriter(); 50using var writer = new CodeWriter(); 67using var writer = new CodeWriter(); 85using var writer = new CodeWriter(); 106using var writer = new CodeWriter(); 126using var writer = new CodeWriter(); 146using var writer = new CodeWriter(); 166using var writer = new CodeWriter(); 187using var writer = new CodeWriter(); 208using var writer = new CodeWriter(); 229using var writer = new CodeWriter(); 250using var writer = new CodeWriter(); 271using var writer = new CodeWriter(); 289using var writer = new CodeWriter(); 304using var writer = new CodeWriter(); 325using var writer = new CodeWriter(); 346using var writer = new CodeWriter(); 372using var writer = new CodeWriter(); 389using var writer = new CodeWriter(); 410using var writer = new CodeWriter(options); 434using var writer = new CodeWriter(options); 458var testReader = CodeWriter.GetTestTextReader(pages); 481var testReader = CodeWriter.GetTestTextReader(pages); 496using var writer = new CodeWriter(); 516using var writer = new CodeWriter(); 536using var writer = new CodeWriter(); 557using var writer = new CodeWriter(); 577using var writer = new CodeWriter(); 596using var writer = new CodeWriter(); 620using var writer = new CodeWriter(); 638using var writer = new CodeWriter(); 653using var writer = new CodeWriter(); 667using var writer = new CodeWriter(); 681using var writer = new CodeWriter();
CodeGeneration\IndentCacheTests.cs (1)
6using IndentCache = Microsoft.AspNetCore.Razor.Language.CodeGeneration.CodeWriter.IndentCache;
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\CodeGeneration\TestCodeRenderingContext.cs (1)
68private class RenderChildrenVisitor(CodeWriter writer) : IntermediateNodeVisitor
Microsoft.CodeAnalysis.Razor.Compiler (169)
Language\CodeGeneration\CodeRenderingContext.cs (1)
18public CodeWriter CodeWriter { get; }
Language\CodeGeneration\CodeRenderingContextExtensions.cs (4)
58var writer = context.CodeWriter; 70var writer = context.CodeWriter; 94private static (int originalIndent, bool ensureBackSlashes) WritePreamble(CodeWriter writer, RazorCodeGenerationOptions options) 121var 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) 271public static CodeWriter WriteStringLiteral(this CodeWriter writer, ReadOnlyMemory<char> literal) 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; 819this CodeWriter writer, 836this CodeWriter writer, 855public static CodeWriter WriteCommaSeparatedList(this CodeWriter writer, ImmutableArray<string> items) 858public static CodeWriter WriteCommaSeparatedList<T>(this CodeWriter writer, ImmutableArray<T> items, Action<CodeWriter, T> elementWriter) 861public static CodeWriter WriteSeparatedList(this CodeWriter writer, string separator, ImmutableArray<string> items) 882public static CodeWriter WriteSeparatedList<T>(this CodeWriter writer, string separator, ImmutableArray<T> items, Action<CodeWriter, T> elementWriter) 903private static void WriteVerbatimStringLiteral(CodeWriter writer, ReadOnlyMemory<char> literal) 932private static void WriteCStyleStringLiteral(CodeWriter writer, ReadOnlyMemory<char> literal) 990private readonly CodeWriter _writer; 996public CSharpCodeWritingScope(CodeWriter writer, bool autoSpace = true, bool writeBraces = true)
Language\CodeGeneration\DesignTimeNodeWriter.cs (2)
106var writer = context.CodeWriter; 202var writer = context.CodeWriter;
Language\CodeGeneration\IntermediateNodeWriter.cs (1)
93var 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\ComponentDesignTimeNodeWriter.cs (4)
190var writer = context.CodeWriter; 862static void QualifyEventCallback(CodeWriter codeWriter, string typeName, bool? explicitType) 998var codeWriter = context.CodeWriter; 1030var writer = context.CodeWriter;
Language\Components\ComponentNodeWriter.cs (5)
111var writer = context.CodeWriter; 346static void writeConstraints(CodeWriter writer, ComponentTypeInferenceMethodIntermediateNode node) 581public void WriteTo(CodeWriter writer) 594public void WriteTo(CodeWriter writer) 615public void WriteTo(CodeWriter writer)
Language\Components\ComponentRuntimeNodeWriter.cs (5)
770static void QualifyEventCallback(CodeWriter codeWriter, string typeName, bool? explicitType) 891var codeWriter = context.CodeWriter; 923var writer = context.CodeWriter; 961var codeWriter = context.CodeWriter; 1104var 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)
644private static CodeWriter WritePropertyAccessor(CodeWriter writer, DefaultTagHelperPropertyIntermediateNode node) 660private 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)