File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
- /*
1
+ /*
2
2
* Copyright (c) 2014-Present, Facebook, Inc.
3
3
* All rights reserved.
4
4
*
@@ -24,19 +24,28 @@ namespace React.Web.Mvc
24
24
namespace React . AspNet
25
25
#endif
26
26
{
27
+ /// <summary>
28
+ /// IHtmlString or IHtmlString action wrapper implementation
29
+ /// </summary>
27
30
public class ActionHtmlString : IHtmlString
28
31
{
29
32
private readonly Action < TextWriter > _textWriter ;
30
33
34
+ /// <summary>
35
+ /// Constructor IHtmlString or IHtmlString action wrapper implementation
36
+ /// </summary>
37
+ /// <param name="textWriter"></param>
31
38
public ActionHtmlString ( Action < TextWriter > textWriter )
32
39
{
33
40
_textWriter = textWriter ;
34
41
}
35
42
36
43
#if LEGACYASPNET
37
- [ ThreadStatic ]
44
+ [ ThreadStatic ]
38
45
private static StringWriter _sharedStringWriter ;
39
46
47
+ /// <summary>Returns an HTML-encoded string.</summary>
48
+ /// <returns>An HTML-encoded string.</returns>
40
49
public string ToHtmlString ( )
41
50
{
42
51
var stringWriter = _sharedStringWriter ;
@@ -53,6 +62,12 @@ public string ToHtmlString()
53
62
return stringWriter . ToString ( ) ;
54
63
}
55
64
#else
65
+ /// <summary>
66
+ /// Writes the content by encoding it with the specified <paramref name="encoder" />
67
+ /// to the specified <paramref name="writer" />.
68
+ /// </summary>
69
+ /// <param name="writer">The <see cref="T:System.IO.TextWriter" /> to which the content is written.</param>
70
+ /// <param name="encoder">The <see cref="T:System.Text.Encodings.Web.HtmlEncoder" /> which encodes the content to be written.</param>
56
71
public void WriteTo ( TextWriter writer , HtmlEncoder encoder )
57
72
{
58
73
_textWriter ( writer ) ;
You can’t perform that action at this time.
0 commit comments