Exemplo n.º 1
0
 private void FailOnDestroy()
 {
     try
     {
         stateManager.Destroy();
         Assert.Fail();
     }
     catch (IllegalStateTransitionException)
     {
         // Expected
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Dispose the Adapter, stopping the sending of all events and releasing all
        /// the resources, and disallowing any further state changes on the Adapter.
        /// </summary>
        /// <throws>EPException to indicate errors during destroy</throws>
        public virtual void Destroy()
        {
            var tempSender = Interlocked.Exchange(ref _sender, null);

            if (tempSender != null)
            {
                tempSender.OnFinish();
            }

            StateManager.Destroy();
            Close();
        }