public void ContextInit(ClaimContextGenerator generator, IEnumerable <Claim> claims) { if (!_claimContextGeneratorServiceFactories.TryGetValue(generator.Type, out IFactory <IClaimContextGeneratorService> generatorServiceFactory)) { var fragment = new TextFragment() { Code = TextCodes.NotFoundClaimContextGeneratorServiceByType, DefaultFormatting = "找不到类型为{0}的声明上下文生成服务,发生位置:{1}", ReplaceParameters = new List <object>() { generator.Type, $"{this.GetType().FullName}.ClaimContextGeneratorServiceFactories" } }; throw new UtilityException((int)Errors.NotFoundClaimContextGeneratorServiceByType, fragment); } generatorServiceFactory.Create().Do(claims); }
public async Task Delete(ClaimContextGenerator generator) { await _claimContextGeneratorStore.Delete(generator.ID); }
public async Task Update(ClaimContextGenerator generator) { await _claimContextGeneratorStore.Update(generator); }
public async Task Add(ClaimContextGenerator generator) { await _claimContextGeneratorStore.Add(generator); }