Example #1
0
 /// <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)));
 }
Example #2
0
 public bool DeleteFile(string remoteFolder, string remoteFilename)
 {
     return(AsyncUtil.CallSync(DeleteFileAsync, remoteFolder, remoteFilename));
 }
Example #3
0
 public bool DownloadFile(string remoteFolder, string remoteFilename, string localPath = "")
 {
     return(AsyncUtil.CallSync(DownloadFileAsync, remoteFolder, remoteFilename, localPath));
 }
Example #4
0
 public IEnumerable <FtpFileInfo> ListFiles(string folder = "")
 {
     return(AsyncUtil.CallSync(ListFilesAsync, folder));
 }
Example #5
0
 public bool UploadFile(string localPath, string folder = "")
 {
     return(AsyncUtil.CallSync(UploadFileAsync, localPath, folder));
 }
Example #6
0
 public bool Initialize(string server, string user, string pass, int port = 21)
 {
     return(AsyncUtil.CallSync(InitializeAsync, server, user, pass, port));
 }
Example #7
0
 public static IDbConnection GetConnection(string connectionStringOrKey, bool connectionStringIsConfigKey = false, string providerName = null)
 {
     return(AsyncUtil.CallSync(GetConnectionAsync, connectionStringOrKey, connectionStringIsConfigKey, providerName));
 }
Example #8
0
 public static int ExecuteCommand(string commandText, IDbConnection connection, int commandTimeout = 30)
 {
     return(AsyncUtil.CallSync(ExecuteCommandAsync, commandText, connection, commandTimeout));
 }
Example #9
0
 public static TResult GetScalarResult <TResult>(string commandText, IDbConnection connection, int commandTimeout = 30)
 {
     return(AsyncUtil.CallSync(GetScalarResultAsync <TResult>, commandText, connection, commandTimeout));
 }
Example #10
0
 public static IDataReader GetReader(string commandText, IDbConnection connection, CommandBehavior behavior = CommandBehavior.CloseConnection, int commandTimeout = 30)
 {
     return(AsyncUtil.CallSync(GetReaderAsync, commandText, connection, behavior, commandTimeout));
 }