Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -24,9 +24,6 @@ namespace System.Collections.ObjectModel
[NonSerialized]
private Object _syncRoot;
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public Collection() {
items = new List<T>();
}
@@ -39,9 +36,6 @@ namespace System.Collections.ObjectModel
}
public int Count {
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
get { return items.Count; }
}
@@ -50,9 +44,6 @@ namespace System.Collections.ObjectModel
}
public T this[int index] {
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
get { return items[index]; }
set {
if( items.IsReadOnly) {
@@ -76,9 +67,6 @@ namespace System.Collections.ObjectModel
InsertItem(index, item);
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public void Clear() {
if( items.IsReadOnly) {
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);
@@ -87,16 +75,10 @@ namespace System.Collections.ObjectModel
ClearItems();
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public void CopyTo(T[] array, int index) {
items.CopyTo(array, index);
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public bool Contains(T item) {
return items.Contains(item);
}
@@ -105,9 +87,6 @@ namespace System.Collections.ObjectModel
return items.GetEnumerator();
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public int IndexOf(T item) {
return items.IndexOf(item);
}
@@ -147,23 +126,14 @@ namespace System.Collections.ObjectModel
RemoveItem(index);
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
protected virtual void ClearItems() {
items.Clear();
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
protected virtual void InsertItem(int index, T item) {
items.Insert(index, item);
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
protected virtual void RemoveItem(int index) {
items.RemoveAt(index);
}

View File

@@ -32,22 +32,13 @@ namespace System.Collections.ObjectModel
}
public int Count {
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
get { return list.Count; }
}
public T this[int index] {
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
get { return list[index]; }
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public bool Contains(T value) {
return list.Contains(value);
}
@@ -56,9 +47,6 @@ namespace System.Collections.ObjectModel
list.CopyTo(array, index);
}
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
public IEnumerator<T> GetEnumerator() {
return list.GetEnumerator();
}
@@ -196,9 +184,6 @@ namespace System.Collections.ObjectModel
}
object IList.this[int index] {
#if !FEATURE_CORECLR
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
#endif
get { return list[index]; }
set {
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);

View File

@@ -1,4 +1,4 @@
// ==++==
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
@@ -353,7 +353,7 @@ namespace System.Collections.ObjectModel
[DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
public sealed class KeyCollection : ICollection<TKey>, ICollection {
public sealed class KeyCollection : ICollection<TKey>, ICollection, IReadOnlyCollection<TKey> {
private readonly ICollection<TKey> m_collection;
[NonSerialized]
private Object m_syncRoot;
@@ -452,7 +452,7 @@ namespace System.Collections.ObjectModel
[DebuggerTypeProxy(typeof(Mscorlib_CollectionDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
public sealed class ValueCollection : ICollection<TValue>, ICollection {
public sealed class ValueCollection : ICollection<TValue>, ICollection, IReadOnlyCollection<TValue> {
private readonly ICollection<TValue> m_collection;
[NonSerialized]
private Object m_syncRoot;