/
ProcessStartInfo.Unix.cs
56 lines (48 loc) · 2.58 KB
/
ProcessStartInfo.Unix.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Versioning;
using System.Security;
namespace System.Diagnostics
{
// We know of no way to achieve this on Unix, particularly providing the password
// without a prompt. If we find a way, we should implement it. It may make more sense to provide
// similar functionality through an API specific to Unix.
public sealed partial class ProcessStartInfo
{
[SupportedOSPlatform("windows")]
public string? PasswordInClearText
{
get { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(PasswordInClearText))); }
set { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(PasswordInClearText))); }
}
[SupportedOSPlatform("windows")]
[AllowNull]
public string Domain
{
get { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(Domain))); }
set { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(Domain))); }
}
[SupportedOSPlatform("windows")]
public bool LoadUserProfile
{
get { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(LoadUserProfile))); }
set { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(LoadUserProfile))); }
}
[SupportedOSPlatform("windows")]
public bool UseCredentialsForNetworkingOnly
{
get { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(UseCredentialsForNetworkingOnly))); }
set { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(UseCredentialsForNetworkingOnly))); }
}
public bool UseShellExecute { get; set; }
public string[] Verbs => Array.Empty<string>();
[CLSCompliant(false)]
[SupportedOSPlatform("windows")]
public SecureString? Password
{
get { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(Password))); }
set { throw new PlatformNotSupportedException(SR.Format(SR.ProcessStartSingleFeatureNotSupported, nameof(Password))); }
}
}
}