コード例 #1
0
        public QueryResultsViewModel(string caption, IQueryResultsView view, IEventAggregator aggregator, ITimeLineService service, 
            IAsyncManager asyncManager, ContextMenuRoot menu)
        {
            this._aggregator = aggregator;
            _service = service;
            this._asyncManager = asyncManager;
            Caption = caption;
            View = view;

            View.DataContext = this;

            this.Tweets = new ObservableCollection<TweetViewModel>();

            this._aggregator.GetEvent<RefreshEvent>().Subscribe(Refresh//,
                ,ThreadOption.UIThread, true,
                _ => !this.Editing
                );

            GlobalCommands.UpCommand.RegisterCommand(new DelegateCommand<object>(MoveUp));
            GlobalCommands.DownCommand.RegisterCommand(new DelegateCommand<object>(MoveDown));

            _contextMenu = menu;

            _editCommand = new DelegateCommand<object>(EditSelectedTweet,
                                                       o =>
                                                       this.SelectedTweet !=
                                                       null);

            _cancelEditCommand = new DelegateCommand<object>(CancelEdit,
                o => this.SelectedTweet != null && this.SelectedTweet.Editable);
        }
コード例 #2
0
#pragma warning disable CS1591 // 缺少对公共可见类型或成员“AboutController.AboutController(ISiteTagService, ITimeLineService, SiteTagMapper, TimeLineMapper)”的 XML 注释
        public AboutController(ISiteTagService siteTagService, ITimeLineService timeLineService, SiteTagMapper siteTagMapper, TimeLineMapper timeLineMapper)
#pragma warning restore CS1591 // 缺少对公共可见类型或成员“AboutController.AboutController(ISiteTagService, ITimeLineService, SiteTagMapper, TimeLineMapper)”的 XML 注释
        {
            this.siteTagService  = siteTagService;
            this.timeLineService = timeLineService;
            this.siteTagMapper   = siteTagMapper;
            this.timeLineMapper  = timeLineMapper;
        }
コード例 #3
0
        private IQueryResultsView CreateView(ITimeLineService timeLineService, string viewName)
        {
            IQueryResultsViewModel vm = _factory.Create(viewName,
                                                        timeLineService);

            _region.Add(vm.View);

            return vm.View;
        }
コード例 #4
0
        private Mock<IQueryResultsViewModel> VerifyViewCreatedOnLoggedIn(ITimeLineService timeLine, string title)
        {
            var viewModel = GetMock<IQueryResultsViewModel>();

            _screenFactory.Setup(f => f.Create(title, timeLine)).Returns(viewModel.Object);

            _authorizationEvent.Object.Publish(true);

            _screenFactory.Verify(f => f.Create(title, timeLine));

            Mock<IRegion> region = GetMock<IRegion>();
            region.Verify(rf => rf.Add(viewModel.Object.View));

            return viewModel;
        }
コード例 #5
0
 public TimeLineController(ITimeLineService timeLineService, IProtectedData protectedData)
 {
     this.timeLineService = timeLineService;
     this.protectedData = protectedData;
 }
コード例 #6
0
 public CommonController(INoticeinfoService noticeinfoService, IFriendLinkService friendLinkService, ITimeLineService timeLineService)
 {
     _noticeinfoService = noticeinfoService;
     _friendLinkService = friendLinkService;
     _timeLineService   = timeLineService;
 }
コード例 #7
0
 public TimeLineController(ITimeLineService timeLineService)
 {
     _timeLineService = timeLineService;
 }
コード例 #8
0
 public TimeLineController(ITimeLineService <TimeLine> clientService)
 {
     _clientService = clientService;
 }
コード例 #9
0
 public TimeLineService(ITimeLineService <GTL> globalService)
 {
     _globalService = globalService;
 }
コード例 #10
0
 public TimeLineController(ITimeLineService <TimeLine> timeLineService, ISessionManager sessionManager, IRestaurantService <Restaurant> restaurantService)
 {
     _timeLineService   = timeLineService;
     _restaurantService = restaurantService;
     _sessionManager    = sessionManager;
 }
コード例 #11
0
 public ReviewModule(IAuthenticationService authenticationService, IDialogService dialogService, IReviewService reviewService, ITimeLineService timeLineService)
 {
     _reviewService   = reviewService;
     _timeLineService = timeLineService;
 }
コード例 #12
0
ファイル: TweetScreenFactory.cs プロジェクト: ArildF/linqtwit
 public IQueryResultsViewModel Create(string title, ITimeLineService service)
 {
     return _container.With("caption").EqualTo(title).With(service).GetInstance<IQueryResultsViewModel>();
 }
コード例 #13
0
 public TimeLinesController(ITimeLineService timelineService)
 {
     this.timelineService = timelineService;
 }