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