Example #1
0
        public void RegisterSystemTarget(ISystemTarget target)
        {
            var systemTarget = target as SystemTarget;

            if (systemTarget == null)
            {
                throw new ArgumentException($"Parameter must be of type {typeof(SystemTarget)}", nameof(target));
            }
            systemTarget.RuntimeClient = this.RuntimeClient;
            var sp = this.serviceProvider;

            systemTarget.WorkItemGroup = new WorkItemGroup(
                systemTarget,
                sp.GetRequiredService <ILogger <WorkItemGroup> >(),
                sp.GetRequiredService <ILogger <ActivationTaskScheduler> >(),
                sp.GetRequiredService <SchedulerStatisticsGroup>(),
                sp.GetRequiredService <IOptions <StatisticsOptions> >(),
                sp.GetRequiredService <IOptions <SchedulingOptions> >());
            activations.RecordNewSystemTarget(systemTarget);
        }
Example #2
0
 internal void RegisterSystemTarget(SystemTarget target)
 {
     scheduler.RegisterWorkContext(target.SchedulingContext);
     activationDirectory.RecordNewSystemTarget(target);
 }