MetadataParser class definition.
Exemple #1
0
        internal static void Main(string[] args)
        {
            Program.Options = ParseArguments(args);

            if (Program.Options.Help)
            {
                return;
            }

            var writer = CreateOutput(Program.Options);

            try
            {
                var text     = LoadSourceText(Program.Options);
                var metadata = MetadataParser.Parse(text);

                ClassWriter.Write(Program.Options, metadata, writer);
            }
            catch (FormatException)
            {
                Console.WriteLine("Input does not contain text in the correct format.");
            }
            finally
            {
                if (writer != Console.Out)
                {
                    writer.Close();
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Helper function to setup the parser and parse the supplied text.
        /// </summary>
        /// <param name="text">Text to parse.</param>
        /// <returns>A sequence of <c>SsisMetadata</c> objects</returns>
        /// <exception cref="FormatException">When the text cannot be parsed.</exception>
        public static IEnumerable <SsisMetadata> Parse(string text)
        {
            var parser = new MetadataParser(text);

            return(parser.Parse());
        }
Exemple #3
0
 /// <summary>
 /// Helper function to setup the parser and parse the supplied text.
 /// </summary>
 /// <param name="text">Text to parse.</param>
 /// <returns>A sequence of <c>SsisMetadata</c> objects</returns>
 /// <exception cref="FormatException">When the text cannot be parsed.</exception>
 public static IEnumerable<SsisMetadata> Parse(string text)
 {
     var parser = new MetadataParser(text);
     return parser.Parse();
 }