Example #1
0
        /// <summary>
        /// Istance a new LanguageList from a directory and load files with specified extension
        /// </summary>
        /// <param name="directory">Directory where search files</param>
        /// <param name="ext">extension of syntax files</param>
        public LanguageList(string directory, string ext)
        {
            string[] files = Directory.GetFiles(directory, ext); //"*.syn");

            foreach (string file in files)
            {
                SyntaxLoader l = new SyntaxLoader();
                Language lng = l.Load(file);

                if (!_Languages.ContainsKey(lng.Name))
                    _Languages.Add(lng.Name, lng);
            }
        }
Example #2
0
        /// <summary>
        /// Istance a new LanguageList from a directory and load files with specified extension
        /// </summary>
        /// <param name="directory">Directory where search files</param>
        /// <param name="ext">extension of syntax files</param>
        public LanguageList(string directory, string ext)
        {
            

            string[] files = Directory.GetFiles(directory, ext); //"*.syn");

            foreach (string file in files)
            {
                SyntaxLoader l = new SyntaxLoader();
                Language lng = l.Load(file);

                if (!_Languages.ContainsKey(lng.Name))
                    _Languages.Add(lng.Name, lng);
            }
        }
Example #3
0
 public static Language FromSyntaxFile(Stream stream)
 {
     SyntaxLoader sl = new SyntaxLoader();
     return sl.Load(stream);
 }
Example #4
0
		public static Language FromSyntaxFile(string filename)
		{
			SyntaxLoader sl=new SyntaxLoader();
			return sl.Load (filename);
		}
Example #5
0
        public static Language FromSyntaxFile(Stream stream)
        {
            SyntaxLoader sl = new SyntaxLoader();

            return(sl.Load(stream));
        }
Example #6
0
        public static Language FromSyntaxFile(string filename)
        {
            SyntaxLoader sl = new SyntaxLoader();

            return(sl.Load(filename));
        }