Example #1
0
        /// <summary>
        /// Opens a new scope
        /// </summary>
        public static IDisposable Create()
        {
            var protector = new HandleProtector(Current);
            Current = protector;

            return protector;
        }
Example #2
0
        /// <summary>
        /// Opens a new scope
        /// </summary>
        public static IDisposable Create()
        {
            var protector = new HandleProtector(Current);

            Current = protector;

            return(protector);
        }
Example #3
0
 /// <summary>
 /// Creates a new instance of the <see cref="HandleProtector"/> class
 /// </summary>
 public HandleProtector(IHandleProtector previous)
 {
     _previous = previous;
 }
Example #4
0
 /// <summary>
 /// Creates a new instance of the <see cref="HandleProtector"/> class
 /// </summary>
 public HandleProtector(IHandleProtector previous)
 {
     _previous = previous;
 }