Exemple #1
0
 public void OnDeactivation(ResolvedServiceEntry entry, Deactivation deactivation)
 {
     foreach (IServiceContainerListener listener in _pluginManager.AllListeners)
       {
     listener.OnDeactivation(entry, deactivation);
       }
 }
Exemple #2
0
 public void Remember(ResolvedServiceEntry entry, Activation activation)
 {
     activation.AssertIsFullyActivated();
       if (_trackingPolicy.Remember(entry, activation) == TrackingStatus.New)
       {
     _listenerInvoker.OnActivation(entry, activation);
     entry.IncrementActiveInstances();
       }
 }
Exemple #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);
     }
       }
 }
Exemple #4
0
 public override void OnActivation(ResolvedServiceEntry entry, Activation activation)
 {
     IDisposable disposable = activation.Instance as IDisposable;
       if (disposable == null) return;
       using (RWLock.AsReader(_lock))
       {
     if (RWLock.UpgradeToWriterIf(_lock, () => { return !_disposables.Contains(disposable); }))
     {
       _disposables.Add(disposable);
     }
       }
 }
 public virtual void OnDeactivation(ResolvedServiceEntry entry, Deactivation deactivation)
 {
 }
 public virtual void OnActivation(ResolvedServiceEntry entry, Activation activation)
 {
 }
 public Creation(ResolvedServiceEntry entry, Activation activation)
 {
     _entry = entry;
       _activation = activation;
 }
 public void Add(ResolvedServiceEntry entry, Activation activation)
 {
     _creations.Add(new Creation(entry, activation));
 }
 public void OnActivation(ResolvedServiceEntry entry, Activation activation)
 {
     _creations.Add(entry, activation);
 }
Exemple #10
0
 public override void OnActivation(ResolvedServiceEntry entry, Activation activation)
 {
 }
 public RememberedActivation(ResolvedServiceEntry resolvedEntry, Activation activation)
 {
     this.ResolvedEntry = resolvedEntry;
       this.Activation = activation;
 }