本文整理汇总了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");
}
示例2: UploadController
/// <summary>
/// 构造函数
/// </summary>
public UploadController(ILogger logger, IConfigService configService, IMediaService mediaService)
{
_logger = logger;
_configService = configService;
_mediaService = mediaService;
saveRootPath = _configService.GetByKey<string>("UploadRootDir", "UploadFiles");
}
示例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");
}
示例4: MapService
public MapService(ILogger logger, IConfigService configService)
{
_logger = logger;
_configService = configService;
_baduKey = _configService.GetByKey("MapBaiduAk", "8a5a51e831ab2b4e667db38c71b4f893");
}
示例5: PushService
public PushService(IConfigService configService, ILogger logger)
{
_configService = configService;
_logger = logger;
_client = new JPushClient(_configService.GetByKey("PushAppKey"), _configService.GetByKey("PushMasterSecret"));
}
示例6: InstructionSendService
public InstructionSendService(ILogger logger, IConfigService configService)
{
_logger = logger;
_configService = configService;
_name = _configService.GetByKey("InstructionActiveMQName");
_uri = _configService.GetByKey("InstructionActiveMQUri");
Start();
}