Commit Graph

70 Commits

Author SHA1 Message Date
Markus Ewald
a4000c106a Added an ObservableList class which is like the ObservableCollection, but allows indexed access
git-svn-id: file:///srv/devel/repo-conversion/nusu@220 d2e56fa2-650e-0410-a79f-9358c0239efd
2011-08-24 11:33:22 +00:00
Markus Ewald
b7c883ea8d Assigning null to a key in the MultiDictionary will not delete that key (this behavior is symmetric with the behavior of querying the values under a key where null indicates that the key doesn't exist - it also doesn't add any "secret tricks" because the normal Dictionary doesn't intersect this functionality of having an extra container between the key and the values)
git-svn-id: file:///srv/devel/repo-conversion/nusu@217 d2e56fa2-650e-0410-a79f-9358c0239efd
2011-08-14 09:33:10 +00:00
Markus Ewald
a08939e914 Added INotifyCollectionChanged interface to ObservableCollection and ObservableDictionary; added a new dictionary type, the MultiDictionary which is equivalent to the C++ multimap<> class
git-svn-id: file:///srv/devel/repo-conversion/nusu@215 d2e56fa2-650e-0410-a79f-9358c0239efd
2011-07-04 22:21:57 +00:00
Markus Ewald
aa5e4d12cc Upgraded unit tests to NMock 3.0
git-svn-id: file:///srv/devel/repo-conversion/nusu@214 d2e56fa2-650e-0410-a79f-9358c0239efd
2011-03-08 20:36:43 +00:00
Markus Ewald
46cbc920b1 Removed some XNA 3.1 code paths; cleaned up constant usage in platform-specific code sections
git-svn-id: file:///srv/devel/repo-conversion/nusu@211 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-12-24 01:02:56 +00:00
Markus Ewald
374152cd63 Added XNA 4.0 for Windows Phone 7 project; updated Nuclex.Support to compile targeting Windows Phone 7
git-svn-id: file:///srv/devel/repo-conversion/nusu@203 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-09-17 15:29:22 +00:00
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
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
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
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
d0fe47239e Replaced all ExpectedExceptionAttributes with the new Assert.Throws<>() method to work around a compatibility issue between TeamCity 4.5 and NUnit 2.5 Final
git-svn-id: file:///srv/devel/repo-conversion/nusu@137 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-05-07 19:36:27 +00:00
Markus Ewald
d845b08a91 IObservableCollection was internal - fixed
git-svn-id: file:///srv/devel/repo-conversion/nusu@135 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-05-06 18:42:08 +00:00
Markus Ewald
1c317b3f66 Moved RingMemoryStream class from the Collections namespace to the IO namespace
git-svn-id: file:///srv/devel/repo-conversion/nusu@133 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-04-28 20:44:36 +00:00
Markus Ewald
889a47db6d Added new interface IObservableCollection which can be used to find out whether a collection can be observed, even if it is only published by its generic .NET interface
git-svn-id: file:///srv/devel/repo-conversion/nusu@123 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-03-19 19:34:11 +00:00
Markus Ewald
743fc9cc09 Fixed some typos in the comments; added weak collection which stores objects by weak reference; moved UNITTEST #if to the top of the files for some unit tests
git-svn-id: file:///srv/devel/repo-conversion/nusu@122 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-03-11 19:20:28 +00:00
Markus Ewald
1f1faac82a Fixed a typo
git-svn-id: file:///srv/devel/repo-conversion/nusu@118 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-01-26 20:06:41 +00:00
Markus Ewald
b90ff1c78b Added new class ObservableDictionary to the collection class library; 100% test coverage for the new ObservableDictionary class; fixed some minor issues with the code of ObservableCollection and ReadOnlyDictionary
git-svn-id: file:///srv/devel/repo-conversion/nusu@117 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-01-26 20:05:32 +00:00
Markus Ewald
2ab3b22c60 Fixed failing unit tests on Mono; used CollectionAssert.AreEquivalent() instead of CollectionAssert.AreEqual() since the order of items in a Dictionary is unspecified and Mono makes use of this allowance; fixed one serious bug that should have been caught by the .NET 2.0 unit tests: the enumeration of ReadOnlyDictionary via ICollection should return DictionaryEntry[] and not KeyValuePair<>[]
git-svn-id: file:///srv/devel/repo-conversion/nusu@115 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-01-13 20:00:13 +00:00
Markus Ewald
0a483b4d44 Made Nuclex.Support compileable on the XBox 360; added new XNA 3.0 project to compile Nuclex.Support on the XBox 360; added my own AssemblyLoadEventArgs implementation since the XBox 360 XNA framework doesn't provide it; other minor fixes so Nuclex.Support can cope with the XBox 360 XNA framework
git-svn-id: file:///srv/devel/repo-conversion/nusu@113 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-01-13 18:50:52 +00:00
Markus Ewald
6eb49ed0d2 Updated copyright statement to include the year 2009 =); finally decided to make some of the NUnit assert helper methods public and include it in Nuclex.Support (yes, that means those methods won't be there in a build with unit testing disabled, a compromise accepted now)
git-svn-id: file:///srv/devel/repo-conversion/nusu@111 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-01-07 19:05:29 +00:00
Markus Ewald
88b51ef0fa Eliminated warnings that still came up when compiling with the mono C# compiler; all classes in the Nuclex.Support.Scheduling namespace now have 100% test coverage
git-svn-id: file:///srv/devel/repo-conversion/nusu@103 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-12-07 19:36:29 +00:00
Markus Ewald
ecb36e9ce3 Fixed a comment in read only list sources; achieved 100% test coverage for the read only dictionary wrapper - that makes 100% test coverage for all collection classes; implemented serialization into the read only dictionary class to perfectly emulate the behavior of the .NET framework dictionary
git-svn-id: file:///srv/devel/repo-conversion/nusu@98 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-27 20:36:51 +00:00
Markus Ewald
5c90646327 Achieved 100% test coverage for the TransformingReadOnlyCollection and ReadOnlyList classes
git-svn-id: file:///srv/devel/repo-conversion/nusu@97 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-27 19:40:43 +00:00
Markus Ewald
195ba1df30 Reformatted the comments in the RingMemoryStream class so my favorite IDE (Visual Studio) will not destroy indentation on auto-formatting anymore; achieved 100% test coverage for the RingMemoryStream and ReverseComparer classes
git-svn-id: file:///srv/devel/repo-conversion/nusu@96 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-27 19:04:09 +00:00
Markus Ewald
de7c28fa84 achieved 100% test coverage for the read only collection wrapper; optimized the indexer of the license key class; increased test coverage for the license key class to 100%
git-svn-id: file:///srv/devel/repo-conversion/nusu@95 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-27 19:02:48 +00:00
Markus Ewald
c43bfd47c8 Increased test coverage for all collection classes up to the priority queue to 100%; SetParent() is no longer 'protected internal' as internal is sufficient in this case (.NET 'protected internal' is less restrictive than 'protected' or 'internal' alone); parenting collection now unsets parent for items that are being replaced; priority queue version check for enumerators (to protected against modification of the collection) now only happens in debug mode
git-svn-id: file:///srv/devel/repo-conversion/nusu@94 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-27 18:56:08 +00:00
Markus Ewald
cb0355193d Nailed the unit test coverage for all classes in the root namespace at 100%; fixed ugly german comment in ReadOnlyDictionary; moved AbstractFactory interface for FactoryEmployer in Nuclex.Support.Plugins into its own file; wrote unit tests for the PluginHelper, Shared, StringSegment and WeakReference classes
git-svn-id: file:///srv/devel/repo-conversion/nusu@93 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-11-26 19:15:36 +00:00
Markus Ewald
313b006f83 Added license tags in the files where they were amiss; added IntegerHelper class with a method to quickly determine the next power of 2 to any number
git-svn-id: file:///srv/devel/repo-conversion/nusu@82 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-07-17 21:19:41 +00:00
Markus Ewald
a666885598 Some more minor documentation improvements
git-svn-id: file:///srv/devel/repo-conversion/nusu@81 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-07-17 20:51:35 +00:00
Markus Ewald
2cc7b27b0c Added read-only collection wrappers for IDictionary<>, IList<> and ICollection<> since the classes provided by the .NET framework in System.Collections.ObjectModel are incomplete and inconsistent (eg. System.Collections.ObjectModel.ReadOnlyCollection wraps an IList<>!); minor improvements to documentation; added ReverseComparer for inverting the results of an existing IComparer<> or simply comparing values in inverted order
git-svn-id: file:///srv/devel/repo-conversion/nusu@80 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-07-17 20:44:40 +00:00
Markus Ewald
f5eefc6765 Added Peek() method to the priority queue classes (it's a method and not a property because it can potentially fail with an exception and a property might lead someone to not think about this possibility)
git-svn-id: file:///srv/devel/repo-conversion/nusu@79 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-07-15 20:36:16 +00:00
Markus Ewald
7bff8c5d52 All remaining references to the old name of the waitable class, 'progression' changed to 'waitable'; QueueOperation renamed to OperationQueue; SetProgression renamed to WaitableGroup; improved documentation in various places
git-svn-id: file:///srv/devel/repo-conversion/nusu@78 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-06-11 20:28:08 +00:00
Markus Ewald
d59753b98d Moved all contents of the Nuclex.Plugins project into the Nuclex.Support project; added copyright notices to all files imported from Nuclex.Plugins; updated copyright span year in all copyright notices; minor documentation improvements
git-svn-id: file:///srv/devel/repo-conversion/nusu@59 d2e56fa2-650e-0410-a79f-9358c0239efd
2008-01-07 18:04:02 +00:00
Markus Ewald
b1e97f48bf Improved documentation in various places; added UML design concepts for UserInterface library; created unit tests for the PathHelper class; Gui now has width and height to allow usage of unified coordinates; renamed InputProcessor to InputReceiver
git-svn-id: file:///srv/devel/repo-conversion/nusu@55 d2e56fa2-650e-0410-a79f-9358c0239efd
2007-11-02 21:36:15 +00:00
Markus Ewald
c230f0ce7c Renamed UnintrusivePriorityQueue to PairPriorityQueue; Switched PairPriorityQueue to work on PriorityItemPairs instead of eating up the priority value once the item was added; PriorityQueue and PairPriorityQueue now both work on the default comparer or use a custom comparer specified in the constructor
git-svn-id: file:///srv/devel/repo-conversion/nusu@45 d2e56fa2-650e-0410-a79f-9358c0239efd
2007-09-05 18:20:10 +00:00
Markus Ewald
caeee49f4a Added an empty line between the license section and the using statements; fixed a wrong comment in ObservableCollection.cs
git-svn-id: file:///srv/devel/repo-conversion/nusu@43 d2e56fa2-650e-0410-a79f-9358c0239efd
2007-07-24 20:15:19 +00:00