diff --git a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj index 7cbe9a7a1c91..c8b9d374ce85 100644 --- a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj +++ b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj @@ -17,6 +17,9 @@ Azure.Storage + + + diff --git a/sdk/storage/Directory.Build.props b/sdk/storage/Directory.Build.props index 1302735d79ba..51044c32532d 100644 --- a/sdk/storage/Directory.Build.props +++ b/sdk/storage/Directory.Build.props @@ -54,8 +54,6 @@ DEBUG;$(DefineConstants) - - diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs index 783db9d9ceb1..174eaad833b5 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/AzureStorageBlobsWebJobsStartup.cs @@ -9,12 +9,10 @@ namespace Microsoft.Azure.WebJobs.Extensions.Storage { - /// - /// TODO. - /// + /// public class AzureStorageBlobsWebJobsStartup : IWebJobsStartup { - /// + /// public void Configure(IWebJobsBuilder builder) { builder.AddAzureStorageBlobs(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs index 07e3b607d9c5..8a6668a38bac 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobAttribute.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; +using Azure.Storage.Blobs.Specialized; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -19,11 +20,11 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob - /// (read-only) - /// CloudBlobStream (write-only) + /// + /// + /// + /// + /// /// /// /// @@ -39,12 +40,13 @@ namespace Microsoft.Azure.WebJobs /// The parameter type can be CloudBlobContainer, CloudBlobDirectory or /// of one of the following element types: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob - /// Stream - /// string - /// TextReader + /// + /// + /// + /// + /// + /// + /// /// /// [SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "There is an accessor for FileAccess")] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs index 11e452ca0d9f..2a0214e6eae9 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobNameValidationAttribute.cs @@ -78,11 +78,6 @@ protected override ValidationResult IsValid(object value, ValidationContext vali return null; } - /// - /// TODO. - /// - /// - /// internal static bool IsValidContainerName(string containerName) { if (containerName == null) @@ -98,13 +93,6 @@ internal static bool IsValidContainerName(string containerName) return Regex.IsMatch(containerName, @"^[a-z0-9](([a-z0-9\-[^\-])){1,61}[a-z0-9]$"); } - // See http://msdn.microsoft.com/en-us/library/windowsazure/dd135715.aspx. - /// - /// TODO. - /// - /// - /// - /// internal static bool IsValidBlobName(string blobName, out string errorMessage) { const string UnsafeCharactersMessage = diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs index b5fa09f37054..1d7a77500590 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/BlobTriggerAttribute.cs @@ -4,6 +4,7 @@ using System; using System.Diagnostics; using System.IO; +using Azure.Storage.Blobs.Specialized; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -17,17 +18,18 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// ICloudBlob - /// CloudBlockBlob - /// CloudPageBlob + /// + /// + /// + /// /// /// /// /// /// /// - [AttributeUsage(AttributeTargets.Parameter)] #pragma warning restore CA1200 // Avoid using cref tags with a prefix + [AttributeUsage(AttributeTargets.Parameter)] [DebuggerDisplay("{BlobPath,nq}")] [ConnectionProvider(typeof(StorageAccountAttribute))] [Binding] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs index 0591197cf022..b2509d471afe 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/StorageBlobsWebJobsBuilderExtensions.cs @@ -21,16 +21,15 @@ namespace Microsoft.Extensions.Hosting { /// - /// TODO. + /// Extension methods for Storage Blobs integration. /// public static class StorageBlobsWebJobsBuilderExtensions { /// - /// TODO. + /// Adds the Storage Blobs extension to the provided . /// - /// - /// - /// + /// The to configure. + /// Optional. An action to configure . public static IWebJobsBuilder AddAzureStorageBlobs(this IWebJobsBuilder builder, Action configureBlobs = null) { builder.Services.AddAzureClientsCore(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs index 26b782d627fe..b224d59c80f0 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueListener.cs @@ -115,8 +115,6 @@ public QueueListener(QueueClient queue, _sharedWatcher = sharedWatcher; } - // TODO (kasobol-msft) remove this - //_queueProcessor = CreateQueueProcessor(_queue, _poisonQueue, loggerFactory, queueProcessorFactory, _queueOptions, _sharedWatcher); _queueProcessor = queueProcessor; TimeSpan maximumInterval = _queueProcessor.QueuesOptions.MaxPollingInterval; diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs index 14fd198a7b74..56321752b714 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessor.cs @@ -54,9 +54,6 @@ internal protected QueueProcessor(QueueProcessorOptions queueProcessorOptions) /// public event EventHandler MessageAddedToPoisonQueue; - /// - /// TODO. - /// internal QueuesOptions QueuesOptions { get; private set; } /// @@ -86,7 +83,7 @@ internal protected virtual async Task BeginProcessingMessageAsync(QueueMes /// /// The message to complete processing for. /// The from the job invocation. - /// The to use + /// The to use. /// internal protected virtual async Task CompleteProcessingMessageAsync(QueueMessage message, FunctionResult result, CancellationToken cancellationToken) { @@ -125,9 +122,9 @@ private async Task HandlePoisonMessageAsync(QueueMessage message, CancellationTo /// /// Moves the specified message to the poison queue. /// - /// The poison message - /// The poison queue to copy the message to - /// The to use + /// The poison message. + /// The poison queue to copy the message to. + /// The to use. /// protected virtual async Task CopyMessageToPoisonQueueAsync(QueueMessage message, QueueClient poisonQueue, CancellationToken cancellationToken) { @@ -145,8 +142,8 @@ protected virtual async Task CopyMessageToPoisonQueueAsync(QueueMessage message, /// /// The message to release /// The from the job invocation. - /// The visibility timeout to set for the message - /// The to use + /// The visibility timeout to set for the message. + /// The to use. /// protected virtual async Task ReleaseMessageAsync(QueueMessage message, FunctionResult result, TimeSpan visibilityTimeout, CancellationToken cancellationToken) { @@ -179,7 +176,7 @@ protected virtual async Task ReleaseMessageAsync(QueueMessage message, FunctionR /// Delete the specified message. /// /// The message to delete. - /// The to use + /// The to use. /// protected virtual async Task DeleteMessageAsync(QueueMessage message, CancellationToken cancellationToken) { @@ -217,9 +214,9 @@ protected virtual async Task DeleteMessageAsync(QueueMessage message, Cancellati } /// - /// Called to raise the MessageAddedToPoisonQueue event + /// Called to raise the MessageAddedToPoisonQueue event. /// - /// The event arguments + /// The event arguments. protected internal virtual void OnMessageAddedToPoisonQueue(PoisonMessageEventArgs e) { MessageAddedToPoisonQueue?.Invoke(this, e); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs index 29ab0f753f3a..e145b7a95fe2 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueProcessorOptions.cs @@ -20,7 +20,7 @@ internal partial class QueueProcessorOptions /// /// Constructs a new instance. /// - /// TODO. + /// The queue the will operate on. /// The to create an from. /// The queue configuration. /// The queue to move messages to when unable to process a message after the maximum dequeue count has been exceeded. May be null. @@ -33,13 +33,12 @@ internal QueueProcessorOptions(QueueClient queue, ILoggerFactory loggerFactory, } /// - /// TODO. + /// Gets the queue the will operate on. /// public QueueClient Queue { get; private set; } /// - /// TODO. - /// May be null. + /// Gets the queue to move messages to when unable to process a message after the maximum dequeue count has been exceeded. May be null. /// public QueueClient PoisonQueue { get; private set; } @@ -49,7 +48,7 @@ internal QueueProcessorOptions(QueueClient queue, ILoggerFactory loggerFactory, public ILogger Logger { get; private set; } /// - /// TODO. + /// Gets the queue configuration. /// public QueuesOptions Options { get; private set; } } diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs index 5f5b9de63735..d3465d9246ff 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueuesOptions.cs @@ -11,10 +11,10 @@ namespace Microsoft.Azure.WebJobs.Host { +#if STORAGE_WEBJOBS_PUBLIC_QUEUE_PROCESSOR /// - /// TODO. + /// Represents configuration for . /// -#if STORAGE_WEBJOBS_PUBLIC_QUEUE_PROCESSOR public class QueuesOptions : IOptionsFormatter #else internal class QueuesOptions : IOptionsFormatter diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs index da89e37af365..42c4fd3c7257 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/StorageClientProvider.cs @@ -24,12 +24,6 @@ internal abstract class StorageClientProvider where TCl private readonly AzureComponentFactory _componentFactory; private readonly AzureEventSourceLogForwarder _logForwarder; - /// - /// TODO. - /// - /// - /// - /// public StorageClientProvider(IConfiguration configuration, AzureComponentFactory componentFactory, AzureEventSourceLogForwarder logForwarder) { _configuration = configuration; @@ -37,23 +31,12 @@ public StorageClientProvider(IConfiguration configuration, AzureComponentFactory _logForwarder = logForwarder; } - /// - /// TODO. - /// - /// - /// - /// public virtual TClient Get(string name, INameResolver resolver) { var resolvedName = resolver.ResolveWholeString(name); return this.Get(resolvedName); } - /// - /// TODO. - /// - /// - /// public virtual TClient Get(string name) { if (string.IsNullOrWhiteSpace(name)) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs index b48174825317..56f618738559 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/AzureStorageQueuesWebJobsStartup.cs @@ -9,9 +9,7 @@ namespace Microsoft.Azure.WebJobs.Extensions.Storage { - /// - /// TODO. - /// + /// public class AzureStorageQueuesWebJobsStartup : IWebJobsStartup { /// diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs index 18ce0669dccb..73d6e45f7a59 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueAttribute.cs @@ -3,6 +3,8 @@ using System; using System.Diagnostics; +using Azure.Storage.Queues; +using Azure.Storage.Queues.Models; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -15,8 +17,8 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// CloudQueue - /// CloudQueueMessage (out parameter) + /// + /// (out parameter) /// (out parameter) /// (out parameter) /// A user-defined type (out parameter, serialized as JSON) @@ -24,8 +26,8 @@ namespace Microsoft.Azure.WebJobs /// of these types (to enqueue multiple messages via /// /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] #pragma warning restore CA1200 // Avoid using cref tags with a prefix + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes")] [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.ReturnValue)] [DebuggerDisplay("{QueueName,nq}")] [ConnectionProvider(typeof(StorageAccountAttribute))] diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs index 52cca040f5ca..b4357aec1d64 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/QueueTriggerAttribute.cs @@ -3,6 +3,7 @@ using System; using System.Diagnostics; +using Azure.Storage.Queues.Models; using Microsoft.Azure.WebJobs.Description; namespace Microsoft.Azure.WebJobs @@ -16,7 +17,7 @@ namespace Microsoft.Azure.WebJobs /// /// The method parameter type can be one of the following: /// - /// CloudQueueMessage + /// /// /// /// A user-defined type (serialized as JSON) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs index b8c58b8b992f..995f78427552 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/StorageQueuesWebJobsBuilderExtensions.cs @@ -2,14 +2,11 @@ // Licensed under the MIT License. using System; -using Azure.Core; using Azure.WebJobs.Extensions.Storage.Queues; using Microsoft.Azure.WebJobs; -using Microsoft.Azure.WebJobs.Extensions.Storage; using Microsoft.Azure.WebJobs.Extensions.Storage.Common; using Microsoft.Azure.WebJobs.Extensions.Storage.Common.Listeners; using Microsoft.Azure.WebJobs.Host; -using Microsoft.Azure.WebJobs.Host.Listeners; using Microsoft.Azure.WebJobs.Host.Queues; using Microsoft.Azure.WebJobs.Host.Queues.Config; using Microsoft.Azure.WebJobs.Host.Queues.Listeners; @@ -21,16 +18,15 @@ namespace Microsoft.Extensions.Hosting { /// - /// TODO. + /// Extension methods for Storage Queues integration. /// public static class StorageQueuesWebJobsBuilderExtensions { /// - /// TODO. + /// Adds the Storage Queues extension to the provided . /// - /// - /// - /// + /// The to configure. + /// Optional. An action to configure . public static IWebJobsBuilder AddAzureStorageQueues(this IWebJobsBuilder builder, Action configureQueues = null) { builder.Services.AddAzureClientsCore(); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs index 92e0807f8693..24f0768416c1 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Scenario.Tests/tests/BlobBindingEndToEndTests.cs @@ -318,7 +318,6 @@ public async Task BindToByteArray_Output() arguments = new { input = TestData }; await _fixture.JobHost.CallAsync(method, arguments); - // TODO (this sometimes results in empty string Assert.True(await blob.ExistsAsync()); string result = await blob.DownloadTextAsync(); Assert.AreEqual(TestData, result);