public async Task <CreateNmedianPayload> CreateNmedianAsync( CreateNmedianInput input, [Service] IDateTimeOffset dateTimeOffset, [Service] IGuid guid, [ScopedService] NmediaContext dbContext, CancellationToken cancellationToken ) { var entity = new Nmedian { Age = input.Age, Created = dateTimeOffset.Now, IsActive = input.IsActive, Hired = input.Hired, HourlyRate = input.HourlyRate, JobTitle = input.JobTitle, Name = input.Name, Picture = input.Picture, Slug = input.Slug, Uuid = guid.NewGuid() }; dbContext.Nmedians.Add(entity); await dbContext.SaveChangesAsync(cancellationToken); return(new CreateNmedianPayload(entity)); }
public TicTacToeHub(ICurrentUserService currentUserService, IGuid guid, IRandom random, IMediator mediator) { this.currentUserService = currentUserService; this.guid = guid; this.random = random; this.mediator = mediator; }
protected bool Remove <T>(IGuid entity, DbSet <T> entitySet) where T : class, IGuid { if (!(entity is T)) { return(false); } var guid = entity.Guid; entity = entitySet.FirstOrDefault(c => c.Guid == guid); if (entity == null) { return(true); } if (UiSynchronizationContext == null) { entitySet.Remove((T)entity); } else { UiSynchronizationContext.Send(_ => entitySet.Remove((T)entity), null); } return(true); }
public CreateSessionCmdHandler(ILynxDbContext dbContext, IDateTime dateTime, IGuid guid, IMapper mapper) { p_DbContext = dbContext; p_DateTime = dateTime; p_Guid = guid; p_Mapper = mapper; }
/// <summary> /// Initializes a new instance of the <see cref="Daemon" /> class. /// </summary> public Daemon(ILogger <Daemon> logger, IMessageHandling messageHandling, INow now, IGuid guid, IDbContexts dbContexts) { _logger = logger; _messageHandling = messageHandling; _guid = guid; _now = now; _dbContexts = dbContexts; }
public CreateMeasureCommandHandler(IGuid guid, IMapper mapper, IMeasuresRepository measuresRepository) { _guid = guid; _mapper = mapper; _measuresRepository = measuresRepository; }
public AlbumService(IUnitOfWork unitOfWork, IClock clock, IGuid guid) { _unitOfWork = unitOfWork; _clock = clock; _guid = guid; }
public TransactionManager(ITransactionReportRepository transactionReportRepository, IGuid guid, IVirtualNumberApiAccess virtualNumberApiAccess, IBatchReportRepository batchReportRepository) { this.transactionReportRepository = transactionReportRepository; this.guid = guid; this.virtualNumberApiAccess = virtualNumberApiAccess; this.batchReportRepository = batchReportRepository; }
/// <summary> /// /// </summary> /// <param name="identityService"></param> /// <param name="dateTime"></param> /// <param name="guid"></param> /// <param name="customLogger"></param> public AuditableService(IIdentityService identityService, IDateTime dateTime, IGuid guid, ICustomLogger <AuditableService> customLogger) { _identityService = identityService; _dateTime = dateTime; _guid = guid; _customLogger = customLogger; }
public UpdateProductCommandHandler(IGuid guid, IMapper mapper, IProductsRepository productsRepository, IProductCategoriesRepository productCategoriesRepository, IMeasuresRepository measuresRepository) { _guid = guid; _mapper = mapper; _productsRepository = productsRepository; _productCategoriesRepository = productCategoriesRepository; _measuresRepository = measuresRepository; }
public CreateRecipeCommandHandler(IGuid guid, IMapper mapper, IRecipesRepository recipesRepository, IProductsRepository productsRepository, IProductMeasuresRepository productMeasuresRepository) { _guid = guid; _mapper = mapper; _recipesRepository = recipesRepository; _productsRepository = productsRepository; _productMeasuresRepository = productMeasuresRepository; }
protected Character(string name, ICombatAttributes combatAttributes, double experienceWorth = 0, double goldWorth = 0) { this.name = name; this.combatAttributes = combatAttributes; this.experienceWorth = experienceWorth; this.goldWorth = goldWorth; this.guid = GuidProvider.Instance.GetNewGuid(); this.possibleCharacterActions = new List <ICharacterAction>(); }
public CreateProductCategoryCommandHandler( IGuid guid, IMapper mapper, IProductCategoriesRepository productCategoriesRepository) { _guid = guid; _mapper = mapper; _productCategoriesRepository = productCategoriesRepository; }
public RecurringBatchController(IClock clock, IManageRecurringBatches recurringBatchesManager, IOptions <PagingConfiguration> paginationConfiguration, IGuid guid, IManageExport exportManager) : base(exportManager) { this.clock = clock; this.recurringBatchesManager = recurringBatchesManager; this.paginationConfiguration = paginationConfiguration; this.guid = guid; }
public bool Equals(IGuid other) { var o = other as SystemGuid; if (o == null) { return(false); } return(o.guid.Equals(guid)); }
public Config GetDiffAnnotatedConfig(Config curr, IConfig prev, IConfig old) { VmBindable.IsValidateAll = false; curr.PluginSettingsToModel(); var proto = Config.ConvertToProto(curr); this.DiffAnnotatedConfig = new Config(proto); ModelVisitorForAnnotation.InitConfig(this.DiffAnnotatedConfig); int dicNodesCount = this.DiffAnnotatedConfig.DicNodes.Count; var nv = new ModelVisitorNodeGenSettings(); nv.NodeGenSettingsApplyAction(this.DiffAnnotatedConfig, (p) => { p.RestoreNodeAppGenSettingsVm(); }); VmBindable.IsValidateAll = true; //foreach (var t in curr.DicActiveAppProjectGenerators) //{ // this.DiffAnnotatedConfig.DicActiveAppProjectGenerators[t.Key] = t.Value; //} //foreach (var t in curr.DicGenNodeSettings) //{ // this.DiffAnnotatedConfig.DicGenNodeSettings[t.Key] = t.Value; //} //foreach (var t in curr.DicNodes) //{ // this.DiffAnnotatedConfig.DicNodes[t.Key] = t.Value; //} //this.DiffAnnotatedConfig.DicGenerators = curr.DicGenerators; //this.DiffAnnotatedConfig.DicPluginLists = curr.DicPluginLists; //this.DiffAnnotatedConfig.DicPlugins = curr.DicPlugins; //this.DiffAnnotatedConfig.AddAllAppGenSettingsVmsToNode(); this.ListGuidsRenamedObjects = new List <string>(); base.RunThroughConfig(this.DiffAnnotatedConfig, prev, old, (visitor, obj) => { if (obj is IGuid) { IGuid curr2 = (IGuid)obj; if (obj.IsRenamed()) { ListGuidsRenamedObjects.Add(curr2.Guid); } } }); Debug.Assert(dicNodesCount <= this.DiffAnnotatedConfig.DicNodes.Count); foreach (var t in curr.Model.DicGenNodeSettings) { this.DiffAnnotatedConfig.Model.DicGenNodeSettings[t.Key] = t.Value; } return(this.DiffAnnotatedConfig); }
private static void AddReferenceFromNode(ModelNode md, IGuid property, IGuid from) { if (!md.DicReferecedFromNodes.ContainsKey(from.Guid)) { md.DicReferecedFromNodes[from.Guid] = new ReferenceFrom(); } var tn = md.DicReferecedFromNodes[from.Guid]; tn.DicFromFields[property.Guid] = property; tn.FromObject = from; }
public ApplyForTenantCommandHandler( IMapper mapper, IGuid guid, ITenantsRepository tenantsRepository, ITenantApplicationsRepository tenantApplicationsRepository) { _mapper = mapper; _guid = guid; _tenantsRepository = tenantsRepository; _tenantApplicationsRepository = tenantApplicationsRepository; }
public ProcessReceiptHandler( IApplicationContext appContext, IDateTimeOffset dateTimeOffset, IFakturContext dbContext, IGuid guid ) { this.appContext = appContext ?? throw new ArgumentNullException(nameof(appContext)); this.dateTimeOffset = dateTimeOffset ?? throw new ArgumentNullException(nameof(dateTimeOffset)); this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); this.guid = guid ?? throw new ArgumentNullException(nameof(guid)); }
public LogInHandler( IAuthenticationService authenticationService, IDateTimeOffset dateTimeOffset, IFakturContext dbContext, IGuid guid ) { this.authenticationService = authenticationService ?? throw new ArgumentNullException(nameof(authenticationService)); this.dateTimeOffset = dateTimeOffset ?? throw new ArgumentNullException(nameof(dateTimeOffset)); this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); this.guid = guid ?? throw new ArgumentNullException(nameof(guid)); }
public ProcessSuccessfulPaymentHandler( IMerchantEncryptionKeyGetter merchantEncryptionKeyGetter, IEncrypter encrypter, IPaymentRecordCreator paymentRecordCreator, IGuid guid, IDateTime dateTime) { _merchantEncryptionKeyGetter = merchantEncryptionKeyGetter; _encrypter = encrypter; _paymentRecordCreator = paymentRecordCreator; _guid = guid; _dateTime = dateTime; }
public ProcessRejectedPaymentHandler( IEncrypter encrypter, IPaymentRecordCreator paymentRecordCreator, IGuid guid, IDateTime dateTime, IMerchantEncryptionKeyGetter merchantEncryptionKeyGetter) { _encrypter = encrypter; _paymentRecordCreator = paymentRecordCreator; _guid = guid; _dateTime = dateTime; _merchantEncryptionKeyGetter = merchantEncryptionKeyGetter; }
public SaveBannerHandler( IApplicationContext appContext, IDateTimeOffset dateTimeOffset, IFakturContext dbContext, IGuid guid, IMapper mapper ) { this.appContext = appContext ?? throw new ArgumentNullException(nameof(appContext)); this.dateTimeOffset = dateTimeOffset ?? throw new ArgumentNullException(nameof(dateTimeOffset)); this.dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); this.guid = guid ?? throw new ArgumentNullException(nameof(guid)); this.mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public ReactionService(IUnitOfWork unitOfWork, IPhotoService photoService, IPermissionsService permissionsService, IClock clock, IGuid guid, IUserService userService) { _unitOfWork = unitOfWork; _photoService = photoService; _permissionsService = permissionsService; _clock = clock; _guid = guid; _userService = userService; }
public PhotoService(IFtpService ftpService, IUnitOfWork unitOfWork, IAlbumService albumService, IClock clock, IGuid guid, IPermissionsService permissionsService) { _ftpService = ftpService; _unitOfWork = unitOfWork; _albumService = albumService; _clock = clock; _guid = guid; _permissionsService = permissionsService; }
public SaveNmedianHandler( IApplicationContext appContext, IDateTimeOffset dateTimeOffset, INmediaContext dbContext, IGuid guid, IMapper mapper ) { _appContext = appContext ?? throw new ArgumentNullException(nameof(appContext)); _dateTimeOffset = dateTimeOffset ?? throw new ArgumentNullException(nameof(dateTimeOffset)); _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); _guid = guid ?? throw new ArgumentNullException(nameof(guid)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); }
public TenantInitializer( IAdminTenantConfiguration adminTenantConfiguration, ITenantsRepository tenantsRepository, IMediator mediator, IGuid guid, IMapper mapper, ILogger <TenantInitializer> logger) { _adminTenantConfiguration = adminTenantConfiguration; _tenantsRepository = tenantsRepository; _mediator = mediator; _guid = guid; _mapper = mapper; _logger = logger; }
internal void Reset(IGuid secret, bool encrypted) { if (Values.ContainsKey(secret.Guid)) { Values.Remove(secret.Guid); } var fileName = FileName(secret, false, encrypted); if (!File.Exists(fileName)) { return; } File.Delete(fileName); }
public UserService(IUnitOfWork unitOfWork, IEmailService emailService, IClock clock, IGuid guid, IConstants constants, IPasswordService passwordService, IEncryptionService encryptionService) { _unitOfWork = unitOfWork; _emailService = emailService; _clock = clock; _guid = guid; _constants = constants; _passwordService = passwordService; _encryptionService = encryptionService; }
public PackageCreator(IFileSystem fileSystem, IGuid guid, IPackageFactory packageFactory, IConfigSettings configSettings, IRepository <Package> packageRepository, IPackageAuthenticator packageAuthenticator, IHashGetter hashGetter, IPackageIdValidator packageIdValidator, IPackageUriValidator packageUriValidator, ILatestVersionChecker latestVersionChecker, ILatestVersionUpdater <Package> latestVersionUpdater) { _fileSystem = fileSystem; _latestVersionUpdater = latestVersionUpdater; _latestVersionChecker = latestVersionChecker; _packageIdValidator = packageIdValidator; _guid = guid; _packageFactory = packageFactory; _configSettings = configSettings; _packageRepository = packageRepository; _packageAuthenticator = packageAuthenticator; _hashGetter = hashGetter; _packageUriValidator = packageUriValidator; }
public PackageCreator(IFileSystem fileSystem, IGuid guid, IPackageFactory packageFactory, IConfigSettings configSettings, IRepository<Package> packageRepository, IPackageAuthenticator packageAuthenticator, IHashGetter hashGetter, IPackageIdValidator packageIdValidator, IPackageUriValidator packageUriValidator, ILatestVersionChecker latestVersionChecker, ILatestVersionUpdater<Package> latestVersionUpdater) { _fileSystem = fileSystem; _latestVersionUpdater = latestVersionUpdater; _latestVersionChecker = latestVersionChecker; _packageIdValidator = packageIdValidator; _guid = guid; _packageFactory = packageFactory; _configSettings = configSettings; _packageRepository = packageRepository; _packageAuthenticator = packageAuthenticator; _hashGetter = hashGetter; _packageUriValidator = packageUriValidator; }