Exemple #1
0
        public PrefixMap(string prefixmap_file_path)
        {
            var encoding = Encoding.GetEncoding("Shift_JIS");
            using (var stream = new StreamReader(prefixmap_file_path, encoding)) {
                stream.EachLines((line) => {
                    var parameters = line.Split(new[] { '\t' }, 3);
                    if (parameters.Length == 3) {
                        var config = new Config();

                        var note_string = parameters[0];
                        config.prefix_ = parameters[1];
                        config.suffix_ = parameters[2];
                        int note = NoteNumberPropertyConverter.parse(note_string);
                        configs_[note] = config;
                    }
                });
            }
        }