Feeds:
Posts
Comments

Archive for December 4th, 2008

Playing with LinqToObject I create this simple code. Maybe it could be useful for somebody.

public static List<string> SystemFiles(string directory, string pattern, string fileextension) {
         List<string> returnList = new List<string>();
         if(fileextension==")
            fileextension = "*.*"   
         string[] files = Directory.GetFiles(directory, fileextension);
         var outfiles = (from file in files select new { FileName = file, FileLines [...]

Read Full Post »

I often need to create  database snapshot to compare current snapshot  with old snapshot.  I tried to use standard MSSQL BackUp’s and compare binary files. But it’s very difficult to find row (value) that differing.  I don’t find a free tool for saving database in plane text. And write the following function (this function can [...]

Read Full Post »

Getting Nant + nantcontrib. And write following script:

<target name="GetLastVersion">
<!–here get last version into $projectdir–>
</target>
<target name="VssAddFiles">
<fileset basedir="${projectdir}" id="ServerFiles">
<include name="**\*.*"/>
<exclude name="**\*.vspscc"/>
<exclude name="**\*.vssscc"/>
<exclude name="**\*.scc"/>
<exclude name="**\*.vss"/>
<exclude name="**\*.suo"/>
<exclude name="**\*.resharper.user"/>
<exclude name="**\*.resharper"/>
</fileset>
<foreach item="File" property="serverFile">
<in>
<items refid="ServerFiles"/>
</in>
<do>
<property name="localFile"
value="${string::replace(serverFile, projectdir, tempDir)}" />
<property name="currentFolder"
value="${path::get-directory-name(serverFile)}" />
<property name="vssPath"
value="${string::replace(string::replace(currentFolder, projectdir,
LocalVSSPath), ‘\’, ‘/’)}" />
<if test=
"${not file::exists(localFile)
and not string::contains(localFile, ‘\obj\’)
and not string::contains(localFile, ‘\bin\’)
and not string::contains(localFile, ‘\bin\’)
and not string::contains(localFile, ‘\build\’)
and not string::contains(localFile, [...]

Read Full Post »

CruiseControl.Net is a port of famous CruiseControl – Continuous Intagration Server. In our firm we use remote Visual Source Safe Server via VSSConnect. And I write Sourcecontrol Plugin CruiseControl.Net. This plugin should only “Get Latest Version” After some googling  I found interface ISourceControl.
Here result plugin code:

using System;
using System.Collections.Generic;
using System.Text;
using ThoughtWorks.CruiseControl.Core;
using ThoughtWorks.CruiseControl.Core.Util;
using Exortech.NetReflector;
using System.Diagnostics;
using [...]

Read Full Post »