mscorlib(4.0.0.0) API with additions
AssemblyHash.cs
2 
4 {
6  [Serializable]
7  [ComVisible(true)]
8  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
9  public struct AssemblyHash : ICloneable
10  {
11  private AssemblyHashAlgorithm _Algorithm;
12 
13  private byte[] _Value;
14 
16  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
17  public static readonly AssemblyHash Empty = new AssemblyHash(AssemblyHashAlgorithm.None, null);
18 
21  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
23  {
24  get
25  {
26  return _Algorithm;
27  }
28  set
29  {
30  _Algorithm = value;
31  }
32  }
33 
36  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
37  public AssemblyHash(byte[] value)
38  {
39  _Algorithm = AssemblyHashAlgorithm.SHA1;
40  _Value = null;
41  if (value != null)
42  {
43  int num = value.Length;
44  _Value = new byte[num];
45  Array.Copy(value, _Value, num);
46  }
47  }
48 
52  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
53  public AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value)
54  {
55  _Algorithm = algorithm;
56  _Value = null;
57  if (value != null)
58  {
59  int num = value.Length;
60  _Value = new byte[num];
61  Array.Copy(value, _Value, num);
62  }
63  }
64 
67  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
68  public byte[] GetValue()
69  {
70  return _Value;
71  }
72 
75  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
76  public void SetValue(byte[] value)
77  {
78  _Value = value;
79  }
80 
83  [Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
84  public object Clone()
85  {
86  return new AssemblyHash(_Algorithm, _Value);
87  }
88  }
89 }
AssemblyHash(byte[] value)
Initializes a new instance of the T:System.Configuration.Assemblies.AssemblyHash structure with the s...
Definition: AssemblyHash.cs:37
static readonly AssemblyHash Empty
An empty T:System.Configuration.Assemblies.AssemblyHash object.
Definition: AssemblyHash.cs:17
Definition: __Canon.cs:3
AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value)
Initializes a new instance of the T:System.Configuration.Assemblies.AssemblyHash structure with the s...
Definition: AssemblyHash.cs:53
Represents a hash of an assembly manifest's contents.
Definition: AssemblyHash.cs:9
byte [] GetValue()
Gets the hash value.
Definition: AssemblyHash.cs:68
Supports cloning, which creates a new instance of a class with the same value as an existing instance...
Definition: ICloneable.cs:7
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition: Array.cs:17
void SetValue(byte[] value)
Sets the hash value.
Definition: AssemblyHash.cs:76
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
Definition: Array.cs:1275
AssemblyHashAlgorithm Algorithm
Gets or sets the hash algorithm.
Definition: AssemblyHash.cs:23
AssemblyHashAlgorithm
Specifies all the hash algorithms used for hashing files and for generating the strong name.