Rocket.Chat.Net.Driver.RocketChatDriver.ConnectAsync C# (CSharp) Method

ConnectAsync() public method

public ConnectAsync ( ) : Task
return Task
        public async Task ConnectAsync()
        {
            _logger.Info($"Connecting client to {_client.Url}...");
            await _client.ConnectAsync(TimeoutToken).ConfigureAwait(false);
        }

Usage Example

        public async Task Send_attachments()
        {
            //const string password = "******";

            //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger);
            var userName = Constants.OneEmail;
            var password = Constants.OnePassword;

            var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger);

            await driver.ConnectAsync();
            await driver.LoginWithEmailAsync(userName, password);

            var roomId = await driver.GetRoomIdAsync("GENERAL");

            //var a = await driver.SendCustomMessageAsync("test mesage", "name", roomId.Result);

            driver.Dispose();
        }
All Usage Examples Of Rocket.Chat.Net.Driver.RocketChatDriver::ConnectAsync