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); } }
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); } }