forked from jasder/antlr
Fix Collections.SingletonMap for .NET 4.5
This commit is contained in:
parent
5af2411849
commit
ca133e541d
|
@ -59,7 +59,11 @@ namespace Sharpen
|
|||
public static IDictionary<TKey, TValue> SingletonMap<TKey, TValue>(TKey key, TValue value)
|
||||
#endif
|
||||
{
|
||||
#if NET_4_5
|
||||
return new ReadOnlyDictionary<TKey,TValue>(new Dictionary<TKey, TValue> { { key, value } });
|
||||
#else
|
||||
return new Dictionary<TKey, TValue> { { key, value } };
|
||||
#endif
|
||||
}
|
||||
|
||||
private static class EmptyListImpl<T>
|
||||
|
|
Loading…
Reference in New Issue