コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ItemsController"/> class.
 /// </summary>
 /// <param name="itemsService">
 /// The items Service.
 /// </param>
 /// <param name="formsAuthentication">
 /// The forms authentication.
 /// </param>
 public ItemsController(
     IItemsService itemsService,
     IFormsAuthentication formsAuthentication)
     : base(formsAuthentication)
 {
     this.itemsService = itemsService;
 }
コード例 #2
0
 public IEnumerable<Item> GetAllItems()
 {
     if (_service == null)
     {
         _service = DependencyResolver.Current.GetService<IItemsService>();
     }
     return _service.GetAllItems();
 }
コード例 #3
0
ファイル: BaseController.cs プロジェクト: nzhul/mvcstart
        public BaseController()
        {
            this.data = new UoWData();
            this.itemsService = new ItemsService(this.data);
            this.articlesService = new ArticlesService(this.data);
            this.pagesService = new PagesService(this.data);

            LayoutModel model = new LayoutModel();
            model.ItemCategories = this.itemsService.GetItemCategories();
            model.Articles = this.articlesService.GetArticles().Take(5);
            model.Pages = this.pagesService.GetPages();

            ViewBag.LayoutModel = model;
        }
コード例 #4
0
 public ItemCategoriesController()
 {
     this.uoWData = new UoWData();
     this.itemsService = new ItemsService(this.uoWData);
 }
コード例 #5
0
ファイル: RoomsController.cs プロジェクト: nzhul/mvcstart
 public ItemsController()
 {
     this.data = new UoWData();
     this.itemsService = new ItemsService(this.data);
 }
コード例 #6
0
ファイル: MainPageViewModel.cs プロジェクト: oferhaze/Ferrari
        public MainPageViewModel(
            IPageNavigationService pageNavigationService,
            IItemsService dataService,
            ITweetsService tweetsService,
            IVideosService youtubeChannelService,
            ISettingsService settingsService,
            IUnityContainer unityContainer,
            IItemsRepository itemsRepository,
            ITweetsRepository tweetsRepository,
            IImagesRepository imagesRepository,
            IVideosRepository videosRepository,
            ICarsRepository carsRepository,
            IFlickrService flickrService,
            ISharingService sharingService)
            : base(
                sharingService,
                pageNavigationService,
                unityContainer)
        {
            _pageNavigationService = pageNavigationService;
            _dataService = dataService;
            _tweetsService = tweetsService;
            _youtubeChannelService = youtubeChannelService;
            _unityContainer = unityContainer;
            _itemsRepository = itemsRepository;
            _tweetsRepository = tweetsRepository;
            _imagesRepository = imagesRepository;
            _videosRepository = videosRepository;
            _flickrService = flickrService;
            _carsRepository = carsRepository;

            //CarModelsCollection = carsRepository.GetAll();

#if WINDOWS_PHONE
            if (DesignerProperties.IsInDesignTool)
#else // !WINDOWS_PHONE
			if (DesignMode.DesignModeEnabled)
#endif
            {
                //InitializeDataForDesignMode();
                InitializeDataFromOnlineAsync();
            }
        }
コード例 #7
0
 public ItemsFactory()
 {
     _service = DependencyResolver.Current.GetService<IItemsService>();
 }
コード例 #8
0
 public ItemFeaturesController()
 {
     this.uoWData = new UoWData();
     this.itemsService = new ItemsService(this.uoWData);
 }