Category Archives: Silverlight

Anything related to Microsoft Silverlight

Deserializing to Dynamic with RestSharp

You can use JSON.NET to convert any RestSharp service response to a list of dynamic instances; you just need a bit of plumbing code to do it. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms, WPF | Tagged , | 6 Comments

Writing Automated Performance Tests

I found a memory leak in my application, and wrote an automated test using GC.GetTotalMemory to tell if objects were leaking or not. They were (20MB of them in 100k instances). Continue reading

Posted in Core .NET, Silverlight, Wndows Forms, WPF | Tagged , | Leave a comment

Using Enumerations as Bit Flags

You can use enumerations as bit flags. The FlagsAttribute is optional; more importantly, you need to assign powers of 2^n to the enum’s values. Depending on the .NET version, checking can be easy (.HasFlag) or hard (bitwise AND operation) Continue reading

Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF | Tagged , | Leave a comment

Storing a String List in App.Config or Web.Config

How can you store a list of strings (or ints, say) into a single appSetting key/value pair? Surprisingly, it’s as easy as using a delimited list (like comma-delimited or semicolon-delimited) and splitting it at runtime. Continue reading

Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF | Tagged , | Leave a comment

Updated Version of Random Number Generators

After several months, I’ve finally updated the normally-distributed random number generator to tolerate negative numbers in its range. Thanks to everybody who complained to get this feature done! Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged | Leave a comment

Visual Studio Automatic Version Numbering

Visual Studio (2010+) allows you to specify that it should generate (incremental) build versions for your projects. The syntax is quite simple (for AssemblyInfo.cs), but there are a few caveats to know. Continue reading

Posted in Silverlight, Tools, Web, Wndows Forms, WPF | Tagged , , | Leave a comment

Integrating NUnit with CruiseControl.NET

Interested in using CruiseControl.NET to execute NUnit tasks and integrate the results in the dashboard, without using the nunit task type? You can do it through exec, if you merge the results. This article outlines how. Continue reading

Posted in Silverlight, Tools, Web, Wndows Forms | Tagged , | Leave a comment

Using NInject For Compile-Time AOP

An update to my aspect-oriented design pattern for compile-time checking: you can implement aspects as interfaces with singular implementations, and use Ninject to inject the interface implementations. Smooth, easy, and it works! Continue reading

Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF | Tagged , , | Leave a comment

Sending Multiple Updates Through the Updater Block

Adding multiple updates to an updater block manifest is actually quite easy. Simply package every update into its own manifest XML file, reference the manifests from the main/index manifest, and update the ID of the main/index manifest so that clients can tell that changes occurred. That’s it! Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | Leave a comment

An Overview of the Updater Application Block

The Updater Application Block from Microsoft’s Enterprise Library is not immediately obvious in design. How does it work? We go through the basics. It’s a client-server architecture, which exposes an XML file containing a list of updates — what to download, and what to execute when that’s done. It uses BITS for passive transferring. Continue reading

Posted in Libraries, Silverlight, Web, Wndows Forms | Tagged , | Leave a comment