void IDisposable.Dispose()
 {
     _server.Stop();
     if (_ep != null)
     {
         _ep.Dispose();
     }
 }
Exemple #2
0
 void Dispose(bool disposing)
 {
     if (disposing)
     {
         Log.InfoFormat("The mobile client is being disposed");
         updateProcessor.Dispose();
         eventProcessor.Dispose();
     }
 }
Exemple #3
0
 private void Dispose(bool disposing)
 {
     if (disposing) // follow standard IDisposable pattern
     {
         _log.Info("Closing LaunchDarkly client");
         _eventProcessor.Dispose();
         _dataStore.Dispose();
         _dataSource.Dispose();
         _bigSegmentStoreWrapper?.Dispose();
     }
 }
Exemple #4
0
        void Dispose(bool disposing)
        {
            if (disposing)
            {
                Log.InfoFormat("Shutting down the LaunchDarkly client");

                _backgroundModeManager.BackgroundModeChanged -= OnBackgroundModeChanged;
                _connectionManager.Dispose();
                eventProcessor.Dispose();

                // Reset the static Instance to null *if* it was referring to this instance
                DetachInstance();
            }
        }
        public void FinalFlushIsDoneOnDispose()
        {
            _ep = MakeProcessor(_config);
            IdentifyEvent e = EventFactory.Default.NewIdentifyEvent(_user);

            _ep.SendEvent(e);

            PrepareResponse(OkResponse());
            _ep.Dispose();

            JArray output = GetLastRequest().BodyAsJson as JArray;

            Assert.Collection(output,
                              item => CheckIdentifyEvent(item, e, _userJson));
        }
        public void FinalFlushIsDoneOnDispose()
        {
            _ep = MakeProcessor(_config);
            IdentifyEvent e = EventFactory.Default.NewIdentifyEvent(_user);

            _ep.SendEvent(e);

            PrepareResponse(OkResponse());
            _ep.Dispose();

            var bodyStr = JsonConvert.SerializeObject(GetLastRequest().BodyAsJson);
            var output  = LdValue.Parse(bodyStr).AsList(LdValue.Convert.Json);

            Assert.Collection(output,
                              item => CheckIdentifyEvent(item, e, _userJson));
        }
Exemple #7
0
        void Dispose(bool disposing)
        {
            if (disposing)
            {
                _log.Info("Shutting down the LaunchDarkly client");

                _dataSourceUpdateSink.UpdateStatus(DataSourceState.Shutdown, null);

                _backgroundModeManager.BackgroundModeChanged -= OnBackgroundModeChanged;
                _connectionManager.Dispose();
                _dataStore.Dispose();
                _eventProcessor.Dispose();

                // Reset the static Instance to null *if* it was referring to this instance
                DetachInstance();
            }
        }
Exemple #8
0
 private void Dispose(bool disposing)
 {
     if (disposing) // follow standard IDisposable pattern
     {
         Log.Info("Closing LaunchDarkly client.");
         // See comments in LdClient constructor: eventually all of these implementation objects
         // will be factory-created and will have the same lifecycle as the client.
         if (_shouldDisposeEventProcessor)
         {
             _eventProcessor.Dispose();
         }
         if (_shouldDisposeFeatureStore)
         {
             _featureStore.Dispose();
         }
         _updateProcessor.Dispose();
     }
 }
 /// <summary>
 /// Implement Dispose resources
 /// </summary>
 protected override void DisposeManagedResources()
 {
     DisposeInit();
     eventProcessor.Dispose();
 }
Exemple #10
0
 public void Dispose()
 {
     _processor.Dispose();
 }
Exemple #11
0
 private void ReleaseEventProcessor(IEventProcessor ep)
 {
     // TODO: add tracing
     ep.Dispose();
 }
Exemple #12
0
 public void Stop()
 {
     _container?.Dispose();
     _eventProcessor?.Dispose();
     _eventStore?.AttemptDispose();
 }