예제 #1
0
        private int GetTotalSeqCount()
        {
            if (_totalSeqCount != -1)
            {
                return(_totalSeqCount);
            }

            using (var reader = new StreamReader(Path, Encoding.UTF8))
            {
                _totalSeqCount = CTFTools.CountLines(reader).Item2;
                return(_totalSeqCount);
            }
        }
예제 #2
0
        protected override void BeginProcessing()
        {
            Path = IO.GetAbsolutePath(this, Path);

            // Count sequeneces

            Tuple <int, int> lines;

            using (var reader = new StreamReader(Path, Encoding.UTF8))
            {
                lines = CTFTools.CountLines(reader);
            }

            WriteObject(new CTFLineInfo()
            {
                Lines = lines.Item1, Sequences = lines.Item2
            });
        }