Author: jbevain
Date: 2006-03-23 14:08:27 -0500 (Thu, 23 Mar 2006)
New Revision: 58377
Modified:
trunk/cecil/lib/ChangeLog
trunk/cecil/lib/CodeGen/templates/ImageReader.cs
trunk/cecil/lib/CodeGen/templates/NamedCollectionImplem.cs
trunk/cecil/lib/Mono.Cecil/ExternTypeCollection.cs
trunk/cecil/lib/Mono.Cecil/TypeDefinitionCollection.cs
trunk/cecil/lib/Mono.Cecil/TypeReferenceCollection.cs
Log:
2006-03-23 Jb Evain <[EMAIL PROTECTED]>
* Mono.Cecil/TypeReferenceCollection.cs
Mono.Cecil/ExternTypeCollection.cs
Mono.Cecil/TypeDefinitionCollection.cs
CodeGen/templates/NamedCollectionImplem.cs
CodeGen/templates/ImageReader.cs:
Ensure type with the same name are added
to the collection.
Modified: trunk/cecil/lib/ChangeLog
===================================================================
--- trunk/cecil/lib/ChangeLog 2006-03-23 19:04:59 UTC (rev 58376)
+++ trunk/cecil/lib/ChangeLog 2006-03-23 19:08:27 UTC (rev 58377)
@@ -1,5 +1,13 @@
2006-03-23 Jb Evain <[EMAIL PROTECTED]>
+ * Mono.Cecil/TypeReferenceCollection.cs
+ Mono.Cecil/ExternTypeCollection.cs
+ Mono.Cecil/TypeDefinitionCollection.cs
+ CodeGen/templates/NamedCollectionImplem.cs
+ CodeGen/templates/ImageReader.cs:
+ Ensure type with the same name are added
+ to the collection.
+
* Mono.Cecil.Metadata/MetadataWriter.cs:
Ensure every blob signature is unique.
Modified: trunk/cecil/lib/CodeGen/templates/ImageReader.cs
===================================================================
--- trunk/cecil/lib/CodeGen/templates/ImageReader.cs 2006-03-23 19:04:59 UTC
(rev 58376)
+++ trunk/cecil/lib/CodeGen/templates/ImageReader.cs 2006-03-23 19:08:27 UTC
(rev 58377)
@@ -58,7 +58,14 @@
public static ImageReader Read (string file)
{
- Image img = new Image (file);
+ if (file == null)
+ throw new ArgumentNullException ("file");
+
+ FileInfo fi = new FileInfo (file);
+ if (!File.Exists (fi.FullName))
+ throw new FileNotFoundException (fi.FullName);
+
+ Image img = new Image (fi);
ImageReader reader = new ImageReader (img);
img.Accept (reader);
return reader;
Modified: trunk/cecil/lib/CodeGen/templates/NamedCollectionImplem.cs
===================================================================
--- trunk/cecil/lib/CodeGen/templates/NamedCollectionImplem.cs 2006-03-23
19:04:59 UTC (rev 58376)
+++ trunk/cecil/lib/CodeGen/templates/NamedCollectionImplem.cs 2006-03-23
19:08:27 UTC (rev 58377)
@@ -86,7 +86,7 @@
if (On<%=$cur_coll.item_name%>Added != null)
On<%=$cur_coll.item_name%>Added (this, new
<%=$cur_coll.item_name%>EventArgs (value));
- this.BaseSet (value.FullName, value);
+ this.BaseAdd (value.FullName, value);
}
public void Clear ()
Modified: trunk/cecil/lib/Mono.Cecil/ExternTypeCollection.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/ExternTypeCollection.cs 2006-03-23 19:04:59 UTC
(rev 58376)
+++ trunk/cecil/lib/Mono.Cecil/ExternTypeCollection.cs 2006-03-23 19:08:27 UTC
(rev 58377)
@@ -5,7 +5,7 @@
// Jb Evain ([EMAIL PROTECTED])
//
// Generated by /CodeGen/cecil-gen.rb do not edit
-// Thu Jan 26 11:25:59 CET 2006
+// Thu Mar 23 20:04:11 CET 2006
//
// (C) 2005 Jb Evain
//
@@ -83,7 +83,7 @@
if (OnExternTypeAdded != null)
OnExternTypeAdded (this, new
ExternTypeEventArgs (value));
- this.BaseSet (value.FullName, value);
+ this.BaseAdd (value.FullName, value);
}
public void Clear ()
Modified: trunk/cecil/lib/Mono.Cecil/TypeDefinitionCollection.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/TypeDefinitionCollection.cs 2006-03-23
19:04:59 UTC (rev 58376)
+++ trunk/cecil/lib/Mono.Cecil/TypeDefinitionCollection.cs 2006-03-23
19:08:27 UTC (rev 58377)
@@ -5,7 +5,7 @@
// Jb Evain ([EMAIL PROTECTED])
//
// Generated by /CodeGen/cecil-gen.rb do not edit
-// Thu Dec 22 15:41:26 CET 2005
+// Thu Mar 23 20:04:11 CET 2006
//
// (C) 2005 Jb Evain
//
@@ -86,7 +86,7 @@
if (OnTypeDefinitionAdded != null)
OnTypeDefinitionAdded (this, new
TypeDefinitionEventArgs (value));
- this.BaseSet (value.FullName, value);
+ this.BaseAdd (value.FullName, value);
}
public void Clear ()
Modified: trunk/cecil/lib/Mono.Cecil/TypeReferenceCollection.cs
===================================================================
--- trunk/cecil/lib/Mono.Cecil/TypeReferenceCollection.cs 2006-03-23
19:04:59 UTC (rev 58376)
+++ trunk/cecil/lib/Mono.Cecil/TypeReferenceCollection.cs 2006-03-23
19:08:27 UTC (rev 58377)
@@ -5,7 +5,7 @@
// Jb Evain ([EMAIL PROTECTED])
//
// Generated by /CodeGen/cecil-gen.rb do not edit
-// Thu Jan 26 11:25:58 CET 2006
+// Thu Mar 23 20:04:10 CET 2006
//
// (C) 2005 Jb Evain
//
@@ -83,7 +83,7 @@
if (OnTypeReferenceAdded != null)
OnTypeReferenceAdded (this, new
TypeReferenceEventArgs (value));
- this.BaseSet (value.FullName, value);
+ this.BaseAdd (value.FullName, value);
}
public void Clear ()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches