public AuctionsRepository(BiddingContext context, IConfiguration configuration) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _connectionString = _configuration["AzureStorage:ConnectionString"]; _containerDomain = _configuration["AzureStorage:ContainerDomain"]; m_context = context ?? throw new ArgumentNullException(nameof(context)); }
public BiddingPriceManager(SubmitStrategyManager strategyManager, BiddingContext biddingContext, Func <BiddingPriceRequest, bool> cancelStrategyFunc) { this.strategyManager = strategyManager; this.biddingContext = biddingContext; this.strategies = strategyManager.LoadStrategies(); }
/// <summary> /// 尝试提前输入答案 /// </summary> /// <param name="imageUuid"></param> /// <param name="answer"></param> private void TryInputAnswerAhead(string imageUuid, string answer) { var oper = BiddingContext.GetSubmitOperateByUuid(imageUuid); if (oper != null && oper.status != 99) { phase2ActManager.InputCaptchForSubmit(answer); oper.status = 21; } }
public void ResetContext() { biddingContext = new BiddingContext(); logger.InfoFormat("ResetContext last-sec is {0}", biddingContext.GetLastCalcedSec()); ResetStrategyByReload(); lastActions = new List <string>(); SetLastAcionText(); RefreshBiddingPage(); IsPreviewDone = false; IsOneRoundStarted = false; logger.InfoFormat("ResetContext done"); }
private async Task <ClaimsIdentity> SetupUserClaimsAsync(IServiceCollection services, ApplicationUser userDetails) { BiddingContext dbContext = services.BuildServiceProvider().GetService <BiddingContext>(); var rtoPCalcer = new CalcAllowedPermissions(dbContext); List <Claim> claims = new List <Claim> { new Claim( type: PermissionConstants.UserIdClaimType, value: userDetails.Id.ToString(), valueType: ClaimValueTypes.Integer, issuer: "Bidding" ), new Claim( type: PermissionConstants.PackedPermissionClaimType, value: await rtoPCalcer.CalcPermissionsForUserAsync(userDetails.Id).ConfigureAwait(true) ) }; return(new ClaimsIdentity(claims)); }
public BiddingService(BiddingContext context) { _context = context; }
public SubscribeRepository(BiddingContext context) { m_context = context; }
public BiddingController(BiddingContext context) { _context = context; }
public CalcAllowedPermissions(BiddingContext context) { _context = context; }
public void Reset() { biddingContext = new BiddingContext(); }
public UsersRepository(IServiceProvider services) { m_userManager = services.GetRequiredService <UserManager <ApplicationUser> >(); m_roleManager = services.GetRequiredService <RoleManager <ApplicationRole> >(); m_context = services.GetRequiredService <BiddingContext>(); }
public PermissionRepository(BiddingContext context) { m_context = context ?? throw new ArgumentNullException(nameof(context)); }
public FileUploaderRepository(BiddingContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }