示例#1
0
文件: Tokens.cs 项目: dotnet/wpf-test
        /// <summary/>
        public static TokenList operator +(TokenList list1, TokenList list2)
        {
            TokenList result = new TokenList(list1);

            result.Merge(list2);
            return(result);
        }
示例#2
0
        private void CreateVariationsFromScript(string scriptFile, TokenList commandLineTokens)
        {
            TrustedFileStream stream = new TrustedFileStream(scriptFile, FileMode.Open);
            XmlDocument       doc    = new XmlDocument();

            doc.Load(PT.Untrust(stream));

            XmlElement init = doc["INIT"] as XmlElement;

            if (init == null)
            {
                throw new InvalidScriptFileException("script file: " + scriptFile + " is missing INIT element");
            }

            TokenList tokens = new TokenList(init);

            tokens.Merge(commandLineTokens);

            Variation.SetGlobalParameters(tokens);
            CreateVariations(init);
        }