public static IAsyncResult BeginResolve(IEnumerable <ContractDescription> contracts, Uri address, MetadataExchangeClientMode mode, MetadataExchangeClient client, AsyncCallback callback, object asyncState) { if (address == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("address"); } MetadataExchangeClientModeHelper.Validate(mode); if (client == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("client"); } if (contracts == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contracts"); } ValidateContracts(contracts); return(new AsyncMetadataResolverHelper(new EndpointAddress(address, new AddressHeader[0]), mode, client, contracts, callback, asyncState)); }
public static ServiceEndpointCollection Resolve(IEnumerable <ContractDescription> contracts, Uri address, MetadataExchangeClientMode mode, MetadataExchangeClient client) { if (address == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("address"); } MetadataExchangeClientModeHelper.Validate(mode); if (client == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("client"); } if (contracts == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contracts"); } ValidateContracts(contracts); return(ImportEndpoints(client.GetMetadata(address, mode), contracts, client)); }