Skip to content

Consider removing CompletionSourceList #1911

Closed

Description

@jonsequitur
    // IReadOnlyList, yet it has an Add.  Why isn't it IList?
    // Of course, there's also
    // Guideline: DO use the “Collection” suffix in names of types implementing IEnumerable (or any of its descendants) and representing a list of items.
    // So "CompletionSourceCollection" is the name the guidelines suggest.  (It doesn't get the exception of "if you're just being a general data structure and explaining the kind of data structure" that List has)
    // Why doesn't this look like other collections? (Count property, etc)?
    public class CompletionSourceList : IEnumerable<ICompletionSource>, IReadOnlyCollection<ICompletionSource>, IReadOnlyList<ICompletionSource>, IEnumerable 
    {
        public CompletionSourceList();
        public int Count { get; }
        public ICompletionSource Item { get; }
        public void Add(ICompletionSource source);
        public void Clear();
        public IEnumerator<ICompletionSource> GetEnumerator();
    }

Activity

  1. added
    Area-Completions
    on Nov 2, 2022
  2. self-assigned this
    on Nov 3, 2022
  3. added a commit that references this issue on Nov 3, 2022
    d5d965e
  4. added a commit that references this issue on Nov 4, 2022
    466d165
  5. added this to the 2.0 GA milestone on Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area-APIArea-Completions

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions