Backup/Wilco.SyntaxHighlighting/Web/SyntaxHighlighter.cs
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wilco.SyntaxHighlighting;
namespace Wilco.Web.SyntaxHighlighting
{
/// <summary>
/// Represents a syntax highligher.
/// </summary>
[ParseChildren(true), PersistChildren(false)]
public partial class SyntaxHighlighter : WebControl
{
private bool rendered;
private HighlightMode mode;
private IParser htmlParser;
private ITemplate codeLayoutTemplate;
private ITemplate lineNumberTemplate;
private ITemplate sourceLineTemplate;
private ITemplate separatorTemplate;
private static readonly object EventParseToken = new object();
/// <summary>
/// Gets or sets the highlight mode.
/// </summary>
[Description("The highlight mode.")]
public HighlightMode Mode
{
get
{
return this.mode;
}
set
{
if (value != this.mode)
{
if (this.mode == HighlightMode.Source || this.mode == HighlightMode.Inline || this.mode == HighlightMode.Literal)
this.mode = value;
else
throw new ArgumentException("Hightlight mode must either be source, inline or literal.", "mode");
}
}
}
/// <summary>
/// Gets or sets the default language in which the source code is written.
/// </summary>
[Description("The default language in which the source code is written.")]
public string Language
{
get
{
object savedState = this.ViewState["Language"];
if (savedState != null)
return (string)savedState;
return "C#";
}
后面还有 404 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
