/
System.Web.Razor.xml
1193 lines (1177 loc) · 67.3 KB
/
System.Web.Razor.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<doc>
<assembly>
<name>System.Web.Razor</name>
</assembly>
<members>
<member name="T:Microsoft.Internal.Web.Utils.CommonResources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Cannot_Be_Null_Or_Empty">
<summary>
Looks up a localized string similar to Value cannot be null or an empty string..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_Between">
<summary>
Looks up a localized string similar to Value must be between {0} and {1}..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_Enum_Member">
<summary>
Looks up a localized string similar to Value must be a value from the "{0}" enumeration..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_GreaterThan">
<summary>
Looks up a localized string similar to Value must be greater than {0}..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_GreaterThanOrEqualTo">
<summary>
Looks up a localized string similar to Value must be greater than or equal to {0}..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_LessThan">
<summary>
Looks up a localized string similar to Value must be less than {0}..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_LessThanOrEqualTo">
<summary>
Looks up a localized string similar to Value must be less than or equal to {0}..
</summary>
</member>
<member name="P:Microsoft.Internal.Web.Utils.CommonResources.Argument_Must_Be_Null_Or_Non_Empty">
<summary>
Looks up a localized string similar to Value cannot be an empty string. It must either be null or a non-empty string..
</summary>
</member>
<member name="T:System.Web.Razor.DocumentParseCompleteEventArgs">
<summary>
Arguments for the DocumentParseComplete event in RazorEditorParser
</summary>
</member>
<member name="P:System.Web.Razor.DocumentParseCompleteEventArgs.TreeStructureChanged">
<summary>
Indicates if the tree structure has actually changed since the previous reparse.
</summary>
</member>
<member name="P:System.Web.Razor.DocumentParseCompleteEventArgs.GeneratorResults">
<summary>
The results of the code generation and parsing
</summary>
</member>
<member name="P:System.Web.Razor.DocumentParseCompleteEventArgs.SourceChange">
<summary>
The TextChange which triggered the reparse
</summary>
</member>
<member name="M:System.Web.Razor.Editor.SpanEditHandler.IsEndInsertion(System.Web.Razor.Parser.SyntaxTree.Span,System.Web.Razor.Text.TextChange)">
<summary>
Returns true if the specified change is an insertion of text at the end of this span.
</summary>
</member>
<member name="M:System.Web.Razor.Editor.SpanEditHandler.IsEndDeletion(System.Web.Razor.Parser.SyntaxTree.Span,System.Web.Razor.Text.TextChange)">
<summary>
Returns true if the specified change is an insertion of text at the end of this span.
</summary>
</member>
<member name="M:System.Web.Razor.Editor.SpanEditHandler.IsEndReplace(System.Web.Razor.Parser.SyntaxTree.Span,System.Web.Razor.Text.TextChange)">
<summary>
Returns true if the specified change is a replacement of text at the end of this span.
</summary>
</member>
<member name="M:System.Web.Razor.Editor.SpanEditHandler.GetOldText(System.Web.Razor.Parser.SyntaxTree.Span,System.Web.Razor.Text.TextChange)">
<summary>
Returns the old text referenced by the change.
</summary>
<remarks>
If the content has already been updated by applying the change, this data will be _invalid_
</remarks>
</member>
<member name="P:System.Web.Razor.Editor.SpanEditHandler.EditorHints">
<summary>
Provides a set of hints to editors which may be manipulating the document in which this span is located.
</summary>
</member>
<member name="E:System.Web.Razor.Editor.BackgroundParser.ResultsReady">
<summary>
Fired on the main thread.
</summary>
</member>
<member name="F:System.Web.Razor.Generator.ExpressionRenderingMode.WriteToOutput">
<summary>
Indicates that expressions should be written to the output stream
</summary>
<example>
If @foo is rendered with WriteToOutput, the code generator would output the following code:
Write(foo);
</example>
</member>
<member name="F:System.Web.Razor.Generator.ExpressionRenderingMode.InjectCode">
<summary>
Indicates that expressions should simply be placed as-is in the code, and the context in which
the code exists will be used to render it
</summary>
<example>
If @foo is rendered with InjectCode, the code generator would output the following code:
foo
</example>
</member>
<member name="T:System.Web.Razor.Editor.EditorHints">
<summary>
Used within <see cref="F:SpanEditHandler.EditorHints"/>.
</summary>
</member>
<member name="F:System.Web.Razor.Editor.EditorHints.None">
<summary>
The default (Markup or Code) editor behavior for Statement completion should be used.
Editors can always use the default behavior, even if the span is labeled with a different CompletionType.
</summary>
</member>
<member name="F:System.Web.Razor.Editor.EditorHints.VirtualPath">
<summary>
Indicates that Virtual Path completion should be used for this span if the editor supports it.
Editors need not support this mode of completion, and will use the default (<see cref="F:EditorHints.None"/>) behavior
if they do not support it.
</summary>
</member>
<member name="F:System.Web.Razor.Editor.EditorHints.LayoutPage">
<summary>
Indicates that this span's content contains the path to the layout page for this document.
</summary>
</member>
<member name="M:System.Web.Razor.Parser.TokenizerBackedParser`3.PutBack(System.Collections.Generic.IEnumerable{`1})">
<summary>
Put the specified symbols back in the input stream. The provided list MUST be in the ORDER THE SYMBOLS WERE READ. The
list WILL be reversed and the Putback(TSymbol) will be called on each item.
</summary>
<remarks>
If a document contains symbols: a, b, c, d, e, f
and AcceptWhile or AcceptUntil is used to collect until d
the list returned by AcceptWhile/Until will contain: a, b, c IN THAT ORDER
that is the correct format for providing to this method. The caller of this method would,
in that case, want to put c, b and a back into the stream, so "a, b, c" is the CORRECT order
</remarks>
</member>
<member name="M:System.Web.Razor.Parser.HtmlMarkupParser.ScanTagInDocumentContext">
<summary>
Reads the content of a tag (if present) in the MarkupDocument (or MarkupSection) context,
where we don't care about maintaining a stack of tags.
</summary>
<returns>A boolean indicating if we scanned at least one tag.</returns>
</member>
<member name="T:System.Web.Razor.PartialParseResult">
<summary>
The result of attempting an incremental parse
</summary>
<remarks>
Either the Accepted or Rejected flag is ALWAYS set.
Additionally, Provisional may be set with Accepted and SpanContextChanged may be set with Rejected.
Provisional may NOT be set with Rejected and SpanContextChanged may NOT be set with Accepted.
</remarks>
</member>
<member name="F:System.Web.Razor.PartialParseResult.Rejected">
<summary>
Indicates that the edit could not be accepted and that a reparse is underway.
</summary>
</member>
<member name="F:System.Web.Razor.PartialParseResult.Accepted">
<summary>
Indicates that the edit was accepted and has been added to the parse tree
</summary>
</member>
<member name="F:System.Web.Razor.PartialParseResult.Provisional">
<summary>
Indicates that the edit was accepted, but that a reparse should be forced when idle time is available
since the edit may be misclassified
</summary>
<remarks>
This generally occurs when a "." is typed in an Implicit Expression, since editors require that this
be assigned to Code in order to properly support features like IntelliSense. However, if no further edits
occur following the ".", it should be treated as Markup.
</remarks>
</member>
<member name="F:System.Web.Razor.PartialParseResult.SpanContextChanged">
<summary>
Indicates that the edit caused a change in the span's context and that if any statement completions were active prior to starting this
partial parse, they should be reinitialized.
</summary>
</member>
<member name="F:System.Web.Razor.PartialParseResult.AutoCompleteBlock">
<summary>
Indicates that the edit requires an auto completion to occur
</summary>
</member>
<member name="T:System.Web.Razor.RazorDirectiveAttribute">
<summary>
Specifies a Razor directive that is rendered as an attribute on the generated class.
</summary>
</member>
<member name="T:System.Web.Razor.RazorEditorParser">
<summary>
Parser used by editors to avoid reparsing the entire document on each text change
</summary>
<remarks>
This parser is designed to allow editors to avoid having to worry about incremental parsing.
The CheckForStructureChanges method can be called with every change made by a user in an editor and
the parser will provide a result indicating if it was able to incrementally reparse the document.
The general workflow for editors with this parser is:
0. User edits document
1. Editor builds TextChange structure describing the edit and providing a reference to the _updated_ text buffer
2. Editor calls CheckForStructureChanges passing in that change.
3. Parser determines if the change can be simply applied to an existing parse tree node
a. If it can, the Parser updates its parse tree and returns PartialParseResult.Accepted
b. If it can not, the Parser starts a background parse task and return PartialParseResult.Rejected
NOTE: Additional flags can be applied to the PartialParseResult, see that enum for more details. However,
the Accepted or Rejected flags will ALWAYS be present
A change can only be incrementally parsed if a single, unique, Span (see System.Web.Razor.Parser.SyntaxTree) in the syntax tree can
be identified as owning the entire change. For example, if a change overlaps with multiple spans, the change cannot be
parsed incrementally and a full reparse is necessary. A Span "owns" a change if the change occurs either a) entirely
within it's boundaries or b) it is a pure insertion (see TextChange) at the end of a Span whose CanGrow flag (see Span) is
true.
Even if a single unique Span owner can be identified, it's possible the edit will cause the Span to split or merge with other
Spans, in which case, a full reparse is necessary to identify the extent of the changes to the tree.
When the RazorEditorParser returns Accepted, it updates CurrentParseTree immediately. However, the editor is expected to
update it's own data structures independently. It can use CurrentParseTree to do this, as soon as the editor returns from
CheckForStructureChanges, but it should (ideally) have logic for doing so without needing the new tree.
When Rejected is returned by CheckForStructureChanges, a background parse task has _already_ been started. When that task
finishes, the DocumentStructureChanged event will be fired containing the new generated code, parse tree and a reference to
the original TextChange that caused the reparse, to allow the editor to resolve the new tree against any changes made since
calling CheckForStructureChanges.
If a call to CheckForStructureChanges occurs while a reparse is already in-progress, the reparse is cancelled IMMEDIATELY
and Rejected is returned without attempting to reparse. This means that if a conusmer calls CheckForStructureChanges, which
returns Rejected, then calls it again before DocumentParseComplete is fired, it will only recieve one DocumentParseComplete
event, for the second change.
</remarks>
</member>
<member name="M:System.Web.Razor.RazorEditorParser.#ctor(System.Web.Razor.RazorEngineHost,System.String)">
<summary>
Constructs the editor parser. One instance should be used per active editor. This
instance _can_ be shared among reparses, but should _never_ be shared between documents.
</summary>
<param name="host">The <see cref="T:System.Web.Razor.RazorEngineHost"/> which defines the environment in which the generated code will live. <see cref="F:RazorEngineHost.DesignTimeMode"/> should be set if design-time code mappings are desired</param>
<param name="sourceFileName">The physical path to use in line pragmas</param>
</member>
<member name="M:System.Web.Razor.RazorEditorParser.CheckForStructureChanges(System.Web.Razor.Text.TextChange)">
<summary>
Determines if a change will cause a structural change to the document and if not, applies it to the existing tree.
If a structural change would occur, automatically starts a reparse
</summary>
<remarks>
NOTE: The initial incremental parsing check and actual incremental parsing (if possible) occurs
on the callers thread. However, if a full reparse is needed, this occurs on a background thread.
</remarks>
<param name="change">The change to apply to the parse tree</param>
<returns>A PartialParseResult value indicating the result of the incremental parse</returns>
</member>
<member name="M:System.Web.Razor.RazorEditorParser.Dispose">
<summary>
Disposes of this parser. Should be called when the editor window is closed and the document is unloaded.
</summary>
</member>
<member name="E:System.Web.Razor.RazorEditorParser.DocumentParseComplete">
<summary>
Event fired when a full reparse of the document completes
</summary>
</member>
<member name="T:System.Web.Razor.GeneratorResults">
<summary>
Represents results from code generation (and parsing, since that is a pre-requisite of code generation)
</summary>
<remarks>
Since this inherits from ParserResults, it has all the data from ParserResults, and simply adds code generation data
</remarks>
</member>
<member name="T:System.Web.Razor.ParserResults">
<summary>
Represents the results of parsing a Razor document
</summary>
</member>
<member name="P:System.Web.Razor.ParserResults.Success">
<summary>
Indicates if parsing was successful (no errors)
</summary>
</member>
<member name="P:System.Web.Razor.ParserResults.Document">
<summary>
The root node in the document's syntax tree
</summary>
</member>
<member name="P:System.Web.Razor.ParserResults.ParserErrors">
<summary>
The list of errors which occurred during parsing.
</summary>
</member>
<member name="P:System.Web.Razor.GeneratorResults.GeneratedCode">
<summary>
The generated code
</summary>
</member>
<member name="P:System.Web.Razor.GeneratorResults.DesignTimeLineMappings">
<summary>
If design-time mode was used in the Code Generator, this will contain the dictionary
of design-time generated code mappings
</summary>
</member>
<member name="T:System.Web.Razor.RazorEngineHost">
<summary>
Defines the environment in which a Razor template will live
</summary>
<remarks>
The host defines the following things:
* What method names will be used for rendering markup, expressions etc. For example "Write", "WriteLiteral"
* The namespace imports to be added to every page generated via this host
* The default Base Class to inherit the generated class from
* The default Class Name and Namespace for the generated class (can be overridden by parameters in RazorTemplateEngine.GeneratedCode)
* The language of the code in a Razor page
* The markup, code parsers and code generators to use (the system will select defaults, but a Host gets a change to augment them)
** See DecorateNNN methods
* Additional code to add to the generated code (see PostProcessGeneratedCode)
</remarks>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.#ctor(System.Web.Razor.RazorCodeLanguage)">
<summary>
Creates a host which uses the specified code language and the HTML markup language
</summary>
<param name="codeLanguage">The code language to use</param>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.CreateMarkupParser">
<summary>
Constructs the markup parser. Must return a new instance on EVERY call to ensure thread-safety
</summary>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.DecorateCodeParser(System.Web.Razor.Parser.ParserBase)">
<summary>
Gets an instance of the code parser and is provided an opportunity to decorate or replace it
</summary>
<param name="incomingCodeParser">The code parser</param>
<returns>Either the same code parser, after modifications, or a different code parser</returns>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.DecorateMarkupParser(System.Web.Razor.Parser.ParserBase)">
<summary>
Gets an instance of the markup parser and is provided an opportunity to decorate or replace it
</summary>
<param name="incomingMarkupParser">The markup parser</param>
<returns>Either the same markup parser, after modifications, or a different markup parser</returns>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.DecorateCodeGenerator(System.Web.Razor.Generator.RazorCodeGenerator)">
<summary>
Gets an instance of the code generator and is provided an opportunity to decorate or replace it
</summary>
<param name="incomingCodeGenerator">The code generator</param>
<returns>Either the same code generator, after modifications, or a different code generator</returns>
</member>
<member name="M:System.Web.Razor.RazorEngineHost.PostProcessGeneratedCode(System.Web.Razor.Generator.CodeGeneratorContext)">
<summary>
Gets the important CodeDOM nodes generated by the code generator and has a chance to add to them.
</summary>
<remarks>
All the other parameter values can be located by traversing tree in the codeCompileUnit node, they
are simply provided for convenience
</remarks>
<param name="context">The current <see cref="T:System.Web.Razor.Generator.CodeGeneratorContext"/>.</param>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.GeneratedClassContext">
<summary>
Details about the methods and types that should be used to generate code for Razor constructs
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.NamespaceImports">
<summary>
A list of namespaces to import in the generated file
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.DefaultBaseClass">
<summary>
The base-class of the generated class
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.DesignTimeMode">
<summary>
Indiciates if the parser and code generator should run in design-time mode
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.DefaultClassName">
<summary>
The name of the generated class
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.DefaultNamespace">
<summary>
The namespace which will contain the generated class
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.StaticHelpers">
<summary>
Boolean indicating if helper methods should be instance methods or static methods
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.CodeLanguage">
<summary>
The language of the code within the Razor template.
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.EnableInstrumentation">
<summary>
Boolean indicating if instrumentation code should be injected into the output page
</summary>
</member>
<member name="P:System.Web.Razor.RazorEngineHost.InstrumentedSourceFilePath">
<summary>
Gets or sets the path to use for this document when generating Instrumentation calls
</summary>
</member>
<member name="T:System.Web.Razor.RazorTemplateEngine">
<summary>
Entry-point to the Razor Template Engine
</summary>
</member>
<member name="M:System.Web.Razor.RazorTemplateEngine.#ctor(System.Web.Razor.RazorEngineHost)">
<summary>
Constructs a new RazorTemplateEngine with the specified host
</summary>
<param name="host">The host which defines the environment in which the generated template code will live</param>
</member>
<member name="M:System.Web.Razor.RazorTemplateEngine.ParseTemplate(System.Web.Razor.Text.ITextBuffer,System.Nullable{System.Threading.CancellationToken})">
<summary>
Parses the template specified by the TextBuffer and returns it's result
</summary>
<remarks>
IMPORTANT: This does NOT need to be called before GeneratedCode! GenerateCode will automatically
parse the document first.
The cancel token provided can be used to cancel the parse. However, please note
that the parse occurs _synchronously_, on the callers thread. This parameter is
provided so that if the caller is in a background thread with a CancellationToken,
it can pass it along to the parser.
</remarks>
<param name="input">The input text to parse</param>
<param name="cancelToken">A token used to cancel the parser</param>
<returns>The resulting parse tree</returns>
</member>
<member name="M:System.Web.Razor.RazorTemplateEngine.GenerateCode(System.Web.Razor.Text.ITextBuffer,System.String,System.String,System.String,System.Nullable{System.Threading.CancellationToken})">
<summary>
Parses the template specified by the TextBuffer, generates code for it, and returns the constructed CodeDOM tree
</summary>
<remarks>
The cancel token provided can be used to cancel the parse. However, please note
that the parse occurs _synchronously_, on the callers thread. This parameter is
provided so that if the caller is in a background thread with a CancellationToken,
it can pass it along to the parser.
The className, rootNamespace and sourceFileName parameters are optional and override the default
specified by the Host. For example, the WebPageRazorHost in System.Web.WebPages.Razor configures the
Class Name, Root Namespace and Source File Name based on the virtual path of the page being compiled.
However, the built-in RazorEngineHost class uses constant defaults, so the caller will likely want to
change them using these parameters
</remarks>
<param name="input">The input text to parse</param>
<param name="cancelToken">A token used to cancel the parser</param>
<param name="className">The name of the generated class, overriding whatever is specified in the Host. The default value (defined in the Host) can be used by providing null for this argument</param>
<param name="rootNamespace">The namespace in which the generated class will reside, overriding whatever is specified in the Host. The default value (defined in the Host) can be used by providing null for this argument</param>
<param name="sourceFileName">The file name to use in line pragmas, usually the original Razor file, overriding whatever is specified in the Host. The default value (defined in the Host) can be used by providing null for this argument</param>
<returns>The resulting parse tree AND generated Code DOM tree</returns>
</member>
<member name="P:System.Web.Razor.RazorTemplateEngine.Host">
<summary>
The RazorEngineHost which defines the environment in which the generated template code will live
</summary>
</member>
<member name="M:System.Web.Razor.StateMachine`1.Stop">
<summary>
Returns a result indicating that the machine should stop executing and return null output.
</summary>
</member>
<member name="M:System.Web.Razor.StateMachine`1.Transition(System.Web.Razor.StateMachine{`0}.State)">
<summary>
Returns a result indicating that this state has no output and the machine should immediately invoke the specified state
</summary>
<remarks>
By returning no output, the state machine will invoke the next state immediately, before returning
controller to the caller of <see cref="M:System.Web.Razor.StateMachine`1.Turn"/>
</remarks>
</member>
<member name="M:System.Web.Razor.StateMachine`1.Transition(`0,System.Web.Razor.StateMachine{`0}.State)">
<summary>
Returns a result containing the specified output and indicating that the next call to
<see cref="M:System.Web.Razor.StateMachine`1.Turn"/> should invoke the provided state.
</summary>
</member>
<member name="M:System.Web.Razor.StateMachine`1.Stay">
<summary>
Returns a result indicating that this state has no output and the machine should remain in this state
</summary>
<remarks>
By returning no output, the state machine will re-invoke the current state again before returning
controller to the caller of <see cref="M:System.Web.Razor.StateMachine`1.Turn"/>
</remarks>
</member>
<member name="M:System.Web.Razor.StateMachine`1.Stay(`0)">
<summary>
Returns a result containing the specified output and indicating that the next call to
<see cref="M:System.Web.Razor.StateMachine`1.Turn"/> should re-invoke the current state.
</summary>
</member>
<member name="T:System.Web.Razor.Text.TextBufferReader.BacktrackContext">
<summary>
Need a class for reference equality to support cancelling backtrack.
</summary>
</member>
<member name="T:System.Web.Razor.VBRazorCodeLanguage">
<summary>
Defines the Visual Basic Code Language for Razor
</summary>
</member>
<member name="T:System.Web.Razor.RazorCodeLanguage">
<summary>
Represents a code language in Razor.
</summary>
</member>
<member name="M:System.Web.Razor.RazorCodeLanguage.GetLanguageByExtension(System.String)">
<summary>
Gets the RazorCodeLanguage registered for the specified file extension
</summary>
<param name="fileExtension">The extension, with or without a "."</param>
<returns>The language registered for that extension</returns>
</member>
<member name="M:System.Web.Razor.RazorCodeLanguage.CreateCodeParser">
<summary>
Constructs the code parser. Must return a new instance on EVERY call to ensure thread-safety
</summary>
</member>
<member name="M:System.Web.Razor.RazorCodeLanguage.CreateCodeGenerator(System.String,System.String,System.String,System.Web.Razor.RazorEngineHost)">
<summary>
Constructs the code generator. Must return a new instance on EVERY call to ensure thread-safety
</summary>
</member>
<member name="P:System.Web.Razor.RazorCodeLanguage.Languages">
<summary>
Gets the list of registered languages mapped to file extensions (without a ".")
</summary>
</member>
<member name="P:System.Web.Razor.RazorCodeLanguage.LanguageName">
<summary>
The name of the language (for use in System.Web.Compilation.BuildProvider.GetDefaultCompilerTypeForLanguage)
</summary>
</member>
<member name="P:System.Web.Razor.RazorCodeLanguage.CodeDomProviderType">
<summary>
The type of the CodeDOM provider for this language
</summary>
</member>
<member name="M:System.Web.Razor.VBRazorCodeLanguage.CreateCodeParser">
<summary>
Constructs a new instance of the code parser for this language
</summary>
</member>
<member name="M:System.Web.Razor.VBRazorCodeLanguage.CreateCodeGenerator(System.String,System.String,System.String,System.Web.Razor.RazorEngineHost)">
<summary>
Constructs a new instance of the code generator for this language with the specified settings
</summary>
</member>
<member name="P:System.Web.Razor.VBRazorCodeLanguage.LanguageName">
<summary>
Returns the name of the language: "vb"
</summary>
</member>
<member name="P:System.Web.Razor.VBRazorCodeLanguage.CodeDomProviderType">
<summary>
Returns the type of the CodeDOM provider for this language
</summary>
</member>
<member name="M:System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode.Accept(System.Web.Razor.Parser.ParserVisitor)">
<summary>
Accepts a parser visitor, calling the appropriate visit method and passing in this instance
</summary>
<param name="visitor">The visitor to accept</param>
</member>
<member name="M:System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode.EquivalentTo(System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode)">
<summary>
Determines if the specified node is equivalent to this node
</summary>
<param name="node">The node to compare this node with</param>
<returns>
true if the provided node has all the same content and metadata, though the specific quantity and type of symbols may be different.
</returns>
</member>
<member name="P:System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode.IsBlock">
<summary>
Returns true if this element is a block (to avoid casting)
</summary>
</member>
<member name="P:System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode.Length">
<summary>
The length of all the content contained in this node
</summary>
</member>
<member name="P:System.Web.Razor.Parser.SyntaxTree.SyntaxTreeNode.Start">
<summary>
The start point of this node
</summary>
</member>
<member name="M:System.Web.Razor.Parser.ParserContext.StartBlock(System.Web.Razor.Parser.SyntaxTree.BlockType)">
<summary>
Starts a block of the specified type
</summary>
<param name="blockType">The type of the block to start</param>
</member>
<member name="M:System.Web.Razor.Parser.ParserContext.StartBlock">
<summary>
Starts a block
</summary>
</member>
<member name="M:System.Web.Razor.Parser.ParserContext.EndBlock">
<summary>
Ends the current block
</summary>
</member>
<member name="M:System.Web.Razor.Parser.ParserContext.IsWithin(System.Web.Razor.Parser.SyntaxTree.BlockType)">
<summary>
Gets a boolean indicating if any of the ancestors of the current block is of the specified type
</summary>
</member>
<member name="T:System.Web.Razor.CSharpRazorCodeLanguage">
<summary>
Defines the C# Code Language for Razor
</summary>
</member>
<member name="M:System.Web.Razor.CSharpRazorCodeLanguage.CreateCodeParser">
<summary>
Constructs a new instance of the code parser for this language
</summary>
</member>
<member name="M:System.Web.Razor.CSharpRazorCodeLanguage.CreateCodeGenerator(System.String,System.String,System.String,System.Web.Razor.RazorEngineHost)">
<summary>
Constructs a new instance of the code generator for this language with the specified settings
</summary>
</member>
<member name="P:System.Web.Razor.CSharpRazorCodeLanguage.LanguageName">
<summary>
Returns the name of the language: "csharp"
</summary>
</member>
<member name="P:System.Web.Razor.CSharpRazorCodeLanguage.CodeDomProviderType">
<summary>
Returns the type of the CodeDOM provider for this language
</summary>
</member>
<member name="T:System.Web.Razor.Resources.RazorResources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ActiveParser_Must_Be_Code_Or_Markup_Parser">
<summary>
Looks up a localized string similar to The active parser must the same as either the markup or code parser..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.Block_Type_Not_Specified">
<summary>
Looks up a localized string similar to Block cannot be built because a Type has not been specified in the BlockBuilder.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.BlockName_Code">
<summary>
Looks up a localized string similar to code.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.BlockName_ExplicitExpression">
<summary>
Looks up a localized string similar to explicit expression.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CancelBacktrack_Must_Be_Called_Within_Lookahead">
<summary>
Looks up a localized string similar to The "CancelBacktrack" method can be called only while in a look-ahead process started with the "BeginLookahead" method..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CreateCodeWriter_NoCodeWriter">
<summary>
Looks up a localized string similar to Cannot call CreateCodeWriter, a CodeWriter was not provided to the Create method.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_CharacterLiteral">
<summary>
Looks up a localized string similar to <<character literal>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_Comment">
<summary>
Looks up a localized string similar to <<comment>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_Identifier">
<summary>
Looks up a localized string similar to <<identifier>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_IntegerLiteral">
<summary>
Looks up a localized string similar to <<integer literal>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_Keyword">
<summary>
Looks up a localized string similar to <<keyword>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_Newline">
<summary>
Looks up a localized string similar to <<newline sequence>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_RealLiteral">
<summary>
Looks up a localized string similar to <<real literal>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_StringLiteral">
<summary>
Looks up a localized string similar to <<string literal>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.CSharpSymbol_Whitespace">
<summary>
Looks up a localized string similar to <<white space>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.EndBlock_Called_Without_Matching_StartBlock">
<summary>
Looks up a localized string similar to "EndBlock" was called without a matching call to "StartBlock"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ErrorComponent_Character">
<summary>
Looks up a localized string similar to "{0}" character.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ErrorComponent_EndOfFile">
<summary>
Looks up a localized string similar to end of file.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ErrorComponent_Newline">
<summary>
Looks up a localized string similar to line break.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ErrorComponent_Whitespace">
<summary>
Looks up a localized string similar to space or line break.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.HtmlSymbol_NewLine">
<summary>
Looks up a localized string similar to <<newline sequence>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.HtmlSymbol_RazorComment">
<summary>
Looks up a localized string similar to <<razor comment>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.HtmlSymbol_Text">
<summary>
Looks up a localized string similar to <<text>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.HtmlSymbol_WhiteSpace">
<summary>
Looks up a localized string similar to <<white space>>.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.Language_Does_Not_Support_RazorComment">
<summary>
Looks up a localized string similar to Cannot use built-in RazorComment handler, language characteristics does not define the CommentStart, CommentStar and CommentBody known symbol types or parser does not override TokenizerBackedParser.OutputSpanBeforeRazorComment.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_AtInCode_Must_Be_Followed_By_Colon_Paren_Or_Identifier_Start">
<summary>
Looks up a localized string similar to The "@" character must be followed by a ":", "(", or a C# identifier. If you intended to switch to markup, use an HTML start tag, for example:
@if(isLoggedIn) {
<p>Hello, @user!</p>
}.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_BlockComment_Not_Terminated">
<summary>
Looks up a localized string similar to End of file was reached before the end of the block comment. All comments started with "/*" sequence must be terminated with a matching "*/" sequence..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_BlockNotTerminated">
<summary>
Looks up a localized string similar to The "{0}" block was not terminated. All "{0}" statements must be terminated with a matching "{1}"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Expected_CloseBracket_Before_EOF">
<summary>
Looks up a localized string similar to An opening "{0}" is missing the corresponding closing "{1}"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Expected_EndOfBlock_Before_EOF">
<summary>
Looks up a localized string similar to The {0} block is missing a closing "{1}" character. Make sure you have a matching "{1}" character for all the "{2}" characters within this block, and that none of the "{1}" characters are being interpreted as markup..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Expected_X">
<summary>
Looks up a localized string similar to Expected "{0}"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Helpers_Cannot_Be_Nested">
<summary>
Looks up a localized string similar to Helper blocks cannot be nested within each other..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_InheritsKeyword_Must_Be_Followed_By_TypeName">
<summary>
Looks up a localized string similar to The 'inherits' keyword must be followed by a type name on the same line..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_InlineMarkup_Blocks_Cannot_Be_Nested">
<summary>
Looks up a localized string similar to Inline markup blocks (@<p>Content</p>) cannot be nested. Only one level of inline markup is allowed..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_InvalidOptionValue">
<summary>
Looks up a localized string similar to "{1}" is not a valid value for the "{0}" option. The "Option {0}" statement must be followed by either "On" or "Off". .
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_MarkupBlock_Must_Start_With_Tag">
<summary>
Looks up a localized string similar to Markup in a code block must start with a tag and all start tags must be matched with end tags. Do not use unclosed tags like "<br>". Instead use self-closing tags like "<br/>"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_MissingCharAfterHelperName">
<summary>
Looks up a localized string similar to Expected a "{0}" after the helper name..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_MissingCharAfterHelperParameters">
<summary>
Looks up a localized string similar to Expected a "{0}" after the helper parameters..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_MissingEndTag">
<summary>
Looks up a localized string similar to The "{0}" element was not closed. All elements must be either self-closing or have a matching end tag..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_MissingOpenBraceAfterSection">
<summary>
Looks up a localized string similar to Sections cannot be empty. The "@section" keyword must be followed by a block of markup surrounded by "{}". For example:
@section Sidebar {
<!-- Markup and text goes here -->
}.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_NamespaceImportAndTypeAlias_Cannot_Exist_Within_CodeBlock">
<summary>
Looks up a localized string similar to Namespace imports and type aliases cannot be placed within code blocks. They must immediately follow an "@" character in markup. It is recommended that you put them at the top of the page, as in the following example:
@using System.Drawing;
@{
// OK here to use types from System.Drawing in the page.
}.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_NamespaceOrTypeAliasExpected">
<summary>
Looks up a localized string similar to The "Imports" keyword must be followed by a namespace or a type alias on the same line..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_OuterTagMissingName">
<summary>
Looks up a localized string similar to Outer tag is missing a name. The first character of a markup block must be an HTML tag with a valid name..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_RazorComment_Not_Terminated">
<summary>
Looks up a localized string similar to End of file was reached before the end of the block comment. All comments that start with the "@*" sequence must be terminated with a matching "*@" sequence..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_ReservedWord">
<summary>
Looks up a localized string similar to "{0}" is a reserved word and cannot be used in implicit expressions. An explicit expression ("@()") must be used..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Sections_Cannot_Be_Nested">
<summary>
Looks up a localized string similar to Section blocks ("{0}") cannot be nested. Only one level of section blocks are allowed..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_SingleLine_ControlFlowStatements_Not_Allowed">
<summary>
Looks up a localized string similar to Expected a "{0}" but found a "{1}". Block statements must be enclosed in "{{" and "}}". You cannot use single-statement control-flow statements in CSHTML pages. For example, the following is not allowed:
@if(isLoggedIn)
<p>Hello, @user</p>
Instead, wrap the contents of the block in "{{}}":
@if(isLoggedIn) {{
<p>Hello, @user</p>
}}.
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_TextTagCannotContainAttributes">
<summary>
Looks up a localized string similar to "<text>" and "</text>" tags cannot contain attributes..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected">
<summary>
Looks up a localized string similar to Unexpected "{0}".
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Character_At_Helper_Name_Start">
<summary>
Looks up a localized string similar to Unexpected {0} after helper keyword. All helpers must have a name which starts with an "_" or alphabetic character. The remaining characters must be either "_" or alphanumeric..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Character_At_Section_Name_Start">
<summary>
Looks up a localized string similar to Unexpected {0} after section keyword. Section names must start with an "_" or alphabetic character, and the remaining characters must be either "_" or alphanumeric..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Character_At_Start_Of_CodeBlock_CS">
<summary>
Looks up a localized string similar to "{0}" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{{" are valid..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Character_At_Start_Of_CodeBlock_VB">
<summary>
Looks up a localized string similar to "{0}" is not valid at the start of a code block. Only identifiers, keywords, comments, and "(" are valid..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_EndOfFile_At_Start_Of_CodeBlock">
<summary>
Looks up a localized string similar to End-of-file was found after the "@" character. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@".
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Keyword_After_At">
<summary>
Looks up a localized string similar to Unexpected "{0}" keyword after "@" character. Once inside code, you do not need to prefix constructs like "{0}" with "@"..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_Nested_CodeBlock">
<summary>
Looks up a localized string similar to Unexpected "{" after "@" character. Once inside the body of a code block (@if {}, @{}, etc.) you do not need to use "@{" to switch to code..
</summary>
</member>
<member name="P:System.Web.Razor.Resources.RazorResources.ParseError_Unexpected_WhiteSpace_At_Start_Of_CodeBlock_CS">
<summary>