Author: serras
Date: 2006-11-01 11:42:05 -0500 (Wed, 01 Nov 2006)
New Revision: 67221

Added:
   trunk/olive/class/System.Query/System.Query/IOrderedQueryable.cs
   trunk/olive/class/System.Query/System.Query/IOrderedQueryable_T.cs
   trunk/olive/class/System.Query/System.Query/IQueryable.cs
   trunk/olive/class/System.Query/System.Query/IQueryable_T.cs
Modified:
   trunk/olive/class/System.Query/ChangeLog
   trunk/olive/class/System.Query/System.Query.dll.sources
   trunk/olive/class/System.Query/System.Query/Funcs.cs
   trunk/olive/class/System.Query/System.Query/Lookup.cs
   trunk/olive/class/System.Query/System.Query/Sequence.cs
Log:
- Add IOrderedSequence, IQueryable
- Change Sequence.Join and Sequence.GroupJoin to use Lookup<K, T>  as stated on 
the Standard Query Operators paper


Modified: trunk/olive/class/System.Query/ChangeLog
===================================================================
--- trunk/olive/class/System.Query/ChangeLog    2006-11-01 16:38:53 UTC (rev 
67220)
+++ trunk/olive/class/System.Query/ChangeLog    2006-11-01 16:42:05 UTC (rev 
67221)
@@ -1,3 +1,9 @@
+2006-11-01  Alejandro Serrano "Serras"  <[EMAIL PROTECTED]>
+
+    * Add IOrderedSequence, IQueryable
+    * Change Sequence.Join and Sequence.GroupJoin to use Lookup<K, T>
+      as stated on the Standard Query Operators paper
+
 2006-06-05  Alejandro Serrano "Serras"  <[EMAIL PROTECTED]>
 
     * Updates as of LINQ May 2006 release
@@ -2,3 +8,2 @@
 
-
 2006-01-31  Alejandro Serrano "Serras"  <[EMAIL PROTECTED]>

Modified: trunk/olive/class/System.Query/System.Query/Funcs.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/Funcs.cs        2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/Funcs.cs        2006-11-01 
16:42:05 UTC (rev 67221)
@@ -24,9 +24,9 @@
 
 namespace System.Query
 {
-        public delegate TR Func<TR> ();
-        public delegate TR Func<T0, TR> (T0 a0);
-        public delegate TR Func<T0, T1, TR> (T0 a0, T1 a1);
-        public delegate TR Func<T0, T1, T2, TR> (T0 a0, T1 a1, T2 a2);
-        public delegate TR Func<T0, T1, T2, T3, TR> (T0 a0, T1 a1, T2 a2, T3 
a3);
+        public delegate T Func<T> ();
+        public delegate T Func<A0, T> (A0 arg0);
+        public delegate T Func<A0, A1, T> (A0 arg0, A1 arg1);
+        public delegate T Func<A0, A1, A2, T> (A0 arg0, A1 arg1, A2 arg2);
+        public delegate T Func<A0, A1, A2, A3, T> (A0 arg0, A1 arg1, A2 arg2, 
A3 arg3);
 }

Added: trunk/olive/class/System.Query/System.Query/IOrderedQueryable.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/IOrderedQueryable.cs    
2006-11-01 16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/IOrderedQueryable.cs    
2006-11-01 16:42:05 UTC (rev 67221)
@@ -0,0 +1,31 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+//
+// Authors:
+//        Alejandro Serrano "Serras" ([EMAIL PROTECTED])
+//
+
+using System;
+using System.Collections;
+
+namespace System.Query
+{
+        public interface IOrderedQueryable : IEnumerable //, IQueryable
+        {
+        }
+}


Property changes on: 
trunk/olive/class/System.Query/System.Query/IOrderedQueryable.cs
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/olive/class/System.Query/System.Query/IOrderedQueryable_T.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/IOrderedQueryable_T.cs  
2006-11-01 16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/IOrderedQueryable_T.cs  
2006-11-01 16:42:05 UTC (rev 67221)
@@ -0,0 +1,31 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+//
+// Authors:
+//        Alejandro Serrano "Serras" ([EMAIL PROTECTED])
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace System.Query
+{
+        public interface IOrderedQueryable<T> : IOrderedQueryable, 
IEnumerable<T> //, IQueryable<T>
+        {
+        }
+}


Property changes on: 
trunk/olive/class/System.Query/System.Query/IOrderedQueryable_T.cs
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/olive/class/System.Query/System.Query/IQueryable.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/IQueryable.cs   2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/IQueryable.cs   2006-11-01 
16:42:05 UTC (rev 67221)
@@ -0,0 +1,36 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+//
+// Authors:
+//        Alejandro Serrano "Serras" ([EMAIL PROTECTED])
+//
+
+using System;
+using System.Collections.Generic;
+// using System.Expressions;
+
+namespace System.Query
+{
+        /*public interface IQueryable : IEnumerable
+        {
+                IQueryable CreateQuery (Expression expression);
+                object Execute (Expression expression);
+                Type ElementType { get; }
+                Expression Expression { get; }
+        }*/
+}


Property changes on: trunk/olive/class/System.Query/System.Query/IQueryable.cs
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/olive/class/System.Query/System.Query/IQueryable_T.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/IQueryable_T.cs 2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/IQueryable_T.cs 2006-11-01 
16:42:05 UTC (rev 67221)
@@ -0,0 +1,36 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+//
+// Authors:
+//        Alejandro Serrano "Serras" ([EMAIL PROTECTED])
+//
+
+using System;
+using System.Collections.Generic;
+// using System.Expressions;
+
+namespace System.Query
+{
+        /*public interface IQueryable<T> : IQueryable, IEnumerable<T>
+        {
+                IQueryable<S> CreateExpression<S> (Expression expression);
+                S Execute<S> (Expression expression);
+                Type ElementType { get; }
+                Expression Expression { get; }
+        }*/
+}


Property changes on: trunk/olive/class/System.Query/System.Query/IQueryable_T.cs
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/olive/class/System.Query/System.Query/Lookup.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/Lookup.cs       2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/Lookup.cs       2006-11-01 
16:42:05 UTC (rev 67221)
@@ -46,6 +46,11 @@
                         return groups.ContainsKey (key);
                 }
                 
+                public IEnumerable<T> this [K key]
+                {
+                        get { return groups[key]; }
+                }
+                
                 public IEnumerator<IGrouping<K, T>> GetEnumerator ()
                 {
                         return groups.Values.GetEnumerator ();

Modified: trunk/olive/class/System.Query/System.Query/Sequence.cs
===================================================================
--- trunk/olive/class/System.Query/System.Query/Sequence.cs     2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query/Sequence.cs     2006-11-01 
16:42:05 UTC (rev 67221)
@@ -2900,19 +2900,20 @@
                                 innerKeySelector == null || resultSelector == 
null)
                                 throw new ArgumentNullException ();
                         
-                        Dictionary<K, List<U>> innerKeys = new Dictionary<K, 
List<U>> ();
+                        Lookup<K, U> innerKeys = ToLookup<U, K> (inner, 
innerKeySelector);                       
+                        /*Dictionary<K, List<U>> innerKeys = new Dictionary<K, 
List<U>> ();
                         foreach (U element in inner)
                         {
                                 K innerKey = innerKeySelector (element);
                                 if (!innerKeys.ContainsKey (innerKey))
                                         innerKeys.Add (innerKey, new List<U> 
());
                                 innerKeys[innerKey].Add (element);
-                        }
+                        }*/
                         
                         foreach (T element in outer)
                         {
                                 K outerKey = outerKeySelector (element);
-                                if (innerKeys.ContainsKey (outerKey))
+                                if (innerKeys.Contains (outerKey))
                                 {
                                         foreach (U innerElement in innerKeys 
[outerKey])
                                                 yield return resultSelector 
(element, innerElement);
@@ -2936,26 +2937,27 @@
                                 innerKeySelector == null || resultSelector == 
null)
                                 throw new ArgumentNullException ();
                         
-                        Dictionary<K, List<U>> innerKeys = new Dictionary<K, 
List<U>> ();
+                        Lookup<K, U> innerKeys = ToLookup<U, K> (inner, 
innerKeySelector);
+                        /*Dictionary<K, List<U>> innerKeys = new Dictionary<K, 
List<U>> ();
                         foreach (U element in inner)
                         {
                                 K innerKey = innerKeySelector (element);
                                 if (!innerKeys.ContainsKey (innerKey))
                                         innerKeys.Add (innerKey, new List<U> 
());
                                 innerKeys[innerKey].Add (element);
-                        }
+                        }*/
                         
                         foreach (T element in outer)
                         {
                                 K outerKey = outerKeySelector (element);
-                                if (innerKeys.ContainsKey (outerKey))
+                                if (innerKeys.Contains (outerKey))
                                         yield return resultSelector (element, 
innerKeys [outerKey]);
                         }
                 }
                 
                 # endregion
 
-                // This methods are not included in the
+                // These methods are not included in the
                 // .NET Standard Query Operators Specification,
                 // but they provide additional useful commands
                 

Modified: trunk/olive/class/System.Query/System.Query.dll.sources
===================================================================
--- trunk/olive/class/System.Query/System.Query.dll.sources     2006-11-01 
16:38:53 UTC (rev 67220)
+++ trunk/olive/class/System.Query/System.Query.dll.sources     2006-11-01 
16:42:05 UTC (rev 67221)
@@ -1,9 +1,13 @@
 ./Assembly/AssemblyInfo.cs
 ./System.Runtime.CompilerServices/ExtensionAttribute.cs
-./System.Query/Funcs.cs
+./System.Query/Funcs.cs
+./System.Query/Grouping.cs
 ./System.Query/IGrouping.cs
-./System.Query/Grouping.cs
+./System.Query/InternalOrderedSequence.cs
+./System.Query/IOrderedQueryable.cs
+./System.Query/IOrderedQueryable_T.cs
+./System.Query/IQueryable.cs
+./System.Query/IQueryable_T.cs
 ./System.Query/Lookup.cs
 ./System.Query/OrderedSequence.cs
-./System.Query/InternalOrderedSequence.cs
 ./System.Query/Sequence.cs

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

Reply via email to