CodeSmith Community
Your Code. Your Way. Faster!

Where is PascalCasingStyle?

Latest post 09-21-2007 9:39 AM by mcgmatt. 2 replies.
  • 09-10-2007 4:49 PM

    • mcgmatt
    • Not Ranked
    • Joined on 06-22-2007
    • Posts 6
    • Points 150

    Where is PascalCasingStyle?

    I need to use PascalCasingStyle in my template, but I can't find any info about it in the netTiers documentation.  (Even googling it gets 0 results!)

    It's used in CommonSqlCode.cs, so I added <%Import Namespace="x"%> tags to my .cst file, corresponding to all the using x; lines in CommonSqlCode.cs, but I still get:

    error CS0246: The type or namespace name 'PascalCasingStyle' could not be found (are you missing a using directive or an assembly reference?)

    I'm running cs /clearcache before I re-open the template, so a cached template isn't the issue.

    • Post Points: 35
  • 09-11-2007 1:55 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 924
    • Points 34,750

    Re: Where is PascalCasingStyle?

    It's in CommonSqlCode.cs...

        #region PascalCasing style
        /// <summary>
        /// Indicates the style of Pascal casing to be used
        /// </summary>
        public enum PascalCasingStyle
        {
            /// <summary>
            /// No pascal casing is applied
            /// </summary>
            None,
           
            /// <summary>
            /// Original .NetTiers styling (pre SVN553)
            /// </summary>
            Style1,
           
            /// <summary>
            /// New styling that handles uppercase (post SVN552)
            /// </summary>
            Style2,
        }
        #endregion

     

    To use it you need to include a reference to the CommonSqlCode in your template.  If you take a look in some of the netTiers templates you'll see the first line is quite often something like this...

     

    <%@ CodeTemplate src="..\TemplateLib\CommonSqlCode.cs" Inherits="MoM.Templates.CommonSqlCode" Language="C#" TargetLanguage="C#" Description="Template description here." Debug="True" ResponseEncoding="UTF-8" NoWarn="0108,0618,1572,1573,1574,0162,2002"%> 

     

    hth 

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 09-21-2007 9:39 AM In reply to

    • mcgmatt
    • Not Ranked
    • Joined on 06-22-2007
    • Posts 6
    • Points 150

    Re: Where is PascalCasingStyle?

    As it turns out, I just needed <%@ Import NameSpace="MoM.Templates" %>

    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems