This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1296 - ItemCollection should be ICollection
A little bit more kindness for consumers. I didn't add any tests because these are all just trivial forwards.
- Loading branch information
Showing
5 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,34 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections; | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.AspNetCore.Razor.Language | ||
{ | ||
public abstract class ItemCollection | ||
public abstract class ItemCollection : ICollection<KeyValuePair<object, object>> | ||
{ | ||
public abstract object this[object key] { get; set; } | ||
|
||
public abstract int Count { get; } | ||
|
||
public abstract bool IsReadOnly { get; } | ||
|
||
public abstract void Add(KeyValuePair<object, object> item); | ||
|
||
public abstract void Clear(); | ||
|
||
public abstract bool Contains(KeyValuePair<object, object> item); | ||
|
||
public abstract void CopyTo(KeyValuePair<object, object>[] array, int arrayIndex); | ||
|
||
public abstract IEnumerator<KeyValuePair<object, object>> GetEnumerator(); | ||
|
||
public abstract bool Remove(KeyValuePair<object, object> item); | ||
|
||
IEnumerator IEnumerable.GetEnumerator() | ||
{ | ||
return GetEnumerator(); | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Microsoft.AspNetCore.Razor.Language/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters