Spring.Transaction.Interceptor.RollbackRuleAttribute.GetDepth C# (CSharp) Method

GetDepth() public method

Return the depth to the matching superclass execption System.Type.
A return value of 0 means that the exceptionType matches.
public GetDepth ( Type exceptionType ) : int
exceptionType System.Type /// The of exception to find. ///
return int
		public int GetDepth( Type exceptionType )
		{
			return getDepth( exceptionType, 0 );
		}

Same methods

RollbackRuleAttribute::GetDepth ( object exception ) : int

Usage Example

 public void AlwaysTrue()
 {
     RollbackRuleAttribute rr = new RollbackRuleAttribute("System.Exception");
     Assert.IsTrue(rr.GetDepth(typeof (SystemException)) > 0);
     Assert.IsTrue(rr.GetDepth(typeof (ApplicationException)) > 0);
     Assert.IsTrue(rr.GetDepth(typeof (DataException)) > 0);
     Assert.IsTrue(rr.GetDepth(typeof (TransactionSystemException)) > 0);
 }
All Usage Examples Of Spring.Transaction.Interceptor.RollbackRuleAttribute::GetDepth