Add DictionaryCoda.GetValueOrCreate() extension method.
authorJonathan Pryor <jonpryor@vt.edu>
Mon, 26 Jul 2010 16:57:49 +0000 (12:57 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Mon, 26 Jul 2010 16:57:49 +0000 (12:57 -0400)
commitbbc6a9cca8759e4ebbd4118aa871c186e7ce61de
tree60ba55d15de61869fdf30fd6ad53458d39e9a854
parenta1c1f86609c515a63f8d8fa9cfae4b28f388aa65
Add DictionaryCoda.GetValueOrCreate() extension method.

Like DictionaryCoda.GetValueOrDefault() except it allows calling the default
TValue constructor or invoking a Func<TValue> instead of using the default
value.

Patch thanks to Rik Hemsley <rik@rikkus.info>.
src/Cadenza/Cadenza.Collections/DictionaryCoda.cs
src/Cadenza/Cadenza/Check.cs
src/Cadenza/Documentation/en/Cadenza.Collections/DictionaryCoda.xml
src/Cadenza/Documentation/en/index.xml
src/Cadenza/Test/Cadenza.Collections/DictionaryCodaTest.cs