public void Cleanup() { if (_runtimeSettings.ContainsPropertyNamed(@"dontCleanUp")) { return; } File.Delete(_workingPath); }
void includeAnyAdditionalAttachments( ) { if (_pluginSettings.ContainsPropertyNamed(@"additionalAttachments")) { string[] indidualAttachmentPaths = _pluginSettings[@"additionalAttachments"].Split(';'); foreach (string eachAttachmentPath in indidualAttachmentPaths) { _emailMessage.AddAttachment(eachAttachmentPath); } } else { foreach (string eachAttachment in _staticSettings.AdditionalAttachments) { _emailMessage.AddAttachment(eachAttachment); } } }
public void Cleanup() { if (_runtimeSettings.ContainsPropertyNamed(@"dontCleanUp")) { return; } _disk.DeleteFileOrDirectory(_workingPath); }
static string getPasswordIfSpecified(IPluginRuntimeSettings runtimeSettings) { if (runtimeSettings.ContainsPropertyNamed(@"password")) { return(runtimeSettings[@"password"]); } if (string.IsNullOrEmpty(Settings.Password)) { return(Settings.Password); } return(string.Empty); }
public void Run(IPluginRuntimeSettings settings, IPlugin lastPlugin) { _runtimeSettings = settings ; if(_runtimeSettings.ContainsPropertyNamed( @"writeTo" )) { _workingPath = settings[ @"writeTo" ]; } else { _workingPath = getTempLocation( lastPlugin.WorkingPath) ; } _disk.CopyFolder( lastPlugin.WorkingPath, _workingPath ); }
public void Run(IPluginRuntimeSettings settings, IPlugin lastPlugin) { _runtimeSettings = settings ; _workingPath = settings.ContainsPropertyNamed( @"writeTo" ) ? settings[ @"writeTo" ] : getTempLocation(lastPlugin.WorkingPath) ; if( !Directory.Exists( _workingPath ) ) { Directory.CreateDirectory( Path.GetDirectoryName( _workingPath ) ) ; } zipFolder(lastPlugin.WorkingPath, _workingPath ); }
public void Run(IPluginRuntimeSettings settings, IPlugin lastPlugin) { _runtimeSettings = settings; _workingPath = settings.ContainsPropertyNamed(@"writeTo") ? settings[@"writeTo"] : getTempLocation(lastPlugin.WorkingPath); if (!Directory.Exists(_workingPath)) { Directory.CreateDirectory(Path.GetDirectoryName(_workingPath)); } zipFolder(lastPlugin.WorkingPath, _workingPath); }
public void Run(IPluginRuntimeSettings settings, IPlugin lastPlugin) { _runtimeSettings = settings; if (_runtimeSettings.ContainsPropertyNamed(@"writeTo")) { _workingPath = settings[@"writeTo"]; } else { _workingPath = getTempLocation(lastPlugin.WorkingPath); } _disk.CopyFolder(lastPlugin.WorkingPath, _workingPath); }
static string getPathToSaveZippedFileTo(IPluginRuntimeSettings runtimeSettings, string lastPath) { string currentPath = string.Empty; if (runtimeSettings.ContainsPropertyNamed(@"writeto")) { currentPath = runtimeSettings[@"writeto"]; } if (string.IsNullOrEmpty(currentPath)) { currentPath = Settings.WriteTo; } if (string.IsNullOrEmpty(currentPath)) { currentPath = getTempLocation(lastPath); } Directory.CreateDirectory(Path.GetDirectoryName(currentPath)); return(currentPath); }
static string getPathToSaveZippedFileTo( IPluginRuntimeSettings runtimeSettings, string lastPath ) { string currentPath = string.Empty ; if(runtimeSettings.ContainsPropertyNamed( @"writeto" )) { currentPath = runtimeSettings[ @"writeto" ] ; } if (string.IsNullOrEmpty(currentPath)) { currentPath = Settings.WriteTo ; } if (string.IsNullOrEmpty(currentPath)) { currentPath = getTempLocation(lastPath); } Directory.CreateDirectory(Path.GetDirectoryName(currentPath)); return currentPath; }
static string getPasswordIfSpecified( IPluginRuntimeSettings runtimeSettings ) { if(runtimeSettings.ContainsPropertyNamed( @"password" )) { return runtimeSettings[ @"password" ] ; } if(string.IsNullOrEmpty( Settings.Password ) ) { return Settings.Password ; } return string.Empty ; }