From ab6a762e4f913565612f3d98be6f3e18d7e9c4f3 Mon Sep 17 00:00:00 2001 From: v-yuzhichen <96757176+v-yuzhichen@users.noreply.github.com> Date: Wed, 22 Jun 2022 14:22:26 +0800 Subject: [PATCH] Fix Az.Resources XML Comments (#18486) * Fix Az.Resources XML Comments * Fix Az.Resources XML COmments * Fix Az.Resources XML Comments Co-authored-by: Ziyue Zheng --- .../ResourceManager/Components/ApiVersionHelper.cs | 3 +++ .../ResourceManager/Components/HttpClientHelper.cs | 1 + .../Components/HttpClientHelperFactory.cs | 2 ++ .../ResourceManager/Components/QueryFilterBuilder.cs | 2 ++ .../ResourceManager/Components/ResourceIdUtility.cs | 5 ++--- .../Components/ResourceManagerClientHelper.cs | 1 + .../Components/TemplateSpecPackagingEngine.cs | 2 ++ .../ErrorResponseMessageExceptionExtensions.cs | 1 - .../ResourceManager/Extensions/PsObjectExtensions.cs | 6 +++--- .../ResourceManager/Handlers/CmdletInfoHandler.cs | 2 +- .../UnregisterAzureProviderPreviewFeatureCmdlet.cs | 2 +- .../ManagedApplicationCmdletBase.cs | 1 + .../Implementation/Policy/PolicyCmdletBase.cs | 2 -- .../SdkClient/ResourceManagerSdkClient.cs | 2 +- .../SdkClient/TemplateSpecsSdkClient.cs | 2 +- .../Models.Authorization/AuthorizationClient.cs | 11 ++++++++++- 16 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/Resources/ResourceManager/Components/ApiVersionHelper.cs b/src/Resources/ResourceManager/Components/ApiVersionHelper.cs index 4e76b2b4f20c..894c52279f5d 100644 --- a/src/Resources/ResourceManager/Components/ApiVersionHelper.cs +++ b/src/Resources/ResourceManager/Components/ApiVersionHelper.cs @@ -46,6 +46,7 @@ internal static class ApiVersionHelper /// The resource Id. /// The cancellation token /// When specified, indicates if pre-release API versions should be considered. + /// The cmdlet info header values. internal static Task DetermineApiVersion(IAzureContext context, string resourceId, CancellationToken cancellationToken, bool? pre = null, Dictionary cmdletHeaderValues = null) { var providerNamespace = ResourceIdUtility.GetExtensionProviderNamespace(resourceId) @@ -65,6 +66,7 @@ internal static Task DetermineApiVersion(IAzureContext context, string r /// The resource type. /// The cancellation token /// When specified, indicates if pre-release API versions should be considered. + /// The cmdlet info header values. internal static Task DetermineApiVersion(IAzureContext context, string providerNamespace, string resourceType, CancellationToken cancellationToken, bool? pre = null, Dictionary cmdletHeaderValues = null) { var cacheKey = ApiVersionCache.GetCacheKey(context.Environment.Name, providerNamespace: providerNamespace, resourceType: resourceType); @@ -106,6 +108,7 @@ internal static Task DetermineApiVersion(IAzureContext context, string p /// The provider namespace. /// The resource type. /// The cancellation token. + /// The cmdlet info header values. private static string[] GetApiVersionsForResourceType(IAzureContext context, string providerNamespace, string resourceType, CancellationToken cancellationToken, Dictionary cmdletHeaderValues = null) { var resourceManagerClient = ResourceManagerClientHelper.GetResourceManagerClient(context, cmdletHeaderValues); diff --git a/src/Resources/ResourceManager/Components/HttpClientHelper.cs b/src/Resources/ResourceManager/Components/HttpClientHelper.cs index 8355c2833a8b..8dbf1644a2cb 100644 --- a/src/Resources/ResourceManager/Components/HttpClientHelper.cs +++ b/src/Resources/ResourceManager/Components/HttpClientHelper.cs @@ -47,6 +47,7 @@ public abstract class HttpClientHelper /// /// The service client credentials. /// The header values. + /// The cmdlet info header values. protected HttpClientHelper(ServiceClientCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) { this.credentials = credentials; diff --git a/src/Resources/ResourceManager/Components/HttpClientHelperFactory.cs b/src/Resources/ResourceManager/Components/HttpClientHelperFactory.cs index 1a018e571395..b4d96d8a1952 100644 --- a/src/Resources/ResourceManager/Components/HttpClientHelperFactory.cs +++ b/src/Resources/ResourceManager/Components/HttpClientHelperFactory.cs @@ -48,6 +48,7 @@ protected HttpClientHelperFactory() /// /// The credentials. /// The headers. + /// The cmdlet info header. public virtual HttpClientHelper CreateHttpClientHelper(ServiceClientCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) { return new HttpClientHelperImpl(credentials: credentials, headerValues: headerValues, cmdletHeaderValues: cmdletHeaderValues); @@ -63,6 +64,7 @@ private class HttpClientHelperImpl : HttpClientHelper /// /// The credentials. /// The headers. + /// The cmdlet info header. public HttpClientHelperImpl(ServiceClientCredentials credentials, IEnumerable headerValues, Dictionary cmdletHeaderValues) : base(credentials: credentials, headerValues: headerValues, cmdletHeaderValues: cmdletHeaderValues) { diff --git a/src/Resources/ResourceManager/Components/QueryFilterBuilder.cs b/src/Resources/ResourceManager/Components/QueryFilterBuilder.cs index d366063c0626..043957700fbb 100644 --- a/src/Resources/ResourceManager/Components/QueryFilterBuilder.cs +++ b/src/Resources/ResourceManager/Components/QueryFilterBuilder.cs @@ -34,6 +34,8 @@ public static class QueryFilterBuilder /// The tag name. /// The tag value. /// The filter. + /// + /// public static string CreateFilter( string subscriptionId, string resourceGroup, diff --git a/src/Resources/ResourceManager/Components/ResourceIdUtility.cs b/src/Resources/ResourceManager/Components/ResourceIdUtility.cs index c54653ad06bf..7d7e7ccf60b0 100644 --- a/src/Resources/ResourceManager/Components/ResourceIdUtility.cs +++ b/src/Resources/ResourceManager/Components/ResourceIdUtility.cs @@ -42,7 +42,6 @@ public static class ResourceIdUtility /// Processes the parameters to return a valid resource Id. /// /// The resource Id. - /// The resource group /// The extension resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}' /// The extension resource name in the format: '{resourceName}[/{nestedResourceName}]' public static string GetResourceId(string resourceId, string extensionResourceType, string extensionResourceName = null) @@ -357,7 +356,7 @@ public static (string scope, string relativeResourceId) SplitResourceId(string f } /// - /// Gets either a resource type or resource Id based on the value of the parameter. + /// Gets either a resource type or resource Id based on the value of the parameter. /// /// The resource Id. /// When set to true returns a resource name, otherwise a resource type. @@ -381,7 +380,7 @@ private static bool IsExtensionResourceId(string resourceId) } /// - /// Gets either a resource type or resource Id based on the value of the parameter. + /// Gets either a resource type or resource Id based on the value of the parameter. /// /// The resource Id. /// When set to true returns a resource name, otherwise a resource type. diff --git a/src/Resources/ResourceManager/Components/ResourceManagerClientHelper.cs b/src/Resources/ResourceManager/Components/ResourceManagerClientHelper.cs index f9396920ec22..2583c58145a3 100644 --- a/src/Resources/ResourceManager/Components/ResourceManagerClientHelper.cs +++ b/src/Resources/ResourceManager/Components/ResourceManagerClientHelper.cs @@ -31,6 +31,7 @@ internal static class ResourceManagerClientHelper /// Gets a new instance of the . /// /// The azure profile. + /// The cmdlet info header values. internal static ResourceManagerRestRestClient GetResourceManagerClient(IAzureContext context, Dictionary cmdletHeaderValues = null) { var endpoint = context.Environment.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager); diff --git a/src/Resources/ResourceManager/Components/TemplateSpecPackagingEngine.cs b/src/Resources/ResourceManager/Components/TemplateSpecPackagingEngine.cs index 28a96b87e7cd..679b05786ab7 100644 --- a/src/Resources/ResourceManager/Components/TemplateSpecPackagingEngine.cs +++ b/src/Resources/ResourceManager/Components/TemplateSpecPackagingEngine.cs @@ -300,6 +300,7 @@ public static void Unpack( /// Gets all of the deployment resource JObjects within the specified template /// JObject. /// + /// /// If true, deployment resource objects from nested /// templates will be included in the results /// @@ -336,6 +337,7 @@ private static JObject[] GetDeploymentResourceObjects(JObject templateObj, bool /// Gets all of the TemplateLink JObjects within the specified template object that /// are representing references to Template Spec artifacts. /// + /// /// If true, template links from nested templates /// will be included in the results /// diff --git a/src/Resources/ResourceManager/Extensions/ErrorResponseMessageExceptionExtensions.cs b/src/Resources/ResourceManager/Extensions/ErrorResponseMessageExceptionExtensions.cs index e66230406195..90a3ce0edd82 100644 --- a/src/Resources/ResourceManager/Extensions/ErrorResponseMessageExceptionExtensions.cs +++ b/src/Resources/ResourceManager/Extensions/ErrorResponseMessageExceptionExtensions.cs @@ -46,7 +46,6 @@ internal static ErrorRecord ToErrorRecord(this Exception exception) /// /// Converts objects into /// - /// The exception internal static ErrorRecord ToErrorRecord(this AggregateException aggregateException) { // TODO: Improve this. diff --git a/src/Resources/ResourceManager/Extensions/PsObjectExtensions.cs b/src/Resources/ResourceManager/Extensions/PsObjectExtensions.cs index 3acb825090b1..abcf785e79e3 100644 --- a/src/Resources/ResourceManager/Extensions/PsObjectExtensions.cs +++ b/src/Resources/ResourceManager/Extensions/PsObjectExtensions.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Extensions using System.Management.Automation; /// - /// A helper class that handles common tasks that deal with the class. + /// A helper class that handles common tasks that deal with the class. /// public static class PsObjectExtensions { @@ -46,9 +46,9 @@ public static class PsObjectExtensions }; /// - /// Converts a to + /// Converts a to /// - /// The + /// The ResourcePropertyObject. internal static JToken ToResourcePropertiesBody(this PSObject propertyObject) { return PsObjectExtensions.ToJToken(propertyObject); diff --git a/src/Resources/ResourceManager/Handlers/CmdletInfoHandler.cs b/src/Resources/ResourceManager/Handlers/CmdletInfoHandler.cs index 96f44e4dc36c..aaad766b1976 100644 --- a/src/Resources/ResourceManager/Handlers/CmdletInfoHandler.cs +++ b/src/Resources/ResourceManager/Handlers/CmdletInfoHandler.cs @@ -32,7 +32,7 @@ public class CmdletInfoHandler : DelegatingHandler /// /// Initializes a new instance of the class. /// - /// The product info to add as headers. + /// The product info to add as headers. public CmdletInfoHandler(Dictionary cmdletHeaderValues) { this.cmdletHeaderValues = cmdletHeaderValues; diff --git a/src/Resources/ResourceManager/Implementation/Features/UnregisterAzureProviderPreviewFeatureCmdlet.cs b/src/Resources/ResourceManager/Implementation/Features/UnregisterAzureProviderPreviewFeatureCmdlet.cs index 004e2067d2cc..d2201b982588 100644 --- a/src/Resources/ResourceManager/Implementation/Features/UnregisterAzureProviderPreviewFeatureCmdlet.cs +++ b/src/Resources/ResourceManager/Implementation/Features/UnregisterAzureProviderPreviewFeatureCmdlet.cs @@ -38,10 +38,10 @@ public class UnregisterAzureProviderPreviewFeatureCmdlet : ProviderFeatureCmdlet [ValidateNotNullOrEmpty] public string ProviderNamespace { get; set; } - [Parameter(Mandatory = false)] /// /// Gets or sets the pass thru. /// + [Parameter(Mandatory = false)] public SwitchParameter PassThru { get; set; } /// diff --git a/src/Resources/ResourceManager/Implementation/ManagedApplications/ManagedApplicationCmdletBase.cs b/src/Resources/ResourceManager/Implementation/ManagedApplications/ManagedApplicationCmdletBase.cs index 43111763984a..59bf0b95ca73 100644 --- a/src/Resources/ResourceManager/Implementation/ManagedApplications/ManagedApplicationCmdletBase.cs +++ b/src/Resources/ResourceManager/Implementation/ManagedApplications/ManagedApplicationCmdletBase.cs @@ -49,6 +49,7 @@ protected Task> GetNextLink(string next /// /// Converts the resource object to specified resource type object. /// + /// The resource type. /// The policy definition resource object. protected PSObject[] GetOutputObjects(string resourceType, params JToken[] resources) { diff --git a/src/Resources/ResourceManager/Implementation/Policy/PolicyCmdletBase.cs b/src/Resources/ResourceManager/Implementation/Policy/PolicyCmdletBase.cs index 9ee4c2349589..91abeb6accc6 100644 --- a/src/Resources/ResourceManager/Implementation/Policy/PolicyCmdletBase.cs +++ b/src/Resources/ResourceManager/Implementation/Policy/PolicyCmdletBase.cs @@ -70,7 +70,6 @@ public enum ListFilter /// /// Converts the resource object collection to a PsPolicyAssignment collection. /// - /// The resource type of the objects to create /// The policy definition resource object. protected PsPolicyAssignment[] GetOutputPolicyAssignments(params JToken[] resources) { @@ -107,7 +106,6 @@ protected PsPolicySetDefinition[] GetOutputPolicySetDefinitions(params JToken[] /// /// Converts the resource object collection to a PsPolicyExemption collection. /// - /// The resource type of the objects to create /// The policy definition resource object. protected PsPolicyExemption[] GetOutputPolicyExemptions(params JToken[] resources) { diff --git a/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs b/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs index 909c030b4cdb..b690b6379c69 100644 --- a/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs +++ b/src/Resources/ResourceManager/SdkClient/ResourceManagerSdkClient.cs @@ -1371,6 +1371,7 @@ public virtual PSWhatIfOperationResult ExecuteDeploymentWhatIf(PSDeploymentWhatI /// Executes deployment What-If at the specified scope. /// /// + /// /// public virtual PSWhatIfOperationResult ExecuteDeploymentWhatIf(PSDeploymentWhatIfCmdletParameters parameters, string[] excludeChangeTypeNames) { @@ -1673,7 +1674,6 @@ private void CancelDeploymentAtResourceGroup(List deployments, str /// Validates a given deployment. /// /// The deployment create options - /// The deployment mode /// The validation errors if there's any, or empty list otherwise. public virtual List ValidateDeployment(PSDeploymentCmdletParameters parameters) { diff --git a/src/Resources/ResourceManager/SdkClient/TemplateSpecsSdkClient.cs b/src/Resources/ResourceManager/SdkClient/TemplateSpecsSdkClient.cs index b55d3a973469..f4834098ccfa 100644 --- a/src/Resources/ResourceManager/SdkClient/TemplateSpecsSdkClient.cs +++ b/src/Resources/ResourceManager/SdkClient/TemplateSpecsSdkClient.cs @@ -313,7 +313,7 @@ public void DeleteTemplateSpec( /// /// Method name is protected and has an 'Internal' suffix because the return type is /// the SDK model rather than the model wrapped for PS. See - /// + /// /// for the method that returns the wrapped model. /// protected TemplateSpec CreateOrUpdateTemplateSpecInternal( diff --git a/src/Resources/Resources/Models.Authorization/AuthorizationClient.cs b/src/Resources/Resources/Models.Authorization/AuthorizationClient.cs index 0cb12787d690..781fe413196f 100644 --- a/src/Resources/Resources/Models.Authorization/AuthorizationClient.cs +++ b/src/Resources/Resources/Models.Authorization/AuthorizationClient.cs @@ -61,6 +61,7 @@ public PSRoleDefinition GetRoleDefinition(string roleId) /// Gets a single role definition by the role Id guid. /// /// RoleId guid + /// The scope of the role definition public PSRoleDefinition GetRoleDefinition(Guid roleId, string scope) { return AuthorizationManagementClient.RoleDefinitions.Get(scope, roleId.ToString()).ToPSRoleDefinition(); @@ -72,6 +73,9 @@ public PSRoleDefinition GetRoleDefinition(Guid roleId, string scope) /// Otherwise will fetch Roledefinitions with provided name /// /// The role name + /// The scope of the role definition + /// + /// /// The matched role Definitions public IEnumerable FilterRoleDefinitions(string name, string scope, ulong first = ulong.MaxValue, ulong skip = 0) { @@ -125,6 +129,7 @@ public IEnumerable FilterRoleDefinitionsByCustom(string scope, /// Creates new role assignment. /// /// The create parameters + /// The name of the role assignment. It can be any valid GUID. /// The created role assignment object public PSRoleAssignment CreateRoleAssignment(FilterRoleAssignmentsOptions parameters, Guid roleAssignmentId = default(Guid)) { @@ -173,6 +178,8 @@ public IEnumerable FilterRoleDefinitionsByCustom(string scope, /// /// The filtering options /// The current subscription + /// + /// /// The filtered role assignments public List FilterRoleAssignments(FilterRoleAssignmentsOptions options, string currentSubscription, ulong first = ulong.MaxValue, ulong skip = 0) { @@ -382,7 +389,7 @@ public PSRoleDefinition GetSingleRoleDefinitionByName(string name, string scope) /// Deletes a role definition based on the id. /// /// The role definition id to delete - /// Current subscription id + /// The scope of the role definition /// The deleted role definition. public PSRoleDefinition RemoveRoleDefinition(Guid roleDefinitionId, string scope) { @@ -401,6 +408,7 @@ public PSRoleDefinition RemoveRoleDefinition(Guid roleDefinitionId, string scope /// Deletes a role definition based on the name. /// /// The role definition name. + /// The scope of the role definition /// The deleted role definition. public PSRoleDefinition RemoveRoleDefinition(string roleDefinitionName, string scope) { @@ -467,6 +475,7 @@ public PSRoleDefinition UpdateRoleDefinition(PSRoleDefinition roleDefinition) /// Creates a new role definition. /// /// The role definition to create. + /// The role definition id to create. /// The created role definition. public PSRoleDefinition CreateRoleDefinition(PSRoleDefinition roleDefinition, Guid roleDefinitionId = default(Guid)) {