SourceForge Logo NCodeGen


NCodeGen

Documentation

Community

Related

Package

Package is directory that contains manifest.xml file like this used for packaging templates and related helpers,libraries,contexts,...

  
<Package Name="NAntPackage">
    <Libraries>
        <Library Address="NAnt.macro"/>
    </Libraries>
    <Templates>
        <Template Name="BuildFile" Address="NAnt.vm">
            <InputParameters>
                <Parameter Name="SolutionAddress"/>
            </InputParameters>
        </Template>
        <Template Name="Test" Address="Test.vm"/>
    </Templates>
    <Helpers>
        <Helper Name="SL" Type="NCodeGen.Helpers.dll,NCodeGen.Helpers.SLiNgshoTHelper"/>
    </Helpers>
</Package>
			

Tag description
Library Address of Macro file
Template Address of Template file
Helper Address of Assembly containing Helper class and it's Fully Qualified Name

Libraries

Library contains macros that can be used in Package template files

Sample library file :

  
#macro(sources $project)
    #foreach ($file in $project.GetSourceFiles()) 
        <includes name="${file.RelativePath}"/>
    #end
#end
  				
Helpers

Helper is .NET class contained in assembly file and can be used from templates

  

namespace NCodeGen.Helpers
{
	using SLiNgshoT.Core ;

	public class SLiNgshoTHelper
	{
		public Solution GetSolution(string address) 
		{
			Solution sol = new Solution() ;
			sol.Read(address,null) ;
			return sol ;
		}
	}
}

Copyright © 2004, Edris Hasani Nasab
SourceForge.net Logo