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