/// <summary> /// Creates a new instance of <see cref="TokenIO"/> that's configured to use /// the specified environment. /// </summary> /// <param name="cluster">the token cluster to connect to</param> /// <param name="developerKey">the developer key</param> /// <returns>an instance of <see cref="TokenIO"/></returns> public static TokenClient Create(TokenCluster cluster, string developerKey) { return(NewBuilder() .ConnectTo(cluster) .DeveloperKey(developerKey) .Build()); }
/// <summary> /// Creates an instance of a Token SDK. /// </summary> /// <param name="channel">the gRPC channel</param> /// <param name="cryptoEngineFactory">the crypto factory to create crypto engine</param> /// <param name="tokenCluster">the token cluster to connect to</param> public TokenClient( ManagedChannel channel, ICryptoEngineFactory cryptoEngineFactory, TokenCluster tokenCluster) { this.channel = channel; this.cryptoEngineFactory = cryptoEngineFactory; this.tokenCluster = tokenCluster; }
/// <summary> /// Creates an instance of <see cref="Member"/> /// </summary> /// <param name="memberId">Member identifier.</param> /// <param name="client">RPC client used to perform operations against the server</param> /// <param name="tokenCluster">Token cluster, e.g. sandbox, production</param> /// <param name="partnerId">member ID of the partner, if applicable</param> /// <param name="realmId">the realm id</param> public Member(string memberId, Client client, TokenCluster tokenCluster, string partnerId, string realmId) { this.memberId = memberId; this.client = client; this.tokenCluster = tokenCluster; this.partnerId = partnerId; this.realmId = realmId; }
/// <summary> /// Sets Token cluster to connect to. /// </summary> /// <param name="cluster">the token cluster</param> /// <returns>this builder instance</returns> public T ConnectTo(TokenCluster cluster) { this.tokenCluster = cluster; this.hostName = cluster.Url; return((T)this); }
/// <summary> /// Sets Token cluster to connect to. /// </summary> /// <param name="cluster">the token cluster</param> /// <returns>this builder instance</returns> public Builder ConnectTo(TokenCluster cluster) { this.tokenCluster = cluster; this.hostName = cluster.Url; return(this); }