Exemplo n.º 1
0
        /// <summary>
        /// Constructor for an Exchange Gateway
        /// </summary>
        /// <param name="exchangeServer">Exchange server address for exchange searches</param>
        /// <param name="networkLogin">Username for an exchange user</param>
        /// <param name="networkPassword">Credentail for an exchange user</param>
        public ExchangeService(string exchangeServer, string networkLogin, string networkPassword)
        {
            exchangeServerUrl = exchangeServer;

            // Set the default connection limit
            ServicePointManager.DefaultConnectionLimit = ConfigCache.ExchangeMaxConnections;

            ICredentials credentials = new NetworkCredential(networkLogin, networkPassword);

            webDavQuery  = new WebDavQuery(credentials, "Exchange");
            appointments = new AppointmentService(exchangeServerUrl, webDavQuery);
            freebusy     = new FreeBusyService(exchangeServerUrl, webDavQuery, null);
        }
        /// <summary>
        /// Constructor for an Exchange Gateway
        /// </summary>
        /// <param name="exchangeServer">Exchange server address for exchange searches</param>
        /// <param name="networkLogin">Username for an exchange user</param>
        /// <param name="networkPassword">Credentail for an exchange user</param>
        public ExchangeService(string exchangeServer, string networkLogin, string networkPassword)
        {
            exchangeServerUrl = exchangeServer;

            // Set the default connection limit
            ServicePointManager.DefaultConnectionLimit = ConfigCache.ExchangeMaxConnections;

            ICredentials credentials = new NetworkCredential(networkLogin, networkPassword);
            webDavQuery = new WebDavQuery(credentials, "Exchange");
            appointments = new AppointmentService(exchangeServerUrl, webDavQuery);
            freebusy = new FreeBusyService(exchangeServerUrl, webDavQuery, null);
        }