public static void ReplaceTokens(this IItemsHolder pipelineContext, JToken doc, IDictionary <string, IReadOnlyCollection <string> > groups) { if (!pipelineContext.TryGetItem("TokenGroups", out IDictionary <string, IDictionary <string, int> > tokenGroups)) { tokenGroups = new Dictionary <string, IDictionary <string, int> >(); pipelineContext.SetItem("TokenGroups", tokenGroups); } Replace(doc, groups, new TokenHolder(tokenGroups)); }
public void SetItem <T>(string key, T item) { _itemsHolder.SetItem(GetEffectiveItemKey(key), item); }