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

C# IRepo类代码示例

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

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



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

示例1: Main

        static void Main(string[] args)
        {
            try
            {

                // DI
                IKernel _kernal = new StandardKernel();
                _kernal.Bind<INLogger>().To<NLogger>().InSingletonScope();
                _kernal.Bind<IRepo>().To<Repo>().InSingletonScope();
                _kernal.Bind<IOutputHelper>().To<OutputHelper>().InSingletonScope();
                _logger = _kernal.Get<NLogger>();
                _repo = _kernal.Get<Repo>();
                _output = _kernal.Get<OutputHelper>();

                //ValidateRunLengths();
                var duplicates = ValidateIRIAVG();

                var export = new ExcelExport().AddSheet("Duplicates", duplicates.ToArray());
                export.ExportTo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), System.Configuration.ConfigurationManager.AppSettings["excel:exportFileName"].ToString()));
            }
            catch (Exception ex)
            {
                _output.Write(string.Format("Error: {0}", ex.Message), true);
            }
            Console.WriteLine("Done. Press any key to exist.");
            Console.ReadKey();
        }
开发者ID:srailsback,项目名称:RunLengthsProcessor,代码行数:27,代码来源:Program.cs


示例2: PromotionAutocompleteController

 public PromotionAutocompleteController(IRepo<cm.Promotion> repo, IUserService userService, IRepo<cm.Product> repoProduct, IRepo<cm.ProductCategory> repoProductCategory)
 {
     this.repo = repo;
     this.userService = userService;
     this.repoProduct = repoProduct;
     this.repoProductCategory = repoProductCategory;
 }
开发者ID:kennygohcl,项目名称:AppWizAdmin,代码行数:7,代码来源:PersonAutocompleteController.cs


示例3: DashBoardBusiness

 public DashBoardBusiness(IRepo inRepo)
 {
     this._repo = inRepo;
     _listOfOrder = new List<OrderDto>();
     _listOfOrder = _repo.ListAllOrders();
     _dto = new DashBoardDto();
 }
开发者ID:paul-bargerstock,项目名称:Examples,代码行数:7,代码来源:DashBoardBusiness.cs


示例4: FarmerRepo

 public FarmerRepo(IConnectionFactory connFactory, IRepo<FarmerVersion> farmerVersionRepo, IRepo<LandOwner> landOwnerRepo, IRepo<Organization> organizationRepo, IRepo<Farmer> farmerRepo)
     : base(connFactory)
 {
     this.farmerVersionRepo = farmerVersionRepo;
     this.farmerRepo = farmerRepo;
     this.organizationRepo = organizationRepo;
     this.landOwnerRepo = landOwnerRepo;
 }
开发者ID:rodrigogalhardo,项目名称:asms-md,代码行数:8,代码来源:FarmerRepo.cs


示例5: OnNavigatedTo

        public override void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);
            Issue = new IssueViewModel(parameters[Constants.IssueParameterName] as IIssue);
            _repo = parameters[Constants.RepoParameterName] as IRepo;

            Title = string.Format(LogWork.IssueTitle, Issue.Number);
        }
开发者ID:XamarinGarage,项目名称:GiTracker,代码行数:8,代码来源:LogWorkPageViewModel.cs


示例6: OnNavigatedTo

        public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            _repo = parameters[Constants.RepoParameterName] as IRepo;
            Title = _repo.Name;

            await LoadIssuesAsync(Loader);
        }
开发者ID:XamarinGarage,项目名称:GiTracker,代码行数:9,代码来源:IssueListPageViewModel.cs


示例7: LocaleContext

        public LocaleContext(IRepo<Language> langRepo, IRepo<Currency> currRepo) {
            _langRepo = langRepo;
            _currRepo = currRepo;

            string localeCode = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;

            _lzLanguage = new Lazy<Language>(() => GetLanguage(localeCode));
            _lzCurrency = new Lazy<Currency>(() => GetCurrency(localeCode));
        }
开发者ID:jasonholloway,项目名称:brigita,代码行数:9,代码来源:LocaleContext.cs


示例8: BrigitaProducts

 public BrigitaProducts(
             IRepo<Product> repo, 
             ICategories cats, 
             ILocalizer<Product> localizer) 
 {
     _repo = repo;
     _cats = cats;
     _localizer = localizer;
 }
开发者ID:jasonholloway,项目名称:brigita,代码行数:9,代码来源:BrigitaProducts.cs


示例9: HomeModel

        public HomeModel(IRepo repo)
        {
            //   catalogs = repo.GetCatalogAndProducts().ToList();
            using (var c = new Context())
            {
                catalogs = c.Catalogs.ToList();
                products = c.Products.ToList();

            }
        }
开发者ID:MacMcDell,项目名称:BB_Catalogs,代码行数:10,代码来源:HomeModel.cs


示例10: DossierController

 public DossierController(IBuilder<Dossier, DossierCreateInput> v, IDossierService dossierService, ISystemStateServcie systemStateServcie, IRepo<DossierInfo> dossierInfoRepo, IRepo<FieldValueInfo> fieldValueInfoRepo, IRepo<IndicatorValueInfo> indicatorValueInfoRepo, IRepo<CoefficientValueInfo> coefficientValueInfoRepo)
 {
     this.v = v;
     this.dossierService = dossierService;
     this.systemStateServcie = systemStateServcie;
     this.dossierInfoRepo = dossierInfoRepo;
     this.fieldValueInfoRepo = fieldValueInfoRepo;
     this.indicatorValueInfoRepo = indicatorValueInfoRepo;
     this.coefficientValueInfoRepo = coefficientValueInfoRepo;
 }
开发者ID:rodrigogalhardo,项目名称:asms-md,代码行数:10,代码来源:DossierController.cs


示例11: OnNavigatedTo

        public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            _issue = parameters[Constants.IssueParameterName] as IIssue;
            _repo = parameters[Constants.RepoParameterName] as IRepo;

            Title = string.Format(Resources.Strings.WorkLogs.IssueTitle, _issue?.Number);

            await LoadWorkLogsAsync(Loader);
        }
开发者ID:XamarinGarage,项目名称:GiTracker,代码行数:11,代码来源:WorkLogsPageViewModel.cs


示例12: GetRepo

        public static IRepo GetRepo()
        {
            if (_repo == null)
            {
                string repomode = ConfigurationManager.AppSettings["repomode"];

                if (repomode == "T")
                    _repo = new TestOrderRepo();

                else if (repomode == "P")
                    _repo = new ProdOrderRepo();
            }
            return _repo;
        }
开发者ID:paul-bargerstock,项目名称:Examples,代码行数:14,代码来源:RepoFactory.cs


示例13: IndexModule

        public IndexModule(IRepo repo, IAppSettings appSettings)
        {
            this.repo = repo;

            Get["/"] = parameters =>
            {
                //The first request to the app will initiate MyRepo.cs and get an appSetting defined in its ctor
                return View["index"];
            };

            Get["/anotherrequest"] = parameters =>
                {
                    //This should open then close a dbconnection from the singleton dbconnectionfactory, subsequent requests will get the value from dictionary cache
                    int fsd = appSettings.GetSetting<int>("DaysUntilExpiry");

                    return View["index"];
                };
        }
开发者ID:jchannon,项目名称:SettingsCache,代码行数:18,代码来源:IndexModule.cs


示例14: PicSource

 public PicSource(IPictureService pics, IRepo<Picture> picRepo) {
     _pics = pics;
     _picRepo = picRepo;
 }
开发者ID:jasonholloway,项目名称:brigita,代码行数:4,代码来源:PicSource.cs


示例15: AppMainTitleFontSizeAjaxDropdownController

 public AppMainTitleFontSizeAjaxDropdownController(IRepo<FontSize> repo)
 {
     this.repo = repo;
 }
开发者ID:kennygohcl,项目名称:AppWizAdmin,代码行数:4,代码来源:AppMainTitleFontSizeAjaxDropdownController.cs


示例16: HobbyGuidLookupController

 public HobbyGuidLookupController(IRepo<Hobby> repo)
 {
     this.repo = repo;
 }
开发者ID:skhumbanjwa,项目名称:mvc-project-awesome,代码行数:4,代码来源:HobbyGuidLookupController.cs


示例17: CountriesAjaxListController

 public CountriesAjaxListController(IRepo<Country> repo)
 {
     this.repo = repo;
 }
开发者ID:qaleader,项目名称:MyPresentations.Slides-n-Source,代码行数:4,代码来源:AjaxListControllers.cs


示例18: LookupDemoController

 public LookupDemoController(IRepo<Hobby> hobbyRepo, IRepo<Person> personRepo)
 {
     this.hobbyRepo = hobbyRepo;
     this.personRepo = personRepo;
 }
开发者ID:skhumbanjwa,项目名称:mvc-project-awesome,代码行数:5,代码来源:LookupDemoController.cs


示例19: ChefsAjaxListController

 public ChefsAjaxListController(IRepo<Chef> repo)
 {
     this.repo = repo;
 }
开发者ID:qaleader,项目名称:MyPresentations.Slides-n-Source,代码行数:4,代码来源:AjaxListControllers.cs


示例20: FeedbackAjaxListController

 public FeedbackAjaxListController(IRepo<Feedback> repo)
 {
     this.repo = repo;
 }
开发者ID:qaleader,项目名称:MyPresentations.Slides-n-Source,代码行数:4,代码来源:AjaxListControllers.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IReport类代码示例发布时间:2022-05-24
下一篇:
C# IReorderableListAdaptor类代码示例发布时间: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