예제 #1
0
            public CodeEnvironment(Data.CompletionDS.EnvironmentsRow r)
            {
                starttag = r.StartTag;
                endtag   = r.EndTag;
                ID       = r.ID;

                RegexOptions o = RegexOptions.RightToLeft | RegexOptions.Compiled;

                reend   = new Regex(endtag, o);
                restart = new Regex(starttag, o);

                foreach (Data.CompletionDS.SnippetsRow sr in r.GetSnippetsRows())
                {
                    string descr = "";
                    if (!sr.IsDescriptionNull())
                    {
                        descr = sr.Description;
                    }
                    snippets.Add(new MyCompletionData(sr.Text, descr));
                }

                // sort alphabetically
                snippets.Sort(delegate(MyCompletionData c1, MyCompletionData c2)
                {
                    return(String.Compare(c1.Text, c2.Text));
                });
            }
예제 #2
0
            public CodeEnvironment(Data.CompletionDS.EnvironmentsRow r)
            {
                starttag = r.StartTag;
                endtag   = r.EndTag;

                RegexOptions o = RegexOptions.RightToLeft | RegexOptions.Compiled;

                reend   = new Regex(endtag, o);
                restart = new Regex(starttag, o);

                foreach (Data.CompletionDS.SnippetsRow sr in r.GetSnippetsRows())
                {
                    string descr = "";
                    if (!sr.IsDescriptionNull())
                    {
                        descr = sr.Description;
                    }
                    snippets.Add(new MyCompletionData(sr.Text, descr));
                }
            }