-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Cleanup '#if !CORECLR' code #8337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fbe70e8
677e704
7639693
981090f
25adfc2
235b082
8ac7782
bf294a1
cc33627
5a870fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -330,15 +330,6 @@ private void DeleteDelegateSettings(string applicationname, RegistryKey rootKey, | |
| /// </summary> | ||
| protected override void BeginProcessing() | ||
| { | ||
| #if !CORECLR | ||
| if (Environment.OSVersion.Version.Major < 6) | ||
| { | ||
| //OS is XP/Win2k3. Throw error. | ||
| WSManHelper helper = new WSManHelper(this); | ||
| string message = helper.FormatResourceMsgFromResourcetext("CmdletNotAvailable"); | ||
| throw new InvalidOperationException(message); | ||
| } | ||
| #endif | ||
| //If not running elevated, then throw an "elevation required" error message. | ||
| WSManHelper.ThrowIfNotAdministrator(); | ||
|
|
||
|
|
@@ -440,14 +431,6 @@ protected override void BeginProcessing() | |
| //If not running elevated, then throw an "elevation required" error message. | ||
| WSManHelper.ThrowIfNotAdministrator(); | ||
| helper = new WSManHelper(this); | ||
| #if !CORECLR | ||
| if (Environment.OSVersion.Version.Major < 6) | ||
| { | ||
| //OS is XP/Win2k3. Throw error. | ||
| string message = helper.FormatResourceMsgFromResourcetext("CmdletNotAvailable"); | ||
| throw new InvalidOperationException(message); | ||
| } | ||
| #endif | ||
|
|
||
| // DelegateComputer cannot be specified when Role is other than client | ||
| if ((delegatecomputer != null) && !Role.Equals(Client, StringComparison.OrdinalIgnoreCase)) | ||
|
|
@@ -671,23 +654,15 @@ private void UpdateGPORegistrySettings(string applicationname, string[] delegate | |
| //open the registry key.If key is not present,create a new one | ||
| Credential_Delegation_Key = rootKey.OpenSubKey(Registry_Path_Credentials_Delegation, true); | ||
| if (Credential_Delegation_Key == null) | ||
| Credential_Delegation_Key = rootKey.CreateSubKey(Registry_Path_Credentials_Delegation | ||
| #if !CORECLR | ||
| , RegistryKeyPermissionCheck.ReadWriteSubTree | ||
| #endif | ||
| ); | ||
| Credential_Delegation_Key = rootKey.CreateSubKey(Registry_Path_Credentials_Delegation, RegistryKeyPermissionCheck.ReadWriteSubTree); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you decide to add RegistryKeyPermissionCheck parameter here?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it was removed because CoreFX had not support. Now we have this and we can enable the check. |
||
|
|
||
| Credential_Delegation_Key.SetValue(helper.Key_Allow_Fresh_Credentials, 1, RegistryValueKind.DWord); | ||
| Credential_Delegation_Key.SetValue(helper.Key_Concatenate_Defaults_AllowFresh, 1, RegistryValueKind.DWord); | ||
|
|
||
| // add the delegate value | ||
| Allow_Fresh_Credential_Key = rootKey.OpenSubKey(Registry_Path_Credentials_Delegation + @"\" + helper.Key_Allow_Fresh_Credentials, true); | ||
| if (Allow_Fresh_Credential_Key == null) | ||
| Allow_Fresh_Credential_Key = rootKey.CreateSubKey(Registry_Path_Credentials_Delegation + @"\" + helper.Key_Allow_Fresh_Credentials | ||
| #if !CORECLR | ||
| , RegistryKeyPermissionCheck.ReadWriteSubTree | ||
| #endif | ||
| ); | ||
| Allow_Fresh_Credential_Key = rootKey.CreateSubKey(Registry_Path_Credentials_Delegation + @"\" + helper.Key_Allow_Fresh_Credentials, RegistryKeyPermissionCheck.ReadWriteSubTree); | ||
|
|
||
| if (Allow_Fresh_Credential_Key != null) | ||
| { | ||
|
|
@@ -833,17 +808,7 @@ protected override void BeginProcessing() | |
| { | ||
| //If not running elevated, then throw an "elevation required" error message. | ||
| WSManHelper.ThrowIfNotAdministrator(); | ||
|
|
||
| helper = new WSManHelper(this); | ||
| #if !CORECLR | ||
| if (Environment.OSVersion.Version.Major < 6) | ||
| { | ||
| //OS is XP/Win2k3. Throw error. | ||
| string message = helper.FormatResourceMsgFromResourcetext("CmdletNotAvailable"); | ||
| throw new InvalidOperationException(message); | ||
| } | ||
| #endif | ||
|
|
||
| IWSManSession m_SessionObj = null; | ||
| try | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.