示例#1
0
 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);
     }
 }
示例#2
0
 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());
     }
 }
示例#3
0
 public Action1[] GetActions()
 {
     using (var proxy = new OnvifProxy(new NetworkCredential(_userName, _password), new Uri(_url)))
     {
         return(proxy.GetActionsAsync().Result);
     }
 }
示例#4
0
 public async Task <Action1[]> GetActionsAsync()
 {
     using (var proxy = new OnvifProxy(new NetworkCredential(_userName, _password), new Uri(_url)))
     {
         return(await proxy.GetActionsAsync());
     }
 }