示例#1
0
        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));
        }
示例#2
0
 public void SetItem <T>(string key, T item)
 {
     _itemsHolder.SetItem(GetEffectiveItemKey(key), item);
 }