Skip to content

Commit

Permalink
Make KeysCollection.Contains methods public. (#76319)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriktsarpalis authored Sep 29, 2022
1 parent 6098669 commit ed9afa8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/libraries/System.Collections/ref/System.Collections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void CopyTo(TKey[] array, int index) { }
public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
Expand Down Expand Up @@ -500,7 +500,7 @@ public void CopyTo(TKey[] array, int index) { }
public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
System.Collections.Generic.IEnumerator<TKey> System.Collections.Generic.IEnumerable<TKey>.GetEnumerator() { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ void ICollection<TKey>.Clear()
throw new NotSupportedException(SR.NotSupported_KeyCollectionSet);
}

bool ICollection<TKey>.Contains(TKey item)
public bool Contains(TKey item)
{
return _dictionary.ContainsKey(item);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ void ICollection<TKey>.Add(TKey item) =>
void ICollection<TKey>.Clear() =>
ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_KeyCollectionSet);

bool ICollection<TKey>.Contains(TKey item) =>
public bool Contains(TKey item) =>
_dictionary.ContainsKey(item);

bool ICollection<TKey>.Remove(TKey item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void ICollection<TKey>.Clear()
throw new NotSupportedException(SR.NotSupported_ReadOnlyCollection);
}

bool ICollection<TKey>.Contains(TKey item)
public bool Contains(TKey item)
{
return _collection.Contains(item);
}
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7608,7 +7608,7 @@ public void CopyTo(TKey[] array, int arrayIndex) { }
public System.Collections.Generic.IEnumerator<TKey> GetEnumerator() { throw null; }
void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
void System.Collections.Generic.ICollection<TKey>.Clear() { }
bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
public bool Contains(TKey item) { throw null; }
bool System.Collections.Generic.ICollection<TKey>.Remove(TKey item) { throw null; }
void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
Expand Down

0 comments on commit ed9afa8

Please sign in to comment.