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

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