cloudflare_dynamic_dns_featured_image

Automatic dynamic DNS update with Cloudflare

I recently changed my ISP. Although I'm very happy now, there is one major drawback : I don't have any static IP anymore. Which is quite a pain, as I sometimes want to access some services running on my NAS, when I'm at work for example (subsonic, sabnzbd, gitlab, etc...) I investigated some solutions which…

nhibenate_static_proxy_featured_image

NHibernate static proxy

It's been a long time (06/24/2011) I pushed my last commit on my GitHub project NHibernate.StaticProxy, and I notice only now that I even didn't speak about this project on my blog... Shame on me! So after a short delay (hum...), here it comes

post-12-081001400 1377666739

W3 Total Cache and Google XML sitemap

This is a small post to explain how to make the Google XML SiteMap plugin work fine if you have installed W3 Total Cache too. I chose not to talk about this in my previous post, about the migration from DotClear 2 to WordPress 3, because I think this would be more easy to find…

Migration to WordPress

This was a long time I wanted to get rid of my old blog, which was running using DotClear, to replace it with a WordPress instance. There are not a lot of reasons for that. The main one being the number of themes and plugins which is far more substantial on the latter platform. I…

Some news...

Wow... Looking at the date of my last post, I'm surprised to see it is more than one year ago... Some much things happened to me since march 2011. But only one could explain the severe lack of updates over here: I've changed my job. To be honest, this was not a planned move. The…

[CaliburnMicro] Dependencies attribute on any depth level of properties

I didn't post anything on the blog for a very long time (2010-12-07), so let's break the silence with something new about Caliburn Micro.

In this post, I will briefly show you an update of an "old" article I wrote. The main drawback of the previous version of this dependencies attribute was its inability to make the availability of the action depend on more than one level.

For example, you could write these dependencies, which update the availability of the Do method when either OtherProperty (a property of the same view-model than Do) or OtherProperty.ChildProperty were modified.

[code lang="csharp"][Dependencies("OtherProperty", "OtherProperty.ChildProperty")] public IEnumerable Do() { }[/code] With the new Dependencies attribute I'll show you right after the break, you won't be limited to this single level of hierarchy, thus allowing you to write a dependency like:

[code lang="csharp"][Dependencies("OtherProperty.ChildProperty.OneMoreLevelProperty.LastLevelProperty.*")] public IEnumerable Do() { }[/code]

[PostSharp] Ease the creation of configuration sections

In this article, I'll show yet another use of PostSharp, this time focusing on the ConfigurationSection class. If you look in the MSDN at the articles which explain how to use the ConfigurationSection, you may have noticed that the code you need to write is repetitive, tedious, and error-prone:

[code lang="csharp"]public class PageAppearanceSection : ConfigurationSection { [ConfigurationProperty("remoteOnly", DefaultValue = "false", IsRequired = false)] public Boolean RemoteOnly { get { return (Boolean)this["remoteOnly"]; } set { this["remoteOnly"] = value; } } [ConfigurationProperty("font")] public FontElement Font { get { return (FontElement)this["font"]; } set { this["font"] = value; } } [ConfigurationProperty("color")] public ColorElement Color { get { return (ColorElement)this["color"]; } set { this["color"] = value; } } }[/code] As you can see, you have to put the ConfigurationPropertyAttribute on top of each property, and to make calls to an indexer to the Get and Set methods of the properties, using the same name you used in the attribute.

Doesn't this repetition look like to be a good candidate for an aspect?