C#
Exposing global variables in IronPython
Lately I’ve been playing around a bit with IronPython and how to embed it inside an application to add scripting features. I’m still figuring things out, but I had a hard time exposing global variables to the Python environment.
The idea was to expose a couple of .NET objects (mainly a few important managers/singletons from the [...]
Textile.Net source code available via Subversion
One of my open-source .NET projects, Textile.Net, is now available via Subversion on Codeplex.
Conditional operator fun
A good friend of mine sent me this little “gotcha” a few days ago, so I thought I’d share:
#include <iostream>
#include <string>
void main()
{
int a = 0;
int* ptrA = &a;
const int b = 1 ;
const int& refA1 = (ptrA ? [...]
IronCow and the design for testability
IronCow is a library that wraps the Remember The Milk (RTM) web services. The “upper layer” of the IronCow API is an object model that stays in sync with the server and is designed with data binding in mind.
Of course, one of the things that went into IronCow’s design was testability. IronCow ships with a [...]
WPF application patterns continued: convention over configuration
In my previous post on WPF application patterns, I went over a few of the most common patterns available, and gave some pointers on how to implement them in WPF. I mentioned how you could use a dependency injection framework to decouple the implementation of your views and controllers from each other. However, the problem [...]
Announcing IronCow
One of the projects I’m working on at home, IronCow, is now in a state of "somewhat usable alpha". It’s a .NET API that allows developers to use Remember The Milk, the to-do list website, from any .NET language. IronCow is composed of two layers.
One layer is a "dumb" wrapper around the public REST API, [...]
WPF application patterns
There's quite a few articles about using the MVC, MVP, MVVM and other MSomethingSomething patterns with WPF applications out there, but I think there's still quite a few things to say on the subject before we can implement all those wonderful acronyms from A to Z without too much worry.
The goal of each of those [...]
Almost everything you need to know about XAML serialization (part 2)
In part one of this little simple series, we saw how to use XAML as a file format for our own custom types. However, we wanted to reduce the verbosity of XML for specifying objects with only a few properties. This can be done with MarkupExtensions.
We saw that the XAML serializer is asking if our [...]
Custom provider attributes in a configuration element (part 2)
In the first part of this little series, we implemented a simple, read-only way to get custom attributes from a configuration element, using a provider pattern use case. We ended trying to modify the configuration file, without much success.
Right now, we have the following method, called at the end of the program:
private static void SimulateConfigurationChange()
{
[...]
Custom provider attributes in a configuration element (part 1)
A common pattern in .NET is the "provider pattern", where you have an abstraction for pulling data out of something (a database, a file, your ass, etc.), and one or several implementations of this interface (usually, one for each "something" you can pull data out of).
For this example, we're going to get cookies (the biscuit, [...]