private void CheckForCircularLink(ConnectionIntercept intercept) { if (mIntercept != null) { if (mIntercept == intercept) { throw new Exception("Circular links with intercepts not allowed!"); } mIntercept.CheckForCircularLink(intercept); } }
public ConnectionIntercept Accept(object connection) { ConnectionIntercept TempResult = null; if (mIntercept != null) { TempResult = mIntercept.Accept(connection); } if (TempResult != null) { TempResult.Intercept = DoAccept(connection); } else { TempResult = DoAccept(connection); } return(TempResult); }