Beispiel #1
0
        public void Execute(Configuration configuration, List <Duplicate> duplicates)
        {
            var data = new JsonOutput {
                Configuration = configuration, Duplicates = duplicates
            };

            RenderFileHelper.SaveRenderOutput(configuration, FileName, data.ToJsonString());
        }
Beispiel #2
0
        public void Execute(Configuration configuration, List <Duplicate> duplicates)
        {
            var stubble = new StubbleBuilder().Build();

            var data = new Dictionary <string, object>
            {
                ["Duplicates"]    = duplicates.Select(q => new DuplicateDisplay(configuration.SourceDirectory, q)).ToList(),
                ["Configuration"] = configuration,
            };

            var output = stubble.Render(Template, data);

            RenderFileHelper.SaveRenderOutput(configuration, FileName, output);
        }
Beispiel #3
0
        public void Execute(Configuration configuration, List <Duplicate> duplicates)
        {
            Configuration = configuration;

            if (!configuration.TrackChanges || !LoadChanges())
            {
                return;
            }

            var stubble = new StubbleBuilder().Build();

            var data = new Dictionary <string, object>
            {
                ["labels"]    = string.Join(",", Changes.Items.Select(FormatLabel)),
                ["fragments"] = string.Join(",", Changes.Items.Select(q => q.NumberOfFragements)),
                ["locations"] = string.Join(",", Changes.Items.Select(q => q.NumberOfLocations)),
            };

            var output = stubble.Render(Template, data);

            RenderFileHelper.SaveRenderOutput(configuration, FileName, output);
        }