예제 #1
0
        public void PopulateDefaultDefinitions()
        {
            XElement RootElement = new XElement("Checks",
                                                #region VersionCheck
                                                new XElement("Check",
                                                             new XAttribute("Name", "NWVersion"),
                                                             new XAttribute("Pass", _nwfContext.NWVersionIsCurrent()),
                                                             new XElement("Parameter", "Version of Nintex Workflow: " + _nwfContext.VersionOfNintexWorkflow())),
                                                #endregion
                                                #region TimingCheck
                                                new XElement("Check",
                                                             new XAttribute("Name", "Timing"),
                                                             new XAttribute("Pass", _nwfContext.HasCorrectTiming()),
                                                             new XElement("Parameter", "Uses Event Receiver: " + _nwfContext.UsesEventReceiver()),
                                                             new XElement("Parameter", "Uses Item Creation Receiver: " + _nwfContext.StartsOnCreateEvent()),
                                                             new XElement("Parameter", "Uses Item Modification Receiver: " + _nwfContext.StartsOnModifiedEvent()),
                                                             new XElement("Parameter", "Has Delay as First Action: " + _nwfContext.HasPauseStartAction())),
                                                #endregion
                                                #region BatchingCheck
                                                new XElement("Check",
                                                             new XAttribute("Name", "Batching"),
                                                             new XAttribute("Pass", _nwfContext.HandlesBatching()),
                                                             new XElement("Parameter", "Handles Batched Actions with Commit Pending Change Actions: " + _nwfContext.HandlesBatching())),
                                                #endregion
                                                #region NWFFileSizeCheck
                                                new XElement("Check",
                                                             new XAttribute("Name", "Filesize"),
                                                             new XAttribute("Pass", !_nwfContext.NwfTooLarge()),
                                                             new XElement("Parameter", "Workflow size is under 500kb: " + !_nwfContext.NwfTooLarge()),
                                                             new XElement("Parameter", "Workflow size: " + _nwfContext.NWFFileSize() + "kb")));

            #endregion

            BpaXmlDocument.Add(RootElement);
        }