Beispiel #1
0
        //HACK: This TestDefinition/ObjectSerializer/XmlDocument business is a nightmare. We need to move to a simple dictionary based model
        //This is quite a disapointing solution, but expedient. To fix this up would be expensive, with no functional/external gain.
        //I would like to switch the pipeline to be CLD/CLP based to streamline the design however.
        private IStatePayload PopulateStateArgs(Type stateType, ContentPropertyBag bag)
        {
            IStatePayload payload = null;

            if (stateType == typeof(ConvenienceStressState))
            {
                ConvenienceStressStatePayload csp = new ConvenienceStressStatePayload();
                csp.Initialize(bag);
                payload = csp;
            }
            return(payload);
        }
        /// <summary>
        /// Initializes the state object against the state Payload.
        /// </summary>
        /// <param name="stateData"></param>
        public void Initialize(IStatePayload stateData)
        {
            ConvenienceStressStatePayload payload = (ConvenienceStressStatePayload)stateData;

            string windowXamlPaths = payload.WindowXamlPaths;

            if (!String.IsNullOrEmpty(windowXamlPaths))
            {
                windowXamls = windowXamlPaths.Split(new char[] { ',' });
            }

            contentXaml = payload.ContentXamlPath;

            constraintsTable = new ConstraintsTable(payload.ConstraintsTablePath);

            actionTypes = TypeListReader.ParseTypeList(payload.ActionsPath, typeof(DiscoverableAction));
            factoryPool = new FactoryPool(payload.FactoriesPath, DiscoverableInputHelper.GetFactoryInputTypes(actionTypes), constraintsTable);
            constraintsTable.VerifyConstraints(actionTypes);
            memoryLimit = payload.MemoryLimit;
        }
 //Fortunately We don't do anything with this...
 public void Initialize(IStatePayload arguments)
 {
 }