You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Create variables for your subscription key and endpoint, and the example JSON file. The endpoint will later be combined with `inkRecognitionUrl` to access the API.
50
50
51
-
[!code-csharp[endpoint file and key variables](~/cognitive-services-rest-samples/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=vars)]
51
+
[!code-csharp[endpoint file and key variables](~/cognitive-services-rest-samples/Vision/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=vars)]
52
52
53
53
## Create a function to send requests
54
54
@@ -58,29 +58,29 @@ The source code for this quickstart can be found on [GitHub](https://go.microsof
58
58
59
59
3. Send the request with `PutAsync()`. If the request is successful, return the response.
60
60
61
-
[!code-csharp[request example method](~/cognitive-services-rest-samples/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=request)]
61
+
[!code-csharp[request example method](~/cognitive-services-rest-samples/dotnet/Vision/InkRecognition/quickstart/recognizeInk.cs?name=request)]
62
62
63
63
## Send an ink recognition request
64
64
65
65
1. Create a new function called `recognizeInk()`. Construct the request and send it by calling the `Request()` function with your endpoint, subscription key, the URL for the API, and the digital ink stroke data.
66
66
67
67
2. Deserialize the JSON object, and write it to the console.
68
68
69
-
[!code-csharp[request to recognize ink data](~/cognitive-services-rest-samples/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=recognize)]
69
+
[!code-csharp[request to recognize ink data](~/cognitive-services-rest-samples/dotnet/Vision/InkRecognition/quickstart/recognizeInk.cs?name=recognize)]
70
70
71
71
## Load your digital ink data
72
72
73
73
Create a function called `LoadJson()` to load the ink data JSON file. Use a `StreamReader` and `JsonTextReader` to create a `JObject` and return it.
74
74
75
-
[!code-csharp[load the JSON file](~/cognitive-services-rest-samples/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=loadJson)]
75
+
[!code-csharp[load the JSON file](~/cognitive-services-rest-samples/dotnet/Vision/InkRecognition/quickstart/recognizeInk.cs?name=loadJson)]
76
76
77
77
## Send the API request
78
78
79
79
1. In the main method of your application, load your JSON data with the function created above.
80
80
81
81
2. Call the `recognizeInk()` function created above. Use `System.Console.ReadKey()` to keep the console window open after running the application.
82
82
83
-
[!code-csharp[file main method](~/cognitive-services-rest-samples/dotnet/InkRecognition/quickstart/recognizeInk.cs?name=main)]
83
+
[!code-csharp[file main method](~/cognitive-services-rest-samples/dotnet/Vision/InkRecognition/quickstart/recognizeInk.cs?name=main)]
0 commit comments