Example #1
0
            //=====================================================================

            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="cache">The cache with which this indexed document is associated</param>
            /// <param name="file">The file to index</param>
            public IndexedDocument(IndexedCache cache, string file)
            {
                foreach (var kv in cache.GetValues(file))
                {
                    index[kv.Key] = kv.Value;
                }
            }
Example #2
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="parent">The parent build component</param>
        /// <param name="sourceIndex">The source index</param>
        /// <param name="keyXPath">The key XPath expression</param>
        /// <param name="sourceXPath">The source XPath expression</param>
        /// <param name="targetXPath">The target XPath expression</param>
        /// <param name="isAttribute">True if the targets are to be added as attributes, false if they are to be
        /// added as elements</param>
        /// <param name="ignoreCase">True to ignore case on the keys when retrieving index values</param>
        public CopyFromIndexCommand(BuildComponentCore parent, IndexedCache sourceIndex, string keyXPath,
                                    string sourceXPath, string targetXPath, bool isAttribute, bool ignoreCase) :
            base(parent, sourceXPath, targetXPath)
        {
            this.SourceIndex = sourceIndex;
            this.Key         = XPathExpression.Compile(keyXPath);
            this.IsAttribute = isAttribute;
            this.IgnoreCase  = ignoreCase;
        }