Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleLittleCloud committed Nov 13, 2024
1 parent c8bbcbc commit 299f64e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// 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.md file in the project root for more information.

using System.Diagnostics;
using Microsoft.VisualStudio.HotReload.Components.DeltaApplier;

namespace Microsoft.VisualStudio.ProjectSystem.VS.HotReload
Expand All @@ -19,6 +20,12 @@ public interface IProjectHotReloadSessionCallback

internal interface IProjectHotReloadSessionCallback2 : IProjectHotReloadSessionCallback
{
public UnconfiguredProject? Project { get; }

public Process? Process { get; set; }

public IProjectHotReloadSession? Session { get; set; }

Task<bool> RestartProjectAsync(bool isRunningUnderDebug, CancellationToken cancellationToken);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private void EnsureDeltaApplierforSession()

public ValueTask<int?> GetTargetLocalProcessIdAsync(CancellationToken cancellationToken)
{
if (_callback is HotReloadState hotReloadState)
if (_callback is IProjectHotReloadSessionCallback2 hotReloadState)
{
return new ValueTask<int?>(hotReloadState.Process?.Id);
}
Expand All @@ -310,7 +310,7 @@ private void EnsureDeltaApplierforSession()

public ValueTask<string?> GetProjectFullPathAsync(CancellationToken cancellationToken)
{
if (_callback is HotReloadState hrs)
if (_callback is IProjectHotReloadSessionCallback2 hrs)
{
return new ValueTask<string?>(hrs.Project?.FullPath);
}
Expand Down

0 comments on commit 299f64e

Please sign in to comment.