The New SnippetComponent

Jan 1, 2010 at 7:18 PM

Hello All,
According to the documentations, the above new conceptual component in the July 2, 2009 codes...

"Contains code to insert snippets directly from the source files without using any intermediate XML files"

This is a welcome replacement for the current XML Files-based ExampleComponent. However, after
many failed attempt and having confirmed with others on regular expression forums, the expected
input for this component is

// <snippet1>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// </snippet1>
namespace ConsoleApplication5
    #region Sample <snippetdx>
    class Program
        static void Main(string[] args)
    #endregion     </snippetdx>

The expression after the snippet, say 1 in the snippet1 and dx in the snippetdx, the identifier of the snippet.

I am still trying but could not find any advantage this format has over the
original identifier: ExampleID#SnippetID, which allows us to create code references
like exampleId#snippetIdcs,snippetIdvb, where for instance, the snippetIdcs and snippetIdvb
refer to the same example code in different languages.

Can anyone, please, throw more light on this component?

Best regards,

Jan 1, 2010 at 8:32 PM

Hi Paul,

Great find!  I hadn't noticed this new component yet but it's a welcomed addition, if it works :)  I'll play around with it soon as I get the chance.

- Dave

Jan 1, 2010 at 9:37 PM

Hello Dave,

See also the updated conceptual.config file, in the July 2 code, for its configuration.

Best regards,