Example #1
0
 public void OnDeactivation(ResolvedServiceEntry entry, Deactivation deactivation)
 {
     foreach (IServiceContainerListener listener in _pluginManager.AllListeners)
       {
     listener.OnDeactivation(entry, deactivation);
       }
 }
Example #2
0
 public void Deactivate(IResolutionServices services, object instance)
 {
     Deactivation deactivation = new Deactivation(instance);
       RememberedActivation rememberedActivation = _trackingPolicy.RetrieveAndForget(instance);
       if (rememberedActivation != null)
       {
     _listenerInvoker.OnDeactivation(rememberedActivation.ResolvedEntry, deactivation);
     rememberedActivation.Deactivate(services);
       }
 }
Example #3
0
 public override void OnDeactivation(ResolvedServiceEntry entry, Deactivation deactivation)
 {
     IDisposable disposable = deactivation.Instance as IDisposable;
       if (disposable == null) return;
       using (RWLock.AsWriter(_lock))
       {
     if (_disposables.Contains(disposable))
     {
       DisposeOf(disposable);
     }
       }
 }
 public virtual void OnDeactivation(ResolvedServiceEntry entry, Deactivation deactivation)
 {
 }