/// <summary> /// Execute the sample /// </summary> /// <returns></returns> public override BoolMessageItem Execute() { string sampleScript = @"<automation> <!-- Variables --> <var name=""first"" value=""kishore"" /> <var name=""last"" value=""reddy"" /> <var name=""version"" value=""0.9.7"" /> <!-- commands --> <command name=""helloworld"" email=""${first}.${last}@mysite.com"" subject=""CommonLibrary.NET ${version} is out"" /> </automation>"; // create script runner and tell it to run xml scripts, and to load // the commands from the CommonLibrary.dll which // only has one command ( bottom of this file "CommandHelloWorld" ). var runner = new AutomationRunner("xml", "Commonlibrary"); // 1. Xml automation script var results = runner.RunText(sampleScript); runner.WriteResultsToFile("c:/temp/automation.xml"); // 2. Command Line style automation script runner.Init("cmd", "CommonLibrary"); runner.RunText(@"helloword email=""*****@*****.**"" subject=""comlib automation component"""); return(new BoolMessageItem(null, true, string.Empty)); }