예제 #1
0
        /// <summary>
        /// Writes a single sequence to the formatter.
        /// </summary>
        /// <param name="formatter">Formatter</param>
        /// <param name="annotation">Wiggle Annotation</param>
        public static void Format(this WiggleFormatter formatter, WiggleAnnotation annotation)
        {
            var fs = ParserFormatterExtensions <WiggleFormatter> .GetOpenStream(formatter, true);

            if (fs != null)
            {
                formatter.Format(fs, annotation);
            }
            else
            {
                throw new Exception("You must open a formatter before calling Write.");
            }
        }
예제 #2
0
 /// <summary>
 /// Writes a single sequence to the formatter.
 /// </summary>
 /// <param name="formatter">Formatter</param>
 /// <param name="annotation">Wiggle Annotation</param>
 /// <param name="filename">Filename</param>
 public static void Format(this WiggleFormatter formatter, WiggleAnnotation annotation, string filename)
 {
     using (var fs = File.Create(filename))
         formatter.Format(fs, annotation);
 }
예제 #3
0
 /// <summary>
 /// Writes a set of sequences to the formatter.
 /// </summary>
 /// <param name="formatter">Formatter</param>
 /// <param name="annotations">Wiggle annotations to write.</param>
 /// <param name="filename">Filename to write to</param>
 public static void Format(this WiggleFormatter formatter, IEnumerable <WiggleAnnotation> annotations, string filename)
 {
     using (var fs = File.Create(filename))
         formatter.Format(fs, annotations);
 }