Esempio n. 1
0
        public void OnStep(IApplication application, string step)
        {
            if (step != ExecutionLifeCycleSteps.AfterTemplateExecution)
            {
                return;
            }

            var tracing = new TracingWithPrefix(Logging.Log, "NuGet - ");

            tracing.Info("Start processing packages");

            // Call a separate method to do the actual execution which is internally accessible and more easily unit testable.
            Execute(
                applicationProjects: application.Projects,
                tracing: tracing,
                saveProjectDelegate: SaveProject,
                loadProjectDelegate: LoadProject);

            tracing.Info("Package processing complete");
        }
Esempio n. 2
0
        public void OnStep(IApplication application, string step)
        {
            if (step == ExecutionLifeCycleSteps.BeforeTemplateRegistrations)
            {
                application.EventDispatcher.Subscribe <VisualStudioProjectCreatedEvent>(HandleEvent);
            }
            if (step != ExecutionLifeCycleSteps.AfterTemplateExecution)
            {
                return;
            }

            var tracing = new TracingWithPrefix(Logging.Log, "NuGet - ");

            tracing.Info("Start processing packages");

            // Call a separate method to do the actual execution which is internally accessible and more easily unit testable.
            Execute(
                applicationProjects: _projectRegistry.Values,
                tracing: tracing,
                saveProjectDelegate: SaveProject);

            tracing.Info("Package processing complete");
        }