Ejemplo n.º 1
0
        public override BackendResult Build(SourcePackage package)
        {
            if (package.CanLink)
            {
                package.Tag = _linker.AddAssemblyFile(Path.Combine(_outputDir, package.Name + ".dll"));
                return(null);
            }

            var g = new CilGenerator(Disk, Data, Essentials,
                                     this, _linker, package, _outputDir);

            g.Configure(Environment.Debug);

            using (Log.StartProfiler(g.GetType().FullName + ".Generate"))
                g.Generate();

            if (Log.HasErrors)
            {
                return(null);
            }

            using (Log.StartProfiler(g.GetType().FullName + ".Save"))
                g.Save();

            return(new CilResult(g.Assembly, _linker.TypeMap, g.Locations));
        }
Ejemplo n.º 2
0
        public override BackendResult Build()
        {
            var package = Input.Package;

            if (package.CanLink)
            {
                package.Tag = _linker.AddAssemblyFile(Path.Combine(_outputDir, package.Name + ".dll"));
                return(null);
            }

            var g = new CilGenerator(Disk, Data, Essentials,
                                     this, _linker, package, _outputDir);

            g.Configure(Environment.Debug);
            g.Generate();

            if (Log.HasErrors)
            {
                return(null);
            }


            g.Save();
            return(new CilResult(
                       g.Assembly,
                       _linker.TypeMap,
                       g.Locations));
        }