コード例 #1
0
ファイル: AnnotationPart.cs プロジェクト: lanicon/nesper
        /// <summary>
        ///     Print.
        /// </summary>
        /// <param name="writer">to print to</param>
        /// <param name="annotations">annotations</param>
        /// <param name="formatter">for newline-whitespace formatting</param>
        public static void ToEPL(
            TextWriter writer,
            IList<AnnotationPart> annotations,
            EPStatementFormatter formatter)
        {
            if (annotations == null || annotations.IsEmpty())
            {
                return;
            }

            foreach (var part in annotations)
            {
                if (part.Name == null)
                {
                    continue;
                }

                formatter.BeginAnnotation(writer);
                part.ToEPL(writer);
            }
        }