当前位置: 首页>>代码示例>>C#>>正文


C# IConfigService.GetByKey方法代码示例

本文整理汇总了C#中IConfigService.GetByKey方法的典型用法代码示例。如果您正苦于以下问题:C# IConfigService.GetByKey方法的具体用法?C# IConfigService.GetByKey怎么用?C# IConfigService.GetByKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IConfigService的用法示例。


在下文中一共展示了IConfigService.GetByKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InstructionReceiveService

 public InstructionReceiveService(string clientId)
 {
     _clientId = clientId;
     _logger = CdevContainer.Ins.Resolve<ILogger>();
     _configService = CdevContainer.Ins.Resolve<IConfigService>();
     _name = _configService.GetByKey("InstructionActiveMQName");
     _uri = _configService.GetByKey("InstructionActiveMQUri");
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:8,代码来源:InstructionService.cs

示例2: UploadController

 /// <summary>
 /// 构造函数
 /// </summary>
 public UploadController(ILogger logger, IConfigService configService, IMediaService mediaService)
 {
     _logger = logger;
     _configService = configService;
     _mediaService = mediaService;
     saveRootPath = _configService.GetByKey<string>("UploadRootDir", "UploadFiles");
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:10,代码来源:UploadController.cs

示例3: AWeChatService

 public AWeChatService(IConfigService configService, IRepository rep, ILogger logger)
 {
     _configService = configService;
     _rep = rep;
     _logger = logger;
     _config.AppId = _configService.GetByKey("WeChatAppId");
     _config.AppSecret = _configService.GetByKey("WeChatAppSecret");
     _config.Token = _configService.GetByKey("WeChatToken");
     _config.WeChatId = _configService.GetByKey("WeChatId");
     _config.Host = _configService.GetByKey("BaseSiteUrl");
     _config.ApiUrl = _configService.GetByKey("WeChatApiUrl");
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:12,代码来源:AWeChatService.cs

示例4: MapService

 public MapService(ILogger logger, IConfigService configService)
 {
     _logger = logger;
     _configService = configService;
     _baduKey = _configService.GetByKey("MapBaiduAk", "8a5a51e831ab2b4e667db38c71b4f893");
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:6,代码来源:MapService.cs

示例5: PushService

 public PushService(IConfigService configService, ILogger logger)
 {
     _configService = configService;
     _logger = logger;
     _client = new JPushClient(_configService.GetByKey("PushAppKey"), _configService.GetByKey("PushMasterSecret"));
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:6,代码来源:PushService.cs

示例6: InstructionSendService

 public InstructionSendService(ILogger logger, IConfigService configService)
 {
     _logger = logger;
     _configService = configService;
     _name = _configService.GetByKey("InstructionActiveMQName");
     _uri = _configService.GetByKey("InstructionActiveMQUri");
     Start();
 }
开发者ID:hhahh2011,项目名称:CH.Spartan,代码行数:8,代码来源:InstructionService.cs


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