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