Ejemplo n.º 1
0
        /// <summary>
        /// Adds to lifetime.
        /// </summary>
        /// <param name="instanceScope">The instance scope.</param>
        public void AddToLifetime(IAmALifetime instanceScope)
        {
            instanceScope.Add(this);

            if (_successor != null)
            {
                _successor.AddToLifetime(instanceScope);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds to lifetime.
        /// </summary>
        /// <param name="instanceScope">The instance scope.</param>
        public void AddToLifetime(IAmALifetime instanceScope)
        {
            if (this is IDisposable)
            {
                instanceScope.Add(this);
            }

            if (successor != null)
            {
                successor.AddToLifetime(instanceScope);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds to lifetime.
 /// </summary>
 /// <param name="instanceScope">The instance scope.</param>
 public void AddToLifetime(IAmALifetime instanceScope)
 {
     instanceScope.Add(this);
     _successor?.AddToLifetime(instanceScope);
 }