/// <summary> /// Create a node endpoint client factory instance that can be used to create node client endpoint accessors. Use this /// method instead of CreateClientFactory() if you want to call INodeEndpointClientFactory.Make() without having to pass /// in the NAAS authentication credentials each time. /// </summary> /// <param name="defaultCredentials">The NAAS default authentication credentials to assign (unless specified otherwise) to /// the node client endpoint accessors returned from INodeEndpointClientFactory.Make().</param> /// <returns>The <see cref="INodeEndpointClientFactory"/> instance that can be used to create <see cref="INodeEndpointClient"/> node client /// endpoint accessors.</returns> public static INodeEndpointClientFactory CreateClientFactory(AuthenticationCredentials defaultCredentials) { NodeEndpointClientFactory factory = new NodeEndpointClientFactory(); factory.DefaultAuthenticationCredentials = defaultCredentials; factory.Init(); return(factory); }
/// <summary> /// Create a node endpoint client factory instance that can be used to create node client endpoint accessors. Use this /// method instead of CreateClientFactory() if you want to call INodeEndpointClientFactory.Make() without having to pass /// in the NAAS authentication credentials each time. /// </summary> /// <param name="defaultUsername">The NAAS default authentication username to assign (unless specified otherwise) to /// the node client endpoint accessors returned from INodeEndpointClientFactory.Make().</param> /// <param name="defaultPassword">The NAAS default authentication password to assign (unless specified otherwise) to /// the node client endpoint accessors returned from INodeEndpointClientFactory.Make().</param> /// <returns>The <see cref="INodeEndpointClientFactory"/> instance that can be used to create <see cref="INodeEndpointClient"/> node client /// endpoint accessors.</returns> public static INodeEndpointClientFactory CreateClientFactory(string defaultUsername, string defaultPassword) { NodeEndpointClientFactory factory = new NodeEndpointClientFactory(); factory.DefaultAuthenticationCredentials = new AuthenticationCredentials(defaultUsername, defaultPassword); factory.Init(); return(factory); }