public ActionTrigger[] GetActionTriggers(string camUrl, string camUserName, string camPassword) { using (var proxy = new OnvifProxy(new NetworkCredential(camUserName, camPassword), new Uri(camUrl))) { return(proxy.GetActionTriggersAsync().Result); } }
public async Task <ActionTrigger[]> GetActionTriggersAsync() { using (var proxy = new OnvifProxy(new NetworkCredential(_userName, _password), new Uri(_url))) { return(await proxy.GetActionTriggersAsync()); } }