Author: spouliot
Date: 2008-01-11 07:29:49 -0500 (Fri, 11 Jan 2008)
New Revision: 92666

Modified:
   trunk/cecil/gendarme/framework/ChangeLog
   trunk/cecil/gendarme/framework/Location.cs
Log:
Location.cs: Add a ctor for FieldDefinition.

Modified: trunk/cecil/gendarme/framework/ChangeLog
===================================================================
--- trunk/cecil/gendarme/framework/ChangeLog    2008-01-11 12:23:46 UTC (rev 
92665)
+++ trunk/cecil/gendarme/framework/ChangeLog    2008-01-11 12:29:49 UTC (rev 
92666)
@@ -1,3 +1,7 @@
+2008-01-11  Sebastien Pouliot  <[EMAIL PROTECTED]> 
+
+       * Location.cs: Add a ctor for FieldDefinition.
+
 2008-01-05  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * framework.mdp: Added FieldRocks to MD project file

Modified: trunk/cecil/gendarme/framework/Location.cs
===================================================================
--- trunk/cecil/gendarme/framework/Location.cs  2008-01-11 12:23:46 UTC (rev 
92665)
+++ trunk/cecil/gendarme/framework/Location.cs  2008-01-11 12:29:49 UTC (rev 
92666)
@@ -64,6 +64,16 @@
                        this.offset = offset;
                }
 
+               public Location (FieldDefinition field)
+               {
+                       if (field == null)
+                               throw new ArgumentNullException ("field");
+
+                       this.type = field.DeclaringType.FullName;
+                       this.method = field.Name; // temporary
+                       this.offset = -1;
+               }
+
                public override string ToString ()
                {
                        StringBuilder sb = new StringBuilder ();
@@ -87,4 +97,3 @@
                }
        }
 }
-

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to