@@ -53,7 +53,7 @@ public class DigitalTwinsClient
5353 /// For more samples, see <see href="https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/digitaltwins/Azure.DigitalTwins.Core/samples">our repo samples</see>.
5454 /// </remarks>
5555 /// <example>
56- /// <code snippet="Snippet:DigitalTwinsSampleCreateServiceClientWithClientSecret">
56+ /// <code snippet="Snippet:DigitalTwinsSampleCreateServiceClientWithClientSecret" language="csharp" >
5757 /// // DefaultAzureCredential supports different authentication mechanisms and determines the appropriate credential type based of the environment it is executing in.
5858 /// // It attempts to use multiple credential types in an order until it finds a working credential.
5959 /// TokenCredential tokenCredential = new DefaultAzureCredential();
@@ -138,7 +138,7 @@ protected DigitalTwinsClient()
138138 /// <example>
139139 /// This sample demonstrates getting and deserializing a digital twin into a custom data type.
140140 ///
141- /// <code snippet="Snippet:DigitalTwinsSampleGetCustomDigitalTwin">
141+ /// <code snippet="Snippet:DigitalTwinsSampleGetCustomDigitalTwin" language="csharp" >
142142 /// Response<CustomDigitalTwin> getCustomDtResponse = await client.GetDigitalTwinAsync<CustomDigitalTwin>(customDtId);
143143 /// CustomDigitalTwin customDt = getCustomDtResponse.Value;
144144 /// Console.WriteLine($"Retrieved and deserialized digital twin {customDt.Id}:\n\t" +
@@ -255,7 +255,7 @@ public virtual Response<T> GetDigitalTwin<T>(string digitalTwinId, CancellationT
255255 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="digitalTwin"/> is <c>null</c>.
256256 /// </exception>
257257 /// <example>
258- /// <code snippet="Snippet:DigitalTwinsSampleCreateCustomTwin">
258+ /// <code snippet="Snippet:DigitalTwinsSampleCreateCustomTwin" language="csharp" >
259259 /// var customTwin = new CustomDigitalTwin
260260 /// {
261261 /// Id = customDtId,
@@ -393,7 +393,7 @@ public virtual Response<T> CreateOrReplaceDigitalTwin<T>(
393393 /// To delete a digital twin, any relationships referencing it must be deleted first.
394394 /// </remarks>
395395 /// <example>
396- /// <code snippet="Snippet:DigitalTwinsSampleDeleteTwin">
396+ /// <code snippet="Snippet:DigitalTwinsSampleDeleteTwin" language="csharp" >
397397 /// await client.DeleteDigitalTwinAsync(digitalTwinId);
398398 /// Console.WriteLine($"Deleted digital twin '{digitalTwinId}'.");
399399 /// </code>
@@ -558,7 +558,7 @@ public virtual Response UpdateDigitalTwin(string digitalTwinId, JsonPatchDocumen
558558 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="componentName"/> is <c>null</c>.
559559 /// </exception>
560560 /// <example>
561- /// <code snippet="Snippet:DigitalTwinsSampleGetComponent">
561+ /// <code snippet="Snippet:DigitalTwinsSampleGetComponent" language="csharp" >
562562 /// await client.GetComponentAsync<MyCustomComponent>(basicDtId, SamplesConstants.ComponentName);
563563 /// Console.WriteLine($"Retrieved component for digital twin '{basicDtId}'.");
564564 /// </code>
@@ -653,7 +653,7 @@ public virtual Response<T> GetComponent<T>(string digitalTwinId, string componen
653653 /// <exception cref="ArgumentNullException">
654654 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="componentName"/> is <c>null</c>.
655655 /// </exception>
656- /// <code snippet="Snippet:DigitalTwinsSampleUpdateComponent">
656+ /// <code snippet="Snippet:DigitalTwinsSampleUpdateComponent" language="csharp" >
657657 /// // Update Component1 by replacing the property ComponentProp1 value,
658658 /// // using an optional utility to build the payload.
659659 /// var componentJsonPatchDocument = new JsonPatchDocument();
@@ -770,7 +770,7 @@ public virtual Response UpdateComponent(
770770 /// </exception>
771771 /// <example>
772772 /// This sample demonstrates iterating over outgoing relationships and deserializing relationship strings into BasicRelationship objects.
773- /// <code snippet="Snippet:DigitalTwinsSampleGetAllRelationships">
773+ /// <code snippet="Snippet:DigitalTwinsSampleGetAllRelationships" language="csharp" >
774774 /// AsyncPageable<BasicRelationship> relationships = client.GetRelationshipsAsync<BasicRelationship>("buildingTwinId");
775775 /// await foreach (BasicRelationship relationship in relationships)
776776 /// {
@@ -936,7 +936,7 @@ Page<T> NextPageFunc(string nextLink, int? pageSizeHint)
936936 /// The exception is thrown when <paramref name="digitalTwinId"/> is <c>null</c>.
937937 /// </exception>
938938 /// <example>
939- /// <code snippet="Snippet:DigitalTwinsSampleGetIncomingRelationships">
939+ /// <code snippet="Snippet:DigitalTwinsSampleGetIncomingRelationships" language="csharp" >
940940 /// AsyncPageable<IncomingRelationship> incomingRelationships = client.GetIncomingRelationshipsAsync("buildingTwinId");
941941 ///
942942 /// await foreach (IncomingRelationship incomingRelationship in incomingRelationships)
@@ -1086,7 +1086,7 @@ Page<IncomingRelationship> NextPageFunc(string nextLink, int? pageSizeHint)
10861086 /// </exception>
10871087 /// <example>
10881088 /// This sample demonstrates getting and deserializing a digital twin relationship into a custom data type.
1089- /// <code snippet="Snippet:DigitalTwinsSampleGetCustomRelationship">
1089+ /// <code snippet="Snippet:DigitalTwinsSampleGetCustomRelationship" language="csharp" >
10901090 /// Response<CustomRelationship> getCustomRelationshipResponse = await client.GetRelationshipAsync<CustomRelationship>(
10911091 /// "floorTwinId",
10921092 /// "floorBuildingRelationshipId");
@@ -1285,7 +1285,7 @@ public virtual Response DeleteRelationship(string digitalTwinId, string relation
12851285 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="relationshipId"/> is <c>null</c>.
12861286 /// </exception>
12871287 /// <example>
1288- /// <code snippet="Snippet:DigitalTwinsSampleCreateCustomRelationship">
1288+ /// <code snippet="Snippet:DigitalTwinsSampleCreateCustomRelationship" language="csharp" >
12891289 /// var floorBuildingRelationshipPayload = new CustomRelationship
12901290 /// {
12911291 /// Id = "floorBuildingRelationshipId",
@@ -1529,7 +1529,7 @@ public virtual Response UpdateRelationship(
15291529 /// The exception that captures the errors from the service. Check the <see cref="RequestFailedException.ErrorCode"/> and <see cref="RequestFailedException.Status"/> properties for more details.
15301530 /// </exception>
15311531 /// <example>
1532- /// <code snippet="Snippet:DigitalTwinsSampleGetModels">
1532+ /// <code snippet="Snippet:DigitalTwinsSampleGetModels" language="csharp" >
15331533 /// AsyncPageable<DigitalTwinsModelData> allModels = client.GetModelsAsync();
15341534 /// await foreach (DigitalTwinsModelData model in allModels)
15351535 /// {
@@ -1689,7 +1689,7 @@ Page<DigitalTwinsModelData> NextPageFunc(string nextLink, int? pageSizeHint)
16891689 /// The exception is thrown when <paramref name="modelId"/> is <c>null</c>.
16901690 /// </exception>
16911691 /// <example>
1692- /// <code snippet="Snippet:DigitalTwinsSampleGetModel">
1692+ /// <code snippet="Snippet:DigitalTwinsSampleGetModel" language="csharp" >
16931693 /// Response<DigitalTwinsModelData> sampleModelResponse = await client.GetModelAsync(sampleModelId);
16941694 /// Console.WriteLine($"Retrieved model '{sampleModelResponse.Value.Id}'.");
16951695 /// </code>
@@ -1771,7 +1771,7 @@ public virtual Response<DigitalTwinsModelData> GetModel(string modelId, Cancella
17711771 /// The exception is thrown when <paramref name="modelId"/> is <c>null</c>.
17721772 /// </exception>
17731773 /// <example>
1774- /// <code snippet="Snippet:DigitalTwinsSampleDecommisionModel">
1774+ /// <code snippet="Snippet:DigitalTwinsSampleDecommisionModel" language="csharp" >
17751775 /// try
17761776 /// {
17771777 /// await client.DecommissionModelAsync(sampleModelId);
@@ -1866,7 +1866,7 @@ public virtual Response DecommissionModel(string modelId, CancellationToken canc
18661866 /// </remarks>
18671867 /// <seealso href="https://docs.microsoft.com/en-us/azure/digital-twins/concepts-models" />
18681868 /// <example>
1869- /// <code snippet="Snippet:DigitalTwinsSampleCreateModels">
1869+ /// <code snippet="Snippet:DigitalTwinsSampleCreateModels" language="csharp" >
18701870 /// await client.CreateModelsAsync(new[] { newComponentModelPayload, newModelPayload });
18711871 /// Console.WriteLine($"Created models '{componentModelId}' and '{sampleModelId}'.");
18721872 /// </code>
@@ -1967,7 +1967,7 @@ public virtual Response<DigitalTwinsModelData[]> CreateModels(IEnumerable<string
19671967 /// The exception is thrown when <paramref name="modelId"/> is <c>null</c>.
19681968 /// </exception>
19691969 /// <example>
1970- /// <code snippet="Snippet:DigitalTwinsSampleDeleteModel">
1970+ /// <code snippet="Snippet:DigitalTwinsSampleDeleteModel" language="csharp" >
19711971 /// try
19721972 /// {
19731973 /// await client.DeleteModelAsync(sampleModelId);
@@ -2058,7 +2058,7 @@ public virtual Response DeleteModel(string modelId, CancellationToken cancellati
20582058 /// The exception that captures the errors from the service. Check the <see cref="RequestFailedException.ErrorCode"/> and <see cref="RequestFailedException.Status"/> properties for more details.
20592059 /// </exception>
20602060 /// <example>
2061- /// <code snippet="Snippet:DigitalTwinsSampleQueryTwins">
2061+ /// <code snippet="Snippet:DigitalTwinsSampleQueryTwins" language="csharp" >
20622062 /// // This code snippet demonstrates the simplest way to iterate over the digital twin results, where paging
20632063 /// // happens under the covers.
20642064 /// AsyncPageable<BasicDigitalTwin> asyncPageableResponse = client.QueryAsync<BasicDigitalTwin>("SELECT * FROM digitaltwins");
@@ -2277,7 +2277,7 @@ Page<T> NextPageFunc(string nextLink, int? pageSizeHint)
22772277 /// The exception that captures the errors from the service. Check the <see cref="RequestFailedException.ErrorCode"/> and <see cref="RequestFailedException.Status"/> properties for more details.
22782278 /// </exception>
22792279 /// <example>
2280- /// <code snippet="Snippet:DigitalTwinsSampleGetEventRoutes">
2280+ /// <code snippet="Snippet:DigitalTwinsSampleGetEventRoutes" language="csharp" >
22812281 /// AsyncPageable<DigitalTwinsEventRoute> response = client.GetEventRoutesAsync();
22822282 /// await foreach (DigitalTwinsEventRoute er in response)
22832283 /// {
@@ -2509,7 +2509,7 @@ public virtual Response<DigitalTwinsEventRoute> GetEventRoute(string eventRouteI
25092509 /// The exception is thrown when <paramref name="eventRouteId"/> is <c>null</c>.
25102510 /// </exception>
25112511 /// <example>
2512- /// <code snippet="Snippet:DigitalTwinsSampleCreateEventRoute">
2512+ /// <code snippet="Snippet:DigitalTwinsSampleCreateEventRoute" language="csharp" >
25132513 /// string eventFilter = "$eventType = 'DigitalTwinTelemetryMessages' or $eventType = 'DigitalTwinLifecycleNotification'";
25142514 /// var eventRoute = new DigitalTwinsEventRoute(eventhubEndpointName, eventFilter);
25152515 ///
@@ -2587,7 +2587,7 @@ public virtual Response CreateOrReplaceEventRoute(string eventRouteId, DigitalTw
25872587 /// The exception is thrown when <paramref name="eventRouteId"/> is <c>null</c>.
25882588 /// </exception>
25892589 /// <example>
2590- /// <code snippet="Snippet:DigitalTwinsSampleDeleteEventRoute">
2590+ /// <code snippet="Snippet:DigitalTwinsSampleDeleteEventRoute" language="csharp" >
25912591 /// await client.DeleteEventRouteAsync(_eventRouteId);
25922592 /// Console.WriteLine($"Deleted event route '{_eventRouteId}'.");
25932593 /// </code>
@@ -2665,7 +2665,7 @@ public virtual Response DeleteEventRoute(string eventRouteId, CancellationToken
26652665 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="payload"/> is <c>null</c>.
26662666 /// </exception>
26672667 /// <example>
2668- /// <code snippet="Snippet:DigitalTwinsSamplePublishTelemetry">
2668+ /// <code snippet="Snippet:DigitalTwinsSamplePublishTelemetry" language="csharp" >
26692669 /// // construct your json telemetry payload by hand.
26702670 /// await client.PublishTelemetryAsync(twinId, Guid.NewGuid().ToString(), "{\"Telemetry1\": 5}");
26712671 /// Console.WriteLine($"Published telemetry message to twin '{twinId}'.");
@@ -2788,7 +2788,7 @@ public virtual Response PublishTelemetry(
27882788 /// The exception is thrown when <paramref name="digitalTwinId"/> or <paramref name="componentName"/> or <paramref name="payload"/> is <c>null</c>.
27892789 /// </exception>
27902790 /// <example>
2791- /// <code snippet="Snippet:DigitalTwinsSamplePublishComponentTelemetry">
2791+ /// <code snippet="Snippet:DigitalTwinsSamplePublishComponentTelemetry" language="csharp" >
27922792 /// // construct your json telemetry payload by serializing a dictionary.
27932793 /// var telemetryPayload = new Dictionary<string, int>
27942794 /// {
0 commit comments