Beispiel #1
0
        private static DependencyGraph ConstructDependencyGraphFromLast(DependencyGraph ldg)
        {
            using (new LoggerPhaseScope("ConstructDgFromLast", false))
                using (new PerformanceScope("ConstructDgFromLast", LogLevel.Verbose))
                {
                    var dg = new DependencyGraph();
                    if (ldg == null)
                    {
                        return(dg);
                    }

                    // reregister dependency types from last dependency graph
                    using (new LoggerPhaseScope("RegisterDependencyTypeFromLastBuild", true))
                    {
                        dg.RegisterDependencyType(ldg.DependencyTypes.Values);
                    }

                    // restore dependency graph from last dependency graph
                    using (new LoggerPhaseScope("ReportDependencyFromLastBuild", true))
                    {
                        dg.ReportDependency(from r in ldg.ReportedBys
                                            from i in ldg.GetDependencyReportedBy(r)
                                            select i);
                    }
                    return(dg);
                }
        }
Beispiel #2
0
        private static DependencyGraph ConstructDependencyGraphFromLast(DependencyGraph ldg)
        {
            using (new LoggerPhaseScope("ConstructDgFromLast", LogLevel.Verbose))
            {
                var dg = new DependencyGraph();
                if (ldg == null)
                {
                    return(dg);
                }

                // reregister dependency types from last dependency graph
                using (new LoggerPhaseScope("RegisterDependencyTypeFromLastBuild", LogLevel.Diagnostic))
                {
                    dg.RegisterDependencyType(ldg.DependencyTypes.Values);
                }

                return(dg);
            }
        }
        private static DependencyGraph ConstructDependencyGraphFromLast(DependencyGraph ldg)
        {
            var dg = new DependencyGraph();
            if (ldg == null)
            {
                return dg;
            }

            // reregister dependency types from last dependency graph
            using (new LoggerPhaseScope("RegisterDependencyTypeFromLastBuild", true))
            {
                dg.RegisterDependencyType(ldg.DependencyTypes.Values);
            }

            // restore dependency graph from last dependency graph
            using (new LoggerPhaseScope("ReportDependencyFromLastBuild", true))
            {
                dg.ReportDependency(from r in ldg.ReportedBys
                                    from i in ldg.GetDependencyReportedBy(r)
                                    select i);
            }
            return dg;
        }