99 references to Context
Microsoft.CodeAnalysis.Razor.Compiler (99)
Language\Legacy\CSharpCodeParser.cs (60)
268if (Context == null) 302_tokenizer.Reset(Context.Source.Position - split.right.Content.Length); 356Context.ErrorSink.OnError(diagnostic); 410Context.ErrorSink.OnError( 416Context.ErrorSink.OnError( 422Context.ErrorSink.OnError( 466Context.ErrorSink.OnError( 486rightParen = OutputAsMetaCode(missingToken, Context.CurrentAcceptedCharacters); 608else if (At(SyntaxKind.Not) && Context.Options.AllowNullableForgivenessOperator) 723Context.ErrorSink.OnError( 749Context.CurrentAcceptedCharacters); 758Context.NullGenerateWhitespaceAndNewLine = true; 850Context.ErrorSink.OnError( 883Context.ErrorSink.OnError( 945Context.ErrorSink.OnError( 999if ((!Context.Options.AllowRazorInAllCodeBlocks && At(SyntaxKind.LeftBrace)) || 1009else if (Context.Options.AllowRazorInAllCodeBlocks && At(SyntaxKind.LeftBrace)) 1070Context.ErrorSink.OnError( 1115if (!TryBalanceBlock(builder, parseNestedBlocksAsMarkup: Context.Options.AllowRazorInAllCodeBlocks)) 1160if (Context.InTemplateContext) 1162Context.ErrorSink.OnError( 1178Context.InTemplateContext = true; 1185Context.InTemplateContext = false; 1218var @char = Context.SourceDocument.Text[index]; 1223Context.ErrorSink.OnError( 1235if (Context.SeenDirectives.Contains(SyntaxConstants.CSharp.TagHelperPrefixKeyword)) 1332using (Context.PushNewErrorScope(directiveErrorSink)) 1359Context.ErrorSink.OnError( 1381Context.ErrorSink.OnError( 1549using (Context.PushNewErrorScope(directiveErrorSink)) 1586Context.ErrorSink.OnError( 1639Context.ErrorSink.OnError( 1653Context.ErrorSink.OnError( 1665Context.ErrorSink.OnError( 1682Context.ErrorSink.OnError( 1697Context.ErrorSink.OnError( 1712Context.ErrorSink.OnError( 1730Context.ErrorSink.OnError( 1751Context.ErrorSink.OnError( 1781Context.ErrorSink.OnError( 1804Context.ErrorSink.OnError( 1844Context.ErrorSink.OnError( 1900if (Context.Options.AllowRazorInAllCodeBlocks) 1927builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 1955if (Context.SeenDirectives.Contains(descriptor.Directive)) 1959Context.ErrorSink.OnError( 2032Context.ErrorSink.OnError( 2038Context.ErrorSink.OnError( 2068Context.ErrorSink.OnError( 2085builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 2230Context.ErrorSink.OnError( 2238Context.ErrorSink.OnError( 2246Context.ErrorSink.OnError( 2506if (!Context.Options.AllowUsingVariableDeclarations) 2508Context.ErrorSink.OnError( 2660builder.Add(OutputAsMetaCode(Output(), Context.CurrentAcceptedCharacters)); 2753Context.ErrorSink.OnError( 2782if (!Context.WhiteSpaceIsSignificantToAncestorBlock && 2935Context.ErrorSink.OnError( 3040Context.ErrorSink.OnError(
Language\Legacy\HtmlMarkupParser.cs (25)
67if (Context == null) 125if (Context == null) 158Context.ErrorSink.OnError( 190if (Context == null) 336Context.ErrorSink.OnError( 438var old = Context.WhiteSpaceIsSignificantToAncestorBlock; 439Context.WhiteSpaceIsSignificantToAncestorBlock = true; 459Context.NullGenerateWhitespaceAndNewLine = false; 467Context.WhiteSpaceIsSignificantToAncestorBlock = old; 551Context.ErrorSink.OnError( 567Context.ErrorSink.OnError( 687Context.ErrorSink.OnError( 736Context.Source.Position = bookmark; 813Context.ErrorSink.OnError( 968Context.ErrorSink.OnError( 1202if (Context.Options.AllowCSharpInMarkupAttributeArea) 1234(token.Kind != SyntaxKind.Transition || !self.Context.Options.AllowCSharpInMarkupAttributeArea) && 1546Context.ErrorSink.OnError( 1629if (!Context.StartOfLine) 1701var startOfLine = Context.StartOfLine; 1752if (Context.NullGenerateWhitespaceAndNewLine) 1764Context.NullGenerateWhitespaceAndNewLine = false; 2103if (Context.Options.AllowConditionalDataDashAttributes) 2207Context.Source.Position = bookmark.AbsoluteIndex + preSequence.Content.Length; 2215Context.Source.Position = postSequenceBookmark;
Language\Legacy\ParserBase.cs (1)
12protected CancellationToken CancellationToken => Context.CancellationToken;
Language\Legacy\TokenizerBackedParser.cs (13)
53var languageTokenizer = Language.CreateTokenizer(Context.Source); 387Context.ErrorSink.OnError(diagnostic); 396Context.ErrorSink.OnError(diagnostic); 408Context.MakeMarkerNode = true; 528Context.StartOfLine = true; 532Context.StartOfLine = false; 537Context.ErrorSink.OnError(error); 610if (TokenBuilder.Count == 0 && Context.MakeMarkerNode) 657Context.CurrentAcceptedCharacters = accepted ?? AcceptedCharactersInternal.None; 664Context.MakeMarkerNode = Context.CurrentAcceptedCharacters != AcceptedCharactersInternal.Any; 671var editHandler = this.editHandlerBuilder.Build(Context.CurrentAcceptedCharacters); 722Context.CurrentAcceptedCharacters = acceptedCharacters ?? AcceptedCharactersInternal.None;