本文整理汇总了C#中System.IO.StringWriter.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# StringWriter.GetType方法的具体用法?C# StringWriter.GetType怎么用?C# StringWriter.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.StringWriter
的用法示例。
在下文中一共展示了StringWriter.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Render
protected override void Render(HtmlTextWriter writer)
{
// Render the content of this control to a string
StringWriter sw = new StringWriter();
System.Reflection.ConstructorInfo constructor
= writer.GetType().GetConstructor(new Type[] { sw.GetType() });
HtmlTextWriter htw = constructor.Invoke(new object[] {sw}) as HtmlTextWriter;
base.RenderChildren(htw);
htw.Close();
// Filter the string and write the result
Filter f = new Filter();
f.ClientSideFilterName = ClientSideFilterName;
f.SupportNoScriptTables = SupportNoScriptTables;
f.MaxComplexity = MaxComplexity;
f.TrustedImageUrlRegex = TrustedImageUrlRegex;
f.SpamFreeLinkUrlRegex = SpamFreeLinkUrlRegex;
writer.Write(f.FilterUntrusted(sw.ToString()));
}