Esempio n. 1
0
        private EwsClient CreateConnection(string username = UserName, string password = Password)
        {
            var creds = new EwsSecurity
            {
                UserName = username,
                Password = password,
            };

            return(new EwsClient(creds, EwsEndpoint));
        }
Esempio n. 2
0
        static EwsClient CreateConnection(EwsServerConnectionDetails EsSrv)
        {
            var ewsSecurity = new EwsSecurity
            {
                UserName = EsSrv.UserName,
                Password = EsSrv.Password
            };

            return(new EwsClient(ewsSecurity, EsSrv.EwsEndpoint, EwsVersion.Ews12));
        }