Missing: Guidance for fixing architecture without re-writing

Last night I participated in a Distributed Architecture birds-of-a-feather session with Steve Swartz. During the talks Clemens Vasters discussed how the architect of today needs to plan for data being distributed across multiple data sources and the data component on top of these data sources should take care of splitting and re-joining the data across […]

Calling web services using basic authentication

I recently made a web services call into WebMethods using basic authentication.  This authentication meant that we needed to modify the WSDL generated classes to handle the authentication. Here’s how it works.  I add a reference to the Web Service (Visual Studio generates the client code for calling the web service).  To this generated class I need to […]

System.Windows.Forms.Timer vs. System.Threading.Timer vs. System.Timers.Timer

I have seen a few samples of code involving the three timer classes provided with the .Net framework over the years.  Juval has such a sample, which he is updating to use ISynchronizeInvoke.InvokeRequired.  Even within the MSDN documentation, however, I have never seen much guidance between when to use System.Threading.Timer and System.Timers.Timer.  I decided to […]

Converting Command Line String to Args[] using CommandLineToArgvW() API

In testing a command line I recently wanted to verify that the string passed on the command line was converted to the args[] array that was passed to Main(string[] args).  For example, given the command line Compress.exe /v:ReallyMakeItSmall myfile.txt “Read ME.txt” What does the call to Main(string args[]) resolve args to?  There are two ways […]

Providing a Test Method Expansion Template

Another expansion template I use frequently is a test method template (test driven development and all that).  It does extremely little but when you write lots of tests it is a nice to have. [TestMethod] public void CalculateSalaryBonus() { } The template simply declares a VS Team Test test method with the appropriate attributes.  If you […]