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

            return(new EwsClient(ewsSecurity, EsSrv.EwsEndpoint, EwsVersion.Ews12));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            EwsServerConnectionDetails EsSrv = new EwsServerConnectionDetails()
            {
                UserName    = "******",
                Password    = "******",
                EwsEndpoint = "http://192.168.68.200:80/EcoStruxure/DataExchange"
            };


            using (var ewsClient = CreateConnection(EsSrv))
            {
                var keepGoing = true;
                do
                {
                    // GET ACTIVE ALARMS
                    GetAlarmEventsResponse activeAlarms = ewsClient.GetAlarmEvents(1, 3, "", null);

                    Console.ReadKey();
                } while (keepGoing);
            }
        }