aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TCC/Tango.TCC.Service/Storage/TCCStorageManager.cs
blob: a2f70328a05b46c5ce0cb7d4d8a8fab1807e7162 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Tango.Web.Storage;

namespace Tango.TCC.Service.Storage
{
    public class TCCStorageManager
    {
        public static String CreateSampleImageURL(String blobName)
        {
            var manager = new BlobStorageManager();
            var source_container = manager.GetContainer(TCCServiceConfig.TCC_SAMPLE_CONTAINER);
            var blob = source_container.GetBlockBlobReference(blobName);
            return blob.GenerateReadSignature(TimeSpan.FromMinutes(5));
        }

        public static String CreateSourceImageURL(String blobName)
        {
            var manager = new BlobStorageManager();
            var source_container = manager.GetContainer(TCCServiceConfig.TCC_SOURCE_CONTAINER);
            var blob = source_container.GetBlockBlobReference(blobName);
            return blob.GenerateReadSignature(TimeSpan.FromMinutes(5));
        }
    }
}