/// <summary>
        /// Initializes a new instance of the <see cref="DaprClientBuilder"/> class.
        /// </summary>
        public DaprClientBuilder()
        {
            this.GrpcEndpoint = DaprDefaults.GetDefaultGrpcEndpoint();
            this.HttpEndpoint = DaprDefaults.GetDefaultHttpEndpoint();

            this.GrpcChannelOptions = new GrpcChannelOptions()
            {
                // The gRPC client doesn't throw the right exception for cancellation
                // by default, this switches that behavior on.
                ThrowOperationCanceledOnCancellation = true,
            };

            this.JsonSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web);
            this.DaprApiToken          = DaprDefaults.GetDefaultApiToken();
        }
Example #2
0
 public InvocationHandler()
 {
     this.parsedEndpoint = new Uri(DaprDefaults.GetDefaultHttpEndpoint(), UriKind.Absolute);
     this.apiToken       = DaprDefaults.GetDefaultApiToken();
 }