private async Task PerformShowingDifference(string folder, LinkedEntities <PluginAssembly> linked) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.ShowingDifferencePluginAssemblyDescriptionFormat1, linked.Entity1.Name); DateTime now = DateTime.Now; string desc1 = await _handler1.CreateDescriptionAsync(linked.Entity1); string desc2 = await _handler2.CreateDescriptionAsync(linked.Entity2); { string filePath1 = await CreateDescriptionFileAsync(folder, _pluginDescription1.FilePath, linked.Entity1.Name, desc1); string filePath2 = await CreateDescriptionFileAsync(folder, _pluginDescription2.FilePath, linked.Entity2.Name, desc2); if (File.Exists(filePath1) && File.Exists(filePath2)) { await this._iWriteToOutput.ProcessStartProgramComparerAsync(null, filePath1, filePath2, Path.GetFileName(filePath1), Path.GetFileName(filePath2)); } else { this._iWriteToOutput.PerformAction(null, filePath1); this._iWriteToOutput.PerformAction(null, filePath2); } } ToggleControls(true, Properties.OutputStrings.ShowingDifferencePluginAssemblyDescriptionCompletedFormat1, linked.Entity1.Name); }
private async Task PerformExportDescriptionToFile(string folder, PluginConfigurationAssemblyDescriptionHandler handler, PluginDescription pluginDescription, PluginAssembly assembly) { if (!this.IsControlsEnabled) { return; } ToggleControls(false, Properties.OutputStrings.CreatingDescription); string description = await handler.CreateDescriptionAsync(assembly); string filePath = await CreateDescriptionFileAsync(folder, pluginDescription.FilePath, assembly.Name, description); this._iWriteToOutput.PerformAction(null, filePath); ToggleControls(true, Properties.OutputStrings.CreatingDescriptionCompleted); }
private async Task PerformAssemblyDescription(string folder, PluginDescription pluginDescription, PluginAssembly pluginAssembly) { string fileName = string.Format( _formatFileTxt , Path.GetFileNameWithoutExtension(pluginDescription.FilePath) , pluginAssembly.Name ); string filePath = Path.Combine(folder, FileOperations.RemoveWrongSymbols(fileName)); var handler = new PluginConfigurationAssemblyDescriptionHandler(pluginDescription.GetConnectionInfo()); string content = await handler.CreateDescriptionAsync(pluginAssembly); File.WriteAllText(filePath, content, new UTF8Encoding(false)); this._iWriteToOutput.WriteToOutput(null, "Assembly {0} Description exported to {1}", pluginAssembly.Name, filePath); this._iWriteToOutput.PerformAction(null, filePath); }