public static Dictionary<string, string> ReadAccessNumberReferenceMap(ISequenceFormat sf, string filename, IAccessNumberParser parser) { Dictionary<string, string> result = new Dictionary<string, string>(); using (StreamReader sr = new StreamReader(filename)) { Sequence seq; while ((seq = sf.ReadSequence(sr)) != null) { result[parser.GetValue(seq.Name)] = seq.Reference; } } return result; }
public static List<Sequence> Read(ISequenceFormat sf, string filename) { List<Sequence> result = new List<Sequence>(); using (StreamReader sr = new StreamReader(filename)) { Sequence seq; while ((seq = sf.ReadSequence(sr)) != null) { result.Add(seq); } } return result; }
public static Dictionary <string, string> ReadAccessNumberReferenceMap(ISequenceFormat sf, string filename, IAccessNumberParser parser) { Dictionary <string, string> result = new Dictionary <string, string>(); using (StreamReader sr = new StreamReader(filename)) { Sequence seq; while ((seq = sf.ReadSequence(sr)) != null) { result[parser.GetValue(seq.Name)] = seq.Reference; } } return(result); }
public static List <Sequence> Read(ISequenceFormat sf, string filename) { List <Sequence> result = new List <Sequence>(); using (StreamReader sr = new StreamReader(filename)) { Sequence seq; while ((seq = sf.ReadSequence(sr)) != null) { result.Add(seq); } } return(result); }