Author: jbevain
Date: 2005-03-13 08:24:43 -0500 (Sun, 13 Mar 2005)
New Revision: 41759
Modified:
trunk/cecil/lib/Mono.Cecil.Implem/AssemblyName.cs
trunk/cecil/lib/Mono.Cecil.Implem/StructureReader.cs
trunk/cecil/lib/Mono.Cecil/IAssemblyName.cs
Log:
add hash data to IAssemblyNameReference
Modified: trunk/cecil/lib/Mono.Cecil/IAssemblyName.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/IAssemblyName.cs 2005-03-13 12:43:57 UTC (rev
41758)
+++ trunk/cecil/lib/Mono.Cecil/IAssemblyName.cs 2005-03-13 13:24:43 UTC (rev
41759)
@@ -23,6 +23,7 @@
byte [] PublicKey { get; set; }
byte [] PublicKeyToken { get; }
AssemblyHashAlgorithm HashAlgorithm { get; set; }
+ byte [] Hash { get; }
}
public interface IAssemblyNameDefinition : IAssemblyNameReference {}
Modified: trunk/cecil/lib/Mono.Cecil.Implem/AssemblyName.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Implem/AssemblyName.cs 2005-03-13 12:43:57 UTC
(rev 41758)
+++ trunk/cecil/lib/Mono.Cecil.Implem/AssemblyName.cs 2005-03-13 13:24:43 UTC
(rev 41759)
@@ -27,6 +27,7 @@
private byte [] m_publicKey;
private byte [] m_publicKeyToken;
private AssemblyHashAlgorithm m_hashAlgo;
+ private byte [] m_hash;
public string Name {
get { return m_name; }
@@ -108,8 +109,14 @@
set { m_hashAlgo = value; }
}
+ public virtual byte [] Hash {
+ get { return m_hash; }
+ set { m_hash = value; }
+ }
+
public AssemblyNameReference () : this(string.Empty, string.Empty,
null)
- {}
+ {
+ }
public AssemblyNameReference (string name, string culture, Version
version)
{
@@ -131,11 +138,17 @@
internal class AssemblyNameDefinition : AssemblyNameReference,
IAssemblyNameDefinition {
+ public override byte [] Hash {
+ get { return new byte [0]; }
+ }
+
public AssemblyNameDefinition () : base()
- {}
+ {
+ }
public AssemblyNameDefinition (string name, string culture, Version
version) : base(name, culture, version)
- {}
+ {
+ }
public override void Accept (IReflectionStructureVisitor visitor)
{
Modified: trunk/cecil/lib/Mono.Cecil.Implem/StructureReader.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil.Implem/StructureReader.cs 2005-03-13
12:43:57 UTC (rev 41758)
+++ trunk/cecil/lib/Mono.Cecil.Implem/StructureReader.cs 2005-03-13
13:24:43 UTC (rev 41759)
@@ -74,6 +74,7 @@
new Version (arefrow.MajorVersion,
arefrow.MinorVersion,
arefrow.BuildNumber,
arefrow.RevisionNumber));
aname.PublicKeyToken =
m_img.MetadataRoot.Streams.BlobHeap.Read (arefrow.PublicKeyOrToken);
+ aname.Hash = m_img.MetadataRoot.Streams.BlobHeap.Read
(arefrow.HashValue);
(names as AssemblyNameReferenceCollection).Add (aname);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches