コード例 #1
0
        public void Dump(PlanDumperContext context)
        {
            context.WriteHeader(this);

            using (var childContext = context.Push())
            {
                Input.Dump(childContext);
            }
        }
コード例 #2
0
        public void Dump(PlanDumperContext context)
        {
            context.WriteHeader(this);

            using (var childContext = context.Push())
            {
                foreach (var child in modelWorkers)
                {
                    child.Dump(childContext);
                }

                foreach (var child in mapWorkers)
                {
                    child.Dump(childContext);
                }
            }
        }
コード例 #3
0
        public void Dump(PlanDumperContext context)
        {
            context.WriteHeader(this, "{0}: {1}", Id, Name);

            using (var childContext = context.Push())
            {
                foreach (var child in mergers)
                {
                    child.Dump(childContext);
                }

                foreach (var child in updaters)
                {
                    child.Dump(childContext);
                }
            }
        }
コード例 #4
0
        public DataProjectAssembler CreateWork(ProjectDefinition project, AppSettings settings)
        {
            // Grab the temp directory and make sure it exists
            var tempDir = new DirectoryInfo(settings.TempDir);

            if (!tempDir.Exists)
            {
                logger.LogInformation("Creating temp directory: {Path}.", tempDir.FullName);
                tempDir.Create();
            }

            // Create the worker that assembles a data project from its components (models, mappings)
            var root = serviceProvider.GetRequiredService <DataProjectAssembler>();

            // Add a worker to create each data model
            foreach (var model in project.Models)
            {
                root.AddWorker(CreateWorker(model, settings));
            }

            // Add a worker to process each mapping
            foreach (var map in project.Maps)
            {
                root.AddWorker(CreateWorker(map));
            }

            // Dump the dependency tree, for debugging
            using (var writer = new StreamWriter(Path.Combine(tempDir.FullName, "work-plan.txt")))
                using (var context = new PlanDumperContext(writer))
                {
                    root.Dump(context);
                }

            // Return the dependency tree, for subsequent execution
            return(root);
        }
コード例 #5
0
ファイル: XsdLoader.cs プロジェクト: dswisher/swish-mapper
 public void Dump(PlanDumperContext context)
 {
     context.WriteHeader(this, "{0}", Path);
 }
コード例 #6
0
 private PlanDumperContext(PlanDumperContext parent)
     : this(parent.writer, parent.Depth + 1)
 {
 }
コード例 #7
0
 public void Dump(PlanDumperContext context)
 {
     context.WriteHeader(this);
 }
コード例 #8
0
 public void Dump(PlanDumperContext context)
 {
     context.WriteHeader(this, "{0} -> {1}", FromModelId, ToModelId);
 }