Ejemplo n.º 1
0
 public LoadedFilesViewModel(ICoreApplicationService coreService, IOpenFileService openFileService, IFindInFilesService findInFilesService)
     : base()
 {
     _coreService = coreService;
     _openFileService = openFileService;
     _findInFilesService = findInFilesService;
 }
Ejemplo n.º 2
0
 public OptionsViewModel(ICoreApplicationService coreService)
     : base()
 {
     _coreService = coreService;
     SimulationOption.CoreService = coreService;
     Options = new ObservableCollection<SimulationOption>();
     _coreService.IrpProjectLoaded += onProjectLoaded;
 }
Ejemplo n.º 3
0
 public MainSchema(
     IDependencyResolver resolver, RefTypeSchema refTypeSchema, ICoreApplicationService applicationService, IUnitOfWork uow)
     : base(resolver)
 {
     this.applicationService = applicationService;
     this.uow = uow;
     resolver.Resolve <CoreApplicationService>();
     this.Query = resolver.Resolve <RefTypeSchema>();
 }
Ejemplo n.º 4
0
        public ErrorViewModel(ICoreApplicationService coreService)
        {
            _coreService = coreService;

            Errors = new ObservableCollection<ErrorModel>();
            _coreService.IrpError += (s,e) => _threadsaferrors.Add(e.Value);
            _coreService.IrpProjectClosed += (s, e) => clearErrors();
            _coreService.IrpSimulationStarting += (s, e) => clearErrors();
            _coreService.IrpProjectLoaded += (s, e) => setErrors();
            _coreService.IrpSimulationCompleted += (s, e) => setErrors();
        }
Ejemplo n.º 5
0
 public AccountController(
     UserManager <IdentityUser> userManager,
     SignInManager <IdentityUser> signInManager,
     IConfiguration configuration,
     IUserStoreService userStoreService,
     ICoreApplicationService appService)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.configuration = configuration;
     this.appService    = appService;
 }
Ejemplo n.º 6
0
        public HomeController(
            IGuidTransientApplicationService guidTransientApplicationService,
            IGuidScopedApplicationService guidScopedApplicationService,
            IGuidSingletonApplicationService guidSingletonApplicationService,

            ICoreApplicationService coreApplicationService
            )
        {
            _guidTransientApplicationService = guidTransientApplicationService;
            _guidScopedApplicationService    = guidScopedApplicationService;
            _guidSingletonApplicationService = guidSingletonApplicationService;

            _coreApplicationService = coreApplicationService;
        }
Ejemplo n.º 7
0
        public RefTypeGraph(ICoreApplicationService appService)
        {
            this.appService  = appService;
            this.Name        = "RefType";
            this.Description = "RefType List";

            this.Field(x => x.Id, type: typeof(NonNullGraphType <IdGraphType>)).Description("The unique identifier of the RefType.");;
            this.Field(x => x.Name, true);
            this.Field(name: "Parent", type: typeof(RefTypeGraph), resolve: context => this.appService.GetRefTypeById(context.Source));
            this.Field(x => x.InsertDate, true);
            this.Field(x => x.UpdateDate, true);
            this.Field(x => x.IsActive, true);
            this.Field(x => x.Status, true);
        }
Ejemplo n.º 8
0
        public MainViewModel(ICoreApplicationService coreService, 
            IChooseFileNameService chooseFileNameService,
            IPersist persist,
            IOpenSimulationService openSimulationService)
        {
            _coreService = coreService;
            _chooseFileNameService = chooseFileNameService;
            _openSimulationService = openSimulationService;
            _persist = persist;

            _coreService.IrpSimulationProgress += (s,e) => Progress=e.Value;
            _coreService.IrpProjectLoaded += (s, e) => OnProjectLoaded(e.Value);
            _coreService.IrpSimulationCompleted += (s,e) => OnSimulationCompleted(e.Value);
        }
Ejemplo n.º 9
0
        public IrpObjectViewModel(ICoreApplicationService coreService, IOpenFileService openFileService, IOpenSimulationService openSimulationService)
            : base()
        {
            _coreService = coreService;
            _openFileService = openFileService;
            _openSimulationService = openSimulationService;

            _containers.Add(_scripts = new IrpObjectContainer("Scripts", _coreService.Scripts));
            _containers.Add(_scenarios = new IrpObjectContainer("Scenarios", _coreService.Scenarios));
            _containers.Add(new IrpVariableContainer("Aggregates", _coreService.AggregateVariables));
            _containers.Add(new IrpVariableContainer("Supply", _coreService.SupplyVariables));
            _containers.Add(new IrpVariableContainer("Demand", _coreService.DemandVariables));
            _containers.Add(new IrpVariableContainer("Storage", _coreService.StorageVariables));
            _containers.Add(new IrpVariableContainer("Cost", _coreService.CostVariables));
            _containers.Add(new IrpVariableContainer("Variables", _coreService.Variables));
            //_containers.Add(new IrpVariableContainer("System", _coreService.SystemVariables));
            _containers.Add(new IrpObjectContainer("Definitions", _coreService.Definitions));
            _containers.Add(new IrpObjectContainer("Categories", _coreService.Categories));
            //_containers.Add(new IrpObjectContainer("Options", _coreService.Options));
            _containers.Add(new IrpObjectContainer("Simulations", _coreService.Simulations));
        }
Ejemplo n.º 10
0
        public RefTypeSchema(ICoreApplicationService applicationService, IRefTypeEventHandler handler)
        {
            this.applicationService = applicationService;
            this.handler            = handler;
            this.Name        = "RefType";
            this.Description = "The query type, represents all of the entry points into our object graph.";

            this.FieldAsync <GetRefTypesResponseGraph, GetRefTypesResponseDTO>(
                "GetRefTypes",
                "Get all refTypes",
                arguments: new QueryArguments(),
                resolve: async context => this.handler.GetRefTypes().Result);

            this.FieldAsync <RefTypeGraph, RefTypeDTO>(
                "GetRefTypeById",
                "Get a refType by id",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >()
            {
                Name        = "id",
                Description = "The unique identifier of the RefType.",
            }),
                resolve: async context => this.handler.GetRefTypeById(context.GetArgument <long>("id")).Result);
        }
 public RefTypeController(ICoreApplicationService appService)
 {
     this.appService = appService;
 }
Ejemplo n.º 12
0
 public HomeController(ICoreApplicationService coreApplicationService)
 {
     _coreApplicationService = coreApplicationService;
 }