/// <summary> /// Sends a RFC conform email using default .NET classes. /// </summary> /// <param name="messageToSend">The pre-configured <see cref="MailMessage" /> to send.</param> /// <param name="settings">A structure containing the settings for the server.</param> /// <returns><c>True</c> if the mail was sent, otherwise <c>false</c>.</returns> public static bool SendMail(MailMessage messageToSend, MailServerSettings settings) { return(AsyncUtil.CallSync(() => SendMailAsync(messageToSend, settings))); }
public bool DeleteFile(string remoteFolder, string remoteFilename) { return(AsyncUtil.CallSync(DeleteFileAsync, remoteFolder, remoteFilename)); }
public bool DownloadFile(string remoteFolder, string remoteFilename, string localPath = "") { return(AsyncUtil.CallSync(DownloadFileAsync, remoteFolder, remoteFilename, localPath)); }
public IEnumerable <FtpFileInfo> ListFiles(string folder = "") { return(AsyncUtil.CallSync(ListFilesAsync, folder)); }
public bool UploadFile(string localPath, string folder = "") { return(AsyncUtil.CallSync(UploadFileAsync, localPath, folder)); }
public bool Initialize(string server, string user, string pass, int port = 21) { return(AsyncUtil.CallSync(InitializeAsync, server, user, pass, port)); }
public static IDbConnection GetConnection(string connectionStringOrKey, bool connectionStringIsConfigKey = false, string providerName = null) { return(AsyncUtil.CallSync(GetConnectionAsync, connectionStringOrKey, connectionStringIsConfigKey, providerName)); }
public static int ExecuteCommand(string commandText, IDbConnection connection, int commandTimeout = 30) { return(AsyncUtil.CallSync(ExecuteCommandAsync, commandText, connection, commandTimeout)); }
public static TResult GetScalarResult <TResult>(string commandText, IDbConnection connection, int commandTimeout = 30) { return(AsyncUtil.CallSync(GetScalarResultAsync <TResult>, commandText, connection, commandTimeout)); }
public static IDataReader GetReader(string commandText, IDbConnection connection, CommandBehavior behavior = CommandBehavior.CloseConnection, int commandTimeout = 30) { return(AsyncUtil.CallSync(GetReaderAsync, commandText, connection, behavior, commandTimeout)); }