• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDataRepository类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDataRepository的典型用法代码示例。如果您正苦于以下问题:C# IDataRepository类的具体用法?C# IDataRepository怎么用?C# IDataRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDataRepository类属于命名空间,在下文中一共展示了IDataRepository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MainPageViewModel

        public MainPageViewModel(IDataRepository citiesRepository, INavigationService navigation, IEventAggregator eventAggregator)
        {
            _citiesRepository = citiesRepository;
            _navigation = navigation;
            _eventAggregator = eventAggregator;
            var clocks = _citiesRepository.GetUsersCities();
            Clocks = new ObservableCollection<CityInfo>(clocks);
            _eventAggregator.GetEvent<AddCityMessage>().Subscribe(HandleAddCity, true);
            _eventAggregator.GetEvent<DeleteCityMessage>().Subscribe(HandleDeleteCity, true);

            Add = new RelayCommand(() =>
            {
                _navigation.Navigate(Experiences.CitySelector.ToString(), null);
            });
            Donate = new RelayCommand(() => Launcher.LaunchUriAsync(new Uri("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UFS2JX3EJGU3N")));
            GoToDetails = new DelegateCommand<CityInfo>(HandleGotoDetails);
            SetShowMenu = new RelayCommand(() =>
            {
                MenuActive = !MenuActive;
            });
            GoToSettings = new RelayCommand(() =>
            {
                _navigation.Navigate(Experiences.Settings.ToString(), null);
            });
        }
开发者ID:BerserkerDotNet,项目名称:UniversalWorldClock,代码行数:25,代码来源:MainPageViewModel.cs


示例2: ConfigurableController

        protected ConfigurableController(IDataRepository repository)
        {
            _repository = repository;

            PageConfigurations = GetCurrentPageConfigurations().ToList();

        }
开发者ID:GAllenD,项目名称:jeffreyawisniewski.com,代码行数:7,代码来源:ConfigurableController.cs


示例3: DataRepositoryObjectViewModel

 public DataRepositoryObjectViewModel( IDataRepository dataRepository, IRegionManager regionManager, IInteractionService interactionService, ILoggerFacade logger )
     : base(regionManager, interactionService, logger)
 {
     Model = null;
      InTransaction = false;
      this.DataRepository = dataRepository;
 }
开发者ID:nagyist,项目名称:HealthTracker-1,代码行数:7,代码来源:DataRepositoryObjectViewModel.cs


示例4: data_generator

 public data_generator(IDataRepository db, int key)
 {
     this._key = key;
     this.CalulatedKey = new Hashtable();
     initialize_data_list(key);
     this.LoginData = get_random_data(db);
 }
开发者ID:sorvis,项目名称:C--MVC3-Secure-Web-Login-Handler,代码行数:7,代码来源:data_generator.cs


示例5: GeoRegionMaintenanceViewModel

        public GeoRegionMaintenanceViewModel(IModuleController moduleController, IDataRepository repository, IEventAggregator eventAggregator)
        {
            _moduleController = moduleController;
            _repository = repository;
            _eventAggregator = eventAggregator;

            ShowView = _moduleController.ShowViewCommand;
            NavigationDetails = _moduleController.NavigationDetails;

            ChangeMetaPanel = new DelegateCommand<bool?>(ChangeMetaViewPanel);
            ChangeGeoPanel = new DelegateCommand<bool?>(ChangeGeoViewPanel);

            DeleteMetaRegionCommand = new DelegateCommand(DeleteMetaRegion);
            EditMetaRegionCommand = new DelegateCommand(EditMetaRegion);
            AddNewMetaRegionCommand = new DelegateCommand(AddNewMetaRegion);
            DeleteMetaRegionMappingCommand = new DelegateCommand(DeleteMetaRegionMapping);
            AddMetaRegionMappingCommand = new DelegateCommand(AddMetaRegionMapping);
            DeleteGeoRegionCommand = new DelegateCommand(DeleteGeoRegion);
            EditGeoRegionCommand = new DelegateCommand(EditGeoRegion);
            CreateNewGeoRegionCommand = new DelegateCommand(CreateNewGeoRegion);

            _metaRegions = new ObservableCollection<t033_meta_region>();
            _metaRegionMappings = new ObservableCollection<t031_geo_code>();
            _geoRegions = new ObservableCollection<GeoRegionViewModel>();

            _moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionRegion, MaintenanceViewNames.MetaRegionView);
            _moduleController.SwitchPanel(MaintenanceRegionNames.GeoRegionRegion, MaintenanceViewNames.GeoRegionView);
            _moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionMappingRegion, MaintenanceViewNames.MetaRegionMappingView);

            _eventAggregator.GetEvent<RefreshRegionsEvent>().Subscribe(InitializeData);
        }
开发者ID:nzjamesk,项目名称:Nephila,代码行数:31,代码来源:GeoRegionMaintenanceViewModel.cs


示例6: FoodItemViewModel

 public FoodItemViewModel( IDataRepository dataRepository, IRegionManager regionManager, IInteractionService interactionService, ILoggerFacade logger )
     : base(dataRepository, regionManager, interactionService, logger)
 {
     FoodGroupsPerServing = new ObservableCollection<ServingViewModel<FoodGroup>>();
      ValidFoodGroups = new AllFoodGroupsViewModel( dataRepository );
      Title = DisplayStrings.NewFoodItemTitle;
 }
开发者ID:nagyist,项目名称:HealthTracker-1,代码行数:7,代码来源:FoodItemViewModel.cs


示例7: SessionData

 public SessionData(IUnityContainer container)
 {
     this.container = container;
     Customer = container.Resolve<ICustomerVM>();
     repository = container.Resolve<IDataRepository>();
     repository.DataChanged += OnCustomerChanged;
 }
开发者ID:JWroe,项目名称:ScrapTraders,代码行数:7,代码来源:SessionData.cs


示例8: ReadEventSet

        public static EventSetViewModel ReadEventSet(IDataRepository repository, bool fullLoad)
        {
            var eventSet = new EventSetViewModel(EventSetName);

            var events = repository.GetItems<t00002_event_set>();
            foreach (var ev in events)
            {
                // We want to group them by simulation id but they won't be in order
                if (!eventSet.EventSimulations.Any(e => e.Id == ev.event_simulation))
                    eventSet.EventSimulations.Add(new EventSimulationViewModel(ev.event_simulation));

                // Have option of just returning the root level tree to save time
                if (fullLoad)
                {
                    var eventViewModel = new EventViewModel(ev.event_id, ev.event_day, ev.t010_peril);

                    foreach (var footprintViewModel in ev.t00002_event_loss_footprint.Select(footprint =>
                                                                                             new EventLossFootprintViewModel
                                                                                                 (footprint.id,
                                                                                                  footprint.loss_amount,
                                                                                                  footprint.
                                                                                                      t031_geo_code)))
                    {
                        eventViewModel.EventLossFootprints.Add(footprintViewModel);
                    }

                    // We have constructed the event structure, so now add it to the relevant simulation model
                    var simulation = eventSet.EventSimulations.FirstOrDefault(e => e.Id == ev.event_simulation);
                    if (simulation != null)
                        simulation.Events.Add(eventViewModel);
                }
            }

            return eventSet;
        }
开发者ID:nzjamesk,项目名称:Nephila,代码行数:35,代码来源:T00002EventSetReader.cs


示例9: RssPlugin

 public RssPlugin(IBitTorrentEngine torrentEngine, IDataRepository dataRepository, ITimerFactory timerFactory, IWebClient webClient)
 {
     _torrentEngine = torrentEngine;
     _dataRepository = dataRepository;
     _timer = timerFactory.CreateTimer();
     _webClient = webClient;
 }
开发者ID:randacc,项目名称:hdkn,代码行数:7,代码来源:RssPlugin.cs


示例10: ServerController

        public ServerController(IDataRepository dataRepository, 
								IFileRepository fileRepository,
								IJsonDataParser jsonDataParser)
        {
            _dataRepository = dataRepository;
            _fileRepository = fileRepository;
            _jsonDataParser = jsonDataParser;
        }
开发者ID:JianpingChen,项目名称:jControl,代码行数:8,代码来源:ServerController.cs


示例11: JobManager

 public JobManager(IDataRepository database)
 {
     this.db = database;
     _jobTimer = new Timer();
     _jobTimer.Interval = 500;
     _jobTimer.Elapsed += new ElapsedEventHandler(OnElapsed);
     _jobTimer.Start();
 }
开发者ID:sethwebster,项目名称:Recurrence,代码行数:8,代码来源:JobManager.cs


示例12: DefaultPluginEngine

 public DefaultPluginEngine(IFileSystem fs, IDataRepository repo, IMessageBus mbus, IMigrationRunner runner, IPluginLoader[] loaders)
 {
     _fs = fs;
     _repo = repo;
     _mbus = mbus;
     _runner = runner;
     _loaders = loaders;
 }
开发者ID:arenhag,项目名称:hdkn,代码行数:8,代码来源:DefaultPluginEngine.cs


示例13: IterationService

        public IterationService(IDataRepository data, DiffService diff)
        {
            Requires.NotNull(data, "data");
            Requires.NotNull(diff, "diff");

            Data = data;
            Diff = diff;
        }
开发者ID:cburgdorf,项目名称:ReviewR,代码行数:8,代码来源:IterationService.cs


示例14: SelectTestViewModel

        public SelectTestViewModel(
            INavigationService navigationService,IDataRepository dataRepository,IDialogService dialogService)
        {
            _navigationService = navigationService;
            _dataRepository = dataRepository;
            _dialogService = dialogService;

        }
开发者ID:shulli,项目名称:QandAWP,代码行数:8,代码来源:SelectTestViewModel.cs


示例15: DataController

 public DataController(IDataRepository repository)
 {
     if(repository==null)
     {
         throw new ArgumentException("Server data is empty");
     }
     dataRepository = repository;
 }
开发者ID:joyjeet,项目名称:ServerTrack,代码行数:8,代码来源:DataController.cs


示例16: ReportService

 public ReportService(IDataRepository dataRepository, AppActs.Client.Repository.Interface.IApplicationRepository applicationRepository, 
     AppActs.Client.Repository.Interface.IPlatformRepository platformRepository, 
     IReportRepository reportRepository)
 {
     this.dataRepository = dataRepository;
     this.applicationRepository = applicationRepository;
     this.platformRepository = platformRepository;
     this.reportRepository = reportRepository;
 }
开发者ID:Appacts,项目名称:mobile-analytics-server,代码行数:9,代码来源:ReportService.cs


示例17: CustomerVM

		public CustomerVM(IDataRepository repository) {
			this.repository = repository;
			if (repository == null) throw new ArgumentNullException(ExceptionMessages.RepositoryNull, (Exception)null);
			currentCustomer = new CustomerData();
			cleanCustomer = new CustomerData();
			currentCustomer.AddressChanged += UpdateIsDirty;
			BackingCustomer = new Customer();
			saveHelper = new SaveHelper(repository, currentCustomer);
		}
开发者ID:JWroe,项目名称:ScrapTraders,代码行数:9,代码来源:CustomerVM.cs


示例18: DataObjectCollectionNodeViewModel

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">Name of the collection</param>
        /// <param name="dataRepository">The data repository</param>
        /// <param name="childClickCommand">The command that should be executed if a child is clicked on.</param>
        public DataObjectCollectionNodeViewModel( String name, IDataRepository dataRepository, ICommand childClickCommand )
            : base(name)
        {
            dataRepository.ItemAdded += this.OnItemAdded;
             dataRepository.ItemDeleted += this.OnItemRemoved;
             dataRepository.ItemModified += this.OnItemModified;

             _childClickCommand = childClickCommand;
        }
开发者ID:nagyist,项目名称:HealthTracker-1,代码行数:15,代码来源:DataObjectCollectionNodeViewModel.cs


示例19: FoodGroupNodeViewModel

 public FoodGroupNodeViewModel( IDataRepository dataRepository, ICommand childClickCommand )
     : base(DisplayStrings.AdminFoodGroupsTitle, dataRepository, childClickCommand)
 {
     _children =
     new ObservableCollection<TreeNodeViewModel>(
        (from foodGroup in dataRepository.GetAllFoodGroups()
         select new ClickableTreeNodeViewModel( foodGroup.Name, childClickCommand, foodGroup.ID )).ToList() );
      Children = new ReadOnlyObservableCollection<TreeNodeViewModel>( _children );
 }
开发者ID:nagyist,项目名称:HealthTracker-1,代码行数:9,代码来源:FoodGroupNodeViewModel.cs


示例20: MealTemplateNodeViewModel

 public MealTemplateNodeViewModel( IDataRepository dataRepository, ICommand childClickCommand )
     : base(DisplayStrings.AdminMealTemplatesTitle, dataRepository, childClickCommand)
 {
     _children =
     new ObservableCollection<TreeNodeViewModel>(
     (from mealTemplate in dataRepository.GetAllMealTemplates()
      select new ClickableTreeNodeViewModel( mealTemplate.Name, childClickCommand, mealTemplate.ID )).ToList() );
      Children = new ReadOnlyObservableCollection<TreeNodeViewModel>( _children );
 }
开发者ID:nagyist,项目名称:HealthTracker-1,代码行数:9,代码来源:MealTemplateNodeViewModel.cs



注:本文中的IDataRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDataService类代码示例发布时间:2022-05-24
下一篇:
C# IDataRecord类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap