public FieldController(IFieldRepository fieldRepository, IMessageModelBuilder messageModelBuilder, IMapper mapper, IWellRepository wellRepository) { _fieldRepository = fieldRepository; _wellRepository = wellRepository; _messageModelBuilder = messageModelBuilder; _mapper = mapper; }
public ShopController(IShopRepository shopRepository, IMessageModelBuilder messageModelBuilder, IMapper mapper, IWellRepository wellRepository) { _shopRepository = shopRepository; _wellRepository = wellRepository; _messageModelBuilder = messageModelBuilder; _mapper = mapper; }
public HomeController(IProjectRepository projectRepository, IPickingPersonRepository pickingPersonRepository, IWellRepository wellRepository, IMapper mapper) { _projectRepository = projectRepository; _pickingPersonRepository = pickingPersonRepository; _wellRepository = wellRepository; _mapper = mapper; }
public WellRequestHandler( IWellRepository wellRepository, ICompanyRepository companyRepository, IWorkshopRepository workshopRepository, IFieldRepository fieldRepository) { _wellRepository = wellRepository; _companyRepository = companyRepository; _workshopRepository = workshopRepository; _fieldRepository = fieldRepository; }
public WellObject(IWellRepository wellRepository) { this.Name = "Well"; this.Description = "A well."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the Well."); this.Field(x => x.name, type: typeof(NonNullGraphType <StringGraphType>)) .Description("The name of the Well."); }
public ConstraintObject(IWellRepository wellRepository) { this.Name = "Constraint"; this.Description = "Constraints."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the Constraint."); this.Field(x => x.budget, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.manHours, type: typeof(NonNullGraphType <FloatGraphType>)); }
public ActionFinancialEstimateObject(IWellRepository wellRepository) { this.Name = "ActionFinancialEstimate"; this.Description = "Action financial estimate."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the ActionFinancialEstimate."); this.Field(x => x.well, type: typeof(NonNullGraphType <WellObject>)); this.Field(x => x.action, type: typeof(NonNullGraphType <ActionObject>)); this.Field(x => x.impact, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.cost, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.manHours, type: typeof(NonNullGraphType <FloatGraphType>)); }
public CompanyController( ICompanyRepository companyRepository, IWellRepository wellRepository, IShopRepository shopRepository, IFieldRepository fieldRepository, IMessageModelBuilder messageModelBuilder, IMapper mapper) { _companyRepository = companyRepository; _wellRepository = wellRepository; _shopRepository = shopRepository; _fieldRepository = fieldRepository; _messageModelBuilder = messageModelBuilder; _mapper = mapper; }
public MetricsInputObject(IWellRepository wellRepository) { this.Name = "MetricsInput"; this.Description = "Metrics."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the Metrics."); this.Field(x => x.waterCut, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.GOR, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.oilRate, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.date, type: typeof(NonNullGraphType <IntGraphType>)); this.Field(x => x.well, type: typeof(NonNullGraphType <WellInputObject>)); this.Field(x => x.type, type: typeof(NonNullGraphType <StringGraphType>)); }
public ActionOutcomeInputObject(IWellRepository wellRepository) { this.Name = "ActionOutcomeInput"; this.Description = "Action outcome."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the ActionOutcome."); this.Field(x => x.well, type: typeof(NonNullGraphType <WellInputObject>)); this.Field(x => x.action, type: typeof(NonNullGraphType <ActionInputObject>)); this.Field(x => x.probabilityOfAnomaly, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.cost, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.manHours, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.increaseInOilRate, type: typeof(NonNullGraphType <FloatGraphType>)); }
public OpportunityInputObject(IWellRepository wellRepository) { this.Name = "OpportunityInput"; this.Description = "An Opportunity."; // To require authorization for all fields in this type. // this.AuthorizeWith(AuthorizationPolicyName.Admin); this.Field(x => x.id, type: typeof(NonNullGraphType <IdGraphType>)) .Description("The unique identifier of the Opportunity."); this.Field(x => x.name, type: typeof(NonNullGraphType <StringGraphType>)); this.Field(x => x.createdAt, type: typeof(NonNullGraphType <DateTimeGraphType>)); this.Field(x => x.actions, type: typeof(NonNullGraphType <ListGraphType <NonNullGraphType <ActionInputObject> > >)); this.Field(x => x.incrementalRevenue, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.costReduction, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.cost, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.manHours, type: typeof(NonNullGraphType <FloatGraphType>)); this.Field(x => x.well, type: typeof(NonNullGraphType <WellInputObject>)); }
public QueryObject( IWellRepository wellRepository) { this.Name = "Query"; this.Description = "The query type, represents all of the entry points into our object graph."; this.FieldAsync <NonNullGraphType <ListGraphType <NonNullGraphType <WellObject> > >, List <Well> >( "allActiveWells", "Get all active wells.", resolve: context => wellRepository.AllActiveWells( context.CancellationToken)); this.FieldAsync <NonNullGraphType <MetricsObject>, Metrics>( "wellPredictedMetrics", "Get a Well's predicted metrics.", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <WellInputObject> > { Name = "well", Description = "The well for which to get the metrics.", }, new QueryArgument <NonNullGraphType <IntGraphType> > { Name = "date", Description = "The date of the metrics to get." }), resolve: context => wellRepository.WellPredictedMetrics( context.GetArgument <Well>("well"), context.GetArgument <int>("date"), context.CancellationToken)); this.FieldAsync <NonNullGraphType <MetricsObject>, Metrics>( "wellMeasuredMetrics", "Get a Well's measured metrics.", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <WellInputObject> >() { Name = "well", Description = "The well for which to get the metrics.", }, new QueryArgument <NonNullGraphType <IntGraphType> >() { Name = "date", Description = "The date of the metrics to get.", } ), resolve: context => wellRepository.WellMeasuredMetrics( context.GetArgument <Well>("well"), context.GetArgument <int>("date"), context.CancellationToken ) ); this.FieldAsync <NonNullGraphType <ActionOutcomeObject>, ActionOutcome>( "wellActionOutcome", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <WellInputObject> >() { Name = "well", Description = "The well for which to get the metrics.", }, new QueryArgument <NonNullGraphType <ActionInputObject> >() { Name = "action", Description = "", } ), resolve: context => wellRepository.WellActionOutcome( context.GetArgument <Well>("well"), context.GetArgument <Models.Action>("action"), context.CancellationToken ) ); this.Field <NonNullGraphType <ActionObject> >( "discoverIntervention", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "predictedMetrics", Description = "", }, new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "measuredMetrics", Description = "", } ), resolve: context => wellRepository.DiscoverIntervention( context.GetArgument <Metrics>("predictedMetrics"), context.GetArgument <Metrics>("measuredMetrics"), context.CancellationToken ) ); this.Field <NonNullGraphType <ActionObject> >( "shouldTestWell", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <FloatGraphType> >() { Name = "healthIndex", Description = "", }, new QueryArgument <NonNullGraphType <IntGraphType> >() { Name = "lastTestDay", Description = "", }, new QueryArgument <NonNullGraphType <IntGraphType> >() { Name = "today", Description = "", } ), resolve: context => wellRepository.ShouldTestWell( context.GetArgument <double>("healthIndex"), context.GetArgument <int>("lastTestDay"), context.GetArgument <int>("today"), context.CancellationToken ) ); this.Field <NonNullGraphType <FloatGraphType> >( "healthIndex", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "predictedMetrics", Description = "", }, new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "measuredMetrics", Description = "", } ), resolve: context => wellRepository.HealthIndex( context.GetArgument <Metrics>("predictedMetrics"), context.GetArgument <Metrics>("measuredMetrics"), context.CancellationToken ) ); this.FieldAsync <NonNullGraphType <IntGraphType>, int>( "wellLastTestDate", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <WellInputObject> >() { Name = "well", Description = "The well for which to get the metrics.", }, new QueryArgument <NonNullGraphType <IntGraphType> >() { Name = "today", Description = "", } ), resolve: context => wellRepository.WellLastTestDate( context.GetArgument <Well>("well"), context.GetArgument <int>("today"), context.CancellationToken ) ); this.Field <NonNullGraphType <IntGraphType> >( "todayDate", "", resolve: context => wellRepository.TodayDate( context.CancellationToken ) ); this.Field <NonNullGraphType <ListGraphType <NonNullGraphType <OpportunityObject> > > >( "applyConstraints", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <ListGraphType <NonNullGraphType <OpportunityInputObject> > > >() { Name = "opportunities", Description = "", }, new QueryArgument <NonNullGraphType <ConstraintInputObject> >() { Name = "constraints", Description = "", } ), resolve: context => wellRepository.ApplyConstraints( context.GetArgument <List <Opportunity> >("opportunities"), context.GetArgument <Constraint>("constraints"), context.CancellationToken ) ); this.Field <NonNullGraphType <OpportunityObject> >( "combineActionImpacts", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <WellInputObject> >() { Name = "well", Description = "The well for which to get the metrics.", }, new QueryArgument <NonNullGraphType <ListGraphType <NonNullGraphType <ActionFinancialEstimateInputObject> > > >() { Name = "costReduction", Description = "", }, new QueryArgument <NonNullGraphType <ListGraphType <NonNullGraphType <ActionFinancialEstimateInputObject> > > >() { Name = "revenueGains", Description = "", } ), resolve: context => wellRepository.CombineActionImpacts( context.GetArgument <Well>("well"), context.GetArgument <List <ActionFinancialEstimate> >("costReduction"), context.GetArgument <List <ActionFinancialEstimate> >("revenueGains"), context.CancellationToken ) ); this.Field <NonNullGraphType <ListGraphType <NonNullGraphType <ActionFinancialEstimateObject> > > >( "interventionRevenueGain", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <FloatGraphType> >() { Name = "oilPrice", Description = "", }, new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "measuredMetrics", Description = "", }, new QueryArgument <NonNullGraphType <ActionOutcomeInputObject> >() { Name = "actionOutcome", Description = "", } ), resolve: context => wellRepository.InterventionRevenueGain( context.GetArgument <double>("oilPrice"), context.GetArgument <Metrics>("measuredMetrics"), context.GetArgument <ActionOutcome>("actionOutcome"), context.CancellationToken ) ); this.Field <NonNullGraphType <ListGraphType <NonNullGraphType <ActionFinancialEstimateObject> > > >( "skippingTestCostReduction", "", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <FloatGraphType> >() { Name = "oilPrice", Description = "", }, new QueryArgument <NonNullGraphType <MetricsInputObject> >() { Name = "measuredMetrics", Description = "", }, new QueryArgument <NonNullGraphType <ActionOutcomeInputObject> >() { Name = "actionOutcome", Description = "", } ), resolve: context => wellRepository.SkippingTestCostReduction( context.GetArgument <double>("oilPrice"), context.GetArgument <Metrics>("measuredMetrics"), context.GetArgument <ActionOutcome>("actionOutcome"), context.CancellationToken ) ); this.Field <NonNullGraphType <FloatGraphType> >( "currentOilPrice", "", resolve: context => wellRepository.CurrentOilPrice( context.CancellationToken ) ); // Just include static info for info query in this case as it's not hitting the dummy repository/database. this.Field <InfoObject>( "info", resolve: context => { return(new Info { Id = "maana.io.claroil.well.optimization.demo", Name = "ClarOil Well Optimization Demo", Version = "0.0.8", Description = "ClarOil Well Optimization Demo" }); }); }
public SubscriptionObject(IWellRepository wellRepository) { this.Name = "Subscription"; this.Description = "The subscription type, represents all updates can be pushed to the client in real time over web sockets."; }
public WellController(IWellRepository wellRepository, IMessageModelBuilder messageModelBuilder, IMapper mapper) { _wellRepository = wellRepository; _messageModelBuilder = messageModelBuilder; _mapper = mapper; }
public WellsController(IWellRepository context) { wellRep = context; }
public WellService(IWellRepository wellRepository) { _wellRepository = wellRepository; }
public WellListViewModel(IWellRepository wellRepository) { _repository = wellRepository; }
public WellService(IWellRepository wellRepository) { this.wellRepository = wellRepository; }
public MutationObject(IWellRepository wellRepository) { this.Name = "Mutation"; this.Description = "The mutation type, represents all updates we can make to our data."; }