コード例 #1
0
ファイル: StorageService.cs プロジェクト: fredwong-it/Mars
        public bool IsAllowDownload(string email, string path)
        {
            string tableEndPoint = _settings.TableEndPoint;
            var    _tableService = new TableStorageService(tableEndPoint, _couserSASToken);

            return(_tableService.IsAllowedDownload(email, path));
        }
コード例 #2
0
        public void IsAllowDownloadNo2Test()
        {
            string email = "*****@*****.**";
            string path  = "project/course01";
            TableStorageService service = new TableStorageService(_endPoint, _sasToken);
            bool isAllowed = service.IsAllowedDownload(email, path);

            Assert.IsFalse(isAllowed);
        }
コード例 #3
0
        public void IsAllowDownloadYes2Test()
        {
            string email = "*****@*****.**";
            string path  = "mcts/demo";
            TableStorageService service = new TableStorageService(_endPoint, _sasToken);
            bool isAllowed = service.IsAllowedDownload(email, path);

            Assert.IsTrue(isAllowed);
        }