<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fun with Duplex contracts</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx</link><description>Well, Clemens threw the glove so here goes :-) The first thing that we define is the contracts using System.ServiceModel; namespace DuplexSample.Interfaces { [ ServiceContract ] interface IClientSide { [ OperationContract (IsOneWay = true )] void WriteString(</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>All Things Indigo - Indigo Resources I've Found</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#372046</link><pubDate>Mon, 14 Feb 2005 03:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372046</guid><dc:creator>Mike Lorengo's Weblog</dc:creator><description>All Things Indigo - Indigo Resources I've Found</description></item><item><title>Today and tomorrow: Will Indigo heal...? Powerful object model for contract-first glue</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#372282</link><pubDate>Mon, 14 Feb 2005 18:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372282</guid><dc:creator>Christian Weyer: Smells like service spirit</dc:creator><description /></item><item><title>Design Smell?</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#372975</link><pubDate>Tue, 15 Feb 2005 14:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:372975</guid><dc:creator>Zohar</dc:creator><description>Dude, this :&lt;br&gt;OperationContext.Current&lt;br&gt;is a design smell....&lt;br&gt;How do you test / mock it ?&lt;br&gt;&lt;br&gt;You guys need to look at inversion of control :&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://www.martinfowler.com/articles/injection.html"&gt;http://www.martinfowler.com/articles/injection.html&lt;/a&gt;&lt;br&gt;&lt;br&gt; class ServiceImpl : IServiceSide&lt;br&gt;{&lt;br&gt;      public property OperationContext ctx{&lt;br&gt;            set{ ctx = value; }&lt;br&gt;      }&lt;br&gt;&lt;br&gt;      public void Rotate(string s)&lt;br&gt;      {&lt;br&gt;&lt;br&gt;         IClientSide client =  ctx.GetCallbackChannel&amp;lt;IClientSide&amp;gt;();&lt;br&gt;&lt;br&gt;etc....&lt;br&gt;&lt;br&gt;&lt;br&gt;simple and testable.&lt;br&gt;&lt;br&gt;you can use annotations instead of signature if you prefer :&lt;br&gt;&lt;br&gt;[RequiresContext]&lt;br&gt;public void thisIsWhereWeGetTheContext(OperationContext ctx)&lt;br&gt;&lt;br&gt;</description></item><item><title>re: Fun with Duplex contracts</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#373065</link><pubDate>Tue, 15 Feb 2005 16:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:373065</guid><dc:creator>Shy</dc:creator><description>Zohar, I believe that you assume that the context and the CLR object instance are the same across calls - this may not be true in all cases. I guess this calls for a blog entry about instancing :-)</description></item><item><title>Today and tomorrow: Will Indigo heal...? Powerful object model for contract-first glue</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#376559</link><pubDate>Sat, 19 Feb 2005 16:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:376559</guid><dc:creator>Christian Weyer: Smells like service spirit</dc:creator><description /></item><item><title>Don Box's Writing Itch</title><link>http://blogs.msdn.com/shycohen/archive/2005/02/11/370946.aspx#381341</link><pubDate>Mon, 28 Feb 2005 02:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:381341</guid><dc:creator>Jeff Donnici</dc:creator><description /></item></channel></rss>