Removed the last traces on WinRT compatibility
git-svn-id: file:///srv/devel/repo-conversion/nusu@326 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
ab6a3374d8
commit
7dd08c93e0
|
@ -31,11 +31,7 @@ namespace Nuclex.Support.Collections {
|
|||
/// <typeparam name="TValue">Type of values stored in the dictionary</typeparam>
|
||||
public interface IMultiDictionary<TKey, TValue> :
|
||||
IDictionary<TKey, ICollection<TValue>>,
|
||||
#if WINRT
|
||||
ICollection,
|
||||
#else
|
||||
IDictionary,
|
||||
#endif
|
||||
ICollection<KeyValuePair<TKey, TValue>>,
|
||||
IEnumerable<KeyValuePair<TKey, TValue>>,
|
||||
IEnumerable {
|
||||
|
|
|
@ -38,8 +38,6 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
#region IDictionary implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Adds an item into the dictionary</summary>
|
||||
/// <param name="key">Key under which the item will be added</param>
|
||||
/// <param name="value">Item that will be added</param>
|
||||
|
@ -89,22 +87,16 @@ namespace Nuclex.Support.Collections {
|
|||
set { this[(TKey)key] = (ICollection<TValue>)value; }
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDictionaryEnumerator implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Returns a new entry enumerator for the dictionary</summary>
|
||||
/// <returns>The new entry enumerator</returns>
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator() {
|
||||
return new Enumerator(this);
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionaryEnumerator implementation
|
||||
|
||||
#region ICollection<KeyValuePair<TKey, TValue>> implementation
|
||||
|
|
|
@ -34,9 +34,7 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
/// <summary>Enumerates the values stored in a multi dictionary</summary>
|
||||
private class Enumerator :
|
||||
#if !WINRT
|
||||
IDictionaryEnumerator,
|
||||
#endif
|
||||
IEnumerator<KeyValuePair<TKey, TValue>> {
|
||||
|
||||
/// <summary>Initializes a new multi dictionary enumerator</summary>
|
||||
|
@ -128,8 +126,6 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
#region IDictionaryEnumerator implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>The current entry the enumerator is pointing to</summary>
|
||||
DictionaryEntry IDictionaryEnumerator.Entry {
|
||||
get {
|
||||
|
@ -157,8 +153,6 @@ namespace Nuclex.Support.Collections {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionaryEnumerator implementation
|
||||
|
||||
/// <summary>
|
||||
|
@ -227,9 +221,7 @@ namespace Nuclex.Support.Collections {
|
|||
/// <param name="dictionary">Dictionary the multi dictionary will be based on</param>
|
||||
internal MultiDictionary(IDictionary<TKey, ICollection<TValue>> dictionary) {
|
||||
this.typedDictionary = dictionary;
|
||||
#if !WINRT
|
||||
this.objectDictionary = (this.typedDictionary as IDictionary);
|
||||
#endif
|
||||
|
||||
foreach(ICollection<TValue> values in dictionary.Values) {
|
||||
this.count += values.Count;
|
||||
|
@ -411,10 +403,8 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
||||
private IDictionary<TKey, ICollection<TValue>> typedDictionary;
|
||||
#if !WINRT
|
||||
/// <summary>The wrapped Dictionary under its object interface</summary>
|
||||
private IDictionary objectDictionary;
|
||||
#endif
|
||||
/// <summary>The number of items currently in the multi dictionary</summary>
|
||||
private int count;
|
||||
/// <summary>Provides the values stores in the dictionary in sequence</summary>
|
||||
|
|
|
@ -40,11 +40,7 @@ namespace Nuclex.Support.Collections {
|
|||
IDeserializationCallback,
|
||||
#endif
|
||||
IDictionary<TKey, TValue>,
|
||||
#if WINRT
|
||||
ICollection,
|
||||
#else
|
||||
IDictionary,
|
||||
#endif
|
||||
#if !NO_SPECIALIZED_COLLECTIONS
|
||||
INotifyCollectionChanged,
|
||||
#endif
|
||||
|
@ -333,8 +329,6 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
#region IDictionary implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Adds an item into the Dictionary</summary>
|
||||
/// <param name="key">Key under which the item will be added</param>
|
||||
/// <param name="value">Item that will be added</param>
|
||||
|
@ -395,22 +389,16 @@ namespace Nuclex.Support.Collections {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionary implementation
|
||||
|
||||
#region IDictionaryEnumerator implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Returns a new entry enumerator for the dictionary</summary>
|
||||
/// <returns>The new entry enumerator</returns>
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator() {
|
||||
return this.objectDictionary.GetEnumerator();
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionaryEnumerator implementation
|
||||
|
||||
#region ICollection<> implementation
|
||||
|
@ -493,10 +481,8 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
||||
private IDictionary<TKey, TValue> typedDictionary;
|
||||
#if !WINRT
|
||||
/// <summary>The wrapped Dictionary under its object interface</summary>
|
||||
private IDictionary objectDictionary;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ namespace Nuclex.Support.Collections {
|
|||
this.objectDictionary = (this.typedDictionary as IDictionary);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>Whether the directory is write-protected</summary>
|
||||
public bool IsReadOnly {
|
||||
get { return true; }
|
||||
|
@ -237,8 +236,6 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
#region IDictionary implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Removes all items from the Dictionary</summary>
|
||||
void IDictionary.Clear() {
|
||||
throw new NotSupportedException(
|
||||
|
@ -313,22 +310,16 @@ namespace Nuclex.Support.Collections {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionary implementation
|
||||
|
||||
#region IDictionaryEnumerator implementation
|
||||
|
||||
#if !WINRT
|
||||
|
||||
/// <summary>Returns a new entry enumerator for the dictionary</summary>
|
||||
/// <returns>The new entry enumerator</returns>
|
||||
IDictionaryEnumerator IDictionary.GetEnumerator() {
|
||||
return this.objectDictionary.GetEnumerator();
|
||||
}
|
||||
|
||||
#endif // !WINRT
|
||||
|
||||
#endregion // IDictionaryEnumerator implementation
|
||||
|
||||
#region ICollection<> implementation
|
||||
|
@ -410,10 +401,8 @@ namespace Nuclex.Support.Collections {
|
|||
|
||||
/// <summary>The wrapped Dictionary under its type-safe interface</summary>
|
||||
private IDictionary<KeyType, ValueType> typedDictionary;
|
||||
#if !WINRT
|
||||
/// <summary>The wrapped Dictionary under its object interface</summary>
|
||||
private IDictionary objectDictionary;
|
||||
#endif
|
||||
/// <summary>ReadOnly wrapper for the keys collection of the Dictionary</summary>
|
||||
private ReadOnlyCollection<KeyType> readonlyKeyCollection;
|
||||
/// <summary>ReadOnly wrapper for the values collection of the Dictionary</summary>
|
||||
|
|
Loading…
Reference in New Issue
Block a user