Imported Upstream version 4.6.0.150

Former-commit-id: 73e3bb1e96dd09dc931c1dfe559d2c7f7b8b02c7
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-23 13:20:38 +00:00
parent 02ac915603
commit b95516a3dd
239 changed files with 4096 additions and 1544 deletions

View File

@@ -139,6 +139,13 @@ namespace System.Linq.Expressions {
return LambdaCompiler.Compile(this, debugInfoGenerator);
}
#if NETSTANDARD
public Delegate Compile(bool preferInterpretation) {
// TODO: add logic for preferInterpretation
return Compile();
}
#endif
/// <summary>
/// Compiles the lambda into a method definition.
/// </summary>
@@ -200,6 +207,13 @@ namespace System.Linq.Expressions {
return (TDelegate)(object)LambdaCompiler.Compile(this, debugInfoGenerator);
}
#if NETSTANDARD
public new TDelegate Compile(bool preferInterpretation) {
// TODO: add logic for preferInterpretation
return Compile();
}
#endif
/// <summary>
/// Creates a new expression that is like this one, but using the
/// supplied children. If all of the children are the same, it will

View File

@@ -1 +1 @@
f062ca5e6394c3e981aa5bf8417cf029954e40a0
373609195c25680febccfacc678a393fa3cfeb06

View File

@@ -241,5 +241,19 @@ namespace System.Security.Cryptography {
return s_sha512;
}
}
#if NETSTANDARD
public static CngAlgorithm ECDiffieHellman {
get {
throw new NotImplementedException ();
}
}
public static CngAlgorithm ECDsa {
get {
throw new NotImplementedException ();
}
}
#endif
}
}

View File

@@ -32,7 +32,206 @@ namespace System.Security.Cryptography {
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class CngKey : IDisposable {
#if MONO
public CngAlgorithmGroup AlgorithmGroup {
[SecuritySafeCritical]
[Pure]
get {
throw new NotImplementedException ();
}
}
public CngAlgorithm Algorithm {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public CngExportPolicies ExportPolicy {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public SafeNCryptKeyHandle Handle {
[System.Security.SecurityCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
get {
throw new NotImplementedException ();
}
}
public bool IsEphemeral {
[SecuritySafeCritical]
[Pure]
get {
throw new NotImplementedException ();
}
[System.Security.SecurityCritical]
private set {
throw new NotImplementedException ();
}
}
public bool IsMachineKey {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public string KeyName {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public int KeySize {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public CngKeyUsages KeyUsage {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public IntPtr ParentWindowHandle {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
set {
throw new NotImplementedException ();
}
}
public CngProvider Provider {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public SafeNCryptProviderHandle ProviderHandle {
[System.Security.SecurityCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
get {
throw new NotImplementedException ();
}
}
public string UniqueName {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public CngUIPolicy UIPolicy {
[SecuritySafeCritical]
get {
throw new NotImplementedException ();
}
}
public static CngKey Create(CngAlgorithm algorithm) {
throw new NotImplementedException ();
}
public static CngKey Create(CngAlgorithm algorithm, string keyName) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public static CngKey Create(CngAlgorithm algorithm, string keyName, CngKeyCreationParameters creationParameters) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public void Delete() {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
public void Dispose() {
throw new NotImplementedException ();
}
public static bool Exists(string keyName) {
throw new NotImplementedException ();
}
public static bool Exists(string keyName, CngProvider provider) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Justification = "Reviewed")]
public static bool Exists(string keyName, CngProvider provider, CngKeyOpenOptions options) {
throw new NotImplementedException ();
}
public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public static CngKey Import(byte[] keyBlob, CngKeyBlobFormat format, CngProvider provider) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public byte[] Export(CngKeyBlobFormat format) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
public CngProperty GetProperty(string name, CngPropertyOptions options) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
public bool HasProperty(string name, CngPropertyOptions options) {
throw new NotImplementedException ();
}
public static CngKey Open(string keyName) {
throw new NotImplementedException ();
}
public static CngKey Open(string keyName, CngProvider provider) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public static CngKey Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions) {
throw new NotImplementedException ();
}
[System.Security.SecurityCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
public static CngKey Open(SafeNCryptKeyHandle keyHandle, CngKeyHandleOpenOptions keyHandleOpenOptions) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
[SecurityPermission(SecurityAction.Demand, UnmanagedCode = true)]
public void SetProperty(CngProperty property) {
throw new NotImplementedException ();
}
#else
private SafeNCryptKeyHandle m_keyHandle;

View File

@@ -119,6 +119,20 @@ namespace System.Security.Cryptography {
}
}
#if NETSTANDARD
public static CngKeyBlobFormat EccFullPrivateBlob {
get {
throw new NotImplementedException ();
}
}
public static CngKeyBlobFormat EccFullPublicBlob {
get {
throw new NotImplementedException ();
}
}
#endif
public static CngKeyBlobFormat GenericPrivateBlob {
get {
Contract.Ensures(Contract.Result<CngKeyBlobFormat>() != null);

View File

@@ -41,6 +41,38 @@ namespace System.Security.Cryptography {
return CryptoConfig.CreateFromName(algorithm) as ECDsa;
}
#if NETSTANDARD
public static ECDsa Create (ECCurve curve)
{
throw new NotImplementedException ();
}
public static ECDsa Create (ECParameters parameters)
{
throw new NotImplementedException ();
}
public virtual ECParameters ExportExplicitParameters (bool includePrivateParameters)
{
throw new NotImplementedException ();
}
public virtual ECParameters ExportParameters (bool includePrivateParameters)
{
throw new NotImplementedException ();
}
public virtual void GenerateKey (ECCurve curve)
{
throw new NotImplementedException ();
}
public virtual void ImportParameters (ECParameters parameters)
{
throw new NotImplementedException ();
}
#endif
//
// Signature operations
//

View File

@@ -19,6 +19,34 @@ namespace System.Security.Cryptography {
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
public sealed class ECDsaCng : ECDsa {
#if MONO
public ECDsaCng() : this(521) {
}
public ECDsaCng(int keySize) {
throw new NotImplementedException ();
}
[SecuritySafeCritical]
public ECDsaCng(CngKey key) {
throw new NotImplementedException ();
}
#if NETSTANDARD
public ECDsaCng(ECCurve curve) {
throw new NotImplementedException ();
}
#endif
public CngKey Key {
get {
throw new NotImplementedException ();
}
private set {
throw new NotImplementedException ();
}
}
public override byte[] SignHash(byte[] hash) {
throw new NotImplementedException();
}

View File

@@ -11,6 +11,34 @@ namespace System.Security.Cryptography
public sealed class RSACng : RSA
{
#if MONO
public RSACng() : this(2048) { }
public RSACng(int keySize)
{
throw new NotImplementedException ();
}
#if NETSTANDARD
public RSACng(CngKey key)
{
throw new NotImplementedException ();
}
#endif
public CngKey Key
{
[SecuritySafeCritical]
get
{
throw new NotImplementedException ();
}
private set
{
throw new NotImplementedException ();
}
}
public override RSAParameters ExportParameters(bool includePrivateParameters)
{
throw new NotImplementedException();

View File

@@ -55,13 +55,6 @@ namespace System {
if (start==end)
return false;
#if MONO
if (!Uri.IsWindowsFileSystem) {
if (!(end - start > 2 && name[start] == '\\' && name[start + 1] == '\\')) {
return false;
}
}
#endif
//
// First segment could consist of only '_' or '-' but it cannot be all digits or empty
//

View File

@@ -471,7 +471,62 @@ namespace System.Text.RegularExpressions {
}
}
}
#if NETSTANDARD
protected IDictionary Caps
{
get
{
var dict = new Dictionary<int, int>();
foreach (int key in caps.Keys)
{
dict.Add (key, (int)caps[key]);
}
return dict;
}
set
{
if (value == null)
throw new ArgumentNullException("value");
caps = new Hashtable (value.Count);
foreach (DictionaryEntry entry in value)
{
caps[(int)entry.Key] = (int)entry.Value;
}
}
}
protected IDictionary CapNames
{
get
{
var dict = new Dictionary<string, int>();
foreach (string key in capnames.Keys)
{
dict.Add (key, (int)capnames[key]);
}
return dict;
}
set
{
if (value == null)
throw new ArgumentNullException("value");
capnames = new Hashtable (value.Count);
foreach (DictionaryEntry entry in value)
{
capnames[(string)entry.Key] = (int)entry.Value;
}
}
}
#endif
/// <devdoc>
/// <para>
/// Returns the options passed into the constructor

View File

@@ -34,6 +34,21 @@ namespace System
}
}
#if NETSTANDARD
public static string TargetFrameworkName
{
get
{
throw new NotImplementedException();
}
}
public static object GetData (string name)
{
throw new NotImplementedException();
}
#endif
#region Switch APIs
#if !MONO
static AppContext()