예제 #1
0
        private static void WinRT_IDictionary <K, V>(MapToDictionaryAdapter mapToDictionaryAdapter, MapToCollectionAdapter mapToCollectionAdapter, DictionaryToMapAdapter dictionaryToMapAdapter, IMap <K, V> map)
        {
            WinRT_IEnumerable <KeyValuePair <K, V> >(null, null, null);

            // instantiate stubs for commonly used methods on IDictionary<K, V> and ICollection<KeyValuePair<K, V>>
            V dummy;

            mapToDictionaryAdapter.Indexer_Get <K, V>(default(K));
            mapToDictionaryAdapter.Indexer_Set <K, V>(default(K), default(V));
            mapToDictionaryAdapter.ContainsKey <K, V>(default(K));
            mapToDictionaryAdapter.Add <K, V>(default(K), default(V));
            mapToDictionaryAdapter.Remove <K, V>(default(K));
            mapToDictionaryAdapter.TryGetValue <K, V>(default(K), out dummy);
            mapToCollectionAdapter.Count <K, V>();
            mapToCollectionAdapter.Add <K, V>(new KeyValuePair <K, V>(default(K), default(V)));
            mapToCollectionAdapter.Clear <K, V>();

            // instantiate stubs for commonly used methods on IMap<K, V>
            dictionaryToMapAdapter.Lookup <K, V>(default(K));
            dictionaryToMapAdapter.Size <K, V>();
            dictionaryToMapAdapter.HasKey <K, V>(default(K));
            dictionaryToMapAdapter.Insert <K, V>(default(K), default(V));
            dictionaryToMapAdapter.Remove <K, V>(default(K));
            dictionaryToMapAdapter.Clear <K, V>();
        }
예제 #2
0
        private static void WinRT_IDictionary <K, V>(MapToDictionaryAdapter mapToDictionaryAdapter, MapToCollectionAdapter mapToCollectionAdapter, DictionaryToMapAdapter dictionaryToMapAdapter, IMap <K, V> map)
        {
            Internal.WinRT_IEnumerable <KeyValuePair <K, V> >(null, null, null);
            mapToDictionaryAdapter.Indexer_Get <K, V>(default(K));
            mapToDictionaryAdapter.Indexer_Set <K, V>(default(K), default(V));
            mapToDictionaryAdapter.ContainsKey <K, V>(default(K));
            mapToDictionaryAdapter.Add <K, V>(default(K), default(V));
            mapToDictionaryAdapter.Remove <K, V>(default(K));
            V v;

            mapToDictionaryAdapter.TryGetValue <K, V>(default(K), out v);
            mapToCollectionAdapter.Count <K, V>();
            mapToCollectionAdapter.Add <K, V>(new KeyValuePair <K, V>(default(K), default(V)));
            mapToCollectionAdapter.Clear <K, V>();
            dictionaryToMapAdapter.Lookup <K, V>(default(K));
            dictionaryToMapAdapter.Size <K, V>();
            dictionaryToMapAdapter.HasKey <K, V>(default(K));
            dictionaryToMapAdapter.Insert <K, V>(default(K), default(V));
            dictionaryToMapAdapter.Remove <K, V>(default(K));
            dictionaryToMapAdapter.Clear <K, V>();
        }