Category Archives: Programming

Using asymmetric properties in views

Many people separate their business logic and view classes into two or more separate assemblies. This gives rise to the ability to use an asymmetric set for view properties that aren’t meant to be accessible. Simply put: public string SomeProperty { get; internal set; } The internal modifier means that this property is only accessible

Google Docs API: get all spreadsheets/docs in a folder

It’s easy enough to get a list of spreadsheets for a user, or a list of folders, but there’s a trick to getting the contents of a folder. The first part of the trick is to ignore the category. Firstly, because it’s removed in version 3.0 of the API, and secondly because it filters by

Convert file path to file URL

A very short note: I was trying to find an analogue to Java’s File.toURI().toURL() method in .NET, looking through System.IO et al, and not finding it on the lazyweb. To my surprise, all you need use is UriBuilder: new UriBuilder(@”c:\path\to\file.txt”).ToString(); This will output “file://c:/path/to/file.txt“. Simple, but far too much time wasted finding it…