|
3 | 3 | using Microsoft.WindowsAzure.Storage;
|
4 | 4 | using Microsoft.WindowsAzure.Storage.Auth;
|
5 | 5 | using Microsoft.WindowsAzure.Storage.Blob;
|
6 |
| -using Microsoft.WindowsAzure.Storage.Queue; |
| 6 | + |
7 | 7 | using System;
|
8 | 8 | using System.Collections.Generic;
|
9 | 9 | using System.IO;
|
@@ -53,32 +53,6 @@ public static async Task<bool> UploadFileToStorage(Stream fileStream, string fil
|
53 | 53 | return await Task.FromResult(true);
|
54 | 54 | }
|
55 | 55 |
|
56 |
| - public static async Task<bool> CreateQueueItem(string imageInfo, AzureStorageConfig _storageConfig) |
57 |
| - { |
58 |
| - // Create storagecredentials object by reading the values from the configuration (appsettings.json) |
59 |
| - StorageCredentials storageCredentials = new StorageCredentials(_storageConfig.AccountName, _storageConfig.AccountKey); |
60 |
| - |
61 |
| - // Create cloudstorage account by passing the storagecredentials |
62 |
| - CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, true); |
63 |
| - |
64 |
| - // Create the queue client. |
65 |
| - CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient(); |
66 |
| - |
67 |
| - // Retrieve a reference to a queue. |
68 |
| - CloudQueue queue = queueClient.GetQueueReference(_storageConfig.QueueName); |
69 |
| - |
70 |
| - // Create the queue if it doesn't already exist. |
71 |
| - await queue.CreateIfNotExistsAsync(); |
72 |
| - |
73 |
| - // Create a message and add it to the queue. |
74 |
| - CloudQueueMessage message = new CloudQueueMessage(imageInfo); |
75 |
| - |
76 |
| - // Add a message to the queue |
77 |
| - await queue.AddMessageAsync(message); |
78 |
| - |
79 |
| - return await Task.FromResult(true); |
80 |
| - } |
81 |
| - |
82 | 56 | public static async Task<List<string>> GetThumbNailUrls(AzureStorageConfig _storageConfig)
|
83 | 57 | {
|
84 | 58 | List<string> thumbnailUrls = new List<string>();
|
|
0 commit comments