IFindUsagesContext.cs 881 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Threading;
using System.Threading.Tasks;

namespace Microsoft.CodeAnalysis.FindUsages
{
    internal interface IFindUsagesContext
    {
        CancellationToken CancellationToken { get; }

12 13 14 15 16 17 18 19
        /// <summary>
        /// Report a message to be displayed to the user.
        /// </summary>
        void ReportMessage(string message);

        /// <summary>
        /// Set the title of the window that results are displayed in.
        /// </summary>
20 21 22 23 24 25 26 27
        void SetSearchLabel(string displayName);

        Task OnDefinitionFoundAsync(DefinitionItem definition);
        Task OnReferenceFoundAsync(SourceReferenceItem reference);

        Task ReportProgressAsync(int current, int maximum);
    }
}