コード例 #1
0
        public static TransitionTable FromEmbededResources()
        {
            const string resource = "CSharpCompiler.Lexica.vocabulary.bin";
            var          assembly = typeof(TransitionTable).GetTypeInfo().Assembly;

            using (var stream = assembly.GetManifestResourceStream(resource))
                using (var reader = new TransitionTableBinaryReader(stream))
                    return(reader.Read());
        }
コード例 #2
0
 public static TransitionTable FromFile(string path)
 {
     using (var stream = File.OpenRead(path))
         using (var reader = new TransitionTableBinaryReader(stream))
             return(reader.Read());
 }