Some attempts at making this compile on WinRT. Much work remains.

git-svn-id: file:///srv/devel/repo-conversion/nusu@281 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2012-03-17 13:03:40 +00:00
parent cc1b8d095a
commit 7d4a66e9f2
8 changed files with 163 additions and 34 deletions

View file

@ -40,7 +40,11 @@ namespace Nuclex.Support.Collections {
IDeserializationCallback,
#endif
IDictionary<TKey, TValue>,
#if WINRT
ICollection,
#else
IDictionary,
#endif
#if !NO_SPECIALIZED_COLLECTIONS
INotifyCollectionChanged,
#endif
@ -329,6 +333,8 @@ 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>
@ -344,12 +350,6 @@ namespace Nuclex.Support.Collections {
return this.objectDictionary.Contains(key);
}
/// <summary>Returns a new entry enumerator for the dictionary</summary>
/// <returns>The new entry enumerator</returns>
IDictionaryEnumerator IDictionary.GetEnumerator() {
return this.objectDictionary.GetEnumerator();
}
/// <summary>Whether the size of the Dictionary is fixed</summary>
bool IDictionary.IsFixedSize {
get { return this.objectDictionary.IsFixedSize; }
@ -395,7 +395,23 @@ namespace Nuclex.Support.Collections {
}
}
#endregion
#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
@ -477,8 +493,10 @@ 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
}