コード例 #1
0
            internal SuspendToken(SuspendableDocumentLeafNode parent)
            {
                var suspendLevel = System.Threading.Interlocked.Increment(ref parent._suspendLevel);

                _parent = parent;

                if (1 == suspendLevel)
                {
                    try
                    {
                        _parent.OnSuspended();
                    }
                    catch (Exception)
                    {
                        System.Threading.Interlocked.Decrement(ref parent._suspendLevel);
                        _parent = null;
                        throw;
                    }
                }
            }
コード例 #2
0
			internal TemporaryResumeToken(SuspendableDocumentLeafNode parent)
			{
				_parent = parent;
			}
コード例 #3
0
			internal SuspendToken(SuspendableDocumentLeafNode parent)
			{
				var suspendLevel = System.Threading.Interlocked.Increment(ref parent._suspendLevel);
				_parent = parent;

				if (1 == suspendLevel)
				{
					try
					{
						_parent.OnSuspended();
					}
					catch (Exception)
					{
						System.Threading.Interlocked.Decrement(ref parent._suspendLevel);
						_parent = null;
						throw;
					}
				}
			}
コード例 #4
0
			protected override IEnumerable<DocumentNodeAndName> GetDocumentNodeChildrenWithName()
			{
				if (null != _child)
					yield return new DocumentNodeAndName(_child, () => _child = null, "Child");
			}
コード例 #5
0
			public TestNodeWithoutChild_SuspendableDocumentNode(SuspendableDocumentLeafNode child)
			{
				_child = child;
			}
コード例 #6
0
 internal TemporaryResumeToken(SuspendableDocumentLeafNode parent)
 {
     _parent = parent;
 }