Alsing.SourceCode.SyntaxDefinitionList.GetSyntaxDefinitions C# (CSharp) Метод

GetSyntaxDefinitions() публичный Метод

public GetSyntaxDefinitions ( ) : List
Результат List
        public List<SyntaxDefinition> GetSyntaxDefinitions()
        {
            return languages;
        }
    }

Usage Example

Пример #1
0
        public CodeEditingForm(string docname)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            // Sets the L# language syntax document
            SyntaxDefinitionList list = new SyntaxDefinitionList();
            if (!System.IO.File.Exists(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location) + "\\LSharp.syn"))
            {
                // create from Embedded Resource
    	       string embeddedName = String.Format("LSharp.Studio.Core.LSharp.syn");
    	       var me = System.Reflection.Assembly.GetExecutingAssembly();
    	       System.IO.Stream StreAm =  me.GetManifestResourceStream(embeddedName);
    	       FileStream fs = new FileStream(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location) + "\\LSharp.syn", FileMode.Create);
    	       StreAm.CopyTo(fs);
    	       fs.Close();
    	       StreAm.Close();
            }
            System.Collections.Generic.List<SyntaxDefinition>l2 = list.GetSyntaxDefinitions();
            l2.Add(new SyntaxDefinitionLoader().Load(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location) + "\\LSharp.syn"));
            Alsing.SourceCode.SyntaxDefinition def = l2[0];
            syntaxDocument1.Parser.Init(def);
            Filename = LSharp.Studio.Core.Properties.Settings.Default.DefaultSaveLocation + "\\" + docname;
        }
All Usage Examples Of Alsing.SourceCode.SyntaxDefinitionList::GetSyntaxDefinitions