public async Task <Dictionary <string, string> > GenerateAuthInfo(RemoteServiceDescription description) { if (!_authInfoGeneratorServiceFactories.TryGetValue(description.AuthInfoType, out IFactory <IAuthInfoGeneratorService> serviceFactory)) { var fragment = new TextFragment() { Code = TextCodes.NotFoundRemoteServiceAuthInfoGeneratorServiceByType, DefaultFormatting = "找不到类型为{0}的远程服务验证信息生成服务,发生位置:{1}", ReplaceParameters = new List <object>() { description.AuthInfoType, $"{this.GetType().FullName}.AuthInfoGeneratorServiceFactories" } }; throw new UtilityException((int)Errors.NotFoundRemoteServiceAuthInfoGeneratorServiceByType, fragment); } return(await serviceFactory.Create().Generate()); }
public async Task Update(RemoteServiceDescription description) { await _remoteServiceDescriptionStore.Update(description); }
public async Task Delete(RemoteServiceDescription description) { await _remoteServiceDescriptionStore.Delete(description.ID); }
public async Task Add(RemoteServiceDescription description) { await _remoteServiceDescriptionStore.Add(description); }