/// <summary>
        /// Initializes a new instance of <see cref="InkRecognizerClient"/>.
        /// </summary>
        /// <param name="endpoint">Endpoint URI for InkRecognizer service.</param>
        /// <param name="credential">The application key received after signing up for the service.</param>
        /// <param name="options">Options that allow to configure the request sent to the InkRecognizer service.</param>
        public InkRecognizerClient(
            Uri endpoint,
            InkRecognizerCredential credential,
            InkRecognizerClientOptions options)
        {
            var destination    = endpoint.AbsoluteUri;
            var serviceVersion = GetServiceVersion(options.Version);

            _endpoint   = new Uri(destination + serviceVersion);
            _options    = options;
            _credential = credential;
        }
예제 #2
0
        private void CreatePolicies()
        {
            var option = new InkRecognizerClientOptions()
            {
                Retry =
                {
                    Mode       = RetryMode.Exponential,
                    MaxDelay   = TimeSpan.FromSeconds(0.8),
                    MaxRetries = 3
                }
            };

            //LoggingPolicy = new LoggingPolicy();

            //(var componentName, var componentVersion) = GetComponentNameAndVersion();
            //var applicationId = Guid.NewGuid().ToString();
            //var telemetryPolicy = new TelemetryPolicy(componentName, componentVersion)
            //{
            //    ApplicationId = applicationId
            //};
        }