// 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 enable using System; using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; namespace Microsoft.CodeAnalysis.Remote { internal abstract class RemoteServiceConnection : IDisposable { public abstract void Dispose(); public abstract Task RunRemoteAsync(string targetName, Solution? solution, IReadOnlyList arguments, CancellationToken cancellationToken); public abstract Task RunRemoteAsync(string targetName, Solution? solution, IReadOnlyList arguments, Func>? dataReader, CancellationToken cancellationToken); public Task RunRemoteAsync(string targetName, Solution? solution, IReadOnlyList arguments, CancellationToken cancellationToken) => RunRemoteAsync(targetName, solution, arguments, dataReader: null, cancellationToken); } }