/// <summary> /// Factory method for creating a DiscoveryTransport. The Discovery Transport wraps the /// given ICompositeTransport and will add and remove Transport URIs as they are discovered. /// </summary> public static DiscoveryTransport CreateTransport(ICompositeTransport compositeTransport, URISupport.CompositeData compositeData, StringDictionary options) { DiscoveryTransport transport = new DiscoveryTransport(compositeTransport); URISupport.SetProperties(transport, options, "transport."); transport.Properties = options; Uri discoveryAgentURI = compositeData.Components[0]; IDiscoveryAgent discoveryAgent = DiscoveryAgentFactory.CreateAgent(discoveryAgentURI); transport.DiscoveryAgent = discoveryAgent; return(transport); }
public static IDiscoveryAgent CreateAgent(Uri location) { IDiscoveryAgentFactory tf = DiscoveryAgentFactory.CreateAgentFactory(location); return(tf.CreateAgent(location)); }