public CloudFilesController() : base() { //instantiate services entityService = new CloudFileService(base.db, base.identityDB); transactionService = new TransactionService(base.db); accountService = new AccountService(this.db); }
public CloudFileServiceTest() { httpService = new HttpService(new MockConfigurationService()); authService = new AuthService(httpService); cloudFileService = new CloudFileService(httpService); file = new FileCommon { Data = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, Name = "file.bin", IsPublic = true, SizeInBytes = 10 }; }
public override async Task <ActionResult> Create() { auditResult = audit.LogEvent(UserContact, Guid.Empty, this.ENTITY, this.Request.UserHostAddress, EVENT_INSERT); //init storage transaction logging CloudFileService cloudFileService = (CloudFileService)this.entityService; await cloudFileService.InitStorageTransactionLogging(UserContact); //double authAmount = 30.0; //bool isAuthAllowedForAccount = await accountService.IsAuthAllowedForAccount(UserContact, authAmount); Guid guidSampleId = Guid.Parse(Request["sampleId"]); ViewBag.Sample = db.GNSamples.Where(a => a.Id.Equals(guidSampleId)).FirstOrDefault(); //if (isAuthAllowedForAccount) //{ return(await base.Create()); //} //else //{ // return RedirectToAction("NotAllowed","Error"); //} }
public SamplesController() : base() { entityService = new SampleService(base.db, base.identityDB); cloudFileService = new CloudFileService(base.db, base.identityDB); }