示例#1
0
 private void RenderBufferedAttributeValueAccessor(CSharpCodeWriter writer)
 {
     if (_designTimeMode)
     {
         // There is no value buffer in design time mode but we still want to write out a value. We write a
         // value to ensure the tag helper's property type is string.
         writer.Write("string.Empty");
     }
     else
     {
         writer.WriteInstanceMethodInvocation(StringValueBufferVariableName,
                                              "ToString",
                                              endLine: false);
     }
 }
 private void RenderBufferedAttributeValueAccessor(CSharpCodeWriter writer)
 {
     if (_designTimeMode)
     {
         // There is no value buffer in design time mode but we still want to write out a value. We write a
         // value to ensure the tag helper's property type is string.
         writer.Write("string.Empty");
     }
     else
     {
         writer.WriteInstanceMethodInvocation(
             StringValueBufferVariableName,
             _tagHelperContext.TagHelperContentGetContentMethodName,
             endLine: false,
             parameters: new string[] { _tagHelperContext.HtmlEncoderPropertyName });
     }
 }
 private void RenderBufferedAttributeValueAccessor(CSharpCodeWriter writer)
 {
     if (_designTimeMode)
     {
         // There is no value buffer in design time mode but we still want to write out a value. We write a
         // value to ensure the tag helper's property type is string.
         writer.Write("string.Empty");
     }
     else
     {
         writer.WriteInstanceMethodInvocation(
             StringValueBufferVariableName,
             _tagHelperContext.TagHelperContentGetContentMethodName,
             endLine: false,
             parameters: new string[] { _tagHelperContext.HtmlEncoderPropertyName });
     }
 }
 private void RenderBufferedAttributeValueAccessor(CSharpCodeWriter writer)
 {
     if (_designTimeMode)
     {
         // There is no value buffer in design time mode but we still want to write out a value. We write a
         // value to ensure the tag helper's property type is string.
         writer.Write("string.Empty");
     }
     else
     {
         writer.WriteInstanceMethodInvocation(StringValueBufferVariableName,
                                              "ToString",
                                              endLine: false);
     }
 }