strawpollcontrolbuilder.cs

来自「Professional C# 2nd Edition」· CS 代码 · 共 27 行

CS
27
字号
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Collections;

namespace PCSCustomWebControls
{
	/// <summary>
	/// Summary description for StrawPollControlBuilder.
	/// </summary>
	internal class StrawPollControlBuilder : ControlBuilder
	{
		public override Type GetChildControlType(string tagName, IDictionary attribs)
		{
			if (tagName.ToLower().EndsWith("candidate"))
				return typeof(Candidate);
			return null;
		}

		public override void AppendLiteralString(string s)
		{
			// Do nothing, to avoid embedded text being added to control
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?