Beispiel #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                lock (this) {
                    resolver?.Dispose();
                    container?.Dispose();
                }
            }

            lock (this) {
                resolver  = null;
                container = null;
            }
        }
Beispiel #2
0
 public void OpenScope(string name = null)
 {
     _scope?.Dispose();
     _scope = _container.OpenScope(name);
 }
Beispiel #3
0
 /// <summary>Disposes underlying container.</summary>
 public void Dispose() => _scopedResolver.Dispose();
Beispiel #4
0
 /// <summary>Disposes the underlying resolver context</summary>
 public void Dispose() => _resolverContext.Dispose();
 public void Dispose()
 {
     _resolver.Dispose();
 }
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     _context.Dispose();
 }
 public void Dispose() => _ctx.Dispose();
Beispiel #8
0
 /// <summary>Disposed underlying scoped container.</summary>
 public void Dispose() => ScopedContainer?.Dispose();
Beispiel #9
0
 public void Dispose() => _scope.Dispose();
Beispiel #10
0
 /// <summary>
 /// Disposes scoped container
 /// </summary>
 public void Dispose()
 {
     _onDispose?.Invoke();
     _resolveContext.Dispose();
 }
Beispiel #11
0
 protected void ResetLifetime()
 {
     ScopeContext?.Dispose();
     ScopeContext = Container.OpenScope();
 }
Beispiel #12
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose() => _context.Dispose();