Ejemplo n.º 1
0
        /// <summary>
        /// Removes the given object from the backing store.
        /// </summary>
        public override void RemoveValue(ILifetimeContainer container = null)
        {
            var disposable = GetValue() as IDisposable;

            disposable?.Dispose();

            UnityPerRequestHttpModule.SetValue(_lifetimeKey, null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Stores the given value into the backing store for retrieval later.
 /// </summary>
 /// <param name="newValue">The object being stored.</param>
 public override void SetValue(object newValue, ILifetimeContainer container = null)
 {
     UnityPerRequestHttpModule.SetValue(_lifetimeKey, newValue);
 }