@SET CODESMITHCONSOLE="..\..\cs"

@REM ********************************************************************************
@REM
@REM These are simple command line generation calls.  You can use the GUI client to
@REM set the properties of a template and then right-click the property grid and
@REM select "Save Property Set XML" to save your properties to a file. 
@REM
@REM ********************************************************************************

%CODESMITHCONSOLE% /template:ArrayList.cst /propertyset:StringCollectionPropertySet.xml /out:StringCollection.cs
%CODESMITHCONSOLE% /template:IList.cst /propertyset:IStringCollectionPropertySet.xml /out:IStringCollection.cs
%CODESMITHCONSOLE% /template:PurchaseOrderXml.cst /propertyset:PurchaseOrderXmlPropertySet.xml /out:purchaseorder.txt

@REM ********************************************************************************
@REM
@REM This is an example of using the merge features of the command line client.
@REM 
@REM The first part of the merge switch is the name of the merge strategy to use and
@REM the second part is the initialization string to pass into the merge strategy.
@REM 
@REM In this sample we are using the InsertRegion merge strategy which will take the
@REM output of a template and insert it into a region named "Sample Generated Region".
@REM In this care we are explicitly setting the language attribute for the merge strategy
@REM to C# which will tell the merge strategy to look for C# style #region's in the file.
@REM The language attribute will default to the targetlanguage that is specified in the
@REM template if it is not specified here.
@REM
@REM ********************************************************************************

%CODESMITHCONSOLE% /template:MergeOutputSample.cst /propertyset:MergeOutputSamplePropertySet.xml /out:MergeOutputSample.vb /merge:InsertRegion="RegionName=Sample Generated Region;Language=C#;"

@REM ********************************************************************************
@REM
@REM This is another example of using the merge features of the command line client.
@REM 
@REM In this sample we are using the PreserveRegions merge strategy which will take the
@REM output of a template and merge it with an existing file while preserving any custom
@REM code in the file within specially named regions.  In this case we have specified
@REM "^[ \t]*(?i:Custom)" (which is also the default) as the region name regex of our
@REM regions to be preserved.  You can use any regex and any region whose name matches that
@REM regex will be preserved.  We are also explicitly setting the language to T-SQL
@REM which will use --region as the format for the regions.
@REM 
@REM ** IMPORTANT ** The template must output regions of the same
@REM names for the custom tool to know where to insert the content.  Any regions that are
@REM found matching the criteria that don't have a corresponding region in the template output
@REM will be inserted at the end of the file so that the code is not lost.
@REM
@REM ********************************************************************************

%CODESMITHCONSOLE% /template:PreserveRegionsMergeSample.cst /out:PreserveRegionsMergeSample.sql /merge:PreserveRegions="RegionNameRegex=^[ \t]*(?i:Custom);Language=T-SQL;"

@REM ********************************************************************************
@REM
@REM This is an example of using the console client to simulate the VS.NET custom tool
@REM and output multiple generations to a single file in the same way that the VS.NET
@REM custom tool generates code.
@REM
@REM ** NOTE: The property set format for the custom tool mode is different from the single
@REM property set format.  Look at the hashtable.xml file for an example of this format.
@REM
@REM ********************************************************************************

%CODESMITHCONSOLE% /propertyset:hashtable.xml /out:hashtable.cs

@REM ********************************************************************************
@REM
@REM This is an example of using the console client's batch mode.  The batch mode can
@REM be used to render an unlimited number of files at once.  And is MUCH faster than
@REM rendering them one at a time via the command line client.
@REM
@REM ********************************************************************************

%CODESMITHCONSOLE% /batch:BatchModeSample.xml


