Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -0,0 +1,76 @@
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: AssemblyHash
**
**
** Purpose:
**
**
===========================================================*/
namespace System.Configuration.Assemblies {
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public struct AssemblyHash : ICloneable
{
private AssemblyHashAlgorithm _Algorithm;
private byte[] _Value;
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public static readonly AssemblyHash Empty = new AssemblyHash(AssemblyHashAlgorithm.None, null);
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(byte[] value) {
_Algorithm = AssemblyHashAlgorithm.SHA1;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value) {
_Algorithm = algorithm;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
// Hash is made up of a byte array and a value from a class of supported
// algorithm types.
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHashAlgorithm Algorithm {
get { return _Algorithm; }
set { _Algorithm = value; }
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public byte[] GetValue() {
return _Value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public void SetValue(byte[] value) {
_Value = value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public Object Clone() {
return new AssemblyHash(_Algorithm, _Value);
}
}
}

View File

@@ -0,0 +1,36 @@
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: AssemblyHashAlgorithm
**
**
** Purpose:
**
**
===========================================================*/
using System.Runtime.InteropServices;
namespace System.Configuration.Assemblies {
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum AssemblyHashAlgorithm
{
None = 0,
MD5 = 0x8003,
SHA1 = 0x8004,
#if !FEATURE_CORECLR || FEATURE_NETCORE
[ComVisible(false)]
SHA256 = 0x800c,
[ComVisible(false)]
SHA384 = 0x800d,
[ComVisible(false)]
SHA512 = 0x800e,
#endif
}
}

View File

@@ -0,0 +1,28 @@
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: AssemblyVersionCompatibility
**
** <EMAIL>Author: Suzanne Cook</EMAIL>
**
** Purpose: defining the different flavor's assembly version compatibility
**
** Date: June 4, 1999
**
===========================================================*/
namespace System.Configuration.Assemblies {
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum AssemblyVersionCompatibility
{
SameMachine = 1,
SameProcess = 2,
SameDomain = 3,
}
}