This project is read-only.

Visual Studio 2005 support

Sep 4, 2009 at 10:17 AM

Hi all,

I'm brand new to this project and wanted to play with the code.  Unfortunately I'm still on the 2005 version of Visual Studio with doesn't support implicit getters/setters.. but it was fairly trivial to "backport" the Lite branch using some Find/Replace regular expression magic in the IDE.  Below is what worked for me (so far), in case anyone else finds this useful.

Find: public {(.*)} {(.*)} \{ get; set; \}
Replace with: private \1 _\2;\npublic \1 \2 \{ get\{return _\2;\} set\{_\2 = value;\} \}

Find: public {(.*)} {(.*)} \{ get; private set; \}
Replace with: private \1 _\2;\npublic \1 \2 \{ get\{return _\2;\} private set\{_\2 = value;\} \}

Find: public {(.*)} {(.*)} \{ get; internal set; \}
Replace with: private \1 _\2;\npublic \1 \2 \{ get\{return _\2;\} internal set\{_\2 = value;\} \}

Find: var {(.*)} = \({(.*)}\) {(.*)};
Replace with: \2 \1 = (\2) \3;

Find: var {(.*)} = new {(.*)}\({.*}
Replace with: \2 \1 = new \2(\3

Do this against the whole project.. then all that's left are a handful of manual code corrections.