mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Merge pull request #1210 from PowerShell/andschwa/rtm
Update PowerShell to use .NET Core 1.0
This commit is contained in:
commit
b294a46d2e
43 files changed
+117
-3157
No files matched your search
@@ -9,6 +9,7 @@ using System.Net;
|
||||
using System.Security;
|
||||
using SafeString=System.String;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using Microsoft.PowerShell;
|
||||
|
||||
@@ -286,7 +287,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
if (unmanagedPtr != IntPtr.Zero)
|
||||
{
|
||||
ClrFacade.ZeroFreeCoTaskMemUnicode(unmanagedPtr);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(unmanagedPtr);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
if (p != IntPtr.Zero)
|
||||
{
|
||||
ClrFacade.ZeroFreeCoTaskMemUnicode(p);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ namespace System.Management.Automation.Remoting.Client
|
||||
{
|
||||
if (cred.password != IntPtr.Zero)
|
||||
{
|
||||
ClrFacade.ZeroFreeCoTaskMemUnicode(cred.password);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(cred.password);
|
||||
cred.password = IntPtr.Zero;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netstandard1.5": {
|
||||
"netstandard1.6": {
|
||||
"imports": [ "dnxcore50" ],
|
||||
"buildOptions": {
|
||||
"define": [ "CORECLR", "PORTABLE" ],
|
||||
@@ -131,36 +131,36 @@
|
||||
"Microsoft.PowerShell.CoreCLR.AssemblyLoadContext": "1.0.0-*",
|
||||
"Microsoft.PowerShell.CoreCLR.Eventing": "1.0.0-*",
|
||||
|
||||
"Microsoft.CSharp": "4.0.1-rc2-24027",
|
||||
"Microsoft.Win32.Registry.AccessControl": "4.0.0-rc2-24027",
|
||||
"System.Collections.Specialized": "4.0.1-rc2-24027",
|
||||
"System.Collections.NonGeneric": "4.0.1-rc2-24027",
|
||||
"System.ComponentModel.EventBasedAsync": "4.0.11-rc2-24027",
|
||||
"System.ComponentModel.TypeConverter": "4.0.1-rc2-24027",
|
||||
"System.Data.Common": "4.0.1-rc2-24027",
|
||||
"System.Diagnostics.Contracts": "4.0.1-rc2-24027",
|
||||
"System.Diagnostics.FileVersionInfo": "4.0.0-rc2-24027",
|
||||
"System.Diagnostics.Process": "4.1.0-rc2-24027",
|
||||
"System.Diagnostics.StackTrace": "4.0.1-rc2-24027",
|
||||
"System.Diagnostics.TraceSource": "4.0.0-rc2-24027",
|
||||
"System.Dynamic.Runtime": "4.0.11-rc2-24027",
|
||||
"System.IO.FileSystem.AccessControl": "4.0.0-rc2-24027",
|
||||
"System.IO.FileSystem.DriveInfo": "4.0.0-rc2-24027",
|
||||
"System.IO.FileSystem.Watcher": "4.0.0-rc2-24027",
|
||||
"System.IO.Pipes": "4.0.0-rc2-24027",
|
||||
"System.Linq.Expressions": "4.0.11-rc2-24027",
|
||||
"System.Net.Http": "4.0.1-rc2-24027",
|
||||
"System.Net.NetworkInformation": "4.1.0-rc2-24027",
|
||||
"System.Reflection.Emit": "4.0.1-rc2-24027",
|
||||
"System.Reflection.Emit.Lightweight": "4.0.1-rc2-24027",
|
||||
"System.Security.AccessControl": "4.0.0-rc2-24027",
|
||||
"System.Security.Cryptography.Algorithms": "4.1.0-rc2-24027",
|
||||
"System.Security.Cryptography.X509Certificates": "4.1.0-rc2-24027",
|
||||
"System.Threading.Thread": "4.0.0-rc2-24027",
|
||||
"System.Threading.Tasks.Parallel": "4.0.1-rc2-24027",
|
||||
"System.Xml.XPath.XmlDocument": "4.0.1-rc2-24027",
|
||||
"System.Xml.XmlDocument": "4.0.1-rc2-24027",
|
||||
"System.Xml.XmlSerializer": "4.0.11-rc2-24027"
|
||||
"Microsoft.CSharp": "4.0.1",
|
||||
"Microsoft.Win32.Registry.AccessControl": "4.0.0",
|
||||
"System.Collections.Specialized": "4.0.1",
|
||||
"System.Collections.NonGeneric": "4.0.1",
|
||||
"System.ComponentModel.EventBasedAsync": "4.0.11",
|
||||
"System.ComponentModel.TypeConverter": "4.1.0",
|
||||
"System.Data.Common": "4.1.0",
|
||||
"System.Diagnostics.Contracts": "4.0.1",
|
||||
"System.Diagnostics.FileVersionInfo": "4.0.0",
|
||||
"System.Diagnostics.Process": "4.1.0",
|
||||
"System.Diagnostics.StackTrace": "4.0.1",
|
||||
"System.Diagnostics.TraceSource": "4.0.0",
|
||||
"System.Dynamic.Runtime": "4.0.11",
|
||||
"System.IO.FileSystem.AccessControl": "4.0.0",
|
||||
"System.IO.FileSystem.DriveInfo": "4.0.0",
|
||||
"System.IO.FileSystem.Watcher": "4.0.0",
|
||||
"System.IO.Pipes": "4.0.0",
|
||||
"System.Linq.Expressions": "4.1.0",
|
||||
"System.Net.Http": "4.1.0",
|
||||
"System.Net.NetworkInformation": "4.1.0",
|
||||
"System.Reflection.Emit": "4.0.1",
|
||||
"System.Reflection.Emit.Lightweight": "4.0.1",
|
||||
"System.Security.AccessControl": "4.0.0",
|
||||
"System.Security.Cryptography.Algorithms": "4.2.0",
|
||||
"System.Security.Cryptography.X509Certificates": "4.1.0",
|
||||
"System.Threading.Thread": "4.0.0",
|
||||
"System.Threading.Tasks.Parallel": "4.0.1",
|
||||
"System.Xml.XPath.XmlDocument": "4.0.1",
|
||||
"System.Xml.XmlDocument": "4.0.1",
|
||||
"System.Xml.XmlSerializer": "4.0.11"
|
||||
}
|
||||
},
|
||||
"net451": {
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Microsoft.PowerShell
|
||||
}
|
||||
finally
|
||||
{
|
||||
ClrFacade.ZeroFreeCoTaskMemUnicode(ptr);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
if (unmanagedMemory != IntPtr.Zero)
|
||||
{
|
||||
ZeroFreeCoTaskMemUnicode(unmanagedMemory);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(unmanagedMemory);
|
||||
}
|
||||
}
|
||||
return passwordInClearText;
|
||||
@@ -213,19 +213,6 @@ namespace System.Management.Automation
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Needed to pair with the SecureStringToCoTaskMemUnicode method which is member of
|
||||
/// 'SecureStringMarshal' on CORE CLR, and member of 'Marshal' on Full CLR.
|
||||
/// </summary>
|
||||
internal static void ZeroFreeCoTaskMemUnicode(IntPtr unmanagedStr)
|
||||
{
|
||||
#if CORECLR
|
||||
SecureStringMarshal.ZeroFreeCoTaskMemUnicode(unmanagedStr);
|
||||
#else
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(unmanagedStr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Facade for SecureStringToCoTaskMemUnicode
|
||||
/// </summary>
|
||||
|
||||
@@ -1023,7 +1023,7 @@ namespace System.Management.Automation.Internal
|
||||
{
|
||||
data[i] = Marshal.ReadByte(ptr, i);
|
||||
}
|
||||
ClrFacade.ZeroFreeCoTaskMemUnicode(ptr);
|
||||
Marshal.ZeroFreeCoTaskMemUnicode(ptr);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user