diff --git a/iothub/service/src/DigitalTwin/DigitalTwinClient.cs b/iothub/service/src/DigitalTwin/DigitalTwinClient.cs index 1e45bc8a13..6a237f62f2 100644 --- a/iothub/service/src/DigitalTwin/DigitalTwinClient.cs +++ b/iothub/service/src/DigitalTwin/DigitalTwinClient.cs @@ -19,8 +19,10 @@ namespace Microsoft.Azure.Devices { /// /// The Digital Twins Service Client contains methods to retrieve and update digital twin information, and invoke commands on a digital twin device. - /// For more information, see /// + /// + /// For more information, see + /// public class DigitalTwinClient : IDisposable { private const string HttpsEndpointPrefix = "https"; @@ -29,16 +31,20 @@ public class DigitalTwinClient : IDisposable /// /// Creates an instance of , provided for unit testing purposes only. - /// Use the CreateFromConnectionString or Create method to create an instance to use the client. /// public DigitalTwinClient() { } /// - /// Initializes a new instance of the class. + /// Creates DigitalTwinClient from an IoT hub connection string. + /// /// The IoT hub's connection string. - /// The delegating handlers to add to the http client pipeline. You can add handlers for tracing, implementing a retry strategy, routing requests through a proxy, etc. + /// + /// The delegating handlers to add to the http client pipeline. + /// You can add handlers for tracing, implementing a retry strategy, routing requests through a proxy, etc. + /// + /// A DigitalTwinsClient instance. public static DigitalTwinClient CreateFromConnectionString(string connectionString, params DelegatingHandler[] handlers) { connectionString.ThrowIfNullOrWhiteSpace(nameof(connectionString)); @@ -49,15 +55,21 @@ public static DigitalTwinClient CreateFromConnectionString(string connectionStri } /// - /// Creates an instance of . + /// Creates DigitalTwinClient, authenticating using an identity in Azure Active Directory (AAD). /// - /// IoT hub host name. - /// Azure Active Directory credentials to authenticate with IoT hub. See - /// The delegating handlers to add to the http client pipeline. You can add handlers for tracing, implementing a retry strategy, routing requests through a proxy, etc. - /// An instance of . /// - /// For more information on configuring IoT hub with Azure Active Directory, see + /// For more about information on the options of authenticating using a derived instance of , see + /// . + /// For more information on configuring IoT hub with Azure Active Directory, see + /// /// + /// IoT hub host name. + /// Azure Active Directory (AAD) credentials to authenticate with IoT hub. See + /// + /// The delegating handlers to add to the http client pipeline. You can add handlers for tracing, + /// implementing a retry strategy, routing requests through a proxy, etc. + /// + /// A DigitalTwinsClient instance. public static DigitalTwinClient Create( string hostName, TokenCredential credential, @@ -78,12 +90,17 @@ public static DigitalTwinClient Create( } /// - /// Creates an instance of . + /// Creates DigitalTwinClient using a shared access signature provided and refreshed as necessary by the caller. /// + /// + /// Users may wish to build their own shared access signature (SAS) tokens rather than give the shared key to the SDK and let it manage signing and renewal. + /// The object gives the SDK access to the SAS token, while the caller can update it as necessary using the + /// method. + /// /// IoT hub host name. /// Credential that generates a SAS token to authenticate with IoT hub. See . /// The delegating handlers to add to the http client pipeline. You can add handlers for tracing, implementing a retry strategy, routing requests through a proxy, etc. - /// An instance of . + /// A DigitalTwinsClient instance. public static DigitalTwinClient Create( string hostName, AzureSasCredential credential, @@ -124,8 +141,10 @@ public virtual async Task> GetDi /// /// Updates a digital twin. - /// For further information on how to create the json-patch, see /// + /// + /// For further information on how to create the json-patch, see . + /// /// The Id of the digital twin. /// The application/json-patch+json operations to be performed on the specified digital twin. /// The optional settings for this request. @@ -183,7 +202,7 @@ public virtual async TaskThe command payload. /// The optional settings for this request. /// The cancellationToken. - /// The application/json command invocation response and the http response. + /// The application/json command invocation response and the http response. public virtual async Task> InvokeComponentCommandAsync( string digitalTwinId, string componentName, diff --git a/iothub/service/src/JobClient/JobClient.cs b/iothub/service/src/JobClient/JobClient.cs index 32421512b4..5fb6338f56 100644 --- a/iothub/service/src/JobClient/JobClient.cs +++ b/iothub/service/src/JobClient/JobClient.cs @@ -23,6 +23,9 @@ namespace Microsoft.Azure.Devices /// /// Job management /// + /// + /// For more information, see . + /// public class JobClient : IDisposable { private const string _jobsUriFormat = "/jobs/v2/{0}?{1}"; @@ -37,8 +40,7 @@ public class JobClient : IDisposable private IHttpClientHelper _httpClientHelper; /// - /// Creates an instance of , provided for unit testing purposes only. - /// Use the CreateFromConnectionString method to create an instance to use the client. + /// Creates JobClient, provided for unit testing purposes only. /// public JobClient() { @@ -62,22 +64,21 @@ internal JobClient(IotHubConnectionProperties connectionProperties, HttpTranspor } /// - /// Creates a JobClient from the IoT Hub connection string. - /// For more information, see + /// Creates JobClient from the IoT hub connection string. /// - /// The IoT Hub connection string. - /// A JobClient instance. + /// The IoT hub connection string. + /// A JobClient instance. public static JobClient CreateFromConnectionString(string connectionString) { return CreateFromConnectionString(connectionString, new HttpTransportSettings()); } /// - /// Creates a JobClient from the IoT Hub connection string and HTTP transport settings + /// Creates JobClient from the IoT hub connection string and HTTP transport settings. /// - /// The IoT Hub connection string. - /// The HTTP transport settings. - /// A JobClient instance. + /// The IoT hub connection string. + /// The HTTP transport settings. + /// A JobClient instance. public static JobClient CreateFromConnectionString(string connectionString, HttpTransportSettings transportSettings) { if (transportSettings == null) @@ -93,15 +94,18 @@ public static JobClient CreateFromConnectionString(string connectionString, Http #if !NET451 /// - /// Creates an instance of . + /// Creates JobClient, authenticating using an identity in Azure Active Directory (AAD). /// - /// IoT hub host name. - /// Azure Active Directory credentials to authenticate with IoT hub. See - /// The HTTP transport settings. - /// An instance of . /// - /// For more information on configuring IoT hub with Azure Active Directory, see + /// For more about information on the options of authenticating using a derived instance of , see + /// . + /// For more information on configuring IoT hub with Azure Active Directory, see + /// /// + /// IoT hub host name. + /// Azure Active Directory (AAD) credentials to authenticate with IoT hub. See + /// The HTTP transport settings. + /// A JobClient instance. public static JobClient Create( string hostName, TokenCredential credential, @@ -122,12 +126,17 @@ public static JobClient Create( } /// - /// Creates an instance of . + /// Creates JobClient using a shared access signature provided and refreshed as necessary by the caller. /// + /// + /// Users may wish to build their own shared access signature (SAS) tokens rather than give the shared key to the SDK and let it manage signing and renewal. + /// The object gives the SDK access to the SAS token, while the caller can update it as necessary using the + /// method. + /// /// IoT hub host name. /// Credential that generates a SAS token to authenticate with IoT hub. See . /// The HTTP transport settings. - /// An instance of . + /// A JobClient instance. public static JobClient Create( string hostName, AzureSasCredential credential, diff --git a/iothub/service/src/RegistryManager.cs b/iothub/service/src/RegistryManager.cs index a92958bbcd..d65436715f 100644 --- a/iothub/service/src/RegistryManager.cs +++ b/iothub/service/src/RegistryManager.cs @@ -14,6 +14,7 @@ using Microsoft.Azure.Devices.Common.Exceptions; using Microsoft.Azure.Devices.Shared; using Newtonsoft.Json; +using System.Diagnostics.CodeAnalysis; #if !NET451 @@ -26,9 +27,11 @@ namespace Microsoft.Azure.Devices { /// /// Contains methods that services can use to perform create, remove, update and delete operations on devices. - /// For more information, see /// - [System.Diagnostics.CodeAnalysis.SuppressMessage( + /// + /// For more information, see + /// + [SuppressMessage( "Naming", "CA1716:Identifiers should not match keywords", Justification = "Cannot change parameter names as it is considered a breaking change.")] @@ -70,8 +73,7 @@ public class RegistryManager : IDisposable private IHttpClientHelper _httpClientHelper; /// - /// Creates an instance of , provided for unit testing purposes only. - /// Use the CreateFromConnectionString method to create an instance to use the client. + /// Creates an instance of RegistryManager, provided for unit testing purposes only. /// public RegistryManager() { @@ -97,21 +99,22 @@ internal RegistryManager(string iotHubName, IHttpClientHelper httpClientHelper) } /// - /// Creates a RegistryManager from the IoT Hub connection string. + /// Creates RegistryManager from an IoT hub connection string. /// - /// The IoT Hub connection string. - /// An RegistryManager instance. + /// The IoT hub connection string. + /// A RegistryManager instance. public static RegistryManager CreateFromConnectionString(string connectionString) { return CreateFromConnectionString(connectionString, new HttpTransportSettings()); } /// - /// Creates a RegistryManager from the IoT Hub connection string and transport settings + /// Creates an instance of RegistryManager, authenticating using an IoT hub connection string, and specifying + /// HTTP transport settings. /// - /// The IoT Hub connection string. + /// The IoT hub connection string. /// The HTTP transport settings. - /// An RegistryManager instance. + /// A RegistryManager instance. public static RegistryManager CreateFromConnectionString(string connectionString, HttpTransportSettings transportSettings) { if (transportSettings == null) @@ -127,15 +130,18 @@ public static RegistryManager CreateFromConnectionString(string connectionString #if !NET451 /// - /// Creates an instance of RegistryManager. + /// Creates RegistryManager, authenticating using an identity in Azure Active Directory (AAD). /// - /// IoT hub host name. - /// Azure Active Directory credentials to authenticate with IoT hub. See - /// The HTTP transport settings. - /// An instance of . /// - /// For more information on configuring IoT hub with Azure Active Directory, see + /// For more about information on the options of authenticating using a derived instance of , see + /// . + /// For more information on configuring IoT hub with Azure Active Directory, see + /// /// + /// IoT hub host name. + /// Azure Active Directory (AAD) credentials to authenticate with IoT hub. + /// The HTTP transport settings. + /// A RegistryManager instance. public static RegistryManager Create( string hostName, TokenCredential credential, @@ -156,12 +162,17 @@ public static RegistryManager Create( } /// - /// Creates an instance of . + /// Creates RegistryManager using a shared access signature provided and refreshed as necessary by the caller. /// + /// + /// Users may wish to build their own shared access signature (SAS) tokens rather than give the shared key to the SDK and let it manage signing and renewal. + /// The object gives the SDK access to the SAS token, while the caller can update it as necessary using the + /// method. + /// /// IoT hub host name. /// Credential that generates a SAS token to authenticate with IoT hub. See . /// The HTTP transport settings. - /// An instance of . + /// A RegistryManager instance. public static RegistryManager Create( string hostName, AzureSasCredential credential, diff --git a/iothub/service/src/ServiceClient.cs b/iothub/service/src/ServiceClient.cs index 5927f9c33d..d9ebac1c17 100644 --- a/iothub/service/src/ServiceClient.cs +++ b/iothub/service/src/ServiceClient.cs @@ -45,8 +45,10 @@ public enum TransportType /// /// Contains methods that services can use to send messages to devices - /// For more information, see /// + /// + /// For more information, see + /// public class ServiceClient : IDisposable { private const string StatisticsUriFormat = "/statistics/service?" + ClientApiVersionHelper.ApiVersionQueryString; @@ -116,11 +118,11 @@ internal ServiceClient(IotHubConnection connection, IHttpClientHelper httpClient } /// - /// Create an instance of ServiceClient from the specified IoT Hub connection string. + /// Creates ServiceClient from an IoT hub connection string. /// - /// Connection string for the IoT Hub. + /// Connection string for the IoT hub. /// The that allow configuration of the service client instance during initialization. - /// An instance of ServiceClient. + /// A ServiceClient instance. public static ServiceClient CreateFromConnectionString(string connectionString, ServiceClientOptions options = default) { return CreateFromConnectionString(connectionString, TransportType.Amqp, options); @@ -129,17 +131,20 @@ public static ServiceClient CreateFromConnectionString(string connectionString, #if !NET451 /// - /// Creates a using Azure Active Directory credentials and the specified transport type. + /// Creates ServiceClient, authenticating using an identity in Azure Active Directory (AAD). /// + /// + /// For more about information on the options of authenticating using a derived instance of , see + /// . + /// For more information on configuring IoT hub with Azure Active Directory, see + /// + /// /// IoT hub host name. /// Azure Active Directory credentials to authenticate with IoT hub. See /// Specifies whether Amqp or Amqp_WebSocket_Only transport is used. /// Specifies the AMQP_WS and HTTP proxy settings for service client. /// The options that allow configuration of the service client instance during initialization. - /// An instance of . - /// - /// For more information on configuring IoT hub with Azure Active Directory, see - /// + /// A ServiceClient instance. public static ServiceClient Create( string hostName, TokenCredential credential, @@ -168,14 +173,19 @@ public static ServiceClient Create( } /// - /// Creates a using SAS token and the specified transport type. + /// Creates ServiceClient using a shared access signature provided and refreshed as necessary by the caller. /// + /// + /// Users may wish to build their own shared access signature (SAS) tokens rather than give the shared key to the SDK and let it manage signing and renewal. + /// The object gives the SDK access to the SAS token, while the caller can update it as necessary using the + /// method. + /// /// IoT hub host name. /// Credential that generates a SAS token to authenticate with IoT hub. See . /// Specifies whether Amqp or Amqp_WebSocket_Only transport is used. /// Specifies the AMQP_WS and HTTP proxy settings for service client. /// The options that allow configuration of the service client instance during initialization. - /// An instance of . + /// A ServiceClient instance. public static ServiceClient Create( string hostName, AzureSasCredential credential,