Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-07-24 15:51:35 +0400
committerMarek Safar <marek.safar@gmail.com>2014-07-24 15:51:35 +0400
commit056a48738608644ad9939916afb105b6c22c1055 (patch)
tree74849af59d6d8f6cdcdd1f184a8b3f3df5a5e60d /mcs/class/System.ComponentModel.Composition.4.5
parent9a53dd4e9158aced72ba422033527c768ff218ff (diff)
[System.ComponentModel.Composition] Remove ReadOnlyDictionary. It's not used in 4.5 profile (it implements different interfaces compare to public ReadOnlyDictionary anyway)
Diffstat (limited to 'mcs/class/System.ComponentModel.Composition.4.5')
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources2
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs106
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs34
3 files changed, 0 insertions, 142 deletions
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
index 5072270d8f1..ac779fcd516 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
+++ b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
@@ -22,10 +22,8 @@ src/ComponentModel/Microsoft/Internal/GenerationServices.cs
src/ComponentModel/Microsoft/Internal/Runtime/Serialization/SerializationServices.cs
src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.cs
src/ComponentModel/Microsoft/Internal/Collections/WeakReferenceCollection.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.CollectionOfObject.cs
src/ComponentModel/Microsoft/Internal/Collections/EnumerableCardinality.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
src/ComponentModel/System/LazyOfTTMetadata.cs
src/ComponentModel/System/ComponentModel/Composition/PartMetadataAttribute.cs
src/ComponentModel/System/ComponentModel/Composition/ExceptionBuilder.cs
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
deleted file mode 100644
index 03269317f54..00000000000
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Microsoft.Internal;
-
-// This is using the desktop namespace for ReadOnlyDictionary, the source code is in Microsoft\Internal\Collections to keep it seperate from the main MEF codebase.
-namespace System.Collections.ObjectModel
-{
-
- [DebuggerDisplay("Count = {Count}")]
- [DebuggerTypeProxy(typeof(ReadOnlyDictionaryDebuggerProxy<,>))]
- internal sealed partial class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
- {
- private readonly IDictionary<TKey, TValue> _innerDictionary;
-
- public ReadOnlyDictionary(IDictionary<TKey, TValue> dictionary)
- {
- this._innerDictionary = dictionary ?? new Dictionary<TKey, TValue>(0);
- }
-
- public int Count
- {
- get { return this._innerDictionary.Count; }
- }
-
- public bool IsReadOnly
- {
- get { return true; }
- }
-
- public ICollection<TKey> Keys
- {
- get { return this._innerDictionary.Keys; }
- }
-
- public TValue this[TKey key]
- {
- get { return this._innerDictionary[key]; }
- set { throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); }
- }
-
- public ICollection<TValue> Values
- {
- get { return this._innerDictionary.Values; }
- }
-
- public bool Contains(KeyValuePair<TKey, TValue> item)
- {
- return this._innerDictionary.Contains(item);
- }
-
- public bool ContainsKey(TKey key)
- {
- return this._innerDictionary.ContainsKey(key);
- }
-
- public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
- {
- this._innerDictionary.CopyTo(array, arrayIndex);
- }
-
- public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
- {
- return this._innerDictionary.GetEnumerator();
- }
-
- public bool TryGetValue(TKey key, out TValue value)
- {
- return this._innerDictionary.TryGetValue(key, out value);
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return this._innerDictionary.GetEnumerator();
- }
-
- void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- void ICollection<KeyValuePair<TKey, TValue>>.Clear()
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- bool IDictionary<TKey, TValue>.Remove(TKey key)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
- }
-}
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
deleted file mode 100644
index 9dda8f4bc58..00000000000
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using Microsoft.Internal;
-
-namespace System.Collections.ObjectModel
-{
-
- // NOTE: This type cannot be a nested proxy of ReadOnlyDictionary due to a bug
- // in the Visual Studio Debugger which causes it to ignore nested generic proxies.
- internal class ReadOnlyDictionaryDebuggerProxy<TKey, TValue>
- {
- private readonly ReadOnlyDictionary<TKey, TValue> _dictionary;
-
- public ReadOnlyDictionaryDebuggerProxy(ReadOnlyDictionary<TKey, TValue> dictionary)
- {
- Requires.NotNull(dictionary, "dictionary");
-
- _dictionary = dictionary;
- }
-
- [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
- public KeyValuePair<TKey, TValue>[] Items
- {
- // NOTE: This shouldn't be cached, so that on every query of
- // the current value of the underlying dictionary is respected.
- get { return this._dictionary.ToArray(); }
- }
- }
-}