invalidcontextstateexception.cs

来自「C#的数据层架构」· CS 代码 · 共 33 行

CS
33
字号
using System;

namespace Framework.Transactions
{
	/// <summary>
	/// Summary description for InvalidContextStateException.
	/// </summary>
	public class InvalidContextStateException : TransactionContextException
	{
		private TransactionContextState _currentState;
		private TransactionContextState[] _allowedStates;

		public InvalidContextStateException() : base() { }
		public InvalidContextStateException(string message) : base(message) { }
		public InvalidContextStateException(
			TransactionContextState currentState, TransactionContextState[] allowedStates, string message) 
			: base(message) 
		{ 
			_currentState = currentState;
			_allowedStates = allowedStates;
		}

		public TransactionContextState CurrentState 
		{
			get { return _currentState; }
		}
		public TransactionContextState[] AllowedStates
		{
			get { return _allowedStates; }
		}
	}
}

⌨️ 快捷键说明

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