Archive for April, 2009

Looking for hosted SVN? Beanstalk could be your solution.

Wednesday, April 29th, 2009

Signed up for a free account at Beanstalk and am loving what I have seen so far. I like the focus they have and the exposed API to allow mixing their service with another best of breed. They have also done a lot of the interfacing to other services already for you. For now, they are my source control vender of choice. I have started my startup repository and work is underway. Progress has been made and code committed.

Sort of gives me goose bumps. :-)

A quick post with a work around for adding a sleep to a batch file

Wednesday, April 22nd, 2009

Add the following line:

ping 127.0.0.1 -n 2 -w 1000 > nul&ping 127.0.0.1 -n 2 -w 1000 > nul

replacing the 2nd 2 with the number of seconds you want to delay.

Some code to walk projects in VSX

Wednesday, April 15th, 2009

Just a little sample that I couldn't find anywhere. This will walk the active project of a solution. I am refining it to walk the entire sollution (all projects) and will post that when done.

C#:
  1. private void TestProjectObjectModel()
  2. {
  3.     StringBuilder sb = new StringBuilder();
  4.     Array currentProjects = (Array)this._applicationObject.ActiveSolutionProjects;
  5.     string indention = "";
  6.     if (currentProjects.Length> 0)
  7.     {
  8.         foreach (Project currentProject in currentProjects)
  9.         {
  10.             parseProject(sb, currentProject.ProjectItems, indention);
  11.         }
  12.     }
  13.     Console.WriteLine(sb.ToString());
  14. }
  15.  
  16. private static void parseProject(StringBuilder sb, ProjectItems currentProject, string indention)
  17. {
  18.     foreach (ProjectItem item in currentProject)
  19.     {
  20.         if (item != null)
  21.         {
  22.             sb.AppendFormat("{3}Name: {0}, Kind: {1}{2}", item.Name, item.Kind, Environment.NewLine, indention);
  23.         }
  24.         if (item.ProjectItems.Count> 0)
  25.         {
  26.             parseProject(sb, item.ProjectItems, indention + "  ");
  27.         }
  28.     }
  29. }