예제 #1
0
        static int Main(string [] args)
        {
            if (args.Length == 0)
            {
                return(1);
            }

            AssemblyCollection acoll = new AssemblyCollection();

            foreach (string fullName in args)
            {
                acoll.Add(fullName);
            }

            XmlDocument doc = new XmlDocument();

            acoll.Document = doc;
            acoll.DoOutput();

            XmlTextWriter writer = new XmlTextWriter(Console.Out);

            writer.Formatting = Formatting.Indented;
            XmlNode decl = doc.CreateXmlDeclaration("1.0", null, null);

            doc.InsertBefore(decl, doc.DocumentElement);
            doc.WriteTo(writer);
            return(0);
        }
예제 #2
0
        static int Main(string[] args)
        {
            if (args.Length == 0)
            {
                args = new string[] { typeof(string).Assembly.Location };
                //return 1;
            }

            var acoll = new AssemblyCollection();

            foreach (var fullName in args)
            {
                acoll.Add(fullName);
            }

            var doc = new XmlDocument();

            acoll.Document = doc;
            acoll.DoOutput();

            //var writer = new XmlTextWriter(Console.Out);
            using (var cout = new StreamWriter("c:\\api-info.xml"))
            {
                var writer = new XmlTextWriter(cout)
                {
                    Formatting = Formatting.Indented
                };
                XmlNode decl = doc.CreateXmlDeclaration("1.0", null, null);
                doc.InsertBefore(decl, doc.DocumentElement);
                doc.WriteTo(writer);
            }

            //Console.ReadLine();
            return(0);
        }
예제 #3
0
		static int Main (string [] args)
		{
			if (args.Length == 0)
				return 1;

			AssemblyCollection acoll = new AssemblyCollection ();
			
			foreach (string fullName in args) {
				acoll.Add (fullName);
			}

			XmlDocument doc = new XmlDocument ();
			acoll.Document = doc;
			acoll.DoOutput ();

			XmlTextWriter writer = new XmlTextWriter (Console.Out);
			writer.Formatting = Formatting.Indented;
			XmlNode decl = doc.CreateXmlDeclaration ("1.0", null, null);
			doc.InsertBefore (decl, doc.DocumentElement);
			doc.WriteTo (writer);
			return 0;
		}