コード例 #1
0
 private void PushToContext(MetadataContextStack contextStack, string key, object value, bool fullName = false)
 {
     if (!fullName)
     {
         key = key.SubstringAfter(matchString + "_");
     }
     contextStack.Add(key, value);
 }
        public IEnumerable <IRoot> Run <TMetadata>(TMetadata metadata)
        {
            contextStack.Push(Constants.Metadata, metadata);
            contextStack.Add(Constants.ExpansionFirstRunner, this);
            var thisRoot = templateRoot.Copy();

            DoTemplateStart(thisRoot);
            IDom nextPart = null;
            var  retList  = Update(thisRoot, contextStack, ref nextPart).Cast <IRoot>();

            DoTemplateComplete(thisRoot, retList);
            contextStack.Pop();
            return(retList);
        }