public MethodCallBroker(IRequestBuilder requestBuilder, IRandomService service = null, IBeforeRequestCommandFactory beforeRequestCommandFactory = null, IResponseHandlerFactory responseHandlerFactory = null) { _requestBuilder = requestBuilder; _service = service ?? new RandomOrgApiService(); _beforeRequestCommandFactory = beforeRequestCommandFactory; _responseHandlerFactory = responseHandlerFactory; }
public PlaylistManager(int playedItemStackCapacity = 1000, IRandomService randomService = null) { this.randomService = randomService ?? new RandomService(); this.items = new ObservableCollection<PlaylistItem>(); this.readonlyItems = new ReadOnlyObservableList<PlaylistItem>(items); this.playedItemsStack = new PlayedItemsStack<PlaylistItem>(playedItemStackCapacity); this.items.CollectionChanged += ItemsCollectionChanged; }
public Cpu(IMemory memory, IRegisterBank registerBank, IRandomService randomService, IDisplay display) { _memory = memory; _registerBank = registerBank; _randomService = randomService; _display = display; _registerBank.Initialise(); }
public PlaylistManager(int playedItemStackCapacity = 1000, IRandomService randomService = null) { this.randomService = randomService ?? new RandomService(); items = new ObservableCollection <PlaylistItem>(); Items = new ReadOnlyObservableList <PlaylistItem>(items); playedItemsStack = new PlayedItemsStack <PlaylistItem>(playedItemStackCapacity); items.CollectionChanged += ItemsCollectionChanged; }
public StringPatternProcessorGod(IEvolutionStrategy evolutionStragey, IStringPatternService stringPatternService, IOptimizerConfig optimizerConfig, IRandomService randomService) { this.isInitialized = false; this.evolutionStrategy = evolutionStragey; this.stringPatternService = stringPatternService; this.optimizerConfig = optimizerConfig; this.randomService = randomService; this.scoreCache = new ConcurrentDictionary <Guid, double>(); }
public BaseMethodTest() { Random = new Random(); AdvisoryDelayHandler = new AdvisoryDelayHandler(new DateTimeWrap()); if (new ConfigurationManagerWrap().GetAppSettingValue<bool>("useEmulator")) Service = new RandomOrgApiEmulator(); }
public RepairKit( IDurabilityService durability, IPerkService perk, IRandomService random) { _durability = durability; _perk = perk; _random = random; }
public ActionFactory(IEffectRepository effectRepository, IUserService userService, IStatsRepository statsRepository, IInventoryRepository inventoryRepository, ISlackWebApi slack, IRandomService randomService, IItemRepository itemRepository) { _effectRepository = effectRepository; _userService = userService; _statsRepository = statsRepository; _inventoryRepository = inventoryRepository; _slack = slack; _randomService = randomService; _itemRepository = itemRepository; }
public DeathService(IDataService data, INWScript script, IRandomService random, IDurabilityService durability) { _data = data; _ = script; _random = random; _durability = durability; }
public LightningShock(INWScript script, IRandomService random, IPerkService perk, ISkillService skill) { _ = script; _random = random; _perk = perk; _skill = skill; }
public ItemFactory(ISlackWebApi slack, IStatsRepository statsRepository, IInventoryRepository inventoryRepository, IUserService userService, IEventDispatcher eventDispatcher, IEffectRepository effectRepository, IRandomService randomService) { _slack = slack; _statsRepository = statsRepository; _inventoryRepository = inventoryRepository; _userService = userService; _eventDispatcher = eventDispatcher; _effectRepository = effectRepository; _randomService = randomService; }
public ExpulsionManeuver(INWScript script, IPerkService perk, IRandomService random, IColorTokenService color) { _ = script; _perk = perk; _random = random; _color = color; }
public Recover(INWScript script, IPerkService perk, IRandomService random, ISkillService skill) { _ = script; _perk = perk; _random = random; _skill = skill; }
public CasinoCommands(IUserRepository userRepository, ISlackWebApi messageSender, IChannelRepository channelRepository, IBackgroundJobClient backgroundJobClient, IItemEventDispatcher itemEventDispatcher, IStatsRepository statsRepository, IRandomService randomService) { _userRepository = userRepository; _slack = messageSender; _channelRepository = channelRepository; _backgroundJobClient = backgroundJobClient; _itemEventDispatcher = itemEventDispatcher; _statsRepository = statsRepository; _randomService = randomService; }
public BlockingRecovery(INWScript script, IPerkService perk, IRandomService random, IPlayerStatService playerStat) { _ = script; _perk = perk; _random = random; _playerStat = playerStat; }
public GraspingIce(INWScript script, IRandomService random, IPerkService perk, ISkillService skill) { _ = script; _random = random; _perk = perk; _skill = skill; }
public MonsterService(IMonsterRepository monsterRepository, ISlackWebApi slack, IUserService userService, IInventoryRepository inventoryRepository, IRandomService randomService, IMonsterFactory monsterFactory, IChannelRepository channelRepository) { _monsterRepository = monsterRepository; _slack = slack; _userService = userService; _inventoryRepository = inventoryRepository; _randomService = randomService; _monsterFactory = monsterFactory; _channelRepository = channelRepository; }
public FarmingService(INWScript script, IDataContext db, IRandomService random, IColorTokenService color) { _ = script; _db = db; _random = random; _color = color; }
public FarmingService(INWScript script, IDataService data, IRandomService random, IColorTokenService color) { _ = script; _data = data; _random = random; _color = color; }
public double FullyRandomCalculate(double inputValue, IRandomService randomService, int seed) { var randomOptions = new RandomOptions { Seed = seed, IsNegative = inputValue <= 0.0 }; return(randomService.GetRandomValue(randomOptions)); }
public CrushingEarth(INWScript script, IRandomService random, IPerkService perk, ISkillService skill) { _ = script; _random = random; _perk = perk; _skill = skill; }
public Dice( INWScript script, IRandomService random, IColorTokenService color) { _ = script; _random = random; _color = color; GenericError = _color.Red("Please enter /dice help for more information on how to use this command."); }
public LanguageService( ISkillService skillService, IRandomService randomService, IDataService data, AppCache cache) { _skillService = skillService; _randomService = randomService; _data = data; _cache = cache; }
public PreciseToss( INWScript script, IPerkService perk, IRandomService random, ICustomEffectService customEffect) { _perk = perk; _ = script; _random = random; _customEffect = customEffect; }
protected override Task DoInsertAsync <T>(T entity) { var collection = IMemoryCollectionFactory.GetOrCreateCollection <T>(); entity.Id = IRandomService.RandomBase24(12); entity.Created = ITimeService.Now; collection.Add(entity.CopyByJson()); return(Task.CompletedTask); }
public RepairKit( IDurabilityService durability, IPerkService perk, IRandomService random, ISkillService skill) { _durability = durability; _perk = perk; _random = random; _skill = skill; }
public DrillSpawnRule( IRandomService random, IResourceService resource, IBiowareXP2 biowareXP2, IColorTokenService color) { _random = random; _resource = resource; _biowareXP2 = biowareXP2; _color = color; }
public DrainLife( INWScript script, IRandomService random, IPlayerStatService stat, ISkillService skill) { _ = script; _random = random; _stat = stat; _skill = skill; }
public CasinoCommands(IUserRepository userRepository, ISlackWebApi messageSender, IChannelRepository channelRepository, IBackgroundJobClient backgroundJobClient, IEventDispatcher eventDispatcher, IStatsRepository statsRepository, IRandomService randomService, IUserService userService, ICreditsRepository creditsRepository) { _userRepository = userRepository; _slack = messageSender; _channelRepository = channelRepository; _backgroundJobClient = backgroundJobClient; _eventDispatcher = eventDispatcher; _statsRepository = statsRepository; _randomService = randomService; _userService = userService; _creditsRepository = creditsRepository; }
public DeathService(IDataContext db, INWScript script, ISerializationService serialization, IRandomService random, IColorTokenService color) { _db = db; _ = script; _serialization = serialization; _random = random; _color = color; }
public TreatmentKit(INWScript script, ISkillService skill, ICustomEffectService customEffect, IRandomService random, IPerkService perk) { _ = script; _skill = skill; _customEffect = customEffect; _random = random; _perk = perk; }
public ForcePush(INWScript script, IPerkService perk, IRandomService random, IPlayerStatService playerStat, ISkillService skill) { _ = script; _perk = perk; _random = random; _playerStat = playerStat; _skill = skill; }
public HealingKit(INWScript script, ISkillService skill, IRandomService random, IPerkService perk, IPlayerStatService playerStat) { _ = script; _skill = skill; _random = random; _perk = perk; _playerStat = playerStat; }
/// <summary> /// Constructor /// </summary> /// <param name="randomService"><see cref="IRandomService"/> to use to get random values. Defaults to <see cref="RandomOrgApiService"/></param> public UsageMethod(IRandomService randomService = null) { _randomService = randomService ?? new RandomOrgApiService(); // We need to keep this separate so we can retrieve the list of values that are returned from to the caller _responseParser = new JsonResponseParserFactory(new UsageResponseParser()); _responseHandlerFactory = new ResponseHandlerFactory( new ErrorHandlerThrowException(new ErrorParser()), _responseParser ); }
/// <summary> /// Constructor /// </summary> /// <param name="advisoryDelayHandler"> /// Class which handles the apprioriate delay before the request is called. /// It is required that this class be passed into the method because the same instance of the <see cref="AdvisoryDelayHandler"/> must be passed in on every request. /// </param> /// <param name="randomService"><see cref="IRandomService"/> to use to get random values. Defaults to <see cref="RandomOrgApiService"/></param> public StringSignedMethod(AdvisoryDelayHandler advisoryDelayHandler, IRandomService randomService = null) : base(advisoryDelayHandler, randomService) { var verifySignatureHandler = new VerifySignatureHandler(RandomService); BeforeRequestCommandFactory = new BeforeRequestCommandFactory(advisoryDelayHandler, verifySignatureHandler); ResponseHandlerFactory = new ResponseHandlerFactory( new ErrorHandlerThrowException(new ErrorParser()), verifySignatureHandler, advisoryDelayHandler, new VerifyIdResponseHandler(), ResponseParser ); }
/// <summary> /// Constructor /// </summary> /// <param name="advisoryDelayHandler"> /// Class which handles the apprioriate delay before the request is called. /// It is required that this class be passed into the method because the same instance of the <see cref="AdvisoryDelayHandler"/> must be passed in on every request. /// </param> /// <param name="randomService"><see cref="IRandomService"/> to use to get random values. Defaults to <see cref="RandomOrgApiService"/></param> public BlobSignedMethod(AdvisoryDelayHandler advisoryDelayHandler, IRandomService randomService = null) : base(advisoryDelayHandler, randomService) { // We just need to setup the Verification Signature class, other than that everything else is the same. var verifySignatureHandler = new VerifySignatureHandler(RandomService); BeforeRequestCommandFactory = new BeforeRequestCommandFactory(advisoryDelayHandler, verifySignatureHandler); ResponseHandlerFactory = new ResponseHandlerFactory( new ErrorHandlerThrowException(new ErrorParser()), verifySignatureHandler, advisoryDelayHandler, new VerifyIdResponseHandler(), ResponseParser ); }
/// <summary> /// Constructor /// </summary> /// <param name="advisoryDelayHandler"> /// Class which handles the apprioriate delay before the request is called. /// It is required that this class be passed into the method because the same instance of the <see cref="AdvisoryDelayHandler"/> must be passed in on every request. /// </param> /// <param name="randomService"><see cref="IRandomService"/> to use to get random values. Defaults to <see cref="RandomOrgApiService"/></param> public UuidBasicMethod(AdvisoryDelayHandler advisoryDelayHandler, IRandomService randomService = null) { RandomService = randomService ?? new RandomOrgApiService(); RequestBuilder = new JsonRequestBuilder(new UuidJsonRequestBuilder()); BeforeRequestCommandFactory = new BeforeRequestCommandFactory(advisoryDelayHandler); // We need to keep this separate so we can retrieve the list of values that are returned from to the caller ResponseParser = new JsonResponseParserFactory(new UuidResponseParser()); ResponseHandlerFactory = new ResponseHandlerFactory( new ErrorHandlerThrowException(new ErrorParser()), advisoryDelayHandler, new VerifyIdResponseHandler(), ResponseParser ); }
public VerifySignatureHandler(IRandomService service = null) { _service = service ?? new RandomOrgApiService(); }
public static void Provide(IRandomService service) { randomService = service == null ? new NullRandomService() : service; }