3832b0a090* Mono.Rocks.sln: Add tools/Eithers.csproj project. * tools/ (svn:ignore): Ignore generated files. * tools/CodeDomRocks.cs: Add .GetMethods(), .ThrowWhenArgumentIsNull(). * tools/Eithers.cs: Added; C#-based replacement for ../mkeithers. * tools/Eithers.csproj: Added; Project file for Eithers.exe. * tools/FileGenerator.cs: Don't hardcode the namespace name. * tools/Lambdas.cs: Refactor to use ThrowWhenArgumentIsNull(). * tools/XmlDocs.cs: Add additional XML documentation helpers.
Jonathan Pryor
2009-11-19 16:04:08 +0000
e73fc6667c* Mono.Rocks/String.cs: Add .WrappedLines() extension method, a generalized version of Options.GetLines() (from Mono.Options). In short, given a long string, it'll break it into "line-sized" chunks of a given width so that you can have e.g. nicely line-wrapped help text. Only really suitable for console/fixed-width-font output. * Tests/Mono.Rocks.Tests/StringTest.cs: Add tests for .WrappedLines() extension method.
Jonathan Pryor
2009-11-17 19:24:21 +0000
b788e7250a* Mono.Rocks/String.cs: Added IsNullOrWhitespace * Tests/Mono.Rocks.Tests/StringTest.cs: Added tests for IsNullOrWhitespace
Eric Maupin
2009-11-12 22:22:13 +0000
5c37000668* MutableLookup.cs: Added .Clear() * MutableLookupTest.cs: Added tests for .Clear()
Eric Maupin
2009-11-12 02:24:59 +0000
ceca0c96c1* Mono.Rocks.sln: Remove the 'doc' project (it gives VS fits), and add tools/Lambdas.csproj. * tools/ChangeLog: started. * tools/CodeDomRocks.cs: Added; extension methods for System.CodeDom. * tools/FileGenerator.cs: Added; helper type for CodeDom-based C# generators. * tools/Lambdas.cs: Added; C#-based replacement for ../mklambdas. * tools/Lambdas.csproj: Added; Profile file for Lambdas.exe. * tools/Options.cs: Added; Mono.Options option parser. * tools/Types.cs: Added; Utility class for CodeDom types. * tools/XmlDocs.cs: Added; Utility class for CodeDom comments.
Jonathan Pryor
2009-11-11 03:13:59 +0000
f2d6adab95Added MutableLookup<TKey,TElement> and tests
Eric Maupin
2009-11-07 02:16:49 +0000
0c85489006* Mono.Rocks.csproj: Remove the BeforeBuild requirement. This breaks VS usage when Perl isn't installed. We'll need to remove the Perl dependency if we want to have BeforeBuild work.
Jonathan Pryor
2009-11-06 16:46:08 +0000
531ca93e36* Mono.Rocks.Tests.dll.sources: * Tests/Mono.Rocks.Tests.csproj: Add EquatableContract.cs to the build.
Jonathan Pryor
2009-11-04 19:39:15 +0000
ffe1ddd0f3* Mono.Rocks.csproj: Use a saner file generation process.
Jonathan Pryor
2009-11-03 19:49:33 +0000
a588dd417e* Mono.Rocks.csproj: Makefile functionality import: If the mk* files are newer than the files they generate, re-run the mk* programs to generate their output files before building. Add a 'shell' target; note that the 'shell' target doesn't work, as stdout/stderr isn't visible interactively. * Mono.Rocks.sln: Flush. * Mono.Rocks/Delegates.cs, Mono.Rocks/Eithers.cs, Mono.Rocks/Lamdas.cs, Mono.Rocks/Tuples.cs: Flush header.
Jonathan Pryor
2009-11-03 14:57:37 +0000
838f91fef0* Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Mono.Rocks.Tests/IEnumerableContract.cs to the build. * Tests/Mono.Rocks.Tests/IEnumerableContract.cs: Added; base-level IEnumerable<T> sanity tests, refactored out from CachedSequenceTest.cs. * Tests/Mono.Rocks.Tests/CachedSequenceTest.cs: Inherit from IEnumerableContract.cs.
Jonathan Pryor
2009-10-29 02:51:22 +0000
28deef3f0b* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/CachedSequence.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Mono.Rocks.Tests/CachedSequenceTest.cs to the build. * Mono.Rocks/IEnumerable.cs: Add .Cache() extension method. * Mono.Rocks/CachedSequence.cs: Resuscitated from rocks-playground/Mono.Rocks/Cons.cs@r112950; an immutable, thread-safe, singly-linked list. Improvements include less memory overhead (down to one pointer from two), a better name, and a reason to exist (to sanely cope with potentially infinite sequences which change each time you call .GetEnumerator() on them). * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .Cache(). * Tests/Mono.Rocks.Tests/CachedSequenceTest.cs: Resuscitated from rocks-playground/Tests/Mono.Rocks.Tests/ConsTest.cs@r112950. Tests for CachedSequence<T>.
Jonathan Pryor
2009-10-28 03:06:23 +0000
2563b490c6* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/OrderedDictionary.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Mono.Rocks.Tests/OrderedDictionaryTest.cs to the build. * Mono.Rocks/OrderedDictionary.cs: Added a dictionary that maintains insertion order without losing hashing speed benefits. * Tests/Mono.Rocks.Tests/OrderedDictionaryTest.cs: Add tests for OrderedDictionary<>
Jonathan Pryor
2009-09-23 15:49:52 +0000
505bcdbb1aFix timestamp.
Jonathan Pryor
2009-09-22 15:59:22 +0000
b2eb2af01d* StringTest.cs: Add tests for .Slice() * DelegateTest.cs: Fixed test for Timings()
Jonathan Pryor
2009-09-17 20:37:42 +0000
21238a0251* Mono.Rocks/String.cs: Add .Remove(string[]) extension method. Patch thanks to Eric Maupin <me@ermau.com>. * Tests/Mono.Rocks.Tests/StringTest.cs: Add tests for .Remove(string[]) extension method. Patch thanks to Eric Maupin <me@ermau.com>.
Jonathan Pryor
2009-09-17 20:15:57 +0000
5ea2bdf4e6* lib/monodoc/sources/mono-rocks-docs.source: Place documentation into the correct node (for more recent versions of monodoc).
Jonathan Pryor
2009-09-17 20:12:00 +0000
540d7823db* Mono.Rocks/IEnumerable.cs: Add .ContiguousSubsequences(). Extension method courtesy of Distilled Brilliance / John Feminella. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .ContiguousSubsequences().
Jonathan Pryor
2009-06-23 17:58:14 +0000
e0212fc1d1Fix arguments to ArgumentException within IEnumerableRocks.Tokens().
Jonathan Pryor
2009-06-19 03:12:22 +0000
eaf02b03d7* Mono.Rocks/IEnumerable.cs: Add .ToReadOnlyDictionary() extension methods. Contributed by Eric Maupin <me@ermau.com>. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .ToReadOnlyDictionary().
Jonathan Pryor
2009-06-12 02:55:48 +0000
167afc2467* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/ReadOnlyDictionary.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/ReadOnlyDictionaryTest.cs to the build. * Mono.Rocks/ReadOnlyDictionary.cs: Added; implementation thanks to Eric Maupin <me@ermau.com>. * Tests/Mono.Rocks.Tests/ReadOnlyDictionaryTest.cs: Added; implementation thanks to Eric Maupin <me@ermau.com>.
Jonathan Pryor
2009-06-12 02:44:03 +0000
ee3067f6a7* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/ValueReader.cs to the build. * Mono.Rocks/EnumerableValueReader.cs, Mono.Rocks/TextValueReader.cs: Use ValueReader<T> as the implementation helper. Mark types [CLSCompliant(false)]. * Mono.Rocks/IEnumerable.cs: Mark ToValueReader() [CLSCompliant(false)]. * Mono.Rocks/IValueReader.cs, Mono.Rocks/IValueWriter.cs: Simplify (KISS!). Don't make them generic (and return the generic type), as this complicates calling the methods. (It also means you can't have type-specific methods which are accessible after an IValueReader/IValueWriter method invocation, but as soon as you introduce actual types you hit the same issue...) It also complicates writing additional Read/Write extension methods. Read() methods now return IValueReader, and Write() methods now return IValueWriter. * Mono.Rocks/Stream.cs: Mark .WithSystemConverter() [CLSCompliant(false)]. * Mono.Rocks/StreamConverter.cs, Mono.Rocks/System.StreamConverter.cs: Support new IValueReader and IValueWriter. Mark types [CLSCompliant(false)]. * Mono.Rocks/ValueReader.cs: Added; helper class to implement IValueReader. * Tests/Mono.Rocks.Tests/SystemStreamConverterTest.cs, Tests/Mono.Rocks.Tests/TextValueReaderTest.cs: Update to support new IValueReader/IValueWriter semantics.
Jonathan Pryor
2009-04-17 03:45:28 +0000
d5c82ce761Flush (should have been in a previous commit)
Jonathan Pryor
2009-04-17 03:01:05 +0000
e9272b46b2* doc/en/**: Flush ObjectRocks documentation.
Jonathan Pryor
2009-04-12 17:41:10 +0000
d4ca59e4a4* doc/en/**: Flush documentation. * Mono.Rocks/Tuple.cs: Don't check for null Tuple<T1,T2>, as Tuples are structs and thus can't be null. * Tests/Mono.Rocks.Tests/JaggedArrayTest.cs, Tests/Mono.Rocks.Tests/IEnumerableTest.cs, Tests/Mono.Rocks.Tests/RectangularArrayTest.cs: Add #region blocks for docs.
Jonathan Pryor
2009-03-29 19:17:01 +0000
b698054f1aFlush.
Jonathan Pryor
2009-03-29 17:45:40 +0000
a1b8862dba* doc/en/**: Flush TypeRocks documentation.
Jonathan Pryor
2009-03-29 17:45:20 +0000
8e8b14955c* mkdelegates: Generate <exception/> docs for ArgumentNullException; fix <typeparam/> generation. * Mono.Rocks/Delegates.cs, doc/en/Mono.Rocks/DelegateRocks.xml: Flush.
Jonathan Pryor
2009-03-29 17:43:33 +0000
55a1157f8e* TextValueReaderTest.cs: Enable Read_UnsupportedT(), as bnc#485377 has been fixed.
Jonathan Pryor
2009-03-21 13:46:05 +0000
7ee8be74ef* doc/en/Mono.Rocks/Either.xml: Flush.
Jonathan Pryor
2009-03-21 03:21:40 +0000
246a6aa868* mkeithers: Generate <exception/> XML comments. * doc/en/Mono.Rocks/Either*.xml: Flush <exception/> comments. * Mono.Rocks/Eithers.cs: Flush (updates <exception/> XML comments).
Jonathan Pryor
2009-03-21 02:58:18 +0000
b05d6089d8* doc/**: Flush (add <exception/> specifications, as generated by `make doc-update MDOC_OPTIONS=--exceptions=asm'.
Jonathan Pryor
2009-03-14 04:19:51 +0000
6fb9df022d* Makefile: Allow $NUNIT_OPTIONS to be passed to nunit-console2 in the check and check-all targets. * doc/Makefile.include: Use mdoc, not monodocer; Allow MDOC_OPTIONS to be specified to mdoc-update. * doc/**: Flush (Tree-related extension methods). * Mono.Rocks/Check.cs: Add ChildrenSelector(), ValueSelector(). * Mono.Rocks/IEnumerable.cs: Add SelectBreadthFirst(), SelectDepthFirst(), for dealing with tree structures. * Mono.Rocks/Object.cs: Add TraverseBreadthFirst(), TraverseBreadthFirstWithParent(), TraverseDepthFirst(), TraverseDepthFirstWithParent(). Idea and most code courtesy of leppie: http://xacc.wordpress.com/2009/03/05/tree-traversal-extension-methods * Tests/Mono.Rocks.Tests.csproj: Flush (specify target framework). * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .SelectBreadthFirst(), .SelectDepthFirst(). * Tests/Mono.Rocks.Tests/TextValueReaderTest.cs: Disable Read_UnsupportedT, as it currently crashes mono; see bnc#485377. * Tests/Mono.Rocks.Tests/ObjectTest.cs: Add tests for TraverseBreadthFirst(), TraverseBreadthFirstWithParent(), TraverseDepthFirst(), TraverseDepthFirstWithParent().
Jonathan Pryor
2009-03-14 04:14:32 +0000
3e37ccd66d* MIT.X11: Added; the library license. This really should have been added ages ago...
Jonathan Pryor
2009-01-10 01:05:33 +0000
b7ab6f450d* IEnumerableTest.cs: bnc#400716 has been fixed in r122358, so enable these tests.
Jonathan Pryor
2009-01-04 16:54:43 +0000
6388e94d03* doc/en/**: Flush; changes due to mdoc changes (e.g. removal of Extension and other compiler-generated attributes), class library changes (mkdelegates changes, etc.).
Jonathan Pryor
2008-12-27 02:45:05 +0000
4df0e9db75* mkdelegates: Alter .Timings(): - Remove "all defaults" .Timings() overload, as it has no utility -- it would "automagically" determine the "appropriate" runs & loopsPerRun values, but wouldn't communicate these to the caller, and loopsPerRun is crucial to understanding the timings. - Ensure that Stopwatch is pre-JITed as well as `self'. - Generate documentation. * Generator.pm: Add GetValueList() static method. * Mono.Rocks/Delegates.cs: Flush (update .Timings() methods). * Tests/Mono.Rocks.Tests/DelegateTest.cs: Update tests for .Timings().
Jonathan Pryor
2008-12-27 02:27:53 +0000
650ee6db57* Mono.Rocks/IEnumerable.cs: Rename .Apply<T>(Action<T>) to .Each<T>(Action<T>). Add .Each<T>(Action<T,int>), .ForEach<T>(Action<T>), and .ForEach<T>(Action<T, int>). The .ForEach() overloads are a shortened version of .Each(...).Apply(), and provides compatibility with List<T>.ForEach(). * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .Each(), .ForEach(). * Tests/Mono.Rocks.Tests/Int32Test.cs, Tests/Mono.Rocks.Tests/StringTest.cs: Cope with .Apply()->.Each() rename.
Jonathan Pryor
2008-12-12 15:11:10 +0000
fed6d9e005* EitherTest.cs: Ensure that nullable types can be parsed.
Jonathan Pryor
2008-12-09 18:29:00 +0000
01d97bb88a* Makefile (check): Recent versions of nunit-console2 require -exclude instead of /exclude.
Jonathan Pryor
2008-12-09 18:26:44 +0000
3ee9881e4e* EnumerableValueReaderTest.cs, TextValueReaderTest.cs: Ensure that an InvalidOperationException is thrown when we read past the end of the Reader.
Jonathan Pryor
2008-12-09 18:25:06 +0000
7c82f5d406Flush.
Jonathan Pryor
2008-12-09 18:09:27 +0000
431e6f40cb* Generator.pm (ValueList): Return a value when $max==0.
Jonathan Pryor
2008-12-09 18:08:57 +0000
3788ef1c97* mkdelegates: Add .Timings() extension method to get a list of how long it takes a delegate to execute. * Mono.Rocks/Delegates.cs: Flush (adds .Timings() methods). * Tests/Mono.Rocks.Tests/DelegateTest.cs: Add tests for .Timings().
Jonathan Pryor
2008-12-08 20:16:08 +0000
f93d051840* Mono.Rocks/Maybe.cs: Equals() should compare Value==obj.Value, otherwise the result will always be true. * Tests/Mono.Rocks.Tests/MaybeTest.cs: Add test for .Equals().
Jonathan Pryor
2008-12-04 18:31:46 +0000
79a7019e18* mkdelegates: Add "traditional" currying extension methods. * Mono.Rocks/Delegates.cs: Flush (adds "traditional" .Curry() methods). * Tests/Mono.Rocks.Tests/DelegateTest.cs: Add tests for traditional .Curry().
Jonathan Pryor
2008-10-05 03:37:52 +0000
45bece37dd* Mono.Rocks/IEnumerable.cs: The TypeLoadException-generating gmcs bug has been fixed, so now (1) the .Tokens() unit test can run, and (2) it found some bugs (unsurprisingly). Fix them. In particular, if we hit an element where acumulate(seed, s) returns false AND we already have an element, then we should return the previous element, reset the seed, and try accumulate(seed, s) again. This way we don't "lose" elements during processing. * Mono.Rocks/TextReader.cs: .Tokens() can now use IEnumerableRocks.Tokens(). * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Flush .Tokens() test. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs, Tests/Mono.Rocks.Tests/JaggedArrayTest.cs, Tests/Mono.Rocks.Tests/MaybeTest.cs: Disable some warnings.
Jonathan Pryor
2008-10-05 03:32:26 +0000
03d8b2b23e* doc/en/**: Flush TextReader changes. * Mono.Rocks/TextReader.cs: Change the default semantics of .Lines(), .Words(), and .Tokens() so that the TextReader is disposed by default. * Tests/Mono.Rocks.Tests/TextReaderTest.cs: Update tests to check for TextReader disposal by default.
Jonathan Pryor
2008-09-30 19:41:03 +0000
fd02c5acc7* Mono.Rocks/Either.cs: Finish the "expend all efforts to convert values" approach by using IConvertable to convert the source value to the destination value, in this case by using Convert.ChangeType(). Now allows EnumerableValueReader.Read() to perform "implicit" conversions, e.g. int->bool, which TypeDescriptor doesn't support. Consistently return NotSupportedException if the conversion throws an exception (as Convert.ChangeType() throws InvalidCastException if it fails, which makes for an ambiguous error condition). * Mono.Rocks/EnumerableValueReader.cs: Don't bother witih IConvertible changes, as Either.TryParse() now does this. * Tests/Mono.Rocks.Tests/EitherTest.cs: Add some tests for IConvertible support within Either.TryParse(). * Tests/Mono.Rocks.Tests/MaybeTest.cs: int->bool is now valid (via Convert.ChangeType), so try a int->DateTime conversion, which is currently unsupported. * Tests/Mono.Rocks.Tests/EnumerableValueReaderTest.cs: Show type conversion functionality in-action, by reading an int[] into a short, char, and decimal.
Jonathan Pryor
2008-09-28 02:02:28 +0000
e3b53c9f19* Makefile: Ignore more warnings when building unit tests. * doc/en/**: Flush .Tokens() changes. * Mono.Rocks/IEnumerable.cs: Change .Tokens() categories from Func<TSource,bool> to Func<TAggregate, TSource, bool>, so that the callback can be "smarter" about category detection. * Mono.Rocks/String.cs: Add .Tokens() extension method on strings. * Mono.Rocks/TextReader.cs: Revert .Words() semantic changes so that .Words() now just returns whitespace-separated words (as before). Add .Tokens() to return tokens extracted from the input stream (the newer .Words() semantics). .Tokens() takes a different delegate type from IEnumerable<T>.Tokens(), so we need to map them (for the `#if false` block), as a non-translated version would require "exposing" the internal StringBuilder to public users. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .Tokens(). * Tests/Mono.Rocks.Tests/MaybeTest.cs: Remove compiler warning. * Tests/Mono.Rocks.Tests/StringTest.cs: Add tests for .Tokens(). * Tests/Mono.Rocks.Tests/TextReaderTest.cs: Add tests for .Tokens(). * Tests/Mono.Rocks.Tests/TextValueReaderTest.cs: Use .Tokens(), not .Words(), and update to new parameter types.
Jonathan Pryor
2008-09-27 21:26:36 +0000
5d368d33bb* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/StreamConverter.cs to the build. * doc/en/**: Flush SystemStreamConverter changes. * Mono.Rocks/Check.cs: Add Check.Value(). * Mono.Rocks/Stream.cs: .WithSystemConverter() should return SystemConverter. * Mono.Rocks/StreamConverter.cs: Re-add, as I had forgotten the point to StreamConverter, which was to have a single Stream-oriented IValueReader/IValueWriter base class (though this was before there was IValueReader & IValueWriter), which could have multiple different "backends" -- BitConverter version, Mono.DataConvert, etc. Alas, CLS-noncompliant members can't be abstract, so provide (dumb) virtual versions instead. * Mono.Rocks/SystemStreamConverter.cs: Make an implementation of StreamConverter.
Jonathan Pryor
2008-09-27 19:13:18 +0000
35be4b5511* doc/en/**: Flush IValueReader/IValueWriter changes. * Mono.Rocks/IValueReader.cs, Mono.Rocks/IValueWriter.cs: Add methods so that IValueReader and IValueWriter support all the types of IConvertible. * Mono.Rocks/EnumerableValueReader.cs, Mono.Rocks/TextValueReader.cs, Mono.Rocks/SystemStreamConverter.cs: Support new IValueReader & IValueWriter methods. * Mono.Rocks/EnumerableValueReader.cs: Read() methods now fallback to using IConvertible.To*() methods for type conversion purposes. This way if TypeDescriptor doesn't support a conversion (e.g. int->bool), the conversion can still be supported. * Mono.Rocks/SystemStreamConverter.cs: Provide a basic working implementation of Read(string) and Write(string) using length-prefixed UTF-8. * Tests/Mono.Rocks.Tests/EnumerableValueReaderTest.cs: Update the type thrown for unsupported conversions.
Jonathan Pryor
2008-09-27 14:42:44 +0000
5e615f09ee* doc/en/**: Flush all the doc changes from previous commit. * Tests/Mono.Rocks.Tests/TextReaderTest.cs: Add #region for doc usage.
Jonathan Pryor
2008-09-27 12:57:37 +0000
8cb5bd3c3f* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/EnumerableValueReader.cs, Mono.Rocks/IValueReader.cs, Mono.Rocks/IValueWriter.cs, Mono.Rocks/SystemStreamConverter.cs, Mono.Rocks/TextValueReader.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/EnumerableValueReaderTest.cs, Tests/Mono.Rocks.Tests/SystemStreamConverterTest.cs, Tests/Mono.Rocks.Tests/TextValueReaderTest.cs to the build. * Mono.Rocks/Check.cs: Add .Accumulate(), .Categories(). * Mono.Rocks/Either.cs: Add .TryParse<S,R>() overload; improve TypeConverter usage to check for conversions both from the source type and to the destination type (in case they differ). * Mono.Rocks/EnumerableValueReader.cs: Added; IValueReader implementation for IEnumerable<T> types. * Mono.Rocks/IEnumerable.cs: Remove .Convert(), which is replaced by .ToValueReader(). So: "a b".Words ().Convert (out a, out b); can be replaced with: "a b".Words ().ToValueReader ().Read (out a).Read (out b); Add .Tokens(), a generalized version of TextReader.Words(). * Mono.Rocks/IValueReader.cs, Mono.Rocks/IValueWriter.cs: Added; brainstorm: the Read/Write-style API from StreamConverter doesn't need to be restricted to binary data, it could apply equally well to textual data, layered atop TextReader/TextWriter. Must be interfaces so that both can be supported by SystemStreamConverter. Generic types so that the .Read/.Write return types are of the "most-derived" type, allowing easy & correct, lossless method chaining. * Mono.Rocks/Maybe.cs: Add .TryParse<S,R>() overload; use Either.TryParse() for the implementation. * Mono.Rocks/Stream.cs: .WithSystemConverter() returns SystemStreamConverter. * Mono.Rocks/StreamConverter.cs: Rename to SystemStreamConverter.cs. * Mono.Rocks/SystemStreamConverter.cs: Remove StreamConverter type, make SystemStreamConverter public, and make SystemStreamConverter implement IValueReader and IValueWriter interfaces. * Mono.Rocks/TextValueReader.cs: Added; IValueReader implementation for IEnumerable<string> (see IEnumerable.cs for example). * Mono.Rocks/TextReader.cs: "categories" seems better than "levels" for .Words(), and matches .Tokens(); provide alternate implementation that uses .Tokens() for implementation (unused because of compiler runtime bug). * Tests/Mono.Rocks.Tests/EitherTest.cs: Add tests for .TryParse() method. * Tests/Mono.Rocks.Tests/EnumerableValueReaderTest.cs: Added; tests for EnumerableValueReader. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .ToValueReader(). * Tests/Mono.Rocks.Tests/MaybeTest.cs: Add tests for .TryParse() method. * Tests/Mono.Rocks.Tests/RectangularArrayTest.cs: Re-enable the test, as the bug was fixed. * Tests/Mono.Rocks.Tests/StreamConverterTest.cs: Rename to SystemStreamConverterTest.cs. * Tests/Mono.Rocks.Tests/TextValueReaderTest.cs: Added; tests for TextValueReader.
Jonathan Pryor
2008-09-27 04:11:12 +0000
111dcf82a0* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/Type.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/TypeTest.cs to the build. * Mono.Rocks/Type.cs: Added; .IsNullable() extension method. * Tests/Mono.Rocks.Tests/TypeTest.cs: Added; tests for TypeRocks.
Jonathan Pryor
2008-09-27 00:25:26 +0000
4c2e604ada* Mono.Rocks/Check.cs: Add Check.Levels(). * Mono.Rocks/TextReader.cs: Rework .Words() to be a more general- purpose lexer, returning strings made up from "levels" of input characters. * Tests/Mono.Rocks.Tests/TextReaderTest.cs: Add new tests for .Words() lexer capabilities.
Jonathan Pryor
2008-09-26 14:48:50 +0000
d22b925c82* doc/en/**: Add Stream.WriteTo() extension method. * Mono.Rocks/Check.cs: Add Check.Destination() method. * Mono.Rocks/Stream.cs: Add .WriteTo() method, which copies data between streams. * Tests/Mono.Rocks.Tests/StreamTest.cs: Add tests for .WriteTo().
Jonathan Pryor
2008-09-25 04:55:22 +0000
16768f2255* TextReaderTest.cs: Add check that .Words() doesn't consume the entire TextReader.
Jonathan Pryor
2008-09-25 04:42:15 +0000
d667e38c32Flush.
Jonathan Pryor
2008-09-25 04:41:27 +0000
9a27234c7bFlush.
Jonathan Pryor
2008-09-25 04:41:01 +0000
5c703660d9* doc/en/**: Flush. * Mono.Rocks/IEnumerable.cs (Transpose): Don't insert default(TSource) when a row doesn't have enough elements for the transposed row, just skip it. This is Haskell's behavior. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add test for non-rectangular array.
Jonathan Pryor
2008-09-25 04:40:46 +0000
5638cfe9f1Oops; use proper file names.
Jonathan Pryor
2008-09-23 19:21:37 +0000
e91f88142e* Makefile: `check` shouldn't test NotWorking tests; add `check-all` target which tests all tests, including NotWorking tests. * Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/JaggedArray.cs and Mono.Rocks/RectangularArray.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/JaggedArrayTest.cs and Tests/Mono.Rocks.Tests/RectangularArrayTest.cs to the build. * doc/en/**: Add new types. * Mono.Rocks/JaggedArray.cs, Mono.Rocks/RectangularArray.cs: Added; extension methods for jagged and rectangular arrays. * Tests/Mono.Rocks.Tests/JaggedArrayTest.cs, Tests/Mono.Rocks.Tests/RectangularArrayTest.cs: Added; tests for .Rows() extension methods.
Jonathan Pryor
2008-09-23 19:17:34 +0000
565b8429ea* Makefile: Add `shell` target, which runs `csharp -r:Mono.Rocks.dll` for simple interactive testing. * doc/en/**: Flush. * Mono.Rocks/IEnumerable.cs: Change the return type of .ToTuple() to IList<object>; .SplitAt() should throw if firstLength is negative; rename .Span()'s Func<TSource,bool> parameter to `predicate`. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add #region blocks for doc usage; add exception check for .SplitAt(); update tests for .ToTuple().
Jonathan Pryor
2008-09-23 14:33:05 +0000
b1fd4e12cd* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/Either.cs to the build. * Mono.Rocks.csproj, Tests/Mono.Rocks.Tests.csproj: Update output directory; correct filename errors. * doc/en/Mono.Rocks/Either.xml: Added. * Mono.Rocks/Either.cs: Added; static `Either` utility class. * Tests/Mono.Rocks.Tests/EitherTest.cs: Add test for Either.TryParse().
Jonathan Pryor
2008-09-23 03:08:43 +0000
8bd1d04b11* Makefile: Place Mono.Rocks.dll & Mono.Rocks.Tests.dll into lib/mono-rocks; add an `install` target -- usage is: make install prefix=/path/to/root/prefix If necessary, libdir can also be set if $prefix/lib isn't the correct $libdir: make install prefix=/path/to/root/prefix libdir=/alt/libdir Rename `run-test` to `check`. * doc/Makefile.include: place mono-rocks-docs.{tree,zip} into lib/monodoc/sources; add doc-install target; fix mono-rocksdocs.{tree,zip} generation. * doc/mono-rocks-docs.source: Moved to lib/monodoc/sources/mono-rocks-docs.source. * lib/monodoc/sources/mono-rocks-docs.source: @basefile needs to refer to the correct filename. * lib/mono-rocks (svn:ignore), lib/monodoc/sources (svn:ignore): Ignore generated files. * lib/pkgconfig/mono-rocks.pc: Added; pkg-config control file for Mono.Rocks.dll.
Jonathan Pryor
2008-09-22 17:47:23 +0000
a54a8ce746* doc/en/Mono.Rocks/Cons`1.cs: Removed (should have removed along with Mono.Rocks/Cons.cs on 2008-09-14...).
Jonathan Pryor
2008-09-21 01:25:36 +0000
ef575ce537* mkeithers: Added; generates Mono.Rocks/Eithers.cs. * Makefile: Generate Mono.Rocks/Eithers.cs with mkeithers. * Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/Eithers.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/EitherTest.cs to the build. * Mono.Rocks/Eithers.cs: Added; type safe "tagged" union types. * Tests/Mono.Rocks.Tests/EitherTest.cs: Added; tests for Either<...>. * Tests/Mono.Rocks.Tests/BaseRocksFixture.cs: Add AssertException().
Jonathan Pryor
2008-09-21 01:20:41 +0000
8fb9d3aa4f* doc/en/index.xml, doc/en/Mono.Rocks/Maybe`1.xml: Flush. * doc/en/Mono.Rocks/IEnumerableRocks.xml: Document .SelectFromEach() and .Zip(). * Mono.Rocks/IEnumerable.cs: Rename .SelectFromEach() type parameters for consistency: s/TFirstSource/T1/g, s/TSecondSource/T2/g, s/TThirdSource/T3/g, s/TFourthSource/T4/g. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add #regions for doc usage.
Jonathan Pryor
2008-09-19 02:49:20 +0000
fad8f57ff8* doc/Makefile.include: For VS.NET users, export XML Documentation into Mono.Rocks.xml.
Jonathan Pryor
2008-09-18 19:47:38 +0000
28fd46c200* doc/en/Mono.Rocks/Maybe`1.xml: Document Maybe<T>.
Jonathan Pryor
2008-09-18 03:23:51 +0000
89081dab32* doc/en/index.xml, doc/en/Mono.Rocks/Maybe.xml, doc/en/Mono.Rocks/MaybeRocks.xml: Document Maybe & MaybeRocks. * Mono.Rocks/Maybe.cs: - TryParse() should use .CanConvertFrom() in addition to catching the exception, as exceptions are slow. - Rename MaybeRocks.SelectMany<TSource,TResult>(...) to MaybeRocks.Select<TSource,TResult>(...), as this more closely matches the semantics and the documented pattern at: http://msdn.microsoft.com/en-us/library/bb308966.aspx - .Select() and .SelectMany() should call .ToMaybe() on their return values, not .Just(), as returning Maybe<T>.Nothing is already part of their contract, so this is more sensible. * Tests/Mono.Rocks.Tests/MaybeTest.cs: Add #regions for doc usage; Add/update tests due to s/SelectMany/Select/ method rename.
Jonathan Pryor
2008-09-18 02:22:36 +0000
765e3d4d0b* doc/en/Mono.Rocks/Sequence.xml: Document Sequence. * Mono.Rocks/Sequence.cs: Update parameter names for consistency. * Tests/Mono.Rocks.Tests/SequenceTest.cs: Add #regions for use by documentation.
Jonathan Pryor
2008-09-16 15:51:08 +0000
0f2a10ce58* doc/en/**: Document StringRocks. * Tests/Mono.Rocks.Tests/StringTest.cs: Add #regions and "prettify" the tests so that the tests can be included verbatim into the documentation.
Jonathan Pryor
2008-09-16 03:09:35 +0000
8167c38b73* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Remove Mono.Rocks/Cons.cs from the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Remove Tests/Mono.Rocks.Tests/ConsTest.cs from the build. * doc/en/**: Flush Cons<T> removal. * Mono.Rocks/Cons.cs: Remove. There doesn't seem to be much point to it. * Tests/Mono.Rocks.Tests/ConsTest.cs: Remove, as Cons<T> was removed.
Jonathan Pryor
2008-09-14 14:42:01 +0000
26ee503c4b* mktuples: Add .Match() method, which is a "nicer" version of ObjectRocks.Match() for use with tuples. * doc/fixup.sed: Allow .Match() documentation to be imported. * doc/en/**: Flush. * Mono.Rocks/Tuples.cs: Flush (adds .Match() method).
Jonathan Pryor
2008-09-12 15:19:14 +0000
0ceef35eba* doc/en/**: Flush.
Jonathan Pryor
2008-09-12 02:28:25 +0000
0b5f8bc3a4* doc/en/**: Flush. * TextReader.cs: Add .Words(TextReaderRocksOptions) overload, and change .Lines(TextRederLineOptions) to .Lines(TextReaderRocksOptions). * TextReaderTest.cs: Add tests for .Words(TextReaderRocksOptions).
Jonathan Pryor
2008-09-10 17:57:02 +0000
7a3ab6879a* gendarm.ignore: Add additional members to ignore. * Mono.Rocks/Cons.cs: Insert a MemoryBarrier() around the double-checked locking. Fix gendarme-alerted ArgumentOutOfRangeException usage. * Mono.Rocks/Maybe.cs: Provide operator== and operator!= on Maybe<T>.
Jonathan Pryor
2008-09-10 02:23:28 +0000
8c0f3bf010* Mono.Rocks/Maybe.cs: - Alter the semantics of Maybe<T>: Maybe<T> should not be able to hold null values, so the constructor now throws ArgumentNullException if this is attempted, i.e. `new Maybe<string>(null)` now throws. - Remove Maybe.Create() in lieu of the .Just() extension method (see Object.cs). - Add Maybe.TryParse(), which uses System.ComponentModel.TypeConverter to convert a string to an arbitrary type. If it fails, then Maybe<T>.Nothing is returned instead of throwing an exception. - Maybe.When() now requires non-null values. * Mono.Rocks/Nullable.cs: Remove .ToNullable(), as it's primary purpose was to make Sequence.GenerateReverse() livable, but GenerateReverse() now uses Maybe<T>. Add .Just() and .ToMaybe() for nullable types. * Mono.Rocks/Object.cs: Add .Just() extension method, which converts a value to a Maybe<T> but throws an ArgumentNullException if the value is null, and alter .ToMaybe() to return Maybe<T>.Nothing if value is null. * Tests/Mono.Rocks.Tests/MaybeTest.cs: Remove Maybe.Create(); test Maybe.TryParse(). * Tests/Mono.Rocks.Tests/NullableTest.cs: Remove .ToNullable(); test .Just(), .ToMaybe(). * Tests/Mono.Rocks.Tests/ObjectTest.cs: Cope w/ Maybe changes; test .Just(), .ToMaybe().
Jonathan Pryor
2008-09-10 01:09:31 +0000
7539e638ce* Mono.Rocks/TextReader.cs: Add a .Lines(TextReaderLineOptions) overload, to control whether the TextReader is disposed at the end of iteration. See: http://blogs.msdn.com/ericlippert/archive/2008/09/08/high-maintenance.aspx * Tests/Mono.Rocks.Tests/TextReaderRocks.cs: Add tests for new .Lines(TextReaderLineOptions) overload.
Jonathan Pryor
2008-09-09 00:25:16 +0000
bedf0132da* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/Cons.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/ConsTest.cs to the build. * doc/en/**: Flush updated types. * Mono.Rocks/Cons.cs: Added; an immutable singly-linked list. * Mono.Rocks/IEnumerable.cs: Add .ToCons(). * Mono.Rocks/Sequence.cs: Rename GenerateReverse()'s `func' parameter to `selector'. * Tests/Mono.Rocks.Tests/ConsTest.cs: Added; Tests for Cons<T>. * Tests/Mono.Rocks.Tests/IEnumerableTest.cs: Add tests for .ToCons(). * Tests/Mono.Rocks.Tests/MaybeTest.cs: Remove some warnings. * Tests/Mono.Rocks.Tests/SequenceTest.cs: Update naming.
Jonathan Pryor
2008-09-07 18:08:25 +0000
b61616e5db* Mono.Rocks/Object.cs: Add .Match(), an expression-oriented replacement for a sequence of `if' statements. * Tests/Mono.Rocks.Tests/ObjectTest.cs: Add tests for .Match().
Jonathan Pryor
2008-09-07 16:43:41 +0000
1ba45a2414Oops; should have flushed w/ last commit.
Jonathan Pryor
2008-09-07 16:40:00 +0000
80180890aeOops.
Jonathan Pryor
2008-09-07 04:02:27 +0000
dccd31bd21* Mono.Rocks.dll.sources, Mono.Rocks.csproj: Add Mono.Rocks/Maybe.cs to the build. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Add Tests/Mono.Rocks.Tests/MaybeTest.cs to the build. * Mono.Rocks/Check.cs: Add Check.ResultSelector(). * Mono.Rocks/Maybe.cs: Added. * Mono.Rocks/Object.cs: Add .ToMaybe(). * Mono.Rocks/Sequence.cs: Change Sequence.GenerateReverse() to use Maybe<Tuple<...>> instead of Nullable<Tuple<...>>, as using Maybe.When() is shorter than using Tuple.Create(...).ToNullable(). * Tests/Mono.Rocks.Tests/MaybeTest.cs: Added; tests for Maybe, Maybe<T>, and MaybeRocks. * Tests/Mono.Rocks.Tests/ObjectTest.cs: Add test for .ToMaybe(). * Tests/Mono.Rocks.Tests/SequenceTest.cs: Update to use new prototype.
Jonathan Pryor
2008-09-07 01:59:24 +0000
aed5de72f7* doc/en/**: Flush TextReaderRocks & some StringRocks docs.
Jonathan Pryor
2008-09-05 17:14:36 +0000
1934aeef52* doc/en/**: Flush. * Generator.pm: Fix GetDocAction(), GetDocFunc() to pass the correct number of types to GetDoc*Type(); allow GetDocFunc() to accept the return type name (needed for .Compose() documentation). * Makefile: Rename mkcurry to mkdelegates. * mkcurry: Rename to mkdelegates. * mkdelegates: Add .Compose() extension methods. * Mono.Rocks.dll.sources, Mono.Rocks.csproj: Rename Mono.Rocks/Curry.cs to Mono.Rocks/Delegates.cs. * Mono.Rocks.Tests.dll.sources, Tests/Mono.Rocks.Tests.csproj: Rename Tests/Mono.Rocks.Tests/CurryTest.cs to Tests/Mono.Rocks.Tests/DelegateTest.cs. * Mono.Rocks/Check.cs: Add Check.Composer() method. * Mono.Rocks/Curry.cs: Rename to Delegates.cs. * Mono.Rocks/Delegates.cs: Add .Compose() extension methods. * Tests/Mono.Rocks.Tests/CurryTest.cs: Rename to DelegateTest.cs. * Tests/Mono.Rocks.Tests/DelegateTest.cs: Add .Compose() tests.
Jonathan Pryor
2008-09-05 02:59:31 +0000