public EmailAddressGenerator(IStringGenerator stringGenerator, ILastNameGenerator lastNameGenerator, ICompanyNameGenerator companyNameGenerator) { this.stringGenerator = stringGenerator; this.lastNameGenerator = lastNameGenerator; this.companyNameGenerator = companyNameGenerator; }
public UserQueryService(IUserRepository userRepository, IMapper mapper, IEncrypter encrypter, ITokenManager tokenManager, IStringGenerator stringGenerator) { this.userRepository = userRepository; this.mapper = mapper; this.encrypter = encrypter; this.tokenManager = tokenManager; this.stringGenerator = stringGenerator; }
public EmployeeGenerator( INumberGenerator numberGenerator, IStringGenerator stringGenerator, IRepository <Department> departmentsRepository) { this.numberGenerator = numberGenerator; this.stringGenerator = stringGenerator; this.departmentsRepository = departmentsRepository; }
public CompanyObjectService(IAppRepository <CompanyApp> appRepository, ICompanyRepository <Company> companyRepository, IUserCompanyTemp userCompanyTemp, IStringGenerator stringGenerator) { this.appRepository = appRepository; this.companyRepository = companyRepository; this.userCompanyTemp = userCompanyTemp; this.stringGenerator = stringGenerator; }
/// <summary> /// Adds the specified string generator along with its weight to the list. /// </summary> /// <param name="weight">The weight.</param> /// <param name="stringGenerator">The string generator.</param> public void Add(double weight, IStringGenerator stringGenerator) { ExceptionUtilities.CheckArgumentNotNull(stringGenerator, "stringGenerator"); if (weight <= 0.0) { throw new TaupoArgumentException("Weight must be a positive number."); } this.generators.Add(stringGenerator); this.weights.Add(weight); }
public ProjectGenerator( INumberGenerator numberGenerator, IStringGenerator stringGenerator, IDateGenerator dateGenerator, IRepository <Employee> employeesRepository) { this.numberGenerator = numberGenerator; this.stringGenerator = stringGenerator; this.dateGenerator = dateGenerator; this.employeeRepository = employeesRepository; }
public CompanySettingsService(ICompanyRepository <Company> companyRepository, IAppDeletableEntityRepository <CompanyApp> companyAppRepository, IStringGenerator stringGenerator, IVatTypeService vatTypeService, IProductService productService) { this.companyRepository = companyRepository; this.companyAppRepository = companyAppRepository; this.stringGenerator = stringGenerator; this.vatTypeService = vatTypeService; this.productService = productService; }
public EmailConfirmation(UserManager <AppUser> userManager, IRepository <Guid, ConfirmationToken> confirmationTokenRepo, IRepository <string, AppUser> userRepo, ILogger <EmailConfirmation> logger, IStringGenerator stringGenerator ) { _userManager = userManager; _userRepo = userRepo; _logger = logger; _stringGenerator = stringGenerator; _confirmationToken = confirmationTokenRepo; }
private IDataGenerator ResolveStringGenerator(IRandomNumberGenerator random, DataGenerationHint[] hints, bool isNullable) { int minLength; int maxLength = this.GetMaxLengthAndCheckLengthRange(hints, out minLength); bool ansiString = hints.OfType <AnsiStringHint>().Any(); IStringGenerator stringGenerator = ansiString ? this.AnsiStringGenerator : this.UnicodeStringGenerator; var stringPrefixHint = hints.OfType <StringPrefixHint>().SingleOrDefault(); if (stringPrefixHint != null) { string prefix = stringPrefixHint.Value; ExceptionUtilities.Assert(prefix.Length < maxLength, "the length of string prefix in data generation exceeds the max length limit"); return(CreateRandomGenerator <string>(random, (r) => prefix + stringGenerator.GenerateString(r, Math.Max(minLength - prefix.Length, 0), maxLength - prefix.Length), hints)); } return(CreateRandomGenerator <string>(random, (r) => stringGenerator.GenerateString(r, minLength, maxLength), hints)); }
public ManagementController( IBroadcasterManager broadcasterManager, ICipherFactory cipherFactory, IConnectionManager connectionManager, IConsensusManager consensusManager, ILogger <ManagementController> logger, ISerializer serializer, ISmartContractTransactionService smartContractTransactionService, IStateRepositoryRoot stateRepositoryRoot, IStringGenerator stringGenerator, Network network) { _broadcasterManager = broadcasterManager; _cipherFactory = cipherFactory; _connectionManager = connectionManager; _consensusManager = consensusManager; _logger = logger; _serializer = serializer; _smartContractTransactionService = smartContractTransactionService; _stateRepositoryRoot = stateRepositoryRoot; _stringGenerator = stringGenerator; _network = network; }
public SecondService(IStringGenerator stringGenerator) { _stringGenerator = stringGenerator; }
public CompanyService(IAppDeletableEntityRepository <CompanyApp> companyAppRepo, IStringGenerator connectionStringGenerator) { this.companyAppRepo = companyAppRepo; this.stringGenerator = connectionStringGenerator; }
public void SetChangePasswordToken(IStringGenerator generator) => ChangePasswordToken = generator.Generate(50);
/// <summary> /// Initializes a new instance of the SentenceStringGenerator class. /// </summary> /// <param name="wordGenerator">The word generator.</param> public SentenceStringGenerator(IStringGenerator wordGenerator) { ExceptionUtilities.CheckArgumentNotNull(wordGenerator, "wordGenerator"); this.wordGenerator = wordGenerator; }
public ReducerController(IStringGenerator generator, IUriReducerRepository repository, IOptions <Settings> settings) { _keyGenerator = generator; _repository = repository; _currentKeyLength = settings.Value.KeyLettersCount; }
public StringGenerationHandler(IGeneratorService generatorService, IStringGenerator stringGenerator) { this.generatorService = generatorService; this.stringGenerator = stringGenerator; }
public FirstService(IStringGenerator stringGenerator) { _stringGenerator = stringGenerator; }
public CredentialLookup(IKeyVaultManager keyVaultManager, IStringGenerator stringGenerator) { this.keyVaultManager = keyVaultManager; this.stringGenerator = stringGenerator; }
public StringGeneratorTests() { strGen = new StringGenerator(); //TDD approach //strGen = new MockStringGenerator(); }
public UrlGenerator(IStringGenerator stringGenerator, ICompanyNameGenerator companyNameGenerator) { this.stringGenerator = stringGenerator; this.companyNameGenerator = companyNameGenerator; }
public PersonController(IStringGenerator service) { this._service = service; }
public Functions(IStringGenerator strGenerator) { // The Job Activator will inject the Concrete type (defined in the container) into this class _stringGenerator = strGenerator; }
public HumansController(APIBackend apiBackend, IStringGenerator stringGeneratorService, IModelFactory modelFactory) { _apiBackend = apiBackend; _stringGeneratorService = stringGeneratorService; _modelFactory = modelFactory; }
public RandomController(IStringGenerator stringGenerator, IEnumerable <ISomeService> someServices) { _stringGenerator = stringGenerator; _someServices = someServices; }
public DepartmentGenerator(IStringGenerator stringGenerator) { this.stringGenerator = stringGenerator; }
public async Task <IEnumerable <string> > GenerateSetOfStrings(string alphabet, int lenght, int count, IStringGenerator stringGenerator) { if (count <= 0) { throw new ArgumentException("Count can not be less or equal to 0!"); } var tasks = new List <Task <string> >(); for (int i = 0; i < count; i++) { tasks.Add(Task <string> .Run(() => stringGenerator.GenerateString(alphabet, lenght))); } var setOfStrings = await Task.WhenAll(tasks); return(setOfStrings); }