我有UI,我有用户输入Url,我可以找到Exchange Web服务(EWS)。我的应用程序使用EWS来获取忙/闲信息,但我的配置工具只需要为用户设置它。测试Exchange Web服务(EWS)url
现在我只是要求提供主机名并从那里建立Url。例如,他们输入example.org作为主机,我建立了https://example.org/EWS/Exchange.asmx。
我想添加一个测试按钮,以确保他们输入的主机可以通过他们正在配置的机器进行访问。但我不确定我需要测试该服务有多简单或复杂。
是否有任何noop或bind我可以做,以确保我可以建立与EWS的沟通?
喜欢的东西:
var serviceUri = new Uri(_textBoxEwsUrl.Text));
var exchangeService = new ExchangeService();
exchangeService.Url = serviceUri;
// what can I call here to test that I can talk to the exchangeService?
exchangeService.????