<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Tim Scott&#039;s Blog</title>
	<atom:link href="http://lunaverse.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://lunaverse.wordpress.com</link>
	<description>A Blog About .NET Software Development</description>
	<lastBuildDate>Mon, 19 Oct 2009 11:25:04 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Editing a Variable Length List Of Items With MvcContrib.FluentHtml &#8211; Take 2 by ASP.NET MVC View Best Practices – Save time creating views with MvcContrib.FluentHtml &#124; Arrange Act Assert</title>
		<link>http://lunaverse.wordpress.com/2009/01/13/editing-a-variable-length-list-of-items-with-mvccontribfluenthtml-take-2/#comment-178</link>
		<dc:creator>ASP.NET MVC View Best Practices – Save time creating views with MvcContrib.FluentHtml &#124; Arrange Act Assert</dc:creator>
		<pubDate>Mon, 19 Oct 2009 11:25:04 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=347#comment-178</guid>
		<description>[...] Editing a Variable Length List Of Items With MvcContrib.FluentHtml – Take 2 [...]</description>
		<content:encoded><![CDATA[<p>[...] Editing a Variable Length List Of Items With MvcContrib.FluentHtml – Take 2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MvcFluentHtml &#8211; Fluent HTML Interface For MS MVC by ASP.NET MVC View Best Practices – Save time creating views with MvcContrib.FluentHtml &#124; Arrange Act Assert</title>
		<link>http://lunaverse.wordpress.com/2008/11/24/mvcfluenthtml-fluent-html-interface-for-ms-mvc/#comment-177</link>
		<dc:creator>ASP.NET MVC View Best Practices – Save time creating views with MvcContrib.FluentHtml &#124; Arrange Act Assert</dc:creator>
		<pubDate>Mon, 19 Oct 2009 07:34:46 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=24#comment-177</guid>
		<description>[...] MvcFluentHtml – Fluent HTML Interface For MS MVC [...]</description>
		<content:encoded><![CDATA[<p>[...] MvcFluentHtml – Fluent HTML Interface For MS MVC [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Use MvcContrib.FluentHtml With Spark View Engine by Joel</title>
		<link>http://lunaverse.wordpress.com/2009/05/18/use-mvccontrib-fluenthtml-with-spark-view-engine/#comment-176</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Fri, 16 Oct 2009 20:51:10 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=482#comment-176</guid>
		<description>Thanks for FluentHtml, it’s great. This is off the topic of Spark, but I was writing some FluentHtml behaviors to work with MS DataAnnotations, and I found I needed to be able to support buddy/metadata classes defined with the MetadataTypeAttribute. Here’s the code I came up with – feel free to use this if you like.

    /// &lt;summary&gt;
    ///     This is a re-implementation of MvcContrib.FluentHtml.Behaviors.MemberBehaviorHelper{T}
    ///     that is aware of MetadataTypeAttribute from DataAnnotations.
    /// &lt;/summary&gt;
    internal static class AnnotationsHelper
    {
        // Methods
        public static T GetAttribute&lt;T&gt;(IMemberElement element) where T : Attribute
        {
            return GetAttribute&lt;T&gt;(element.ForMember);
        }

        public static T GetAttribute&lt;T&gt;(MemberExpression expression) where T : Attribute
        {
            if (expression == null)
                return default(T);

            var metadataAttrib = expression.Member.DeclaringType
                .GetCustomAttributes(typeof(MetadataTypeAttribute), true)
                .Cast&lt;MetadataTypeAttribute&gt;().FirstOrDefault();

            if (metadataAttrib == null)
            {
                return expression.Member.GetCustomAttributes(typeof(T), true)
                    .Cast&lt;T&gt;().FirstOrDefault();
            }

            return (from prop in TypeDescriptor.GetProperties(metadataAttrib.MetadataClassType).Cast&lt;PropertyDescriptor&gt;()
                    where prop.Name == expression.Member.Name
                    select prop.Attributes.OfType&lt;T&gt;().FirstOrDefault()).FirstOrDefault();
        }

        public static MethodInfo GetMethod(IMemberElement element, string methodName)
        {
            return element.ForMember == null ? null : element.GetType().GetMethod(methodName);
        }

        public static void InvokeMethod(MethodInfo method, IMemberElement element, params object[] parameters)
        {
            method.Invoke(element, parameters);
        }
    }</description>
		<content:encoded><![CDATA[<p>Thanks for FluentHtml, it’s great. This is off the topic of Spark, but I was writing some FluentHtml behaviors to work with MS DataAnnotations, and I found I needed to be able to support buddy/metadata classes defined with the MetadataTypeAttribute. Here’s the code I came up with – feel free to use this if you like.</p>
<p>    /// &lt;summary&gt;<br />
    ///     This is a re-implementation of MvcContrib.FluentHtml.Behaviors.MemberBehaviorHelper{T}<br />
    ///     that is aware of MetadataTypeAttribute from DataAnnotations.<br />
    /// &lt;/summary&gt;<br />
    internal static class AnnotationsHelper<br />
    {<br />
        // Methods<br />
        public static T GetAttribute&lt;T&gt;(IMemberElement element) where T : Attribute<br />
        {<br />
            return GetAttribute&lt;T&gt;(element.ForMember);<br />
        }</p>
<p>        public static T GetAttribute&lt;T&gt;(MemberExpression expression) where T : Attribute<br />
        {<br />
            if (expression == null)<br />
                return default(T);</p>
<p>            var metadataAttrib = expression.Member.DeclaringType<br />
                .GetCustomAttributes(typeof(MetadataTypeAttribute), true)<br />
                .Cast&lt;MetadataTypeAttribute&gt;().FirstOrDefault();</p>
<p>            if (metadataAttrib == null)<br />
            {<br />
                return expression.Member.GetCustomAttributes(typeof(T), true)<br />
                    .Cast&lt;T&gt;().FirstOrDefault();<br />
            }</p>
<p>            return (from prop in TypeDescriptor.GetProperties(metadataAttrib.MetadataClassType).Cast&lt;PropertyDescriptor&gt;()<br />
                    where prop.Name == expression.Member.Name<br />
                    select prop.Attributes.OfType&lt;T&gt;().FirstOrDefault()).FirstOrDefault();<br />
        }</p>
<p>        public static MethodInfo GetMethod(IMemberElement element, string methodName)<br />
        {<br />
            return element.ForMember == null ? null : element.GetType().GetMethod(methodName);<br />
        }</p>
<p>        public static void InvokeMethod(MethodInfo method, IMemberElement element, params object[] parameters)<br />
        {<br />
            method.Invoke(element, parameters);<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Remoting Using WCF and NHibernate by Dani</title>
		<link>http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate/#comment-173</link>
		<dc:creator>Dani</dc:creator>
		<pubDate>Thu, 15 Oct 2009 14:16:35 +0000</pubDate>
		<guid isPermaLink="false">http:/1970/01/01/remoting-using-wcf-and-nhibernate/#comment-173</guid>
		<description>How do I apply the Attribute [UseNetDataContractSerializer]

When using a proxy generated by svcutils ?

I&#039;ve tried to use a code to replace the behaviour in the client - but it doesn&#039;t work (the deserializer looking from staff in the wrong places... - looking for on of my server entities in mscorlib) :
foreach (OperationDescription desc in this.Endpoint.Contract.Operations)
                {
                    DataContractSerializerOperationBehavior dcsOperationBehavior = desc.Behaviors.Find();
                    if (dcsOperationBehavior != null)
                    {
                        int idx = desc.Behaviors.IndexOf(dcsOperationBehavior);
                        desc.Behaviors.Remove(dcsOperationBehavior);
                        desc.Behaviors.Insert(idx, new NetDataContractOperationBehavior(desc));

                    }
                }</description>
		<content:encoded><![CDATA[<p>How do I apply the Attribute [UseNetDataContractSerializer]</p>
<p>When using a proxy generated by svcutils ?</p>
<p>I&#8217;ve tried to use a code to replace the behaviour in the client &#8211; but it doesn&#8217;t work (the deserializer looking from staff in the wrong places&#8230; &#8211; looking for on of my server entities in mscorlib) :<br />
foreach (OperationDescription desc in this.Endpoint.Contract.Operations)<br />
                {<br />
                    DataContractSerializerOperationBehavior dcsOperationBehavior = desc.Behaviors.Find();<br />
                    if (dcsOperationBehavior != null)<br />
                    {<br />
                        int idx = desc.Behaviors.IndexOf(dcsOperationBehavior);<br />
                        desc.Behaviors.Remove(dcsOperationBehavior);<br />
                        desc.Behaviors.Insert(idx, new NetDataContractOperationBehavior(desc));</p>
<p>                    }<br />
                }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Tale Of The Tape by Arnis L.</title>
		<link>http://lunaverse.wordpress.com/2009/09/29/the-tale-of-the-tape/#comment-172</link>
		<dc:creator>Arnis L.</dc:creator>
		<pubDate>Tue, 29 Sep 2009 06:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=782#comment-172</guid>
		<description>This duct tape thing is getting out of control. 

Is there anyone who learnt anything new reading that article by Joel and/or those countless replies?</description>
		<content:encoded><![CDATA[<p>This duct tape thing is getting out of control. </p>
<p>Is there anyone who learnt anything new reading that article by Joel and/or those countless replies?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Eliminate Magic Strings In Javascript With MvcContrib.FluentHtml by Joel</title>
		<link>http://lunaverse.wordpress.com/2009/02/05/eliminate-magic-strings-in-javascript-with-mvccontribfluenthtml/#comment-171</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Fri, 25 Sep 2009 18:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=432#comment-171</guid>
		<description>You could abstract away the less-readable bits, something like this:

var clientIds = {
    firstName: &#039;# x.User.FirstName)%&gt;&#039;
};

Then later your actual jQuery code is much cleaner:

$(clientIds.firstName).change(doSomething);</description>
		<content:encoded><![CDATA[<p>You could abstract away the less-readable bits, something like this:</p>
<p>var clientIds = {<br />
    firstName: &#8216;# x.User.FirstName)%&gt;&#8217;<br />
};</p>
<p>Then later your actual jQuery code is much cleaner:</p>
<p>$(clientIds.firstName).change(doSomething);</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ShouldIt Gets More Fluent by Arnis L.</title>
		<link>http://lunaverse.wordpress.com/2009/07/17/740/#comment-170</link>
		<dc:creator>Arnis L.</dc:creator>
		<pubDate>Wed, 12 Aug 2009 08:56:32 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=740#comment-170</guid>
		<description>Got to check this out. I&#039;m not sure that i want to use ShouldIt but fluent interface implementation SHOULD be worth checking out.

Parenthesis are optional in VB - some interesting kind of bugs might appear because of this. :)</description>
		<content:encoded><![CDATA[<p>Got to check this out. I&#8217;m not sure that i want to use ShouldIt but fluent interface implementation SHOULD be worth checking out.</p>
<p>Parenthesis are optional in VB &#8211; some interesting kind of bugs might appear because of this. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Eliminate Magic Strings In Javascript With MvcContrib.FluentHtml by Arnis L.</title>
		<link>http://lunaverse.wordpress.com/2009/02/05/eliminate-magic-strings-in-javascript-with-mvccontribfluenthtml/#comment-169</link>
		<dc:creator>Arnis L.</dc:creator>
		<pubDate>Wed, 12 Aug 2009 08:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=432#comment-169</guid>
		<description>That&#039;s not a tiny bit - i see it quite unreadable.

But benefit is crucial. :)</description>
		<content:encoded><![CDATA[<p>That&#8217;s not a tiny bit &#8211; i see it quite unreadable.</p>
<p>But benefit is crucial. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Eliminate Magic Strings In Javascript With MvcContrib.FluentHtml by Lansing Day of .NET 2009 - Patrick Steele</title>
		<link>http://lunaverse.wordpress.com/2009/02/05/eliminate-magic-strings-in-javascript-with-mvccontribfluenthtml/#comment-167</link>
		<dc:creator>Lansing Day of .NET 2009 - Patrick Steele</dc:creator>
		<pubDate>Mon, 03 Aug 2009 19:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=432#comment-167</guid>
		<description>[...] Very cool!&#160; No more magic strings!&#160; For more information, see the MvcContrib project and this blog post. [...]</description>
		<content:encoded><![CDATA[<p>[...] Very cool!&#160; No more magic strings!&#160; For more information, see the MvcContrib project and this blog post. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ShouldIt Gets More Fluent by Tim Scott</title>
		<link>http://lunaverse.wordpress.com/2009/07/17/740/#comment-165</link>
		<dc:creator>Tim Scott</dc:creator>
		<pubDate>Fri, 17 Jul 2009 16:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=740#comment-165</guid>
		<description>Eber, I agree that having parens on some nodes is not ideal.  This is due to constrains of the C# language.  The first node &quot;Should()&quot; must be an extension method.  Parens are reqiured for all methods in C#.  The last node must also be a method.  A property must be assigned to something, which we do not want to require.  We make all nodes methods, but in my opinion that would be worse.

If parens were optional on methods with no params in C#, this trouble would disappear.</description>
		<content:encoded><![CDATA[<p>Eber, I agree that having parens on some nodes is not ideal.  This is due to constrains of the C# language.  The first node &#8220;Should()&#8221; must be an extension method.  Parens are reqiured for all methods in C#.  The last node must also be a method.  A property must be assigned to something, which we do not want to require.  We make all nodes methods, but in my opinion that would be worse.</p>
<p>If parens were optional on methods with no params in C#, this trouble would disappear.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
