File: Editor\ITextBufferAssociatedViewService.cs
Web Access
Project: ..\..\..\src\EditorFeatures\Core\Microsoft.CodeAnalysis.EditorFeatures.csproj (Microsoft.CodeAnalysis.EditorFeatures)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
 
#nullable disable
 
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
 
namespace Microsoft.CodeAnalysis.Editor
{
    internal interface ITextBufferAssociatedViewService
    {
        IEnumerable<ITextView> GetAssociatedTextViews(ITextBuffer textBuffer);
 
        event EventHandler<SubjectBuffersConnectedEventArgs> SubjectBuffersConnected;
        event EventHandler<SubjectBuffersConnectedEventArgs> SubjectBuffersDisconnected;
    }
 
    internal class SubjectBuffersConnectedEventArgs
    {
        public ReadOnlyCollection<ITextBuffer> SubjectBuffers { get; }
        public ITextView TextView { get; }
 
        public SubjectBuffersConnectedEventArgs(ITextView textView, ReadOnlyCollection<ITextBuffer> subjectBuffers)
        {
            this.TextView = textView;
            this.SubjectBuffers = subjectBuffers;
        }
    }
}