Example #1
0
 void GroupScopeClose(GroupScope scope)
 {
     scope.OnDisposed -= GroupScopeClose;
     if (_groupStack.Pop() != scope.Group)
     {
         throw new System.Exception("Unexpected group was closed.");
     }
 }
Example #2
0
        protected GroupScope Group(OutputGroup group)
        {
            var scope = new GroupScope(group);

            scope.OnDisposed += GroupScopeClose;

            _groupStack.Push(scope.Group);

            return(scope);
        }