コード例 #1
0
 public TrackerController(ITrackerService trackerService, IAlertTextProvider alertTextProvider, IMySession mySession, IPermissionChecker permissionChecker)
 {
     _trackerService    = trackerService;
     _alertTextProvider = alertTextProvider;
     _mySession         = mySession;
     _permissionChecker = permissionChecker;
 }
コード例 #2
0
        public void Init()
        {
            var messengerMock = new Mock<IMessenger>();
            var serviceMock   = new Mock<ITrackerService>();

            _Messenger = messengerMock.Object;

            _MockPriorityList = new List<string>() { "High", "Low" };
            _MockStatusList = new List<string>() { "In Progress", "Closed" };

            _MockActiveProject = new ProjectViewModel(new Project { Id = 1, Code = "GGGGG", Description = "", Name = "TestProject" });

            _AssignedUserMock = new User() { Id = 5, FirstName = "Adam", Username = "******", Password = "******" };

            _MockProjectUsersList = new List<User>() { _AssignedUserMock};

            serviceMock.Setup<List<string>>(p => p.GetBugPriorityList()).Returns(_MockPriorityList);
            serviceMock.Setup<List<string>>(p => p.GetBugStatusList()).Returns(_MockStatusList);
            serviceMock.Setup<List<User>>(p => p.GetUsersByProject(_MockActiveProject.ToProjectModel())).Returns(_MockProjectUsersList);
            serviceMock.Setup<User>(p => p.GetMyUser()).Returns(_AssignedUserMock);

            var _MockNotifier = new Mock<IGrowlNotifiactions>();

            _ServiceMock = serviceMock.Object;

            _ActiveProjectStub = new ProjectViewModel(new Project { Id = 5, Description = "Stub Project", Name = "Stub Title" });

            _AddPanel = new BugAddPanelViewModel(_Messenger, _ServiceMock, _MockActiveProject, _MockNotifier.Object);
        }
コード例 #3
0
 public StatsController(ITrackerService trackerService, IEventService eventService,
                        ICustomizationService customizationService)
 {
     _trackerService       = trackerService;
     _eventService         = eventService;
     _customizationService = customizationService;
 }
コード例 #4
0
        /// <summary>
        /// Initialises the panel object.
        /// </summary>
        /// <param name="comm">Messenger object to communicate with other view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project.</param>
        public BugAddPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj, IGrowlNotifiactions notifier)
            : base(comm, svc, activeProj)
        {
            InitialiseBugViewModel();

            _Notifier = notifier;
        }
コード例 #5
0
        public void Setup()
        {
            logger        = A.Fake <ILogger <TrackerService> >();
            actionService = A.Fake <ITrackerActionService>();

            trackerService = new TrackerService(logger, actionService);
        }
コード例 #6
0
 public TripReasonController(ITrackerService objIClsTripReason, IAlertTextProvider alertTextProvider, IPermissionChecker permissionChecker, IMySession mySession)
 {
     _trackerService    = objIClsTripReason;
     _alertTextProvider = alertTextProvider;
     _permissionChecker = permissionChecker;
     _mySession         = mySession;
 }
コード例 #7
0
        /// <summary>
        /// Stores dependencies and initialises selected bug list. Also
        /// sets up a message listener to recieve incoming messages.
        /// </summary>
        /// <param name="comm">The mediator for communicatin with other view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project</param>
        public BugTableViewModel(IMessenger comm, ITrackerService svc, IGrowlNotifiactions notifier,
                                 IControlFactory ctrlfactory, ProjectViewModel activeProj)
        {
            _Messenger      = comm;
            _Service        = svc;
            _ControlFactory = ctrlfactory;

            if (activeProj != null && activeProj.Id != 0)
            {
                _ActiveProject = activeProj;
                ProjectTitle   = activeProj.Name;
            }

            _Notifier = notifier;

            _SearchText = "";

            _PageSize = GetPageSizeFromSettings();

            _DefaultTableSortOrder    = new SortDescription("Id", ListSortDirection.Descending);
            _BugListViewSource.Source = _BugList;

            InitSortingAndPaging();

            if (_ActiveProject != null)
            {
                UpdateTableData();
            }

            ListenForMessages();
        }
コード例 #8
0
        /// <summary>
        /// Initialises the panel object.
        /// </summary>
        /// <param name="comm">Messenger object to communicate with other view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project.</param>
        public BugAddPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj, IGrowlNotifiactions notifier)
            : base(comm, svc, activeProj)
        {
            InitialiseBugViewModel();

            _Notifier = notifier;
        }
コード例 #9
0
        public ProjectPanelViewModel(ITrackerService svc, IMessenger mess)
        {
            _Messenger = mess;
            _Service = svc;

            Project = new ProjectViewModel();
        }
コード例 #10
0
 public CommonController(IFleetService fleetService, IUserService userService, ITrackerService trackerService, IMySession mySession)
 {
     _trackerService = trackerService;
     _mySession      = mySession;
     _fleetService   = fleetService;
     _userService    = userService;
 }
コード例 #11
0
        public ProjectPanelViewModel(ITrackerService svc, IMessenger mess)
        {
            _Messenger = mess;
            _Service   = svc;

            Project = new ProjectViewModel();
        }
コード例 #12
0
 public ExperienceDataFactory(IVisitsRepository visitsRepository, IPersonalInfoRepository personalInfoRepository, IOnsiteBehaviorRepository onsiteBehaviorRepository, IReferralRepository referralRepository, ITrackerService trackerService)
 {
     this.visitsRepository         = visitsRepository;
     this.personalInfoRepository   = personalInfoRepository;
     this.onsiteBehaviorRepository = onsiteBehaviorRepository;
     this.referralRepository       = referralRepository;
     this.trackerService           = trackerService;
 }
コード例 #13
0
        public ProjectUsersPanelViewModel(ITrackerService svc, IMessenger messenger, ProjectViewModel proj)
        {
            this._Service   = svc;
            this._Messenger = messenger;
            this._Project   = proj;

            ListenForMessages();
        }
コード例 #14
0
        public WestSideBarViewModel(ITrackerService svc, IMessenger mess, ProjectViewModel activeProj)
        {
            _Service       = svc;
            _Messenger     = mess;
            _ActiveProject = activeProj;

            ListenForMessages();
        }
コード例 #15
0
        public ProjectAddPanelViewModel(ITrackerService svc, IMessenger mess, IGrowlNotifiactions notifier)
            : base(svc, mess)
        {
            _Notifier = notifier;

            ButtonName = "Add & Close";
            PanelTitle = "Add Project";
        }
コード例 #16
0
        public ProjectUsersPanelViewModel(ITrackerService svc, IMessenger messenger, ProjectViewModel proj)
        {
            this._Service = svc;
            this._Messenger = messenger;
            this._Project = proj;

            ListenForMessages();
        }
コード例 #17
0
        public ProjectAddPanelViewModel(ITrackerService svc, IMessenger mess, IGrowlNotifiactions notifier)
            : base(svc, mess)
        {
            _Notifier = notifier;

            ButtonName = "Add & Close";
            PanelTitle = "Add Project";
        }
コード例 #18
0
        public WestSideBarViewModel(ITrackerService svc, IMessenger mess, ProjectViewModel activeProj)
        {
            _Service = svc;
            _Messenger = mess;
            _ActiveProject = activeProj;

            ListenForMessages();
        }
コード例 #19
0
ファイル: Tracker.cs プロジェクト: NicolasR/Composants
    /// <summary>
    /// Enregistre un objet comme service courant de tracking
    /// </summary>
    /// <param name="service">objet à enregistrer</param>
    public static void RegisterTracker( ITrackerService service ) {

      if ( box != null ) box.StopService();
      if ( !Registry.Has( TrackerServiceKeys.KeyTrackerService ) ) Registry.Remove( box );
      box = null;

      if ( service == null ) return;
      Registry.Add( TrackerServiceKeys.KeyTrackerService, service );
      box = service;
    }
コード例 #20
0
        public AssignedProjectsPanelViewModel(IMessenger mess, ITrackerService svc, User currentUser)
        {
            _Service     = svc;
            _Messenger   = mess;
            _CurrentUser = currentUser;

            ListenForMessages();

            IsVisible = true;
        }
コード例 #21
0
        public ProjectViewPanelViewModel(ITrackerService svc, IMessenger mess, ProjectViewModel selectedProj, IGrowlNotifiactions notifier)
            : base(svc, mess)
        {
            Project = selectedProj.Clone();

            _Notifier = notifier;

            ButtonName = "Save & Close";
            PanelTitle = "Edit Project";
        }
コード例 #22
0
        public ProjectViewPanelViewModel(ITrackerService svc, IMessenger mess, ProjectViewModel selectedProj, IGrowlNotifiactions notifier)
            : base(svc, mess)
        {
            Project = selectedProj.Clone();

            _Notifier = notifier;

            ButtonName = "Save & Close";
            PanelTitle = "Edit Project";
        }
        public void TrackLogin_Call_ShouldTrackLoginGoal(string identifier, Db db, [Frozen] ITrackerService trackerService, [Greedy] AccountTrackerService accountTrackerService)
        {
            //Arrange
            db.Add(new DbItem("Item", AccountTrackerService.LoginGoalId));

            //Act
            accountTrackerService.TrackLogin(identifier);

            //Assert
            trackerService.Received().TrackPageEvent(Arg.Is <ID>(AccountTrackerService.LoginGoalId));
        }
コード例 #24
0
        public MapForm(ITrackerService trackerService, IMapService mapService, IAPIMapperService converter, IDistanceService distanceService, ISpeedService speedService)
        {
            InitializeComponent();

            this.trackerService              = trackerService;
            this.mapService                  = mapService;
            this.converter                   = converter;
            this.distanceService             = distanceService;
            this.speedService                = speedService;
            this.mapService.PositionUpdated += MapService_PositionUpdated;
        }
コード例 #25
0
        public void Execute_OutcomeIsNotID_DoNotRegisterOutcome(string outcome, [Frozen] ITrackerService trackerService, [Greedy] RegisterOutcome registerOutcome)
        {
            //Arrange
            registerOutcome.Outcome = outcome;

            //Act
            registerOutcome.Execute(ID.Null, null);

            //Assert
            trackerService.DidNotReceive().TrackOutcome(Arg.Any <ID>());
        }
コード例 #26
0
        public void Execute_OutcomeID_RegisterOutcome(Db db, ID outcomeId, [Frozen] ITrackerService trackerService, [Greedy] RegisterOutcome registerOutcome)
        {
            //Arrange
            db.Add(new DbItem("WrongOutcome", outcomeId, Constants.OutcomeTemplateId));
            registerOutcome.Outcome = outcomeId.ToString();

            //Act
            registerOutcome.Execute(ID.Null, null);

            //Assert
            trackerService.Received().TrackOutcome(outcomeId);
        }
コード例 #27
0
        public ManagedProjectsPanelViewModel(ITrackerService svc, IMessenger mess,
                                             IControlFactory ctrlFactory, User currentUser, IGrowlNotifiactions notifier)
        {
            _Service = svc;
            _Messenger = mess;
            _Factory = ctrlFactory;
            _CurrentUser = currentUser;

            _Notifier = notifier;

            ListenForMessages();
        }
コード例 #28
0
        public ManagedProjectsPanelViewModel(ITrackerService svc, IMessenger mess,
                                             IControlFactory ctrlFactory, User currentUser, IGrowlNotifiactions notifier)
        {
            _Service     = svc;
            _Messenger   = mess;
            _Factory     = ctrlFactory;
            _CurrentUser = currentUser;

            _Notifier = notifier;

            ListenForMessages();
        }
コード例 #29
0
 public SidebarRepository(VisitsRepository visitsRepository,
                          PersonalInfoRepository personalInformationRepository,
                          OnsiteBehaviorRepository onsiteBehaviorRepository,
                          ReferralRepository referralRepository,
                          ITrackerService trackerService)
 {
     _visitsRepository = visitsRepository;
     _personalInformationRepository = personalInformationRepository;
     _onsiteBehaviorRepository      = onsiteBehaviorRepository;
     _referralRepository            = referralRepository;
     _trackerService = trackerService;
 }
コード例 #30
0
        /// <summary>
        /// Initialises the bug view panel and de-references the selected bug to
        /// ensure updates to the edited bug do not reflect in the bug table.
        /// Also initialises a message listener to monitor changes in selected bug.
        /// </summary>
        /// <param name="comm">The mediator object for communication between view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project.</param>
        /// <param name="selectedBug">The currently selected bug</param>
        public BugViewPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj, BugViewModel selectedBug, IGrowlNotifiactions notifier)
            : base(comm, svc, activeProj)
        {
            if (selectedBug == null)
                throw new ArgumentNullException("The selected bug cannot be null.");

            _Notifier = notifier;

            UpdateBugView(selectedBug);

            ListenForMessages();
        }
コード例 #31
0
        /// <summary>
        /// Stores references to dependencies and initialises the
        /// username field by retrieving currents user from service.
        /// </summary>
        /// <param name="comm">Messenger to communciate with other view models.</param>
        /// <param name="svc">Web service allowing remote procedures to be called.</param>
        /// <param name="ctrlfactory">Factory to create controls on the main window.</param>
        public MainWindowViewModel(IMessenger comm, ITrackerService svc,
                                   IWindowFactory winfactory, IControlFactory ctrlfactory)
        {
            _Messenger      = comm;
            _Service        = svc;
            _ControlFactory = ctrlfactory;
            _WindowFactory  = winfactory;

            _CurrentUser = _Service.GetMyUser();

            InitialiseActiveProject();
            ListenForMessages();
        }
コード例 #32
0
        private void Awake()
        {
            _trackerService = GetComponent <ITrackerService>(); //TODO: (bad) В случае если не используете внедрение зависимостей
            var canvas = GameObject.FindObjectsOfType(typeof(UIElement))
                         .Cast <UIElement>()
                         .Where(x => x.id == "canvas");

            var ui = (UserInterface)canvas.First().gameObject.AddComponent(typeof(UserInterface));  //TODO: тоже плохо. Но Unity по другому не умеет

            _userInterface = ui.Inject(this);

            _portal = (Portal)FindObjectOfType(typeof(Portal));
        }
コード例 #33
0
        /// <summary>
        /// Stores references to dependencies and initialses object fields.
        /// </summary>
        /// <param name="loader">The window loader.</param>
        /// <param name="svc">The registration web service.</param>
        public AccountSettingsViewModel(ITrackerService svc, IMessenger mess, IGrowlNotifiactions notifier)
        {
            _Service = svc;
            _Messenger = mess;
            _Notifier = notifier;

            User myUser = _Service.GetMyUser();

            _FirstName = myUser.FirstName;
            _LastName = myUser.Surname;
            _FirstAndLastName = _FirstName + " " + _LastName;
            _Email = myUser.Username;
            _Password = myUser.Password;
        }
コード例 #34
0
        /// <summary>
        /// Stores references to dependencies and initialses object fields.
        /// </summary>
        /// <param name="loader">The window loader.</param>
        /// <param name="svc">The registration web service.</param>
        public AccountSettingsViewModel(ITrackerService svc, IMessenger mess, IGrowlNotifiactions notifier)
        {
            _Service   = svc;
            _Messenger = mess;
            _Notifier  = notifier;

            User myUser = _Service.GetMyUser();

            _FirstName        = myUser.FirstName;
            _LastName         = myUser.Surname;
            _FirstAndLastName = _FirstName + " " + _LastName;
            _Email            = myUser.Username;
            _Password         = myUser.Password;
        }
コード例 #35
0
        /// <summary>
        /// Initialises the bug view panel and de-references the selected bug to
        /// ensure updates to the edited bug do not reflect in the bug table.
        /// Also initialises a message listener to monitor changes in selected bug.
        /// </summary>
        /// <param name="comm">The mediator object for communication between view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project.</param>
        /// <param name="selectedBug">The currently selected bug</param>
        public BugViewPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj, BugViewModel selectedBug, IGrowlNotifiactions notifier)
            : base(comm, svc, activeProj)
        {
            if (selectedBug == null)
            {
                throw new ArgumentNullException("The selected bug cannot be null.");
            }

            _Notifier = notifier;

            UpdateBugView(selectedBug);

            ListenForMessages();
        }
コード例 #36
0
 public void Setup()
 {
     request = new BattleshipRequest()
     {
         Length      = 2,
         Orientation = "vertical",
         Position    = new Coordinates {
             X = 2, Y = 3
         }
     };
     validationService = new Mock <IValidationService>();
     cacheService      = new Mock <ICacheService>();
     trackerService    = new TrackerService(cacheService.Object, validationService.Object);
 }
コード例 #37
0
        /// <summary>
        /// Stores references to dependencies and listens for incoming messages.
        /// </summary>
        /// <param name="comm">The mediator which allows communication between view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj"></param>
        public CommandPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj)
        {
            if (comm == null)
                throw new ArgumentNullException("The messenger cannot be null.");

            if (svc == null)
                throw new ArgumentNullException("Web service cannot be null.");

            _Messenger = comm;
            _Service = svc;

            if (!IsProjectNull(activeProj))
                _ActiveProject = activeProj;

            ListenForMessages();
        }
コード例 #38
0
        public void Init()
        {
            var messengerMock = new Mock <IMessenger>();
            var serviceMock   = new Mock <ITrackerService>();

            _Messenger = messengerMock.Object;

            _MockPriorityList = new List <string>()
            {
                "High", "Low"
            };
            _MockStatusList = new List <string>()
            {
                "In Progress", "Closed"
            };

            _MockActiveProject = new ProjectViewModel(new Project {
                Id = 1, Code = "GGGGG", Description = "", Name = "TestProject"
            });

            _AssignedUserMock = new User()
            {
                Id = 5, FirstName = "Adam", Username = "******", Password = "******"
            };

            _MockProjectUsersList = new List <User>()
            {
                _AssignedUserMock
            };

            serviceMock.Setup <List <string> >(p => p.GetBugPriorityList()).Returns(_MockPriorityList);
            serviceMock.Setup <List <string> >(p => p.GetBugStatusList()).Returns(_MockStatusList);
            serviceMock.Setup <List <User> >(p => p.GetUsersByProject(_MockActiveProject.ToProjectModel())).Returns(_MockProjectUsersList);
            serviceMock.Setup <User>(p => p.GetMyUser()).Returns(_AssignedUserMock);

            var _MockNotifier = new Mock <IGrowlNotifiactions>();

            _ServiceMock = serviceMock.Object;

            _ActiveProjectStub = new ProjectViewModel(new Project {
                Id = 5, Description = "Stub Project", Name = "Stub Title"
            });

            _AddPanel = new BugAddPanelViewModel(_Messenger, _ServiceMock, _MockActiveProject, _MockNotifier.Object);
        }
コード例 #39
0
        public CameraViewModel(
            CameraModel camera, 
            ITrackerService trackerService, 
            ICameraService cameraService, 
            IConsoleService consoleService,
            HelixCameraVisualizationService visualizationService)
        {
            Camera = camera;
            TrackerService = trackerService;
            CameraService = cameraService;
            ConsoleService = consoleService;
            VisualizationService = visualizationService;

            CameraService.Initialize(Camera);
            TrackerService.Initialize(Camera);
            VisualizationService.Initialize(Camera);

            if (!IsInDesignMode)
            {
                Messenger.Default.Register<AddMotionControllerMessage>(this,
                    message =>
                    {
                        TrackerService.AddMotionController(message.MotionController);
                    });

                Messenger.Default.Register<RemoveMotionControllerMessage>(this,
                    message =>
                    {
                        TrackerService.RemoveMotionController(message.MotionController);
                    });

                // add existing controllers
                foreach (MotionControllerViewModel mcvw in SimpleIoc.Default.GetAllCreatedInstances<MotionControllerViewModel>())
                {
                    TrackerService.AddMotionController(mcvw.MotionController);
                }


                SimpleIoc.Default.Register(() => this, Camera.GUID, true);
                Messenger.Default.Send(new AddCameraMessage(Camera));
                // try loading previously saved configurations for this camera
                SimpleIoc.Default.GetInstance<ISettingsService>().LoadCamera(camera);
                Camera.Calibration = SimpleIoc.Default.GetInstance<SettingsViewModel>().SettingsService.LoadCalibration(Camera.GUID);
            }
        }
コード例 #40
0
        public CameraViewModel(
            CameraModel camera, 
            ITrackerService trackerService, 
            ICameraService cameraService, 
            IConsoleService consoleService,
            HelixCameraVisualizationService visualizationService)
        {
            Camera = camera;
            TrackerService = trackerService;
            CameraService = cameraService;
            ConsoleService = consoleService;
            VisualizationService = visualizationService;

            CameraService.Initialize(Camera);
            TrackerService.Initialize(Camera);
            VisualizationService.Initialize(Camera);

            if (!IsInDesignMode)
            {
                Messenger.Default.Register<AddMotionControllerMessage>(this,
                    message =>
                    {
                        TrackerService.AddMotionController(message.MotionController);
                    });

                Messenger.Default.Register<RemoveMotionControllerMessage>(this,
                    message =>
                    {
                        TrackerService.RemoveMotionController(message.MotionController);
                    });

                // add existing controllers
                foreach (MotionControllerViewModel mcvw in SimpleIoc.Default.GetAllCreatedInstances<MotionControllerViewModel>())
                {
                    TrackerService.AddMotionController(mcvw.MotionController);
                }

                SimpleIoc.Default.Register(() => this, Camera.GUID, true);
                Messenger.Default.Send(new AddCameraMessage(Camera));
                // try loading previously saved configurations for this camera
                SimpleIoc.Default.GetInstance<ISettingsService>().LoadCamera(camera);
                Camera.Calibration = SimpleIoc.Default.GetInstance<SettingsViewModel>().SettingsService.LoadCalibration(Camera.GUID);
            }
        }
コード例 #41
0
        public MilestoneViewModel(INavigation navigation = null) : base(navigation)
        {
            trackerService        = DependencyService.Get <ITrackerService>();
            metaService           = DependencyService.Get <IMetaService>();
            authenticationService = DependencyService.Get <IAuthenticationService>();
            userMilestoneService  = DependencyService.Get <IUserMilestoneService>();

            SetPageImageSize();
            ShowBadgeAchievedImage = false;
            BadgeAchievedImage     = string.Empty;
            StringFemale           = StringFemaleDefault;
            StringMale             = StringMaleDefault;
            ColorFemale            = ColorMale = ColorGenderDefault;

            ActionType  = ActionType.Check;
            BaseContent = null;

            CurrentWeightMinimumValue = 0;
            CurrentWeightMaximumValue = App.Configuration.AppConfig.MAXIMUM_WEIGHT_LOSE;
            CurrentWeightValue        = CurrentWeightMinimumValue;

            UserTrackers   = new List <UserTracker>();
            UserMetas      = new UserMeta();
            WeightLossGoal = 0;
            PreviousWeight = 0;

            GoalAchieved         = false;
            CurrentWeightEnabled = true;
            MilestoneAchieved    = false;
            AchievedContent      = null;
            CurrentTitle         = TextResources.CurrentWeight;
            CurrentSubTitle      = string.Empty;
            IsCurrentSubTitle    = false;
            ImageFront           = ImageDefault;
            ImageSide            = ImageDefault;
            TShirtSize           = string.Empty;
            AboutYourJourney     = ErrorMessage;
            MilestoneExtended    = new UserMilestoneExtended();
            Milestones           = new List <MilestonePercentage>();
            UserMilestones       = new List <UserMilestone>();
            ViewComponents       = new List <View>();
            GetUserTracker();
        }
コード例 #42
0
        /// <summary>
        /// Stores references to dependencies and listens for incoming messages.
        /// </summary>
        /// <param name="comm">The mediator which allows communication between view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj"></param>
        public CommandPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj)
        {
            if (comm == null)
            {
                throw new ArgumentNullException("The messenger cannot be null.");
            }

            if (svc == null)
            {
                throw new ArgumentNullException("Web service cannot be null.");
            }

            _Messenger = comm;
            _Service   = svc;

            if (!IsProjectNull(activeProj))
            {
                _ActiveProject = activeProj;
            }

            ListenForMessages();
        }
コード例 #43
0
        /// <summary>
        /// Stores references to dependencies and sets up a message listener.
        /// </summary>
        /// <param name="comm">The communication channel with other view models.</param>
        /// <param name="svc">The bug tracker web service.</param>
        /// <param name="activeProj">The currently active project.</param>
        public BugPanelViewModel(IMessenger comm, ITrackerService svc, ProjectViewModel activeProj)
        {
            if (comm == null)
            {
                throw new ArgumentNullException("The messenger cannot be null.");
            }

            if (activeProj == null)
            {
                throw new ArgumentNullException("The active project cannot be null.");
            }

            if (svc == null)
            {
                throw new ArgumentNullException("The web service cannot be null.");
            }

            _Messenger     = comm;
            _Service       = svc;
            _ActiveProject = activeProj;

            ListenForMessages();
        }
コード例 #44
0
 public JoinProjectPanelViewModel(ITrackerService svc, IGrowlNotifiactions notifier)
 {
     _Service = svc;
     _Notifier = notifier;
     _User = svc.GetMyUser();
 }
コード例 #45
0
 public HomeController(ITrackerService trackerService)
 {
     _trackerService = trackerService;
 }
コード例 #46
0
ファイル: Tracker.cs プロジェクト: NicolasR/Composants
 private void Tracker_FormClosed( object sender, FormClosedEventArgs e ) {
   box = null;
 }
コード例 #47
0
 public AccountTrackerService(IAccountsSettingsService accountsSettingsService, ITrackerService trackerService)
 {
   this.accountsSettingsService = accountsSettingsService;
   this.trackerService = trackerService;
 }
コード例 #48
0
 public TrackVisitors(ITrackerService trackerService)
 {
     _trackerService = trackerService;
 }
コード例 #49
0
ファイル: RegisterOutcome.cs プロジェクト: zyq524/Habitat
 public RegisterOutcome(ITrackerService trackerService)
 {
   this.trackerService = trackerService;
 }