CK.WordPredictor.Engines.SybilleWordPredictorEngineFactory.Release C# (CSharp) Method

Release() public method

public Release ( IWordPredictorEngine engine ) : void
engine IWordPredictorEngine
return void
        public void Release( IWordPredictorEngine engine )
        {
            var disposable = engine as IDisposable;
            if( disposable != null )
            {
                disposable.Dispose();
            }
        }

Usage Example

 public void Release_Should_Call_Dispose()
 {
     SybilleWordPredictorEngineFactory f = new SybilleWordPredictorEngineFactory( TestHelper.SybilleResourceFullPath, TestHelper.MockFeature( 8 ).Object );
     var engine = new DisposableEngine();
     f.Release( engine );
     Assert.That( engine.DisposedCalled );
 }
All Usage Examples Of CK.WordPredictor.Engines.SybilleWordPredictorEngineFactory::Release