Exemple #1
0
 public string GetNativeInstanceURI(string instanceName)
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginGetNativeInstanceURI(_hostName, instanceName, null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndGetNativeInstanceURI(result));
     }
     catch (FaultException <ListenerFault> exception)
     {
         throw ListenerFaultUtility.FaultToException(exception.Detail);
     }
 }
Exemple #2
0
 public string[] EnumerateInstances()
 {
     try
     {
         var          channel = GetInterface();
         IAsyncResult result  = channel.BeginEnumerateInstances(null, null);
         result.AsyncWaitHandle.WaitOne();
         return(channel.EndEnumerateInstances(result));
     }
     catch (FaultException <ListenerFault> exception)
     {
         throw ListenerFaultUtility.FaultToException(exception.Detail);
     }
 }