* src/**/*: Add missing files (doh!). Fixes the build.
authorJonathan Pryor <jpryor@novell.com>
Sat, 25 Apr 2009 00:52:17 +0000 (00:52 -0000)
committerJonathan Pryor <jpryor@novell.com>
Sat, 25 Apr 2009 00:52:17 +0000 (00:52 -0000)
svn path=/trunk/mcs/; revision=132643

mcs/class/System.Data.Linq/ChangeLog
mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/DisabledEntityTracker.cs [new file with mode: 0644]
mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/IEntityTracker.cs [new file with mode: 0644]

index fbcb2d4f076d47f7e5200ee69a91133c9412b603..e59db9ef7f342e481a7933731f2b1decc14bbedc 100755 (executable)
@@ -1,3 +1,7 @@
+2009-04-24  Jonathan Pryor  <jpryor@novell.com>
+
+       * src/**/*: Add missing files (doh!).  Fixes the build.
+
 2009-04-24  Jonathan Pryor  <jpryor@novell.com>
 
        * src/**/*: Flush; syncs to DbLinq r1053.  Adds
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/DisabledEntityTracker.cs b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/DisabledEntityTracker.cs
new file mode 100644 (file)
index 0000000..32d1bc6
--- /dev/null
@@ -0,0 +1,112 @@
+#region MIT license\r
+// \r
+// MIT license\r
+//\r
+// Copyright (c) 2007-2008 Jiri Moudry, Pascal Craponne\r
+// \r
+// Permission is hereby granted, free of charge, to any person obtaining a copy\r
+// of this software and associated documentation files (the "Software"), to deal\r
+// in the Software without restriction, including without limitation the rights\r
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+// copies of the Software, and to permit persons to whom the Software is\r
+// furnished to do so, subject to the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be included in\r
+// all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+// THE SOFTWARE.\r
+// \r
+#endregion\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+\r
+#if MONO_STRICT\r
+using System.Data.Linq.Identity;\r
+#else\r
+using DbLinq.Data.Linq.Identity;\r
+#endif\r
+\r
+#if MONO_STRICT\r
+namespace System.Data.Linq.Implementation\r
+#else\r
+namespace DbLinq.Data.Linq.Implementation\r
+#endif\r
+{\r
+    /// <summary>\r
+    /// List of entities, with their corresponding state (to insert, to watch, to delete)\r
+    /// </summary>\r
+    internal class DisabledEntityTracker : IEntityTracker\r
+    {\r
+        private static IEnumerable<EntityTrack> trackedEntities = new EntityTrack[] { };\r
+\r
+        /// <summary>\r
+        /// Finds entity by key (PK)\r
+        /// </summary>\r
+        /// <param name="identityKey"></param>\r
+        /// <returns></returns>\r
+        public EntityTrack FindByIdentity(IdentityKey identityKey)\r
+        {\r
+            return null;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Returns true if the list contains the entity\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        /// <returns></returns>\r
+        public bool ContainsReference(object entity)\r
+        {\r
+            return false;\r
+        }\r
+\r
+        /// <summary>\r
+        /// Registers an entity to be inserted\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        public void RegisterToInsert(object entity)\r
+        {\r
+        }\r
+\r
+        /// <summary>\r
+        /// Registers an entity to be watched\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        /// <param name="identityKey"></param>\r
+        public void RegisterToWatch(object entity, IdentityKey identityKey)\r
+        {\r
+        }\r
+\r
+        /// <summary>\r
+        /// Registers entity to be deleted\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        public void RegisterToDelete(object entity)\r
+        {\r
+        }\r
+\r
+        /// <summary>\r
+        /// Unregisters the entity after deletion\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        public void RegisterDeleted(object entity)\r
+        {\r
+        }\r
+\r
+        /// <summary>\r
+        /// Enumerates all registered entities\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        public IEnumerable<EntityTrack> EnumerateAll()\r
+        {\r
+            return trackedEntities;\r
+        }\r
+    }\r
+}\r
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/IEntityTracker.cs b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/Implementation/IEntityTracker.cs
new file mode 100644 (file)
index 0000000..0ae07de
--- /dev/null
@@ -0,0 +1,93 @@
+#region MIT license\r
+// \r
+// MIT license\r
+//\r
+// Copyright (c) 2007-2008 Jiri Moudry, Pascal Craponne\r
+// \r
+// Permission is hereby granted, free of charge, to any person obtaining a copy\r
+// of this software and associated documentation files (the "Software"), to deal\r
+// in the Software without restriction, including without limitation the rights\r
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+// copies of the Software, and to permit persons to whom the Software is\r
+// furnished to do so, subject to the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be included in\r
+// all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+// THE SOFTWARE.\r
+// \r
+#endregion\r
+\r
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+\r
+#if MONO_STRICT\r
+using System.Data.Linq.Identity;\r
+#else\r
+using DbLinq.Data.Linq.Identity;\r
+#endif\r
+\r
+#if MONO_STRICT\r
+namespace System.Data.Linq.Implementation\r
+#else\r
+namespace DbLinq.Data.Linq.Implementation\r
+#endif\r
+{\r
+    /// <summary>\r
+    /// Interface of Entity Trackers\r
+    /// </summary>\r
+    internal interface IEntityTracker\r
+    {\r
+        /// <summary>\r
+        /// Finds entity by key (PK)\r
+        /// </summary>\r
+        /// <param name="identityKey"></param>\r
+        /// <returns></returns>\r
+        EntityTrack FindByIdentity(IdentityKey identityKey);\r
+\r
+        /// <summary>\r
+        /// Returns true if the list contains the entity\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        /// <returns></returns>\r
+        bool ContainsReference(object entity);\r
+\r
+        /// <summary>\r
+        /// Registers an entity to be inserted\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        void RegisterToInsert(object entity);\r
+\r
+        /// <summary>\r
+        /// Registers an entity to be watched\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        /// <param name="identityKey"></param>\r
+        void RegisterToWatch(object entity, IdentityKey identityKey);\r
+\r
+        /// <summary>\r
+        /// Registers entity to be deleted\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        void RegisterToDelete(object entity);\r
+\r
+        /// <summary>\r
+        /// Unregisters the entity after deletion\r
+        /// </summary>\r
+        /// <param name="entity"></param>\r
+        void RegisterDeleted(object entity);\r
+\r
+        /// <summary>\r
+        /// Enumerates all registered entities\r
+        /// </summary>\r
+        /// <returns></returns>\r
+        IEnumerable<EntityTrack> EnumerateAll();\r
+    }\r
+}\r