public void ExportOrchestrationOverviews(IEnumerable <BtsOrchestration> omOrchestrations)
{
Log.Info("Exports orchestrations");
foreach (var omOrchestration in omOrchestrations)
{
if (!_generatedOrchestrations.Contains(omOrchestration.FullName))
{
try
{
var filePath = Path.Combine(_orchestrationExportPath, string.Concat(omOrchestration.FullName, ".jpg"));
Log.Debug("Exports overview image for orchestration {0}", omOrchestration.FullName);
var orchestrationOverviewImage = new OrchestrationOverviewImage(omOrchestration);
using (var image = orchestrationOverviewImage.GetImage())
{
image.Save(filePath);
using (var thumbnail = image.GetThumbnailImage(150, 150, null, IntPtr.Zero))
{
thumbnail.Save(Path.Combine(_orchestrationExportPath, string.Concat(omOrchestration.FullName, "_thumb.jpg")));
}
}
_generatedOrchestrations.Add(omOrchestration.FullName);
}
catch (Exception ex)
{
Log.Error(string.Format("Couldn't generate image for orchestration {0}", omOrchestration.FullName), ex);
}
}
}
}