<?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>Fri, 04 Dec 2009 16:19:07 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Remoting Using WCF and NHibernate by Kevin Burton</title>
		<link>http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate/#comment-190</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Fri, 04 Dec 2009 16:19:07 +0000</pubDate>
		<guid isPermaLink="false">http:/1970/01/01/remoting-using-wcf-and-nhibernate/#comment-190</guid>
		<description>I have a similar problem to both that expressed by Dani and Sam above. Any solutions?</description>
		<content:encoded><![CDATA[<p>I have a similar problem to both that expressed by Dani and Sam above. Any solutions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Eliminate Magic Strings In Javascript With MvcContrib.FluentHtml by Josh</title>
		<link>http://lunaverse.wordpress.com/2009/02/05/eliminate-magic-strings-in-javascript-with-mvccontribfluenthtml/#comment-186</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sat, 28 Nov 2009 22:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=432#comment-186</guid>
		<description>I was just about to install FluentHtml until I saw this example.  I think I&#039;ll stick with magic strings =(</description>
		<content:encoded><![CDATA[<p>I was just about to install FluentHtml until I saw this example.  I think I&#8217;ll stick with magic strings =(</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MvcFluentHtml &#8211; Fluent HTML Interface For MS MVC by Tim Scott</title>
		<link>http://lunaverse.wordpress.com/2008/11/24/mvcfluenthtml-fluent-html-interface-for-ms-mvc/#comment-181</link>
		<dc:creator>Tim Scott</dc:creator>
		<pubDate>Fri, 20 Nov 2009 15:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=24#comment-181</guid>
		<description>Carl,  You are correct.  Instead you would use DI something like this:

public MyOpinionatedModelViewPage() : base(IoC.Resolve&lt;IMyMemberBehavior1Marker&gt;(), IoC.Resolve&lt;IMyMemberBehavior2Marker&gt;()) { }</description>
		<content:encoded><![CDATA[<p>Carl,  You are correct.  Instead you would use DI something like this:</p>
<p>public MyOpinionatedModelViewPage() : base(IoC.Resolve&lt;IMyMemberBehavior1Marker&gt;(), IoC.Resolve&lt;IMyMemberBehavior2Marker&gt;()) { }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MvcFluentHtml &#8211; Fluent HTML Interface For MS MVC by Carl Hörberg</title>
		<link>http://lunaverse.wordpress.com/2008/11/24/mvcfluenthtml-fluent-html-interface-for-ms-mvc/#comment-180</link>
		<dc:creator>Carl Hörberg</dc:creator>
		<pubDate>Fri, 20 Nov 2009 10:11:10 +0000</pubDate>
		<guid isPermaLink="false">http://lunaverse.wordpress.com/?p=24#comment-180</guid>
		<description>i think your custom ModelViewPage got to have a 0 argument constructor. that&#039;s because the generated class will inherit from your csutom ModelViewPage but doesn&#039;t call the right constructor.. there for you can&#039;t use DI in this case. Read more at http://stackoverflow.com/questions/1769442/dependency-injection-into-custom-viewpage-generates-wierd-error</description>
		<content:encoded><![CDATA[<p>i think your custom ModelViewPage got to have a 0 argument constructor. that&#8217;s because the generated class will inherit from your csutom ModelViewPage but doesn&#8217;t call the right constructor.. there for you can&#8217;t use DI in this case. Read more at <a href="http://stackoverflow.com/questions/1769442/dependency-injection-into-custom-viewpage-generates-wierd-error" rel="nofollow">http://stackoverflow.com/questions/1769442/dependency-injection-into-custom-viewpage-generates-wierd-error</a></p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>
