public RouteService(ISolarSystemService solarSystemService, EveVoidContext context, ILogger <RouteService> logger) { _solarSystemService = solarSystemService; _context = context; _logger = logger; }
public SignatureService(EveVoidContext context, ISolarSystemService solarSystemService, IRouteService routeService) { _context = context; _solarSystemService = solarSystemService; _routeService = routeService; }
public MapController(ISolarSystemService solarSystemService, ICharacterService characterService, IMapper mapper) { _solarSystemService = solarSystemService; _characterService = characterService; _mapper = mapper; }
public SolarSystemController(ISolarSystemService solarSystemService, ICharacterService characterService, IMapper mapper, ISignatureService signatureService) { _solarSystemService = solarSystemService; _characterService = characterService; _mapper = mapper; _signatureService = signatureService; }
public SolarSystemQueries(ISolarSystemService solarSystemService) { FieldAsync <ListSolarSystemsQueryModelType>( SEARCH_REQUEST_ENDPOINT, "Returns a paginated list of SolarSystems", new QueryArguments( new QueryArgument <NonNullGraphType <PagedRequestType> > { Name = PAGINATION_ARGUMENT_NAME, Description = PagedRequestType.Description }, new QueryArgument <NonNullGraphType <OrderedRequestType> > { Name = ORDERING_ARGUMENT_NAME, Description = OrderedRequestType.Description }, new QueryArgument <NonNullGraphType <FilteredRequestType <SolarSystem> > > { Name = FILTERING_ARGUMENT_NAME, Description = FilteredRequestType <SolarSystem> .Description } ), async context => { var pagination = context.GetArgument <Pagination>(PAGINATION_ARGUMENT_NAME); var ordering = context.GetArgument <Ordering>(ORDERING_ARGUMENT_NAME); var filtering = context.GetArgument <SolarSystemFilter>(FILTERING_ARGUMENT_NAME); var(totalCount, items) = await solarSystemService.SearchSolarSystemAsync(pagination, ordering, filtering); try { return(new ListResponse <SolarSystem> { TotalCount = totalCount, Items = items }); } catch (Exception e) { context.Errors.Add(new ExecutionError("Server Error")); return(null); } } ); }
public CharacterService(EveVoidContext context, ICorporationService corporationService, ILocationApi locationApi, ICharacterApi characterApi, ITokenService tokenService, ISolarSystemService solarSystemService, IItemTypeService itemTypeService, ISignatureService signatureService, IStargateService stargateService, IRouteService routeService, IPilotService pilotService) { _context = context; _corporationService = corporationService; _locationApi = locationApi; _characterApi = characterApi; _tokenService = tokenService; _solarSystemService = solarSystemService; _itemTypeService = itemTypeService; _signatureService = signatureService; _stargateService = stargateService; _routeService = routeService; _pilotService = pilotService; }
public SolarSystemNoteService(EveVoidContext context, ISolarSystemService solarSystemService) { _context = context; _solarSystemService = solarSystemService; }
public RunPlanetSimulationJob(ISolarSystemService solarSystemService) { this.solarSystemService = solarSystemService; }
public WeatherForecastController(ISolarSystemService solarSystemService) { this.solarSystemService = solarSystemService; }
public SolarSystemsController(ISolarSystemService service, ILogger <SolarSystemsController> logger) { _service = service; _logger = logger; }
public SolarSystemMutations(ISolarSystemService service) { FieldAsync <ActionResponseType>( CREATE_REQUEST_ENDPOINT, "Creates a new SolarSystem", new QueryArguments( new QueryArgument <NonNullGraphType <SolarSystemCreateViewModel> > { Name = SOLAR_SYSTEM_ARGUMENT_NAME, Description = "SolarSystem Entity to be Created" } ), async context => { var solarSystem = context.GetArgument <SolarSystem>(SOLAR_SYSTEM_ARGUMENT_NAME); try { await service.CreateSolarSystemAsync(solarSystem); } catch (ValidationException e) { context.Errors.Add(new ExecutionError(e.Message)); return(new ActionResponse(false)); } catch (Exception) { context.Errors.Add(new ExecutionError("Server Error")); return(new ActionResponse(false)); } return(new ActionResponse(true, solarSystem.Id)); }); FieldAsync <ActionResponseType>( UPDATE_REQUEST_ENDPOINT, "Updates an existing SolarSystem", new QueryArguments( new QueryArgument <NonNullGraphType <SolarSystemUpdateViewModel> > { Name = SOLAR_SYSTEM_ARGUMENT_NAME, Description = "SolarSystem to be Updated" }), async context => { var solarSystem = context.GetArgument <SolarSystem>(SOLAR_SYSTEM_ARGUMENT_NAME); try { await service.UpdateSolarSystemAsync(solarSystem); } catch (ValidationException e) { context.Errors.Add(new ExecutionError(e.Message)); return(new ActionResponse(false)); } catch (Exception) { context.Errors.Add(new ExecutionError("Server Error")); return(new ActionResponse(false)); } return(new ActionResponse(true, solarSystem.Id)); }); FieldAsync <ActionResponseType>( DELETE_REQUEST_ENDPOINT, "Removes an existing SolarSystem", new QueryArguments( new QueryArgument <GuidGraphType> { Name = DELETE_ARGUMENT_NAME, Description = "SolarSystem Id used to identify which SolarSystem will be deleted" }), async context => { var id = context.GetArgument <Guid>(DELETE_ARGUMENT_NAME); try { await service.DeleteSolarSystemAsync(id); } catch (ValidationException e) { context.Errors.Add(new ExecutionError(e.Message)); return(new ActionResponse(false)); } catch (Exception) { context.Errors.Add(new ExecutionError("Server Error")); return(new ActionResponse(false)); } return(new ActionResponse(true)); }); }