Converting VB.Net to CSharp

Converting VB.Net to CSharp It has been so long I can’t remember why I started the project off in VB.Net to begin with. I have had my fill and converted the Common.Tasks project from CI Factory to C#. One of the reasons that I felt I could do this with out too much difficulty was the project NRefactory from #develop. I was introduced to NRefactory from the Checkin Policy project located at CodePlex. It is a code parser and generator. Something that Microsoft should have released with the first version of .Net. I have never understood why they haven’t rectified this egregious omission. ...

February 20, 2007 · 2 min · Jay Flowers

My Favorite DXCore Plugins

My Favorite DXCore Plugins Here are a few of my favorite DXCore plugins. In a recent post I mentioned that I migrated a project from VB.Net to C#. The conversion did not maintain regions. To help get the converted code all prettied up I used a couple of DXCore plugins: CR_ClassCleaner and CR_SortLines. John Luif is the creator of CR_ClassCleaner. This plugin did the heavy lifting of organization for me. It includes a Word doc for installation instructions. There he details 6 command actions: ...

February 20, 2007 · 3 min · Jay Flowers

Reflector 5.0

Reflector 5.0 So there is a new version of Reflector out. As always you can get Reflector at Lutz’s site: http://www.aisto.com/roeder/dotnet/. You can get add-ins for Reflector from http://www.codeplex.com/reflectoraddins. Lutz has a slidedeck of the new features here. Doubler has been recompiled against this new version of Reflector. There are no new features in the release of Doubler. Please find Doubler 0.5.6.2 at the new Google Code project site. There are some new features of Reflector that you should know about. The first thing that you should do is run the register commandline switch. Go to the command prompt that execute Reflector.exe /register. This will make dlls open with Reflector, you can double click them and they open in Reflector. I think this was in the previous version. He has added some more integration into the shell with a code URI. I can see how this will be used in blogging and I bet there will be a Reflector add-in for that in the near future. ...

February 20, 2007 · 3 min · Jay Flowers

Code Collapse VS Add-in

Code Collapse VS Add-in I have always wanted an add-in for Visual Studio that collapses if, for, foreach, try, etc statements. There is an add-in for VB.Net Classify, I want one for C# and VB.Net. There is SmartOutline too. It, IMHO, requires too many actions to create a region (see the screen shots on their site). I just could not find the one I wanted. So I got up off my ass and set to work on writing one that did what I wanted. It is by no means finished, it is good enough for now. I had a LOT of help from Dustin Campbell. He is one of the DevExpress developers. Of course the easiest thing to do was create it as a DXCore plugin. For now it is implemented as a command named “CreateHiddenRegion”. So after you download the plugin, see the download link at the bottom, and place it in the DXCore plugin directory you need to add a shortcut to the command. Creating a region is already Ctrl+3 so I mapped mine to Ctrl+Shift+3 as what is really going on is the create of a hidden region. If you have no text selected the language element from beginning to end will be regionized. If you have text selected the selection will be regionized. If you execute the command on something already regionized it will unregionize it. ...

February 19, 2007 · 2 min · Jay Flowers

Shh, Keep it Quiet

Shh, Keep it Quiet Sometimes you just wish there was a way to make it secret. It was really simple. <target name=“test“ > <exec program=“ping“ commandline=“localhost“ output=“c:tempping.log“ /> <echo message=“before“/> <loglevel level=“None“> <do> <exec program=“ping“ commandline=“localhost“ output=“c:tempping.log“/> </do> </loglevel> <echo message=“after“/> </target> test: [exec] Starting ‘ping (localhost)’ in ‘C:\Projects\CI Factory\Current\Product\nAnt Scratch’ [exec] [exec] [exec] Pinging jflowersxp5.CHCSII.COM [::1] with 32 bytes of data: [exec] [exec] [exec] [exec] Reply from ::1: time<1ms [exec] [exec] Reply from ::1: time<1ms [exec] [exec] Reply from ::1: time<1ms [exec] [exec] Reply from ::1: time<1ms [exec] [exec] [exec] [exec] Ping statistics for ::1: [exec] [exec] Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), [exec] [exec] Approximate round trip times in milli-seconds: [exec] [exec] Minimum = 0ms, Maximum = 0ms, Average = 0ms [exec] [echo] before [echo] after BUILD SUCCEEDED Total time: 7.1 seconds. [TaskName(“loglevel”)] public class LogLevelTask : Task { private Level _LogLevel; private TaskContainer _Tasks; [BuildElement(“do”, Required = true)] public TaskContainer Tasks { get { return _Tasks; } set { _Tasks = value; } } [TaskAttribute(“level”, Required = true)] public Level LogLevel { get { return _LogLevel; } set { _LogLevel = value; } } protected override void ExecuteTask() { Level OldLevel = this.Project.Threshold; this.Project.Threshold = this.LogLevel; this.Tasks.Execute(); this.Project.Threshold = OldLevel; } }

February 15, 2007 · 1 min · Jay Flowers

Closing In

Closing In I am closer than I have ever been. I have been focused on getting our build infrastructure working with Visual Studio Team Systems, Team Foundation Server. This means creating a VSTS Source Control Package for CI Factory, which includes NAnt tasks and CCNet plugins. Blah Blah Blah, you have heard this before? True. I think I am just about done. When I publish, it would be nice if it were actually useful to some other shops. So I will try to do a quickly summary of the features here and you can let me know if I have missed something that you would like to see. ...

February 2, 2007 · 4 min · Jay Flowers

Reading to Know Me

Reading to Know Me Siddhartha by Hermann Hesse This was a very quick read, it is only 122 pages. It was nice to read a fiction, a story about someone struggle to awaken. Do You Do It, or Does It Do You?: how to let the universe meditate you by Alan Watts This was my most recent Alan Watts read. It was a good book. It was mostly a re-hashing of things that I have heard him say in other works. This is a good book if you are new to Alan, other wise I would not spend the time on it. ...

January 31, 2007 · 2 min · Jay Flowers

TDD and Zen

TDD and Zen Some time ago on the Yahoo TDD user group there was talk comparing learning TDD to Zen. I have since become interested in Zen and Chán. My path to Zen was preceded by Buddhism as a whole, I looked at many schools besides Zen. Zen uses a direct pointing approach to bring about enlightenment, to transfer the Dharma (Natural Law). That is to say that it values direct experience over study of the scriptures. Use of lay words and stories are another means of pointing. I have experienced some of this direct pointing in Zen from both Alan Watts and Adyashanti. It has changed me. It would have taken a much longer time for me to have achieved as much change on my own. That is to say that the alternative of uncovering these things for myself would have taken much longer. ...

January 28, 2007 · 5 min · Jay Flowers

My Favorite Tool

My Favorite Tool Today is Windows Developer Tools Day. To celebrate the tools that make Windows developers lives easier –and the people who’ve created them–Friday, Jan. 19th is unilaterally declared to be Windows Developer Tools Day. It’s a spontaneous effort to draw attention to the growing number of free and open source software (FOSS) tools that support developers who work on the Windows platform. My favorite tool is NAnt! I use the crap out of this tool. I use it to write more than build scripts. I use it to get stuff done. When it does not do what I need it to do or I think it should be easier I write an extension to help me get the job done. It is very easy to write new NAnt tasks. ...

January 22, 2007 · 2 min · Jay Flowers

Snow

Snow We finally got our first snow fall. Things had been weird with out the snow. People we getting worried about the insects and what not. I wish Ian was not ill we could be out sledding. Instead I am stuck re-caulking the tub. Urgent Update: Due to a nap Chili and Salsa have become the focus of the day. If you were here I would share. ...

January 21, 2007 · 1 min · Jay Flowers