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

📄 exceptionattribute.cs

📁 应用AOP
💻 CS
字号:
//
// Write by Peopleyl 2007-04-13
//
using System;
using Aspect.AopBase;

namespace Aspect.Exception
{
	[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method)]
	public class ExceptionAttribute:AspectAttribute
	{	
		#region ExceptionAttribute Members
		private object returnValue;
		
		public ExceptionAttribute()
		{}

		public ExceptionAttribute(object returnValue)
		{
			this.returnValue = returnValue;
		}
		
		public object ReturnValue
		{
			get{ return this.returnValue; }
		}

		#endregion
		
		#region AspectAttribute override Members

		public override string Name
		{
			get
			{
				return "ExceptionAop";
			}
		}

		public override AspectProperty GetContextProperty(string aopName)
		{
			return new ExceptionProperty(aopName);
		}

		#endregion 
	}
}

⌨️ 快捷键说明

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