예제 #1
0
 public ListHelper(IAreaManager areaManager, IGoalManager goalManager, IMetricManager metricManager, IExternalApiAuthManager externalApiAuthManager)
 {
     _areaManager            = areaManager;
     _goalManager            = goalManager;
     _metricManager          = metricManager;
     _externalApiAuthManager = externalApiAuthManager;
 }
예제 #2
0
 public Performer(IAgent <TAction, TGoal> agent)
 {
     _planHandler = new PlanHandler <TAction>();
     _planHandler.AddCompleteCallBack(PlanComplete);
     _planner       = new Planner <TAction, TGoal>(agent);
     _goalManager   = agent.GoalManager;
     _actionManager = agent.ActionManager;
     _actionManager.AddActionCompleteListener(PlanActionComplete);
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController"/> class.
 /// </summary>
 /// <param name="userManager">User manager</param>
 /// <param name="goalsDbContext">Goals database context</param>
 /// <param name="goalManager">Goal manager</param>
 public HomeController(
     UserManager <ApplicationUser> userManager,
     GoalsDbContext goalsDbContext,
     IGoalManager goalManager)
 {
     this.userManager    = userManager;
     this.goalsDbContext = goalsDbContext;
     this.goalManager    = goalManager;
 }
예제 #4
0
        public CreateGoalCommand(IReader reader, IWriter writer, IDatabase db, IModelFactory factory, IGoalManager goalManager)
            : base(reader, writer)
        {
            Guard.WhenArgument(db, "db").IsNull().Throw();
            Guard.WhenArgument(factory, "factory").IsNull().Throw();
            Guard.WhenArgument(goalManager, "goalManager").IsNull().Throw();

            this.db      = db;
            this.factory = factory;

            this.goalManager = goalManager;
        }
예제 #5
0
파일: Performer.cs 프로젝트: JCYTop/Tmp
 public Performer(IAgent <TAction, TGoal> agent)
 {
     planHandler = new PlanHandler <TAction>();
     planHandler.AddCompleteCallBack(() =>
     {
         //计划完成
         DebugMsg.Log("计划完成");
         actionManager.IsPerformAction = false;
     });
     planner       = new Planner <TAction, TGoal>(agent);
     goalManager   = agent.GoalManager;
     actionManager = agent.ActionManager;
     actionManager.AddActionCompleteListener((actionLabel) =>
     {
         //计划完成了当前动作
         DebugMsg.Log("下一步");
         if (planHandler.GetCurrentHandler().Label.ToString() == actionLabel.ToString())
         {
             planHandler.HandlerAction();
         }
     });
 }
예제 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="goalManager"></param>
 public GoalsController(IGoalManager goalManager)
 {
     this.goalManager = goalManager;
 }
예제 #7
0
 public GoalsController(IGoalManager goalManager,
                        ListHelper listHelper)
 {
     _goalManager = goalManager;
     ListHelper   = listHelper;
 }
예제 #8
0
 public EntryManager(MyselfContext context, IGoalManager goalManager) : base(context)
 {
     this.goalManager = goalManager;
 }
예제 #9
0
 public GoalController(IGoalManager goalManager)
 {
     _goalManager = goalManager;
 }
예제 #10
0
 public ProgressOnDateController(IProgressOnDateManager progressOnDateManager, IGoalManager goalManager, ITaskManager taskManager)
 {
     _progressOnDateManager = progressOnDateManager;
     _goalManager = goalManager;
     _taskManager = taskManager;
 }