예제 #1
0
        public void InitializeTest()
        {
            // workaround for having a half-started repository
            if (RepositoryInstance.Started())
            {
                RepositoryInstance.Shutdown();
            }

            SnTrace.Test.Enabled = true;

            if (_testMethodOperation != null)
            {
                SnTrace.Test.Write("The operation was forced to close.");
                _testMethodOperation.Successful = false;
                _testMethodOperation.Dispose();
            }
            _testMethodOperation = SnTrace.Test.StartOperation("TESTMETHOD: " + TestContext.TestName);
        }
예제 #2
0
 public void _FinishTest(TestContext testContext)
 {
     if (_snTraceOperation != null)
     {
         _snTraceOperation.Successful = true;
         _snTraceOperation.Dispose();
     }
     SnTrace.Flush();
 }
예제 #3
0
파일: TreeLock.cs 프로젝트: sztomi/sensenet
        public void Dispose()
        {
            DataProvider.Current.ReleaseTreeLock(_lockIds);

            if (this.logOp != null)
            {
                logOp.Successful = true;
                logOp.Dispose();
            }
        }
예제 #4
0
 public void Dispose()
 {
     //TODO: find a better design instead of calling an asynchronous method
     // synchronously inside a Dispose method.
     DataStore.ReleaseTreeLockAsync(_lockIds, CancellationToken.None).GetAwaiter().GetResult();
     if (_logOp != null)
     {
         _logOp.Successful = true;
         _logOp.Dispose();
     }
 }