<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>metalinq Forum Rss Feed</title><link>http://www.codeplex.com/metalinq/Thread/List.aspx</link><description>metalinq Forum Rss Description</description><item><title>New Post: Doesn't work with Entity Framework 4 objects</title><link>http://metalinq.codeplex.com/discussions/214914</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I am having the same issue on deserialization only, serialization of EntityFramework Objects works fine. has anyone found a fix for this yet?&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>cgsoldier</author><pubDate>Wed, 14 Dec 2011 18:33:07 GMT</pubDate><guid isPermaLink="false">New Post: Doesn't work with Entity Framework 4 objects 20111214063307P</guid></item><item><title>New Post: Very noisy &lt;EditableLambdaExpression/&gt; Xml node</title><link>http://metalinq.codeplex.com/discussions/271444</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am new to MetaLinq, glad I found it, don't get me wrong. We want to necessarily serialize and deserialize an Expression through an Xml stream. We get something like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;EditableLambdaExpression xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /&amp;gt;&lt;/p&gt;
&lt;p&gt;We save the serialized contents this as the contents of an element, but is the Xmlns Xsi and Xsd really necessary? Or can we refrain from saving that?&lt;/p&gt;
&lt;p&gt;In other words, our &amp;lt;EditableLambdaExpression/&amp;gt; is going to appear in the context of a more complex Xml structure, so Xsi or Xsd would necessarily be a distraction from that.&lt;/p&gt;
&lt;p&gt;Thank you...&lt;/p&gt;
&lt;p&gt;Redards,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;&lt;/div&gt;</description><author>mwpowellnm</author><pubDate>Sun, 04 Sep 2011 18:09:25 GMT</pubDate><guid isPermaLink="false">New Post: Very noisy &lt;EditableLambdaExpression/&gt; Xml node 20110904060925P</guid></item><item><title>New Post: Error while serializing an expression</title><link>http://metalinq.codeplex.com/discussions/267039</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm a beginner with Linq&amp;nbsp;and I have an issue while using MetaLinq for a test.&lt;br /&gt;I need to bind a gridview to data from a server using a Linq query. I looked on the web how to make a data provider, and now I'm trying to serialize the expression to send it to the server side so that it can execute it on the data.&lt;/p&gt;
&lt;p&gt;﻿Here is my code :&lt;/p&gt;
&lt;pre style="background-color: white; color: black;"&gt;&lt;pre&gt;&lt;pre&gt;&lt;div style="background-color: white; color: black;"&gt;&lt;pre&gt;&lt;div style="background-color: white; color: black;"&gt;&lt;pre&gt;QueryableData&amp;lt;QueryableObject&amp;gt; objects = &lt;span style="color: blue;"&gt;new&lt;/span&gt; QueryableData&amp;lt;QueryableObject&amp;gt;(); &lt;span style="color: green;"&gt;// QueryableData implements IOrderedQueryable&lt;/span&gt;

&lt;span style="color: blue;"&gt;var&lt;/span&gt; query = objects.Where(obj =&amp;gt; obj.name == &lt;span style="color: #a31515;"&gt;"test"&lt;/span&gt;).Select(obj =&amp;gt; obj.name);

gridControl1.DataSource = query.ToList();﻿﻿
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre&gt;Then to get some data, in the method Execute(Expression) of the DataProvider I try to serialize the expression&amp;nbsp;:&lt;/pre&gt;
&lt;pre&gt;&lt;div style="background-color: white; color: black;"&gt;&lt;pre&gt;EditableExpression e = CheckSerializationInternal(EditableExpression.CreateEditableExpression(expression)); &lt;span style="color: green;"&gt;// CheckSerializationInternal is the same as in the MetaLinq demo&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;pre&gt;﻿I got the error "﻿There was an error generating the XML document" at line :&lt;/pre&gt;
&lt;pre&gt;&lt;div style="background-color: white; color: black;"&gt;&lt;pre&gt;xs.Serialize(ms, mutableLambda); &lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;pre&gt;Here is the string value of "expression" :&lt;/pre&gt;
&lt;pre&gt;﻿﻿&lt;pre&gt;{value(LinqDataAdapter.QueryableData`1[WCFIntefaces.QueryableObject]).Where(obj =&amp;gt; (obj.name = "test")).Select(obj =&amp;gt; obj.name)}&lt;/pre&gt;
&lt;/pre&gt;
&lt;pre&gt;I'm sure I failed somewhere, but I can't find the reason why. I'm still a beginner...﻿&lt;/pre&gt;
&lt;pre&gt;Thanks for your help.&lt;/pre&gt;
&lt;pre&gt;Axel&lt;/pre&gt;&lt;/div&gt;</description><author>Akwel</author><pubDate>Fri, 29 Jul 2011 09:58:47 GMT</pubDate><guid isPermaLink="false">New Post: Error while serializing an expression 20110729095847A</guid></item><item><title>New Post: Doesn't work with Entity Framework 4 objects</title><link>http://metalinq.codeplex.com/Thread/View.aspx?ThreadId=214914</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Null Reference Error on:&lt;/p&gt;
&lt;p&gt;public static MemberInfo FromSerializableForm(this MemberInfo memberInfo, string serializedValue)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string[] fullName = SplitString(serializedValue);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string name = fullName[1];&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;MemberInfo member = (from m in Type.GetType(fullName[0]).GetMembers()&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where m.ToString() == name&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select m).First();&lt;/strong&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return member;&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Runtime evaluation of fullName[0] reveals everything as expected, however Type.GetType(fullName[0]) returns null.&lt;/p&gt;&lt;/div&gt;</description><author>omayhemo</author><pubDate>Thu, 03 Jun 2010 21:45:18 GMT</pubDate><guid isPermaLink="false">New Post: Doesn't work with Entity Framework 4 objects 20100603094518P</guid></item><item><title>New Post: Deserialization from XML fails with Generic Parameters</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=40255</link><description>&lt;div style="line-height: normal;"&gt;thanks a million you are awesome!&lt;br&gt;&lt;br&gt;On Thu, Nov 20, 2008 at 9:00 PM, [email removed] wrote:&lt;br&gt;&amp;gt; From: idof&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Hi,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; There is a solution for this problem, and it will be uploaded in a couple of&lt;br&gt;&amp;gt; days. In the meantime, here's a fix you can apply in your code (just change&lt;br&gt;&amp;gt; it and recompile the project).&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; In the Extensions folder, replace the methods code in the&lt;br&gt;&amp;gt; ReflectionExtensions.cs file with the following:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;          public static string ToSerializableForm(this MethodInfo method)&lt;br&gt;&amp;gt;         {&lt;br&gt;&amp;gt;             string serializableName =&lt;br&gt;&amp;gt; method.DeclaringType.AssemblyQualifiedName + Environment.NewLine;&lt;br&gt;&amp;gt;             if (!method.IsGenericMethod)&lt;br&gt;&amp;gt;             {&lt;br&gt;&amp;gt;                 serializableName += method.ToString();&lt;br&gt;&amp;gt;             }&lt;br&gt;&amp;gt;             else&lt;br&gt;&amp;gt;             {&lt;br&gt;&amp;gt;                 serializableName +=&lt;br&gt;&amp;gt; method.GetGenericMethodDefinition().ToString() + Environment.NewLine +&lt;br&gt;&amp;gt;                     String.Join(Environment.NewLine,&lt;br&gt;&amp;gt; method.GetGenericArguments().Select(ty =&amp;gt;&lt;br&gt;&amp;gt; ty.ToSerializableForm()).ToArray());&lt;br&gt;&amp;gt;             }&lt;br&gt;&amp;gt;             return serializableName;&lt;br&gt;&amp;gt;         }&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;        public static MethodInfo FromSerializableForm(this MethodInfo&lt;br&gt;&amp;gt; methodInfo, string serializedValue)&lt;br&gt;&amp;gt;        {&lt;br&gt;&amp;gt;             string[] fullName = SplitString(serializedValue);&lt;br&gt;&amp;gt;             string name = fullName[1];&lt;br&gt;&amp;gt;             MethodInfo method = (from m in&lt;br&gt;&amp;gt; Type.GetType(fullName[0]).GetMethods()&lt;br&gt;&amp;gt;                                  where m.ToString() == name&lt;br&gt;&amp;gt;                                  select m).First();&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;             if (method.IsGenericMethod)&lt;br&gt;&amp;gt;             {&lt;br&gt;&amp;gt;                 method = method.MakeGenericMethod(fullName.Skip(2).Select(s&lt;br&gt;&amp;gt; =&amp;gt; typeof(string).FromSerializableForm(s)).ToArray());&lt;br&gt;&amp;gt;             }&lt;br&gt;&amp;gt;             return method;&lt;br&gt;&amp;gt;         }&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; this code will not change serialized trees that didn't use generic methods,&lt;br&gt;&amp;gt; but will create new serialization data for generic methods - so just re-run&lt;br&gt;&amp;gt; the serialization for any expressions that contained generic method&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I will add this code to the current version and update the version in a&lt;br&gt;&amp;gt; couple of days.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Ido.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Read the full discussion online.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; To add a post to this discussion, reply to this email&lt;br&gt;&amp;gt; ([email removed])&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; To start a new discussion for this project, email&lt;br&gt;&amp;gt; [email removed]&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; You are receiving this email because you subscribed to this discussion on&lt;br&gt;&amp;gt; CodePlex. You can unsubscribe on codePlex.com.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Please note: Images and attachments will be removed from emails. Any posts&lt;br&gt;&amp;gt; to this discussion will also be available online at codeplex.com&lt;/div&gt;</description><author>reverseblade</author><pubDate>Fri, 21 Nov 2008 07:50:48 GMT</pubDate><guid isPermaLink="false">New Post: Deserialization from XML fails with Generic Parameters 20081121075048A</guid></item><item><title>New Post: Deserialization from XML fails with Generic Parameters</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=40255</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br&gt;
&lt;br&gt;
There is a solution for this problem, and it will be uploaded in a couple of days. In the meantime, here's a fix you can apply in your code (just change it and recompile the project).&lt;br&gt;
&lt;br&gt;
In the Extensions folder, replace the methods code in the ReflectionExtensions.cs file with the following:&lt;br&gt;
&lt;br&gt;
&lt;p&gt;         public static string ToSerializableForm(this MethodInfo method)&lt;br&gt;
        {&lt;br&gt;
            string serializableName = method.DeclaringType.AssemblyQualifiedName + Environment.NewLine;&lt;br&gt;
            if (!method.IsGenericMethod)&lt;br&gt;
            {&lt;br&gt;
                serializableName += method.ToString();&lt;br&gt;
            }&lt;br&gt;
            else&lt;br&gt;
            {&lt;br&gt;
                serializableName += method.GetGenericMethodDefinition().ToString() + Environment.NewLine +&lt;br&gt;
                    String.Join(Environment.NewLine, method.GetGenericArguments().Select(ty =&amp;gt; ty.ToSerializableForm()).ToArray());&lt;br&gt;
            }&lt;br&gt;
            return serializableName;&lt;br&gt;
        }&lt;br&gt;
&lt;br&gt;
       public static MethodInfo FromSerializableForm(this MethodInfo methodInfo, string serializedValue)&lt;br&gt;
       {&lt;br&gt;
            string[] fullName = SplitString(serializedValue);&lt;br&gt;
            string name = fullName[1];            &lt;br&gt;
            MethodInfo method = (from m in Type.GetType(fullName[0]).GetMethods()&lt;br&gt;
                                 where m.ToString() == name&lt;br&gt;
                                 select m).First();&lt;/p&gt;
&lt;p&gt;            if (method.IsGenericMethod)&lt;br&gt;
            {&lt;br&gt;
                method = method.MakeGenericMethod(fullName.Skip(2).Select(s =&amp;gt; typeof(string).FromSerializableForm(s)).ToArray());&lt;br&gt;
            }&lt;br&gt;
            return method;&lt;br&gt;
        }&lt;/p&gt;
&lt;br&gt;
this code will not change serialized trees that didn't use generic methods, but will create new serialization data for generic methods - so just re-run the serialization for any expressions that contained generic method&lt;br&gt;
&lt;br&gt;
I will add this code to the current version and update the version in a couple of days.&lt;br&gt;
&lt;br&gt;
Ido.
&lt;/div&gt;</description><author>idof</author><pubDate>Thu, 20 Nov 2008 19:00:47 GMT</pubDate><guid isPermaLink="false">New Post: Deserialization from XML fails with Generic Parameters 20081120070047P</guid></item><item><title>New Post: Deserialization from XML fails with Generic Parameters</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=40255</link><description>&lt;div style="line-height: normal;"&gt;Hello &lt;br&gt;
&lt;br&gt;
suppose that we have the following Expression&lt;br&gt;
&lt;br&gt;
Expression &amp;lt;Func&amp;lt;Foo,bool&amp;gt;&amp;gt;&amp;nbsp; myEx =&amp;nbsp; x = &amp;gt; x.Bar&amp;lt;string&amp;gt;();&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Here bar is a method that takes a generic parameter, deserialization of this expression from xml fails with an XML error. Workarounds ?&lt;br&gt;
&lt;/div&gt;</description><author>reverseblade</author><pubDate>Wed, 19 Nov 2008 08:34:52 GMT</pubDate><guid isPermaLink="false">New Post: Deserialization from XML fails with Generic Parameters 20081119083452A</guid></item><item><title>New Post: The code does not compile, the csproj does not correspond to the file structure</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=38596</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br&gt;
&lt;br&gt;
The csproj is repaired, please download again.&lt;br&gt;
&lt;br&gt;
Thank you for noting us.&lt;br&gt;
&lt;br&gt;
Ido Flatow
&lt;/div&gt;</description><author>idof</author><pubDate>Tue, 28 Oct 2008 19:39:37 GMT</pubDate><guid isPermaLink="false">New Post: The code does not compile, the csproj does not correspond to the file structure 20081028073937P</guid></item><item><title>New Post: The code does not compile, the csproj does not correspond to the file structure</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=38596</link><description>&lt;div style="line-height: normal;"&gt;The latest release from 9 Oct has some problems. The cproj does not mirror the file structure, references are missing etc...&lt;br&gt;
Any thoughts on fixing this?&lt;br&gt;
&lt;/div&gt;</description><author>ursuletzu</author><pubDate>Mon, 27 Oct 2008 15:14:46 GMT</pubDate><guid isPermaLink="false">New Post: The code does not compile, the csproj does not correspond to the file structure 20081027031446P</guid></item><item><title>New Post: What's up with Funclet</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15822</link><description>&lt;div style="line-height: normal;"&gt;I didn't see this class in the .NET framework 3.5 SP1, I guess it was removed (checked it with Reflector to make sure).&lt;br&gt;
&lt;/div&gt;</description><author>idof</author><pubDate>Mon, 11 Aug 2008 20:22:20 GMT</pubDate><guid isPermaLink="false">New Post: What's up with Funclet 20080811082220P</guid></item><item><title>New Post: EditableNewArrayExpression.set_NodeType</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15827</link><description>&lt;div style="line-height: normal;"&gt;We have found this to be a bug and it will be fixed on the next release, along with other fixes made to the NewArrayExpression
&lt;/div&gt;</description><author>idof</author><pubDate>Mon, 11 Aug 2008 20:18:12 GMT</pubDate><guid isPermaLink="false">New Post: EditableNewArrayExpression.set_NodeType 20080811081812P</guid></item><item><title>NEW POST: EditableNewArrayExpression.set_NodeType</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15827</link><description>&lt;div class="wikidoc"&gt;
After looking at the following statements:&lt;br /&gt; &lt;br /&gt;if (_nodeType == ExpressionType.NewArrayInit || _nodeType == ExpressionType.NewArrayBounds)&lt;br /&gt;  _nodeType = value;&lt;br /&gt;else&lt;br /&gt;  throw new InvalidOperationException(&amp;quot;NodeType for NewArrayExpression must be ExpressionType.NewArrayInit or ExpressionType.NewArrayBounds&amp;quot;);&lt;br /&gt; &lt;br /&gt;I think the IF comparison should be performed on value keyword, not _nodeType&lt;br /&gt;
&lt;/div&gt;</description><author>francois_tanguay</author><pubDate>Mon, 01 Oct 2007 04:20:02 GMT</pubDate><guid isPermaLink="false">NEW POST: EditableNewArrayExpression.set_NodeType 20071001042002A</guid></item><item><title>NEW POST: What's up with Funclet</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15822</link><description>&lt;div class="wikidoc"&gt;
Is this Pre-Beta2 stuff and it disappeared? &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;I can't seem to find this espression type anymore.&lt;br /&gt;
&lt;/div&gt;</description><author>francois_tanguay</author><pubDate>Mon, 01 Oct 2007 01:00:23 GMT</pubDate><guid isPermaLink="false">NEW POST: What's up with Funclet 20071001010023A</guid></item><item><title>NEW POST: EditableExpression.CreateEditableExpression</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15821</link><description>&lt;div class="wikidoc"&gt;
Couldn't you simply have a single method?&lt;br /&gt; &lt;br /&gt;public static EditableExpression CreateEditableExpression&amp;lt;T&amp;gt;(Expression&amp;lt;T&amp;gt; ex)&lt;br /&gt;{&lt;br /&gt;  LambdaExpression lambEx = Expression.Lambda&amp;lt;T&amp;gt;(ex.Body, ex.Parameters);&lt;br /&gt;  return new EditableLambdaExpression(lambEx);&lt;br /&gt;}&lt;br /&gt;
&lt;/div&gt;</description><author>francois_tanguay</author><pubDate>Mon, 01 Oct 2007 00:58:24 GMT</pubDate><guid isPermaLink="false">NEW POST: EditableExpression.CreateEditableExpression 20071001125824A</guid></item><item><title>NEW POST: Good stuff!</title><link>http://www.codeplex.com/metalinq/Thread/View.aspx?ThreadId=15820</link><description>&lt;div class="wikidoc"&gt;
Haven't looked at it in the details but so far... this rocks!&lt;br /&gt;
&lt;/div&gt;</description><author>francois_tanguay</author><pubDate>Mon, 01 Oct 2007 00:38:35 GMT</pubDate><guid isPermaLink="false">NEW POST: Good stuff! 20071001123835A</guid></item></channel></rss>