WCF – How to use client channel proxies

January 31, 2009

Note – This post does not address duplex communications, it’s not in the scope of this post. There are many approaches you might consider while using client proxies in your solution. Some clients might instantiate a static proxy and use it throughout the entire application lifetime, some will instantiate a proxy per needed call, etc.. Let’s define “Sequential Execution Pattern” to help me around with the describing the basic principles. A sequential execution, as implies, is a set of calls that are invoked one right after another. Meaning the calls are made sequentially. ...
tags: ,
no comments

WCF and OneWay – Behavioral Inconsistency

January 26, 2009

Please read the an important update here: WCF OneWay - Abort or Not Following my last post - WCF and OneWay operations – Is OneWay really OneWay I built up a solution that works against various sets of communication settings – different protocols and binding elements to illustrate how OneWay is inconsistent and how it might affect your code. The source code is attached, you can download it. I will describe my findings which address several concepts I illustrate grouped by different bindings. If you care for the best practices alone just skip this section. For simplicity sake, let’s assume the O/W operation...
tags: ,
3 comments

WCF and OneWay operations – Is OneWay really OneWay?

January 24, 2009

Update: Read the second post about the subject: WCF and OneWay – Behavioral InconsistencyWCF has a simple and easy way to define operations that should be made as OneWay. You do it by setting IsOneWay = true in the OperationContract attribute. E.g.         public interface IMyServiceOneWay     {                 void DoOneWay(bool throwException);     } The contract contains one operation – DoOneWay which will be invoked in a “OneWay” pattern (will...
tags: ,
2 comments

WPF Popups and ToolTip Behavior – Solution

January 18, 2009

Update 26/09/2011 - There's an updated version available in the archive 'Zuker.WpfSamples.zip' with minor bug fixes. Finally, the last post of the series :) Initial posts - WPF Popups and ToolTip behavior - A Journey WPF Popups and ToolTip Behavior – Implementation Attached is my final solution with a working example. Usage <Control>     <controls:RichToolTip.PopupContent>         <RichToolTip>             <TextBlock Text="This will be displayed in the popup" />         </RichToolTip>     </controls:RichToolTip.PopupContent> ...
tags: ,
6 comments

Importing blog posts using MetaBlog API

January 16, 2009

As you might have known by yesterday, I moved my blog from WindowsClient.net over here at Microsoft.co.il. I consulted with Guy Burstein regarding how to I could import the posts to the new blog, he referred me to the following post - Manipulate Your Blog with MetaBlog API for C# This was a great post – thanks Guy! I followed the steps there in order to get the API and the connection ready. Afterwards, I connected to the source, pulled out the posts and saving them to a file. At...
tags: ,
no comments

LINQ to XML – XElement – Descendants vs. Elements

Someone asked me what the difference between descendants and elements is, I thought I'd post the details here for common interest.Descendants will yield you elements of your choice from the entire source element sub-tree, whereas Elements will yield the child elements only.E.g. string xml = @"                <Root>                    <Item>                        <id>1</id>                    </Item>                    <Item>                        <id>2</id>                    </Item>                    <Item>                        <id>3</id>                        <Items>                            <Item>                                <id>5</id>                            </Item>                            <Item>                                <id>6</id>                            </Item>                                                    </Items>                    </Item>                    <Item>                        <id>4</id>                    </Item>                </Root>";            XDocument doc1 = XDocument.Parse(xml);            var q1 = from e in doc1.Root.Descendants("Item")                     select e;            var q2 = from e in doc1.Root.Elements("Item")                     select e;            int c1 = q1.Count(); //6            int c2 = q2.Count();...
tags: ,
6 comments

The MetadataExchangeClient has resolved more than MaximumResolvedReferences

This error was resulted in a specific scenario where I tried to pull a service metadata using .NET MetadataExchangeClient.The reason was that the metadata consisted with more metadata references than the limit defined on my MEXClient instance. (The default is 10)Solution - Increase the limit.MetadataExchangeClient mexClient = new MetadataExchangeClient();mexClient.MaximumResolvedReferences = MaximumResolvedReferences; //some constant
tags: ,
no comments

NDepend

I finally had the chance to look into the NDepend tool.In short:"NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code."I decided to NDepend a component assembly written in our project - the output was very cool.I was able to see the analyzing reports. There's a lot of information exposed there.You can use that tool to extract practical development practices and potential improvements that should be made.Moreover, you can use...
tags: ,
no comments