public virtual ResolveResponseInfo Resolve(ResolveInfo resolveInfo) { if (resolveInfo == null) { throw new ArgumentException("Resolve info cannot be null."); } if (!opened) { throw new InvalidOperationException("The service has never been opened or it was closed previously."); } return(client.Resolve(resolveInfo)); }
public override ReadOnlyCollection <PeerNodeAddress> Resolve( string meshId, int maxAddresses, TimeSpan timeout) { if (String.IsNullOrEmpty(meshId)) { throw new ArgumentNullException("meshId"); } if (maxAddresses <= 0) { throw new ArgumentOutOfRangeException("maxAddresses must be positive integer"); } if (timeout <= TimeSpan.Zero) { throw new ArgumentException(String.Format("Timeout value must be positive value. It was {0}", timeout)); } client.OperationTimeout = timeout; return(new ReadOnlyCollection <PeerNodeAddress> (client.Resolve(new ResolveInfo(client_id, meshId, maxAddresses)).Addresses ?? new PeerNodeAddress [0])); }