Skip to content

Commit

Permalink
Fix inappropriate usages of xml tags (#18117)
Browse files Browse the repository at this point in the history
  • Loading branch information
BethanyZhou authored May 16, 2022
1 parent 316fe08 commit b2d4601
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ protected bool TryGetExistingContextNameParameter(string name, out RuntimeDefin
/// Generate a runtime parameter with ValidateSet matching the current context
/// </summary>
/// <param name="name">The name of the parameter</param>
/// <param name="parameterSetName"></param>
/// <param name="runtimeParameter">The returned runtime parameter for context, with appropriate validate set</param>
/// <returns>True if one or more contexts were found, otherwise false</returns>
protected bool TryGetExistingContextNameParameter(string name, string parameterSetName, out RuntimeDefinedParameter runtimeParameter)
Expand Down
7 changes: 4 additions & 3 deletions src/Accounts/Accounts/CommonModule/AzModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void OnModuleLoad(string resourceId, string moduleName, PipelineChangeDel
/// <param name="exception">The <see cref="System.Exception" /> that is being thrown (if available)</param>
public async Task EventListener(string id, CancellationToken cancellationToken, GetEventData getEventData, SignalDelegate signal, InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, System.Exception exception)
{
/// Drain the queue of ADAL events whenever an event is fired
// Drain the queue of ADAL events whenever an event is fired
DrainDeferredEvents(signal, cancellationToken);
switch (id)
{
Expand Down Expand Up @@ -159,6 +159,7 @@ public async Task EventListener(string id, CancellationToken cancellationToken,
/// <param name="id">a <c>string</c> containing the name of the event being raised (well-known events are in <see cref="Microsoft.Azure.Commands.Common.Events"/></param>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="parameterSetName">The <see cref="string" /> containing the name of the parameter set for this invocation (if available></param>
/// <param name="pscmdlet"></param>
public void Telemetry(string id, InvocationInfo invocationInfo, string parameterSetName, PSCmdlet pscmdlet)
{
switch (id)
Expand Down Expand Up @@ -194,7 +195,7 @@ internal async Task OnResponseCreated(string id, CancellationToken cancellationT
}
}

/// Print formatted response message
// Print formatted response message
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent(GeneralUtilities.GetLog(response)));
}
Expand Down Expand Up @@ -360,7 +361,7 @@ internal async Task OnBeforeCall(string id, CancellationToken cancellationToken,
}
}

/// Print formatted request message
// Print formatted request message
await signal(Events.Debug, cancellationToken,
() => EventHelper.CreateLogEvent(GeneralUtilities.GetLog(request)));
}
Expand Down
9 changes: 6 additions & 3 deletions src/Accounts/Accounts/CommonModule/ContextAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ internal void AddAuthorizeRequestHandler(
/// <param name="completerName">string - the type of completer requested (Resource, Location)</param>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet (if available)</param>
/// <param name="resourceTypes">An <see cref="System.String[]"/> containing resource (or resource types) being completed </param >
/// <param name="parentResourceParameterNames"> An <see cref="System.String[]"/> containing list of parent resource parameter names (if applicable)</param >
/// <returns>A <see cref="System.String[]"/> containing the valid options for the completer.</returns>
/// <param name="resourceTypes">An <see cref="System.String"/>[] containing resource (or resource types) being completed </param >
/// <param name="parentResourceParameterNames"> An <see cref="System.String"/>[] containing list of parent resource parameter names (if applicable)</param >
/// <returns>A <see cref="System.String"/>[] containing the valid options for the completer.</returns>
public string[] CompleteArgument(string completerName, InvocationInfo invocationInfo, string correlationId, string[] resourceTypes, string[] parentResourceParameterNames)
{
var defaultValue = new string[0];
Expand Down Expand Up @@ -247,6 +247,9 @@ internal Func<HttpRequestMessage, CancellationToken, Action, SignalDelegate, Nex
/// <param name="context"></param>
/// <param name="endpointResourceIdKey"></param>
/// <param name="request"></param>
/// <param name="endpointSuffixKey"></param>
/// <param name="extensibleParamters"></param>
/// <param name="tokenAudienceConverter"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
internal async Task<IAccessToken> AuthorizeRequest(IAzureContext context, HttpRequestMessage request, CancellationToken cancellationToken, string endpointResourceIdKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ internal static string RemoveAtStart(this string target, params char[] character
/// </summary>
/// <param name="target"></param>
/// <param name="searchValue"></param>
/// <param name="comparison"></param>
/// <returns></returns>
internal static bool ContainsNotNull(this string target, string searchValue, StringComparison comparison = StringComparison.OrdinalIgnoreCase)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Accounts/Accounts/CommonModule/EventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ namespace Microsoft.Azure.Commands.Common
using GetParameterDelegate = Func<string, System.Management.Automation.InvocationInfo, string, object>;
using SendAsyncStep = Func<HttpRequestMessage, IEventListener, ISendAsync, Task<HttpResponseMessage>>;
using PipelineChangeDelegate = Action<EventData>;

[TypeConverter(typeof(EventDataConverter))]

/// <remarks>
/// In PowerShell, we add on the EventDataConverter to support sending events between modules.
/// Obviously, this code would need to be duplcated on both modules.
/// This is preferable to sharing a common library, as versioning makes that problematic.
/// </remarks>
[TypeConverter(typeof(EventDataConverter))]
public partial class EventData : EventArgs
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/CommonModule/TelemetryProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public virtual void Flush()
/// <param name="invocationInfo"></param>
/// <param name="parameterSetName"></param>
/// <param name="correlationId"></param>
/// <param name="processRecordId"></param>
/// <returns></returns>
public virtual AzurePSQoSEvent CreateQosEvent(InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId)
{
Expand Down
73 changes: 43 additions & 30 deletions src/Accounts/Accounts/CommonModule/VTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ public class VTable
/// <summary>
/// The cmdlet will call this when it is trying to fill in a parameter value that it needs
/// </summary>
/// <param name="resourceId"><c>string</c>containing the expected resource id (ie, ARM).</param>
/// <param name="moduleName"><c>string</c>containing the name of the module being loaded.</param>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet</param>
/// <param name="name">The <see cref="string" /> parameter name being asked for</param>
/// <example>public object GetParameterValue(string resourceId, string moduleName, System.Management.Automation.InvocationInfo invocationInfo, string name)</example>
/// <example>
/// <code>
/// public object GetParameterValue(string resourceId, string moduleName, System.Management.Automation.InvocationInfo invocationInfo, string name)
/// </code>
/// <para>resourceId: <c>string</c>containing the expected resource id (ie, ARM).</para>
/// <para>moduleName: <c>string</c>containing the name of the module being loaded.</para>
/// <para>invocationInfo: The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</para>
/// <para>correlationId: The <see cref="string" /> containing the correlation id for the cmdlet</para>
/// <para>name: The <see cref="string" /> parameter name being asked for</para>
/// </example>
public GetParameterDelegate GetParameterValue;

public GetTelemetryIdDelegate GetTelemetryId;
Expand All @@ -58,34 +62,40 @@ public class VTable
/// <summary>
/// The cmdlet will call this for every event during the pipeline.
/// </summary>
/// <param name="id">a <c>string</c> containing the name of the event being raised (well-known events are in <see cref="Microsoft.Azure.Commands.Common.Events"/></param>
/// <param name="cancellationToken">a <c>CancellationToken</c> indicating if this request is being cancelled.</param>
/// <param name="getEventData">a delegate to call to get the event data for this event</param>
/// <param name="signal">a delegate to signal an event from the handler to the cmdlet.</param>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="parameterSetName">The <see cref="string" /> containing the name of the parameter set for this invocation (if available></param>
/// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet (if available)</param>
/// <param name="processRecordId">The <see cref="string" /> containing the correlation id for the individual process record. (if available)</param>
/// <param name="exception">The <see cref="System.Exception" /> that is being thrown (if available)</param>
/// <example>
/// <para>id: a <c>string</c> containing the name of the event being raised (well-known events are in <see cref="Microsoft.Azure.Commands.Common.Events"/></para>
/// <para>cancellationToken: a <c>CancellationToken</c> indicating if this request is being cancelled.</para>
/// <para>getEventData: a delegate to call to get the event data for this event</para>
/// <para>signal: a delegate to signal an event from the handler to the cmdlet.</para>
/// <para>invocationInfo: The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</para>
/// <para>parameterSetName: The <see cref="string" /> containing the name of the parameter set for this invocation (if available></para>
/// <para>correlationId: The <see cref="string" /> containing the correlation id for the cmdlet (if available)</para>
/// <para>processRecordId: The <see cref="string" /> containing the correlation id for the individual process record. (if available)</para>
/// <para>exception: The <see cref="System.Exception" /> that is being thrown (if available)</para>
/// </example>
public EventListenerDelegate EventListener;

/// <summary>
/// Called when the module is loading. Allows adding HTTP pipeline steps that will always be present.
/// </summary>
/// <param name="resourceId"><c>string</c>containing the expected resource id (ie, ARM).</param>
/// <param name="moduleName"><c>string</c>containing the name of the module being loaded.</param>
/// <param name="prependStep">a delegate which allows the module to prepend a step in the HTTP Pipeline</param>
/// <param name="appendStep">a delegate which allows the module to append a step in the HTTP Pipeline</param>
/// <example>
/// <para>resourceId: <c>string</c>containing the expected resource id (ie, ARM).</para>
/// <para>moduleName: <c>string</c>containing the name of the module being loaded.</para>
/// <para>prependStep: a delegate which allows the module to prepend a step in the HTTP Pipeline</para>
/// <para>appendStep: a delegate which allows the module to append a step in the HTTP Pipeline</para>
///</example>
public ModuleLoadPipelineDelegate OnModuleLoad;

/// <summary>
/// Called when the cmdlet is constructing a new Request
/// </summary>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet (if available)</param>
/// <param name="processRecordId">The <see cref="string" /> containing the correlation id for the individual process record. (if available)</param>
/// <param name="prependStep">a delegate which allows the module to prepend a step in the HTTP Pipeline</param>
/// <param name="appendStep">a delegate which allows the module to append a step in the HTTP Pipeline</param>
/// <example>
/// <para>invocationInfo: The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</para>
/// <para>correlationId: The <see cref="string" /> containing the correlation id for the cmdlet (if available)</para>
/// <para>processRecordId: The <see cref="string" /> containing the correlation id for the individual process record. (if available)</para>
/// <para>prependStep: a delegate which allows the module to prepend a step in the HTTP Pipeline</para>
/// <para>appendStep: a delegate which allows the module to append a step in the HTTP Pipeline</para>
/// </example>
public NewRequestPipelineDelegate OnNewRequest;

public NewRequestPipelineDelegate AddRequestUserAgentHandler;
Expand All @@ -95,13 +105,16 @@ public class VTable
public AuthorizeRequestDelegate AddAuthorizeRequestHandler;

/// <summary>
/// Called for well-known parameters that require argument completers
/// Called for well-known parameters that require argument completers, it
/// </summary>
/// <param name="completerName">string - the type of completer requested (Resource, Location)</param>
/// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
/// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet (if available)</param>
/// <param name="resourceTypes">An <see cref="System.String[]"/> containing resource (or resource types) being completed </param >
/// <param name="parentResourceParameterNames"> An <see cref="System.String[]"/> containing list of parent resource parameter names (if applicable)</param >
/// <example>
/// public string[] ArgumentCompleter(string completerName, System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string[] resourceTypes, string[] parentResourceParameterNames)
/// <para> completerName: string - the type of completer requested (Resource, Location)</para>
/// <para> invocationInfo: The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</para>
/// <para> correlationId: The <see cref="string" /> containing the correlation id for the cmdlet (if available)</para>
/// <para> resourceTypes: An <see cref="System.String"/>[] containing resource (or resource types) being completed</para>
/// <para> parentResourceParameterNames: An <see cref="System.String"/>[] containing list of parent resource parameter names (if applicable)</para>
/// </example>
/// <returns>A <c>string[]</c> containing the valid options for the completer.</returns>
public ArgumentCompleterDelegate ArgumentCompleter;

Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/Models/AzureRmProfileExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public static class AzureRMProfileExtensions
/// </summary>
/// <param name="profile">The profile to change the context for</param>
/// <param name="newContext">The new context, with no token cache information.</param>
/// <param name="name"></param>
public static void SetContextWithCache(this IAzureContextContainer profile, IAzureContext newContext, string name = null)
{
if (profile == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ internal static Task<HttpRequestMessage> CloneWithContentAndDispose(this HttpReq
/// Clones an HttpRequestMessage (without the content)
/// </summary>
/// <param name="original">Original HttpRequestMessage (Will be diposed before returning)</param>
/// <param name="requestUri"></param>
/// <param name="method"></param>
/// <returns>A clone of the HttpRequestMessage</returns>
internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null)
{
Expand Down Expand Up @@ -74,6 +76,8 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste
/// Clones an HttpRequestMessage (including the content stream and content headers)
/// </summary>
/// <param name="original">Original HttpRequestMessage (Will be diposed before returning)</param>
/// <param name="requestUri"></param>
/// <param name="method"></param>
/// <returns>A clone of the HttpRequestMessage</returns>
internal static async Task<HttpRequestMessage> CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null)
{
Expand Down

0 comments on commit b2d4601

Please sign in to comment.