public static void AddAppWeb(this IServiceCollection services, IConfiguration configurationRoot) { services.Configure <SiteOptions>(configurationRoot.GetSection("SiteOptions")); services.TryAddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped <IActionContextAccessor, ActionContextAccessor>(); services.AddSingleton <IPathResolver, PathResolver>(); services.AddScoped <IUnitOfWork, UnitOfWork>(); services.AddScoped <ILogonManager, LogonManager>(); services.AddScoped <ILoggedUserAccessor, LoggedUserAccessor>(); services.AddScoped <IMenuBuilderFactory, MenuBuilderFactory>(); services.AddScoped <ViewDataItems>(); services.AddSingleton(sp => MapInit.CreateConfiguration().CreateMapper()); AddFiles(services, configurationRoot); services.AddSingleton <ITemplateBuilder, TemplateBuilder>(); services.AddSingleton <IEmailSenderService, EmailSenderService>(); services.Configure <EmailSenderOptions>(configurationRoot.GetSection("EmailSenderOptions")); services.AddTransient <IEmailWorkerService, EmailWorkerService>(); services.AddTransient <ISchedulerWorkerService, SchedulerWorkerService>(); services.AddSingleton <WorkersQueue>(); services.AddSingleton <ISchedulerService, SchedulerService>(); }
public PartModel Create(PT_Parts part) { var mapper = MapInit.MapInitialize().CreateMapper(); PartModel dto = mapper.Map <PartModel>(part); dto.Url = _UrlHelper.Link("Part", new { id = part.PartNumber }); return(dto); }
public RequisitionModel Create(PT_RequisitionHeader req) { var mapper = MapInit.MapInitialize().CreateMapper(); RequisitionModel dto = mapper.Map <RequisitionModel>(req); dto.Url = _UrlHelper.Link("Requisition", new { id = req.PONumber }); return(dto); }
public POModel Create(PO_Header po) { var mapper = MapInit.MapInitialize().CreateMapper(); POModel dto = mapper.Map <POModel>(po); dto.Url = _UrlHelper.Link("PO", new { id = po.PONumber }); return(dto); }
void Awake() { XYtoHex = new Dictionary <Coordinates2D, Hex> (new Coordinates2D.EqualityComparer()); numberOfUnits = 0; gameState = GameObject.FindGameObjectWithTag("GameState").GetComponent <GameState>(); initMap = mapManager.GetComponent(typeof(MapInit)) as MapInit; }
public HexList(MapInit map) { this.map = map; hexList = new Dictionary <Coordinates2D, GameObject> (new Coordinates2D.EqualityComparer()); }