Example #1
0
 // The required services are injected. Registration is in Program.cs
 public Toot(ILogger <Toot> logger, IAppConfiguration configuration, IInstanceService instanceService, IConsole console)
 {
     this.log             = logger;
     this.cfg             = configuration;
     this.instanceService = instanceService;
     this.console         = console;
 }
Example #2
0
 public DeleteOfflineNonFarmInstance(IFarmContext context, IInstanceService instanceService, IFarmBuilder farmBuilder, IStateService stateService)
 {
     _context         = context;
     _instanceService = instanceService;
     _farmBuilder     = farmBuilder;
     _stateService    = stateService;
 }
Example #3
0
 public InstanceController(IInstanceService instanceService, ITickerRepository tickerRepository, ITimeFrameRepository timeFrameRepository, IStrategyInfoRepository strategyInfoRepository)
 {
     this.instanceService = instanceService;
     this.tickerRepository = tickerRepository;
     this.timeFrameRepository = timeFrameRepository;
     this.strategyInfoRepository = strategyInfoRepository;
 }
Example #4
0
 public RelaunchOfflineInstance(IFarmContext context, IDateTime dateTime, IFarmBuilder farmBuilder, IInstanceService instanceService)
 {
     _context         = context;
     _dateTime        = dateTime;
     _farmBuilder     = farmBuilder;
     _instanceService = instanceService;
 }
Example #5
0
 public FeedService(ILogger <FeedService> logger, IAppConfiguration configuration, IInstanceService instanceService, ICacheService cacheService)
 {
     this.log      = logger;
     this.cfg      = configuration;
     this.instance = instanceService;
     this.cache    = cacheService;
 }
Example #6
0
 public DeleteOfflineInstance(IFarmContext context, IStateService stateService, ILogger <DeleteOfflineInstance> logger, IInstanceService instanceService)
 {
     _context         = context;
     _stateService    = stateService;
     _logger          = logger;
     _instanceService = instanceService;
 }
Example #7
0
        public TesterController(IInstanceService instanceService)
        {
            this.instanceService = instanceService;

            jsonSerializerSettings = new JsonSerializerSettings();
            jsonSerializerSettings.NullValueHandling = NullValueHandling.Ignore;
        }
 public AggregateService(IInstanceService instance, IScopedService scoped, ITransientService transient, ISingletonService singleton)
 {
     Instance  = instance;
     Scoped    = scoped;
     Transient = transient;
     Singleton = singleton;
 }
Example #9
0
 public LaunchInstance(IFarmBuilder farmBuilder, IFarmContext context, IInstanceService instanceService, IDateTime dateTime)
 {
     _farmBuilder     = farmBuilder;
     _context         = context;
     _instanceService = instanceService;
     _dateTime        = dateTime;
 }
 // The required services are injected. Registration is in Program.cs
 public RegisterApplication(ILogger <RegisterApplication> logger, IAppConfiguration configuration, IInstanceService instanceService, IConsole console)
 {
     this.log             = logger;
     this.cfg             = configuration;
     this.instanceService = instanceService;
     this.console         = console;
 }
Example #11
0
 public RequestMulingHandler(IStateService stateService, IFarmContext context, ILogger <RequestMulingHandler> logger, IInstanceService instanceService, IRandom random)
 {
     _stateService    = stateService;
     _context         = context;
     _logger          = logger;
     _instanceService = instanceService;
     _random          = random;
 }
Example #12
0
 public HomeController(IAggregateService aggregateService, ITransientService transientService, IScopedService scopedService, IInstanceService instanceService, ISingletonService singletonService)
 {
     AggregateService = aggregateService;
     TransientService = transientService;
     ScopedService    = scopedService;
     SingletonService = singletonService;
     InstanceService  = instanceService;
 }
Example #13
0
 public CollectedDataController(ICollectedDataService service,
                                IMapper mapper,
                                IInstanceService instanceService)
 {
     _collectedDataService = service;
     _mapper          = mapper;
     _instanceService = instanceService;
 }
Example #14
0
 public Report(
     IDatabaseService databaseService,
     IInstanceService instanceService
     )
 {
     this.databaseService = databaseService;
     this.instanceService = instanceService;
 }
Example #15
0
 public Action(
     IDatabaseService databaseService,
     IInstanceService instanceService
     )
 {
     this.databaseService = databaseService;
     this.instanceService = instanceService;
 }
Example #16
0
 public Report(
     IDatabaseService databaseService,
     IReportMetadataService reportMetadataService,
     IInstanceService instanceService
     ) : base(reportMetadataService)
 {
     this.databaseService = databaseService;
     this.instanceService = instanceService;
 }
Example #17
0
 public ApplicationBootstrapper(
     IInstanceService instanceService,
     IStorageService storageService,
     IMetadataService metadataService)
 {
     _instanceService = instanceService;
     _storageService  = storageService;
     _metadataService = metadataService;
 }
 public MeetingAttendeeController(
     IMeetingService meetingService,
     IInstanceService invatationService,
     IAuthenticationService authenticationService)
 {
     _meetingService        = meetingService;
     _invationService       = invatationService;
     _authenticationService = authenticationService;
 }
        public ApplicationBootstrapper(
			IInstanceService instanceService,
			IStorageService storageService,
			IMetadataService metadataService)
        {
            _instanceService = instanceService;
            _storageService = storageService;
            _metadataService = metadataService;
        }
Example #20
0
 public WfRuntimeForward(
     ITaskService taskService,
     IInstanceService instanceService,
     IInstanceTaskService iTaskService)
 {
     this.taskService     = taskService;
     this.instanceService = instanceService;
     this.iTaskService    = iTaskService;
 }
Example #21
0
 public Report(
     IDatabaseService databaseService,
     IInstanceService instanceService,
     ICmsFileService cmsFileService
     )
 {
     _databaseService = databaseService;
     _instanceService = instanceService;
     _cmsFileService  = cmsFileService;
 }
Example #22
0
        public EmulController(IInstanceService instanceService, ISettingService settingService, IAliveStrategyRepository aliveStrategyRepository, IOrderRepository orderRepository)
        {
            this.instanceService = instanceService;
            this.settingService = settingService;
            this.aliveStrategyRepository = aliveStrategyRepository;
            this.orderRepository = orderRepository;

            jsonSerializerSettings = new JsonSerializerSettings();
            jsonSerializerSettings.NullValueHandling = NullValueHandling.Ignore;

        }
Example #23
0
 public Report(
     IDatabaseService databaseService,
     IInstanceService instanceService,
     ICmsFileService cmsFileService,
     IReportMetadataService reportMetadataService
     ) : base(reportMetadataService)
 {
     _databaseService = databaseService;
     _instanceService = instanceService;
     _cmsFileService  = cmsFileService;
 }
Example #24
0
        private void OnShutdown(IInstanceService instanceService, IJobService jobService)
        {
            _logger.Log(LogLevel.Warning, "Application shutdown initiated");

            instanceService.MarkInstanceDown(true);

            //mark currently running jobs from this instance as stopped
            jobService.MarkStopped(instanceService.GetCurrentInstanceId());

            _logger.Log(LogLevel.Warning, "Instance marked as down");
        }
Example #25
0
 public WfRuntimeBackward(
     ITaskService taskService,
     IRouteService routeService,
     IInstanceService instanceService,
     IInstanceTaskService iTaskService)
 {
     this.taskService     = taskService;
     this.routeService    = routeService;
     this.instanceService = instanceService;
     this.iTaskService    = iTaskService;
 }
 public HomeController(
     ILogger <HomeController> logger,
     IWebHostEnvironment env,
     IFileProvider fileProvider,
     IInstanceService instances)
 {
     this.logger       = logger;
     this.env          = env;
     this.fileProvider = fileProvider;
     this.instances    = instances;
 }
Example #27
0
 public JobExecuter(IInstanceService instanceService, IPluginRunner pluginRunner, IJobRepository jobRepository,
                    IJobSessionRepository jobSessionRepository, IJobScheduleRepository jobScheduleRepository, ILogger <JobExecuter> logger,
                    IConfiguration configuration, IWorkloadAnalyzer workloadAnalyzer)
 {
     _instanceService       = instanceService;
     _pluginRunner          = pluginRunner;
     _jobRepository         = jobRepository;
     _jobSessionRepository  = jobSessionRepository;
     _jobScheduleRepository = jobScheduleRepository;
     _logger           = logger;
     _configuration    = configuration;
     _workloadAnalyzer = workloadAnalyzer;
 }
Example #28
0
 public ModuleService(
     IReportRepository reportRepository,
     IActionRepository actionRepository,
     IInstanceService instanceService,
     IDatabaseService databaseService,
     IModuleMetadataService moduleMetadataService
     )
 {
     this.reportRepository      = reportRepository;
     this.actionRepository      = actionRepository;
     this.instanceService       = instanceService;
     this.databaseService       = databaseService;
     this.moduleMetadataService = moduleMetadataService;
 }
Example #29
0
 public InstanceController
 (
     IInstanceRepository instanceRepository,
     IServiceLogRepository log,
     IArtifactPermissionsRepository artifactPermissionsRepository,
     IPrivilegesRepository privilegesRepository,
     IInstanceService instanceService) : base(log)
 {
     _instanceRepository            = instanceRepository;
     _artifactPermissionsRepository = artifactPermissionsRepository;
     _instanceService      = instanceService;
     _privilegesManager    = new PrivilegesManager(privilegesRepository);
     _privilegesRepository = privilegesRepository;
 }
Example #30
0
        public InstanceServiceTest()
        {
            _now = DateTime.UtcNow;

            var dateTime = new Mock <IDateTime>();

            dateTime.Setup(d => d.UtcNow).Returns(_now);

            _instanceService = new FORFarm.Application.Farm.InstanceService(
                dateTime.Object,
                new Mock <IClientHandler>().Object,
                new Mock <IStateService>().Object,
                Mapper,
                NewContext);
        }
Example #31
0
 public HomeController(ITransientService transientService1,
                       ITransientService transientService2,
                       IScopeService scopeService1,
                       IScopeService scopeService2,
                       IInstanceService instanceService1,
                       IInstanceService instanceService2
                       )
 {
     _transientService1 = transientService1;
     _transientService2 = transientService2;
     _scopeService1     = scopeService1;
     _scopeService2     = scopeService2;
     _instanceService1  = instanceService1;
     _instanceService2  = instanceService2;
 }
Example #32
0
 public MeetingController(
     IMeetingService meetingService,
     IInstanceService invatationService,
     ILogService logService,
     ILoggerFactory logger,
     IAuthenticationService authenticationService,
     IMeetingAttachmentService meetingAttachmentService)
 {
     _meetingService           = meetingService;
     _invatationService        = invatationService;
     _logService               = logService;
     _authenticationService    = authenticationService;
     _meetingAttachmentService = meetingAttachmentService;
     _logger = logger.CreateLogger("MeetingController");
 }
Example #33
0
        public Report(
            IDatabaseService databaseService,
            IInstanceService instanceService,
            IReportMetadataService reportMetadataService,
            HttpClient httpClient = null
            ) : base(reportMetadataService)

        {
            this.databaseService = databaseService;
            this.instanceService = instanceService;

            if (httpClient != null)
            {
                _httpClient = httpClient;
            }
        }
 public void Setup()
 {
     this.logger                  = Mock.Of <ILogger <InstanceService> >();
     this.instanceRepository      = new InstanceRepositoryStub();
     this.instanceService         = new InstanceService(instanceRepository, logger);
     this.applicationOneInstance1 = new Instance()
     {
         App            = "ApplicationTest",
         HostName       = "hostNameTest",
         IpAddr         = "0.0.0.0",
         Port           = 6969,
         HealthCheckUrl = "",
         HomePageUrl    = "",
         Status         = "",
         StatusPageUrl  = ""
     };
 }
 public InstanceController(IInstanceService service, IMapper mapper)
 {
     _service = service;
     _mapper = mapper;
 }