Index: test/Common/DelftTools.Utils.Tests/Aop/TestClasses/InvokeRequiredTestClass.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- test/Common/DelftTools.Utils.Tests/Aop/TestClasses/InvokeRequiredTestClass.cs (.../InvokeRequiredTestClass.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ test/Common/DelftTools.Utils.Tests/Aop/TestClasses/InvokeRequiredTestClass.cs (.../InvokeRequiredTestClass.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -18,6 +18,26 @@ public int CallsWithoutInvokeCount { get; private set; } + public bool IsDisposed { get; set; } + + [InvokeRequired] + public void SynchronizedMethod() + { + if (!InvokeRequired) + { + CallsWithoutInvokeCount++; + } + } + + public void Dispose() + { + using (InvokeRequiredAttribute.BlockInvokeCallsDuringDispose()) + { + Thread.Sleep(50); + IsDisposed = true; + } + } + #region ISynchronizeInvoke Members public IAsyncResult BeginInvoke(Delegate method, object[] args) @@ -39,29 +59,12 @@ public bool InvokeRequired { - get { return Thread.CurrentThread != mainThread; } - } - - #endregion - - [InvokeRequired] - public void SynchronizedMethod() - { - if(!InvokeRequired) + get { - CallsWithoutInvokeCount++; + return Thread.CurrentThread != mainThread; } } - public void Dispose() - { - using (InvokeRequiredAttribute.BlockInvokeCallsDuringDispose()) - { - Thread.Sleep(50); - IsDisposed = true; - } - } - - public bool IsDisposed { get; set; } + #endregion } } \ No newline at end of file