Commit Graph

202 Commits

Author SHA1 Message Date
Markus Ewald
1aad371ece Added XNA 4.0 XBox 360 project; fixed compilation errors that would result from compiling Nuclex.Support on the XBox 360's special compact framework
git-svn-id: file:///srv/devel/repo-conversion/nusu@202 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-09-17 01:43:00 +00:00
Markus Ewald
5f5b8b519b Updated license statement for the year 2010 ;-)
git-svn-id: file:///srv/devel/repo-conversion/nusu@201 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-07-08 12:37:39 +00:00
Markus Ewald
d0f0e3d2c8 Added missing comment; minor cosmetic fixes
git-svn-id: file:///srv/devel/repo-conversion/nusu@200 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-07-08 12:32:41 +00:00
Markus Ewald
1ac86eebb0 Removed AssertHelper because this functionality is now integrated in NUnit
git-svn-id: file:///srv/devel/repo-conversion/nusu@199 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-05-16 10:03:19 +00:00
Markus Ewald
d8d7af174a Fixed compilation error: Math.DivRem() doesn't exist in the XNA Framework for XBox 360
git-svn-id: file:///srv/devel/repo-conversion/nusu@198 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-05-16 09:45:21 +00:00
Markus Ewald
bbd0849d43 Upgraded from NUnit 2.5.0 to NUnit 2.5.5; upgraded from NMock 2.0.0.44 to NMock 2.1
git-svn-id: file:///srv/devel/repo-conversion/nusu@197 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-04-28 13:19:43 +00:00
Markus Ewald
cf30cf4002 Fixed output file name; added missing NUnit reference
git-svn-id: file:///srv/devel/repo-conversion/nusu@196 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-04-16 12:53:44 +00:00
Markus Ewald
6650be96c8 Updated project files to a more consistent naming scheme; added .NET 4.0 project
git-svn-id: file:///srv/devel/repo-conversion/nusu@195 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-04-16 11:09:25 +00:00
Markus Ewald
a0a0b73a13 Fixed a nasty bug that would corrupt the WeakCollection upon calling RemoveDeadItems()
git-svn-id: file:///srv/devel/repo-conversion/nusu@194 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-04-16 10:26:06 +00:00
Markus Ewald
f0289632f6 WeakCollection now accepts a custom EqualityComparer to be specified
git-svn-id: file:///srv/devel/repo-conversion/nusu@193 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-03-30 11:02:04 +00:00
Markus Ewald
b8dbf8f40d Added an object Pool that can be used to recycle objects in order to avoid garbage buildup; wrote unit tests for the new pool class; added interface through which objects entering the pool can be instructed to revert their state
git-svn-id: file:///srv/devel/repo-conversion/nusu@192 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-03-15 19:08:10 +00:00
Markus Ewald
2b94c316f6 Split Scheduler class into two files, one containing only the static time source management code (which I might decide to put somewhere else after all); added an option for users of the scheduler to query the scheduler's time source; fixed typo
git-svn-id: file:///srv/devel/repo-conversion/nusu@191 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-03-03 20:47:45 +00:00
Markus Ewald
35a4da16fc Added overloads for the StringBuilderHelper.Append() method to limit the number of decimal places being displayed; wrote unit tests for the new functionality
git-svn-id: file:///srv/devel/repo-conversion/nusu@190 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-02-15 19:19:26 +00:00
Markus Ewald
03eb31403d Added double precision overloads for the garbage-free string builder appending methods; the string builder helper methods for floating point values now tell whether they successfully appended a value instead of using an assertion and appending a wrong(!) value; restored full test coverage for the whole assembly
git-svn-id: file:///srv/devel/repo-conversion/nusu@189 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-02-11 21:50:41 +00:00
Markus Ewald
237fb57fc8 Added an interface for the scheduler service (this might be once candidate for replacement by different implementations); added a new helper class for the StringBuilder that allows garbage-free appending of integers and floats; added unit tests for most of the code
git-svn-id: file:///srv/devel/repo-conversion/nusu@188 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-02-11 21:07:04 +00:00
Markus Ewald
66f0ae9b34 The AffineThreadPool class will now work on Mono as well; fixed naming inconsistency for the EnumHelper class; inverted the counting direction used by the Semaphore class so it is easier to read (most other Semaphores count in the direction it is using now)
git-svn-id: file:///srv/devel/repo-conversion/nusu@187 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-01-20 20:21:23 +00:00
Markus Ewald
11610cbbbe Added a new class, EnumHelper, which provides an implementation of Enum.GetValues() for the Xbox 360 and the GetHighestValue() and GetLowestValue() methods which can be useful if you want to create a flags array (eg. using the BitArray class) for an enumeration not declared with the [Flags] attribute or a flags enumeration not fitting within an integer or long; wrote unit tests for the new EnumHelper class, test coverage remains at 100.0%
git-svn-id: file:///srv/devel/repo-conversion/nusu@186 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-12-01 19:17:31 +00:00
Markus Ewald
52b83e8847 Added a notice that the link the code was base on appears to be dead
git-svn-id: file:///srv/devel/repo-conversion/nusu@185 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-11-17 19:42:54 +00:00
Markus Ewald
4d772fb498 Semaphore was initialized twice if its two-parameter constructor was used - fixed
git-svn-id: file:///srv/devel/repo-conversion/nusu@184 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-11-03 20:01:59 +00:00
Markus Ewald
53f29b87a0 Upgrded all XNA projects to XNA 3.1; build script no longer fails of CoverLib.dll cannot be registered (which is likely on Vista/7 due to UAC) - CoverLib.dll needs to be manually registered on these systems
git-svn-id: file:///srv/devel/repo-conversion/nusu@183 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-10-25 20:53:19 +00:00
Markus Ewald
655ae7ab10 Extended to IObservableCollection interface with an ItemsCleared event so subscribers observing the collection only to trigger 'Changed' events (versus subscribers observing the collection to wire/unwire themselves from the collection's items) can make use of the collection
git-svn-id: file:///srv/devel/repo-conversion/nusu@182 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-10-12 19:19:58 +00:00
Markus Ewald
d5293d8cb9 Made Semaphore usable on the XBox 360
git-svn-id: file:///srv/devel/repo-conversion/nusu@181 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-10-05 19:43:04 +00:00
Markus Ewald
9669adcab5 Improved documentation for the AffineThreadPool class
git-svn-id: file:///srv/devel/repo-conversion/nusu@180 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-27 10:48:38 +00:00
Markus Ewald
3c10f05589 Re-added the default exception handler which will now re-throw the exception, thereby mimicking the behavior of .NET's ThreadPool; wrote unit test to verify the default exception handler is working
git-svn-id: file:///srv/devel/repo-conversion/nusu@179 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-18 21:14:27 +00:00
Markus Ewald
273eb9885c AffineThreadPool.CpuCores is now called AffineThreadPool.Processors because this is the term used throughout the .NET framework for the same concept
git-svn-id: file:///srv/devel/repo-conversion/nusu@178 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-18 20:38:55 +00:00
Markus Ewald
874fe0a9e4 Found the synchronization problem in the affine thread pool - the auto reset event was being set twice before even a single thread pool thread made it through the WaitOne() - fixed by using a semaphore; implemented a semaphore that should work in the XBox 360; wrote unit tests for said semaphore; added messages to the affine thread pool's unit tests to make debugging easier
git-svn-id: file:///srv/devel/repo-conversion/nusu@177 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-18 20:06:09 +00:00
Markus Ewald
09247541f2 Removed the AssertionDelegate stuff and added an UnhandledException delegate to the ThreadPool - maybe I'll turn this into an event analogous to Application.ThreadException; removed the EmptyQueue method which was a flawed concept anyway (especially the disposing of state objects!); rewrote the unit tests to work with the new and improved AffineThreadPool class - there's one test that fails when run through NCover, indicating some synchronization problem that I have yet to track down!
git-svn-id: file:///srv/devel/repo-conversion/nusu@176 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-17 19:50:30 +00:00
Markus Ewald
7a7e71d0c3 Fixed XBox 360 compilation error
git-svn-id: file:///srv/devel/repo-conversion/nusu@175 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-16 20:07:36 +00:00
Markus Ewald
e74955b161 The AffineThreadPool class now also tries to create CPU-affine threads on the full .NET framework (which uses P/Invoke and tries to lock a managed thread to a system thread, probably needs some work for Mono)
git-svn-id: file:///srv/devel/repo-conversion/nusu@174 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-15 21:17:34 +00:00
Markus Ewald
05e4aebaac Replaced the affine thread pool with a less elegant implementation that works on the XBox 360
git-svn-id: file:///srv/devel/repo-conversion/nusu@173 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-15 20:03:19 +00:00
Markus Ewald
316e2c379a Added custom CPU core-affine thread pool implementation (which doesn't work on the XBox 360 because Monitor.Wait() and Monitor.Pulse() are not supported - but the code is so nice I want to capture this state in Subversion :D)
git-svn-id: file:///srv/devel/repo-conversion/nusu@172 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-15 19:39:08 +00:00
Markus Ewald
6ef2fdb789 Fixed a typo; fixed a bug in the plug-in library that would see generic types deriving from a required base class as suitable whereas they cannot be instantiated without a generic argument; added unit tests that reproduce the errors
git-svn-id: file:///srv/devel/repo-conversion/nusu@171 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-09-01 19:11:19 +00:00
Markus Ewald
35b1ca742d OperationQueue now attempts to prevent deep call stack nesting levels by looping when an Operation fired its AsyncEnded event synchronously; the OperationQueue's current operation index is now handled using the Interlocked methods, fixing a possible thread safety issue
git-svn-id: file:///srv/devel/repo-conversion/nusu@170 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-08-28 20:27:15 +00:00
Markus Ewald
2472c892fb Added a note about an unexplained exception that happened one time whilst executing the unit tests
git-svn-id: file:///srv/devel/repo-conversion/nusu@169 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-08-05 21:25:28 +00:00
Markus Ewald
88b89dea19 Fixed another compilation error that was causing the XBox 360 build to fail because .NET is missing the Math.DivRem() method on the XBox 360
git-svn-id: file:///srv/devel/repo-conversion/nusu@168 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-21 20:47:32 +00:00
Markus Ewald
d91dc70146 Fixed deque compilation error in release builds (missing #if..#endif around a place where a debug-only field was used)
git-svn-id: file:///srv/devel/repo-conversion/nusu@167 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-21 20:42:07 +00:00
Markus Ewald
9ec6546f70 Added out-of-sync check for the Deque enumerator; added unit test for the out-of-sync check
git-svn-id: file:///srv/devel/repo-conversion/nusu@166 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-14 21:52:40 +00:00
Markus Ewald
a56da772d4 Added missing CPL statements
git-svn-id: file:///srv/devel/repo-conversion/nusu@165 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-14 21:32:44 +00:00
Markus Ewald
0b23b1f7c4 lastBlockCount is called lastBlockEndIndex again (anyone got a better term - it's an index one past the last entry, not a count); implemented the CopyTo() method; added unit tests for the CopyTo() method
git-svn-id: file:///srv/devel/repo-conversion/nusu@164 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-14 21:08:10 +00:00
Markus Ewald
3ee5fdfc67 The deque class now fully supports the IList<> and IList interfaces (with the exception of CopyTo() and CopyToArray() which are not implemented yet); implemented a Clear() method; the deque enumerator is now fully functioning (but still missing an out-of-sync check); moved IndexOf() into its own file; wrote several additional unit tests to verify all the new interface methods are working and to keep test coverage at 100%
git-svn-id: file:///srv/devel/repo-conversion/nusu@163 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-14 20:15:34 +00:00
Markus Ewald
a817f52406 Fixed an ugly bug in the IndexOf() method; achieved 100% test coverage for the deque code so far
git-svn-id: file:///srv/devel/repo-conversion/nusu@162 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-13 21:17:09 +00:00
Markus Ewald
7885e86836 The deque's RemoveAt() method now shifts the objects in the direction that produces the least amount of work
git-svn-id: file:///srv/devel/repo-conversion/nusu@161 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-13 20:22:59 +00:00
Markus Ewald
58c3254260 Implemented more efficient Insert() method for the deque; split RemoveAt() into left-shifting and right-shifting specializations (right-shifting still is a copy of the left-shifting one, will fix it soon); improved unit tests to catch any and all border cases; made the IndexOf() method workable; wrote unit tests for the IndexOf() method; moved removal and insertion functions into the own sub-files to avoid having huge source files
git-svn-id: file:///srv/devel/repo-conversion/nusu@160 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-13 19:34:27 +00:00
Markus Ewald
ed62fa85f2 Implemented deque Insert() and RemoveAt() methods with fixed shifting of all items to the right for now - still have to extend the code to shift items to the closest end; added more unit tests to achieve 100% test coverage for the code
git-svn-id: file:///srv/devel/repo-conversion/nusu@159 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-11 19:55:59 +00:00
Markus Ewald
ff44edcdf1 Began implementing a block-allocating Deque class similar to C++'s std::deque - insertion and removal at both ends already working
git-svn-id: file:///srv/devel/repo-conversion/nusu@158 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-07-10 18:42:23 +00:00
Markus Ewald
74bf351727 Changed all remaining COMPACTFRAMEWORK constants around serialization code to NO_SERIALIZATION
git-svn-id: file:///srv/devel/repo-conversion/nusu@157 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-26 20:17:59 +00:00
Markus Ewald
8f16d09c8a Fixed compilation error on XBox 360
git-svn-id: file:///srv/devel/repo-conversion/nusu@156 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-25 19:36:18 +00:00
Markus Ewald
5d36825fc8 Attempt to fix a possible bug in the generic time source class which could potentially attempt to construct an instance of System.DateTime with an invalid tick count
git-svn-id: file:///srv/devel/repo-conversion/nusu@155 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-24 20:24:21 +00:00
Markus Ewald
839d46ecf1 The CommandLine class didn't construct command lines with empty arguments correctly (these need to be passed as empty quotes to be recognizable as an argument), fixed; added unit tests that exposes this bug; some minor cosmetic fixes
git-svn-id: file:///srv/devel/repo-conversion/nusu@154 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-24 19:20:26 +00:00
Markus Ewald
ce9a6bc932 Added a unit tests that reproduces the bug fixed in the previous commit
git-svn-id: file:///srv/devel/repo-conversion/nusu@153 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-22 18:54:12 +00:00