⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cloudtag.cs

📁 该项目中对 SQLHelper 类进行了简单封装
💻 CS
字号:
/* 
 * CloudTag.cs @Microsoft Visual Studio 2008 <.NET Framework 3.5>
 * AfritXia
 * 2008-02-03
 * 
 * Copyright(c) http://www.AfritXia.NET/
 * 
 */

using System;

namespace NET.AfritXia.RssFoundation
{
	/// <summary>
	/// cloud 标记
	/// </summary>
	public class CloudTag : RssTagBase
	{
		#region 类构造器
		/// <summary>
		/// 类默认构造器
		/// </summary>
		public CloudTag()
			: base()
		{
		}
		#endregion

		/// <summary>
		/// 获取标记名称
		/// </summary>
		protected override string TagName
		{
			get
			{
				return "cloud";
			}
		}

		/// <summary>
		/// 空标记值
		/// </summary>
		public override object Value
		{
			set
			{
				throw new NotSupportedException("不能为该标记赋值 ( Cannot put value for this Tag )");
			}

			get
			{
				return null;
			}
		}

		/// <summary>
		/// 设置或获取 domain 属性
		/// </summary>
		public string Domain
		{
			set
			{
				if (value == null)
				{
					base.RemoveAttribute("domain");
					return;
				}

				base.AddAttribute("domain", value);
			}

			get
			{
				return base.GetAttribute("domain") as string;
			}
		}

		/// <summary>
		/// 设置或获取 port 属性, -1 清除该属性
		/// </summary>
		public int Port
		{
			set
			{
				if (value == -1)
				{
					base.RemoveAttribute("port");
					return;
				}

				base.AddAttribute("port", value);
			}

			get
			{
				object attrValue = base.GetAttribute("port");

				if (attrValue == null)
					return 80;

				return Convert.ToInt32(attrValue);
			}
		}

		/// <summary>
		/// 设置或获取 path 属性
		/// </summary>
		public string Path
		{
			set
			{
				if (value == null)
				{
					base.RemoveAttribute("path");
					return;
				}

				base.AddAttribute("path", value);
			}

			get
			{
				return base.GetAttribute("path") as string;
			}
		}

		/// <summary>
		/// 设置或获取 registerProcedure 属性
		/// </summary>
		public string RegisterProcedure
		{
			set
			{
				if (value == null)
				{
					base.RemoveAttribute("registerProcedure");
					return;
				}

				base.AddAttribute("registerProcedure", value);
			}

			get
			{
				return base.GetAttribute("registerProcedure") as string;
			}
		}

		/// <summary>
		/// 设置或获取 protocol 属性
		/// </summary>
		public string Protocol
		{
			set
			{
				if (value == null)
				{
					base.RemoveAttribute("protocol");
					return;
				}

				base.AddAttribute("protocol", value);
			}

			get
			{
				return base.GetAttribute("protocol") as string;
			}
		}
	}
}

⌨️ 快捷键说明

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