Skip to content

Commit

Permalink
Fix Az.Storage XML comments (#18601)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyuezh576 authored Jun 22, 2022
1 parent da5762a commit 5bd637e
Show file tree
Hide file tree
Showing 51 changed files with 336 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static class AzureContextAdapterExtensions
/// Get the current storage account.
/// </summary>
/// <param name="context">The current Azure context.</param>
/// <param name="provider">The storage service provider to retrieve storage service details</param>
/// <returns>The current storage account, or null, if no current storage account is set.</returns>
public static CloudStorageAccount GetCurrentStorageAccount(this IAzureContext context, IStorageServiceProvider provider)
{
Expand Down Expand Up @@ -91,7 +92,8 @@ public static IStorageContext GetStorageContext(this IStorageService service)
/// Get a CloudStorageAccount client for the given storage service using the given storage service provider
/// </summary>
/// <param name="provider">The storage service provider to retrieve storage service details</param>
/// <param name="accountName">The storage accoutn name</param>
/// <param name="accountName">The storage account name</param>
/// <param name="resourceGroupName">The resource group name</param>
/// <returns>A CloudStorageAccount client for storage data plane tasks</returns>
public static CloudStorageAccount GetCloudStorageAccount(this IStorageServiceProvider provider, string accountName, string resourceGroupName = null)
{
Expand Down
9 changes: 9 additions & 0 deletions src/Storage/Storage/Blob/Cmdlet/GetAzureStorageBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,12 @@ public GetAzureStorageBlobCommand(IStorageBlobManagement channel)
/// <summary>
/// list blobs by blob name and container name
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="containerName">container name</param>
/// <param name="blobName">blob name pattern</param>
/// <param name="includeDeleted"></param>
/// <param name="includeVersion"></param>
/// <returns>An enumerable collection of IListBlobItem</returns>
internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localChannel, string containerName, string blobName, bool includeDeleted = false, bool includeVersion = false)
{
Expand Down Expand Up @@ -276,8 +280,13 @@ internal async Task ListBlobsByName(long taskId, IStorageBlobManagement localCha
/// <summary>
/// list blobs by blob prefix and container name
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="containerName">container name</param>
/// <param name="prefix">blob preifx</param>
/// <param name="blobFilter"></param>
/// <param name="includeDeleted"></param>
/// <param name="includeVersion"></param>
/// <returns>An enumerable collection of IListBlobItem</returns>
internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localChannel, string containerName, string prefix, Func<string, bool> blobFilter = null, bool includeDeleted = false, bool includeVersion = false)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Storage/Storage/Blob/Cmdlet/GetAzureStorageBlobContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public GetAzureStorageBlobContentCommand(IStorageBlobManagement channel)
/// <summary>
/// Download blob to local file
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="blob">Source blob object</param>
/// <param name="filePath">Destination file path</param>
internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, string filePath)
Expand Down Expand Up @@ -178,6 +180,8 @@ await DataMovementTransferHelper.DoTransfer(() =>
/// <summary>
/// Download blob to local file
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="blob">Source blob object</param>
/// <param name="filePath">Destination file path</param>
internal virtual async Task DownloadBlob(long taskId, IStorageBlobManagement localChannel, BlobBaseClient blob, string filePath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ internal IEnumerable<Tuple<AzureStorageContainer, BlobContinuationToken>> ListCo
/// List containers by container name prefix
/// </summary>
/// <param name="prefix">Container name prefix</param>
/// <param name="containerFilter"></param>
/// <returns>An enumerable collection of cloudblobcontainer</returns>
internal IEnumerable<Tuple<AzureStorageContainer, BlobContinuationToken>> ListContainersByPrefix(string prefix, Func<string, bool> containerFilter = null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ public override void ExecuteCmdlet()
/// <param name="blob">CloudBlob object</param>
/// <param name="accessPolicy">SharedAccessBlobPolicy object</param>
/// <param name="policyIdentifier">The existing policy identifier.</param>
/// <param name="protocol"></param>
/// <param name="iPAddressOrRange"></param>
/// <param name="generateUserDelegationSas"></param>
/// <returns></returns>
private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPolicy accessPolicy, string policyIdentifier, SharedAccessProtocol? protocol, IPAddressOrRange iPAddressOrRange, bool generateUserDelegationSas)
{
Expand All @@ -299,7 +302,7 @@ private string GetBlobSharedAccessSignature(CloudBlob blob, SharedAccessBlobPoli
/// <summary>
/// Update the access policy
/// </summary>
/// <param name="policy">Access policy object</param>
/// <param name="accessPolicy">Access policy object</param>
/// <param name="shouldSetExpiryTime">Should set the default expiry time</param>
private void SetupAccessPolicy(SharedAccessBlobPolicy accessPolicy, bool shouldSetExpiryTime)
{
Expand Down
3 changes: 3 additions & 0 deletions src/Storage/Storage/Blob/Cmdlet/NewAzureStorageContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ public NewAzureStorageContainerCommand(IStorageBlobManagement channel)
/// <summary>
/// create a new azure container
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="name">container name</param>
/// <param name="accesslevel">access level in ("off", "blob", "container")</param>
internal async Task CreateAzureContainer(long taskId, IStorageBlobManagement localChannel, string name, BlobContainerPublicAccessType accesslevel)
{
if (!NameUtil.IsValidContainerName(name))
Expand Down
14 changes: 11 additions & 3 deletions src/Storage/Storage/Blob/Cmdlet/RemoveAzureStorageBlob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ public RemoveStorageAzureBlobCommand(IStorageBlobManagement channel)
/// <summary>
/// remove the azure blob
/// </summary>
/// <param name="blob">Cloudblob object</param>
/// <param name="isValidBlob">whether the Cloudblob parameter is validated</param>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="blob">CloudBlob object</param>
/// <param name="isValidBlob">whether the CloudBlob parameter is validated</param>
/// <returns>true if the blob is removed successfully, false if user cancel the remove operation</returns>
internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localChannel, CloudBlob blob, bool isValidBlob)
{
Expand Down Expand Up @@ -212,8 +214,10 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
/// <summary>
/// remove the azure blob with Track2 SDK
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="blob">BlobBaseClient object</param>
/// <param name="isValidBlob">whether the Cloudblob parameter is validated</param>
/// <param name="isValidBlob">whether the CloudBlob parameter is validated</param>
/// <returns>true if the blob is removed successfully, false if user cancel the remove operation</returns>
internal async Task RemoveAzureBlobTrack2(long taskId, IStorageBlobManagement localChannel, BlobBaseClient blob, bool isValidBlob)
{
Expand Down Expand Up @@ -326,6 +330,8 @@ internal async Task DeleteCloudAsyncTrack2(long taskId, IStorageBlobManagement l
/// <summary>
/// remove azure blob
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="container">CloudBlobContainer object</param>
/// <param name="blobName">blob name</param>
/// <returns>true if the blob is removed successfully, false if user cancel the remove operation</returns>
Expand Down Expand Up @@ -387,6 +393,8 @@ internal async Task RemoveAzureBlob(long taskId, IStorageBlobManagement localCha
/// <summary>
/// remove azure blob
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="containerName">container name</param>
/// <param name="blobName">blob name</param>
/// <returns>true if the blob is removed successfully, false if user cancel the remove operation</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public RemoveAzureStorageContainerCommand(IStorageBlobManagement channel)
/// <summary>
/// remove azure container by container name
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="name">container name</param>
internal async Task RemoveAzureContainer(long taskId, IStorageBlobManagement localChannel, string name)
{
Expand Down
7 changes: 4 additions & 3 deletions src/Storage/Storage/Blob/Cmdlet/SetAzureStorageBlobContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ public SetAzureBlobContentCommand(IStorageBlobManagement channel)
/// upload file to azure blob
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="filePath">local file path</param>
/// <param name="blob">destination azure blob object</param>
internal virtual async Task Upload2Blob(long taskId, IStorageBlobManagement localChannel, string filePath, StorageBlob.CloudBlob blob)
Expand Down Expand Up @@ -330,7 +331,6 @@ internal string GetFullSendFilePath(string fileName)
/// set azure blob content
/// </summary>
/// <param name="fileName">local file path</param>
/// <param name="containerName">container name</param>
/// <param name="blobName">blob name</param>
/// <returns>null if user cancel the overwrite operation, otherwise return destination blob object</returns>
internal void SetAzureBlobContent(string fileName, string blobName)
Expand Down Expand Up @@ -406,9 +406,10 @@ protected override void DoEndProcessing()
/// <summary>
/// set blob AccessTier
/// </summary>
/// <param name="azureBlob">CloudBlob object</param>
/// <param name="blockBlobTier">Block Blob Tier</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="blob">CloudBlob object</param>
/// <param name="pageBlobTier">Page Blob Tier</param>
/// <param name="standardBlobTier">Access condition to source if it's file/blob in azure.</param>
private async Task SetBlobTier(IStorageBlobManagement localChannel, StorageBlob.CloudBlob blob, PremiumPageBlobTier? pageBlobTier = null, StandardBlobTier? standardBlobTier = null)
{
if (pageBlobTier == null && standardBlobTier == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public SetAzureStorageContainerAclCommand(IStorageBlobManagement channel)
/// <summary>
/// set the access level of specified container
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="localChannel">IStorageBlobManagement channel object</param>
/// <param name="name">container name</param>
/// <param name="accessLevel">access level in ("off", "blob", "container")</param>
internal async Task SetContainerAcl(long taskId, IStorageBlobManagement localChannel, string name, BlobContainerPublicAccessType accessLevel)
Expand Down
21 changes: 15 additions & 6 deletions src/Storage/Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ public override void ExecuteCmdlet()
/// <summary>
/// Start copy operation by source and destination CloudBlob object
/// </summary>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="srcCloudBlob">Source CloudBlob object</param>
/// <param name="destCloudBlob">Destination CloudBlob object</param>
/// <returns>Destination CloudBlob object</returns>
Expand Down Expand Up @@ -513,6 +514,7 @@ private void StartCopyBlob(IStorageBlobManagement destChannel, BlobBaseClient sr
/// <summary>
/// Start copy operation by source CloudBlob object
/// </summary>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="srcCloudBlob">Source CloudBlob object</param>
/// <param name="destContainer">Destinaion container name</param>
/// <param name="destBlobName">Destination blob name</param>
Expand Down Expand Up @@ -544,9 +546,11 @@ private void StartCopyBlob(IStorageBlobManagement destChannel, BlobBaseClient sr
/// <summary>
/// Start copy operation by source uri
/// </summary>
/// <param name="srcCloudBlob">Source uri</param>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="srcUri">Source uri</param>
/// <param name="destContainer">Destinaion container name</param>
/// <param name="destBlobName">Destination blob name</param>
/// <param name="context">a cloud blob object</param>
/// <returns>Destination CloudBlob object</returns>
private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, string destContainer, string destBlobName, AzureStorageContext context)
{
Expand Down Expand Up @@ -592,9 +596,11 @@ private void StartCopyBlob(IStorageBlobManagement destChannel, string srcUri, st
/// <summary>
/// Start copy operation by container name and blob name
/// </summary>
/// <param name="SrcChannel"></param>
/// <param name="destChannel"></param>
/// <param name="srcContainerName">Source container name</param>
/// <param name="srcBlobName">Source blob name</param>
/// <param name="destContainer">Destinaion container name</param>
/// <param name="destContainerName">Destinaion container name</param>
/// <param name="destBlobName">Destination blob name</param>
/// <returns>Destination CloudBlob object</returns>
private void StartCopyBlob(IStorageBlobManagement SrcChannel, IStorageBlobManagement destChannel, string srcContainerName, string srcBlobName, string destContainerName, string destBlobName)
Expand Down Expand Up @@ -878,9 +884,10 @@ private BlobBaseClient GetDestBlob(IStorageBlobManagement destChannel, string de
/// <summary>
/// Start copy using transfer mangager by source CloudBlob object
/// </summary>
/// <param name="blob">Source CloudBlob object</param>
/// <param name="destContainer">Destination CloudBlobContainer object</param>
/// <param name="destBlobName">Destination blob name</param>
/// <param name="taskId">Task id</param>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="sourceBlob">Source CloudBlob object</param>
/// <param name="destBlob">Destination CloudBlob object</param>
/// <returns>Destination CloudBlob object</returns>
private async Task StartCopyAsync(long taskId, IStorageBlobManagement destChannel, CloudBlob sourceBlob, CloudBlob destBlob)
{
Expand All @@ -903,6 +910,8 @@ private async Task StartCopyAsync(long taskId, IStorageBlobManagement destChanne
/// <summary>
/// Start copy using transfer mangager by source uri
/// </summary>
/// <param name="taskId">Task id</param>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="uri">source uri</param>
/// <param name="destContainer">Destination CloudBlobContainer object</param>
/// <param name="destBlobName">Destination blob name</param>
Expand Down Expand Up @@ -935,9 +944,9 @@ private async Task StartCopyAsync(long taskId, IStorageBlobManagement destChanne
/// <summary>
/// Get DestinationBlob with specified copy id
/// </summary>
/// <param name="destChannel">IStorageBlobManagement channel object</param>
/// <param name="container">CloudBlobContainer object</param>
/// <param name="blobName">Blob name</param>
/// <param name="copyId">Current CopyId</param>
/// <returns>Destination CloudBlob object</returns>
private CloudBlob GetDestinationBlobWithCopyId(IStorageBlobManagement destChannel, CloudBlobContainer container, string blobName)
{
Expand Down
Loading

0 comments on commit 5bd637e

Please sign in to comment.