Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
<DotNetTargetFrameworkVersion>10.0</DotNetTargetFrameworkVersion>
<DotNetTargetFramework>net$(DotNetTargetFrameworkVersion)</DotNetTargetFramework>
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
</PropertyGroup>
<Import
Project="$(MSBuildThisFileDirectory)Configuration.Override.props"
Expand Down
16 changes: 15 additions & 1 deletion src/Xamarin.Android.Tools.AndroidSdk/ProcessUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,21 @@ static ProcessUtils ()
ExecutableFileExtensions = pathExts;
}

public static async Task<int> StartProcess (ProcessStartInfo psi, TextWriter? stdout, TextWriter? stderr, CancellationToken cancellationToken, IDictionary<string, string>? environmentVariables = null, Action<Process>? onStarted = null)
/// Backward-compatible overload matching the original shipped API (without environmentVariables).
#pragma warning disable RS0027 // Public API with optional parameter(s) should have the most parameters amongst its public overloads
public static Task<int> StartProcess (ProcessStartInfo psi, TextWriter? stdout, TextWriter? stderr, CancellationToken cancellationToken, Action<Process>? onStarted = null)
#pragma warning restore RS0027
{
return StartProcess (psi, stdout, stderr, cancellationToken, null, onStarted);
}

Comment thread
jonathanpeppers marked this conversation as resolved.
/// Convenience overload accepting environmentVariables without requiring onStarted.
public static Task<int> StartProcess (ProcessStartInfo psi, TextWriter? stdout, TextWriter? stderr, CancellationToken cancellationToken, IDictionary<string, string>? environmentVariables)
{
return StartProcess (psi, stdout, stderr, cancellationToken, environmentVariables, null);
}

public static async Task<int> StartProcess (ProcessStartInfo psi, TextWriter? stdout, TextWriter? stderr, CancellationToken cancellationToken, IDictionary<string, string>? environmentVariables, Action<Process>? onStarted)
{
cancellationToken.ThrowIfCancellationRequested ();
psi.UseShellExecute = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ static Xamarin.Android.Tools.JdkInstaller.RecommendedMajorVersion.get -> int
static Xamarin.Android.Tools.JdkInstaller.SupportedVersions.get -> System.Collections.Generic.IReadOnlyList<int>!
static Xamarin.Android.Tools.ProcessUtils.CreateProcessStartInfo(string! fileName, params string![]! args) -> System.Diagnostics.ProcessStartInfo!
static Xamarin.Android.Tools.ProcessUtils.IsElevated() -> bool
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables = null, System.Action<System.Diagnostics.Process!>? onStarted = null) -> System.Threading.Tasks.Task<int>!
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables, System.Action<System.Diagnostics.Process!>? onStarted) -> System.Threading.Tasks.Task<int>!
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables) -> System.Threading.Tasks.Task<int>!
Xamarin.Android.Tools.AvdInfo
Xamarin.Android.Tools.AvdInfo.AvdInfo(string! Name, string? DeviceProfile = null, string? Path = null) -> void
Xamarin.Android.Tools.AvdInfo.DeviceProfile.get -> string?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ static Xamarin.Android.Tools.JdkInstaller.RecommendedMajorVersion.get -> int
static Xamarin.Android.Tools.JdkInstaller.SupportedVersions.get -> System.Collections.Generic.IReadOnlyList<int>!
static Xamarin.Android.Tools.ProcessUtils.CreateProcessStartInfo(string! fileName, params string![]! args) -> System.Diagnostics.ProcessStartInfo!
static Xamarin.Android.Tools.ProcessUtils.IsElevated() -> bool
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables = null, System.Action<System.Diagnostics.Process!>? onStarted = null) -> System.Threading.Tasks.Task<int>!
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables, System.Action<System.Diagnostics.Process!>? onStarted) -> System.Threading.Tasks.Task<int>!
static Xamarin.Android.Tools.ProcessUtils.StartProcess(System.Diagnostics.ProcessStartInfo! psi, System.IO.TextWriter? stdout, System.IO.TextWriter? stderr, System.Threading.CancellationToken cancellationToken, System.Collections.Generic.IDictionary<string!, string!>? environmentVariables) -> System.Threading.Tasks.Task<int>!
Xamarin.Android.Tools.AvdInfo
Xamarin.Android.Tools.AvdInfo.AvdInfo(string! Name, string? DeviceProfile = null, string? Path = null) -> void
Xamarin.Android.Tools.AvdInfo.DeviceProfile.get -> string?
Expand Down