Exemplo n.º 1
0
        static void Main(string[] args)
        {
            System.Console.WriteLine("***   Weld 1.0          ***");
            System.Console.WriteLine("***   Martijn Muurman   ***");

            if (args.Length < 1 || args.Length > 2)
            {
                System.Console.WriteLine("usage :  Weld assemblyName [outputfoldername]");
                return;
            }

            var folderName = GetOrCreateFolderAndGetName(args);

            var fileName = Path.GetFullPath(args[0]);
            var assembly = Assembly.LoadFrom(fileName);

            System.Console.WriteLine("processing {0}",fileName);

            var processor = new TypeScriptProcessor();

            var results = processor.ProcessAssembly(assembly);
            System.Console.WriteLine("found {0} decorated types", results.Count);

            foreach (var result in results)
            {
                var fullFileName = Path.Combine(folderName, result.FileName);
                System.Console.WriteLine("Writing file {0}", fullFileName);
                File.WriteAllText(fullFileName, result.Content);
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            System.Console.WriteLine("***   Weld 1.0          ***");
            System.Console.WriteLine("***   Martijn Muurman   ***");

            if (args.Length < 1 || args.Length > 2)
            {
                System.Console.WriteLine("usage :  Weld assemblyName [outputfoldername]");
                return;
            }

            var folderName = GetOrCreateFolderAndGetName(args);

            var fileName = Path.GetFullPath(args[0]);
            var assembly = Assembly.LoadFrom(fileName);

            System.Console.WriteLine("processing {0}", fileName);

            var processor = new TypeScriptProcessor();

            var results = processor.ProcessAssembly(assembly);

            System.Console.WriteLine("found {0} decorated types", results.Count);


            foreach (var result in results)
            {
                var fullFileName = Path.Combine(folderName, result.FileName);
                System.Console.WriteLine("Writing file {0}", fullFileName);
                File.WriteAllText(fullFileName, result.Content);
            }
        }
Exemplo n.º 3
0
        public void ProcessAssembly()
        {
            var result = processor.ProcessAssembly(Assembly.GetExecutingAssembly());

            Assert.IsTrue(result.Count > 0);
        }