[commit] r1821 - in trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common: Classes Properties

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Feb 1 17:29:40 CST 2012


Author: ksmyth
Date: Wed Feb  1 17:29:39 2012
New Revision: 1821

Log:
GetHashCode and Equals for putting into Dictionary

Modified:
   trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Classes/Base.cs
   trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Properties/AssemblyInfo.cs

Modified: trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Classes/Base.cs
==============================================================================
--- trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Classes/Base.cs	Wed Feb  1 17:29:25 2012	(r1820)
+++ trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Classes/Base.cs	Wed Feb  1 17:29:39 2012	(r1821)
@@ -259,5 +259,25 @@
 			get { return Impl.MetaBase.Name; }
 		}
 
+        public override bool Equals(object obj)
+        {
+            if (obj == null)
+                return false;
+            if (!(obj is Base))
+                return false;
+            Base that = obj as Base;
+            if (Impl == null && that.Impl == null)
+                return true;
+            if (Impl == null || that.Impl == null)
+                return false;
+            return Impl.ID == that.Impl.ID;
+        }
+
+        public override int GetHashCode()
+        {
+            if (Impl == null)
+                return 0;
+            return Impl.ID.GetHashCode();
+        }
 	}
 }

Modified: trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Properties/AssemblyInfo.cs
==============================================================================
--- trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Properties/AssemblyInfo.cs	Wed Feb  1 17:29:25 2012	(r1820)
+++ trunk/SDK/DotNet/DsmlGenerator/ISIS.GME.Common/Properties/AssemblyInfo.cs	Wed Feb  1 17:29:39 2012	(r1821)
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.1.0")]
+[assembly: AssemblyFileVersion("1.0.1.0")]


More information about the gme-commit mailing list