Beispiel #1
0
        /// <summary>
        /// insert the snippet into the current template, into the given codelet.
        /// use separator to separate from previous items inserted into that codelet
        /// </summary>
        /// <param name="ACodeletName"></param>
        /// <param name="ASnippet"></param>
        /// <param name="ASeparator"></param>
        public void InsertSnippet(string ACodeletName, ProcessTemplate ASnippet, string ASeparator)
        {
            ASnippet.ReplaceCodelets();
            ASnippet.ProcessIFDEFs(ref ASnippet.FTemplateCode);
            ASnippet.ProcessIFNDEFs(ref ASnippet.FTemplateCode);

            if (FCodelets.ContainsKey(ACodeletName) &&
                (FCodelets[ACodeletName].Length > 0))
            {
                AddSeparatorToCodelet(ACodeletName, ASeparator);
            }

            AddToCodelet(ACodeletName, ASnippet.FTemplateCode.ToString());
        }
Beispiel #2
0
        /// <summary>
        /// insert the snippet into the current template, into the given codelet
        /// </summary>
        /// <param name="ACodeletName"></param>
        /// <param name="ASnippet"></param>
        public void InsertSnippet(string ACodeletName, ProcessTemplate ASnippet)
        {
            ASnippet.ReplaceCodelets();
            ASnippet.ProcessIFDEFs(ref ASnippet.FTemplateCode);
            ASnippet.ProcessIFNDEFs(ref ASnippet.FTemplateCode);

            if (FCodelets.ContainsKey(ACodeletName) &&
                !FCodelets[ACodeletName].ToString().EndsWith(Environment.NewLine) &&
                (FCodelets[ACodeletName].Length > 0))
            {
                AddToCodelet(ACodeletName, Environment.NewLine);
            }

            AddToCodelet(ACodeletName, ASnippet.FTemplateCode.ToString());
        }
Beispiel #3
0
        /// <summary>
        /// insert the snippet into the current template, into the given codelet.
        /// use separator to separate from previous items inserted into that codelet
        /// </summary>
        /// <param name="ACodeletName"></param>
        /// <param name="ASnippet"></param>
        /// <param name="ASeparator"></param>
        public void InsertSnippet(string ACodeletName, ProcessTemplate ASnippet, string ASeparator)
        {
            ASnippet.ReplaceCodelets();
            ASnippet.ProcessIFDEFs(ref ASnippet.FTemplateCode);
            ASnippet.ProcessIFNDEFs(ref ASnippet.FTemplateCode);

            if (FCodelets.ContainsKey(ACodeletName)
                && (FCodelets[ACodeletName].Length > 0))
            {
                AddSeparatorToCodelet(ACodeletName, ASeparator);
            }

            AddToCodelet(ACodeletName, ASnippet.FTemplateCode.ToString());
        }
Beispiel #4
0
        /// <summary>
        /// insert the snippet into the current template, into the given codelet
        /// </summary>
        /// <param name="ACodeletName"></param>
        /// <param name="ASnippet"></param>
        public void InsertSnippet(string ACodeletName, ProcessTemplate ASnippet)
        {
            ASnippet.ReplaceCodelets();
            ASnippet.ProcessIFDEFs(ref ASnippet.FTemplateCode);
            ASnippet.ProcessIFNDEFs(ref ASnippet.FTemplateCode);

            if (FCodelets.ContainsKey(ACodeletName)
                && !FCodelets[ACodeletName].ToString().EndsWith(Environment.NewLine)
                && (FCodelets[ACodeletName].Length > 0))
            {
                AddToCodelet(ACodeletName, Environment.NewLine);
            }

            AddToCodelet(ACodeletName, ASnippet.FTemplateCode.ToString());
        }