Merging To Lists Using Linq

31 במרץ 2008

Hi, Here is a little sample on how to merge two lists into a single list using Linq To Objects. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { class Person { public int Id { get; set; } public string Name { get; set; } } ...
תגובה אחת

Modify The Message Body

18 במרץ 2008

Here is an example of how to create a message inspector that will inspect every message that the client sends and modify the message body: public class ClientOutputMessageInspector : IClientMessageInspector {     #region IClientMessageInspector Members     public void AfterReceiveReply(ref System.ServiceModel.Channels.Message reply, object correlationState)     {         return;     }     public object BeforeSendRequest(ref System.ServiceModel.Channels.Message request, IClientChannel channel)     {         string action = request.Headers.GetHeader<string>("Action", request.Headers.Namespace);         if (action.Contains("SendMessage"))         { ...
תגיות:
אין תגובות

Bug in a Data-Driven Unit/Web Test

I have created a Data-Driven Unit Test using Visual Studio Team System 2008 and bounded it to an SQL data source. When I executed the unit test for each row in the data source I got this strange result: In the data source I got only three records. So, on one hand, as we can see in the lower square,  it displays a message that all four tests passed (4??? wasn't 3?). On the upper square it displays a message the all three tests passed (this is correct).
תגיות: ,
אין תגובות

Meet me face 2 face in Tech Ed

This is great! if you will be at Tech Ed, you can set a meeting and talk face to face with any lecture you wish (as long as there is time). You can meet with me as well. All you need to do is sign in and select "Guy Kolbis" at the Participants list. Here is a link to the face2face meeting scheduler: http://www.face2facemeeting.com/teched/ See you there!
אין תגובות

This message cannot support the operation because it has been copied

This is an error message I got when I extended WCF with a client inspector. The lifetime of a message only lasts for one use. Once you've looked at the contents of a message, or copied the contents somewhere, you can't read the message again. This is a common problem encountered when people are trying to write a message inspector. Since you're expected to pass the message along after you're done inspecting it, it's quite likely that you'll need to make a new copy of the message. If you don't make a copy of the message,...
תגיות:
תגובה אחת

Performance-Driven Development (PDD)

16 במרץ 2008

Hi all, As I mentioned before, I will give a session in the upcoming Tech Ed.   The name for my lecture is "Performance Driven Development". By 2010 Performance-Driven Development will be widespread and half the organizations that today do little more than load testing will have adopted performance-driven development practices. In this session I will give you the tools you need to improve your design, your code and your tests by adopting the Performance-Driven Development practices. I will give a cool Demo! We will build an application using WCF (Extensibility) and Team...
אין תגובות

Generate Compiled Help Files For Your Code

8 במרץ 2008

DocProject is an open source help authoring tool (HAT) that consists of Visual Studio Project Templates, an Add-In and an API that provide an extensible platform for authoring, managing and building compiled help in various formats. The latest version of Microsoft Sandcastle is used to generate HTML help topics for conceptual documentation and auto-generated reference documentation for managed assemblies in various presentation styles, such as one that looks like the documentation for Visual Studio and the Microsoft .NET Framework. DocProject also automates HTML Help compilers to produce Help 1.x (.chm) and Help 2.x (.HxS) output...
אין תגובות

The ABC of setting up for a presentation

When presenting we must set both our laptop and Visual Studio environment. Daniel Moth wrote two really nice posts describing how to do just that: Setting your laptop: http://www.danielmoth.com/Blog/2008/02/10-tips-on-how-to-setup-your-laptop.html Setting your Visual Studio environment: http://www.danielmoth.com/Blog/2008/03/abcdefghi-of-setting-up-visual-studio.html
תגיות: ,
אין תגובות

Auto-Generated Unit Tests for WCF services

A really cool tool that was released by Microsoft enables you to take a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence of calls found in the trace file. The code generated is easily modifiable so that data variation can be introduced for the purpose of doing performance testing. The tool generates code for both Visual Studio 2005 and Visual Studio 2008.   You can download the tool or the source code from here.
תגיות: ,
אין תגובות