//public static string RemoveUnsupportedFilePathCharacters(string input) //{ // //"[^"]*" - replace qualified email addresses in the form "Cieslewicz, Pawel, Vodafone Ireland" // string pattern1 = @"""[^""]*"""; // Regex rgx = new Regex(pattern1, RegexOptions.Multiline | RegexOptions.IgnoreCase); // input = rgx.Replace(input, "").Trim(); // return input.Replace("<", "").Replace(">", "").Replace("?", "").Replace(":", "").Replace("*", "").Replace("|", "").Replace(@"\", "").Replace(@"/", ""); //} private static void SubjectParser() { MFM.Lbg.Helper.Misc Misc = new MFM.Lbg.Helper.Misc(); MFM.Lbg.Helper.SimpleWorkflowRequest SimpleWorkflowRequest = new MFM.Lbg.Helper.SimpleWorkflowRequest(); SimpleWorkflowRequest = Misc.ParseSimpleWorkflowSubject("Action:TrackCase Case:3365-3687187 Request:Accept ID:3687187 GUID:a50f6ae1-650e-4277-8292-47de72f5bba2"); }
//private string ReplaceTag(string TagPattern, string HtmlText, string Replacement) //{ // Regex.Replace(HtmlText,String.Format(@"<{0}[^>*]>",TagPattern, delegate(Match TagMatch) // { // string c = TagMatch. // } // ); //} static void DpRrFilename() { string myPath = @"\\uncserver\here\sub\myfile.xml"; MFM.Lbg.Helper.Misc doIt = new MFM.Lbg.Helper.Misc(); string result = doIt.RrFileName(myPath); }
private static string EmailParser(string input) { //"Cieslewicz, Pawel, Vodafone Ireland" <*****@*****.**> MFM.Lbg.Helper.Misc Misc = new MFM.Lbg.Helper.Misc(); string tmp = Misc.RemoveUnsupportedFilePathCharacters(input); return(tmp); }
static void ParseWorlogs() { //Read Xml XmlDocument msg = new XmlDocument(); msg.Load(@"C:\Users\mcss-tarrighi-p\TFS2012\MFM Integration Apps Group\BizTalk2013\Beacon\MFM.Lbg.Interface\HelperTester\Test\TEST_MX4456660_INPRG.xml"); XmlDocument result = new XmlDocument(); MFM.Lbg.Helper.Misc doIt = new MFM.Lbg.Helper.Misc(); result = doIt.GetCombinedWorkLogMsg(msg); }
private static void TestBulkLoader() { //Test helper bulk load XmlDocument data = new XmlDocument(); data.Load(@"C:\Users\mcss-tarrighi-p\TFS2012\MFM Integration Apps Group\BizTalk2013\Beacon\MFM.Lbg.Interface\HelperTester\Test\out.xml"); MFM.Lbg.Helper.HelpdeskSqlClient Loader = new MFM.Lbg.Helper.HelpdeskSqlClient(); MFM.Lbg.Helper.Misc Misc = new MFM.Lbg.Helper.Misc(); XmlDocument msg = new XmlDocument(); msg = Misc.NotifyConstructMsg(data); }
private static void testBst() { MFM.Lbg.Helper.Misc Misc = new MFM.Lbg.Helper.Misc(); DateTime input, output; // DT evaluated as BST 2014-10-02T13:39:00+01:00 - skips and passes back as +01 as no year 2014 specified - Ok // DT evaluated as BST 2015-10-02T13:39:00+01:00 - catches and forces +01:00 as is within 2015 bst dates - OK // DT evaluated as BST 2015-11-01T13:39:00+01:00 - incorrectly marked as bst as logged in bst window, corrects to +00:00 - ok // DT evaluated as BST 2015-04-01T13:39:00+01:00 - incorrectly marked as GMT as logged before bst window input = System.Convert.ToDateTime("2015-03-31T09:01:00Z"); string u = Misc.AdjustForBst(input); //string extString = u.ToString("yyyy-MM-ddTHH:mm:sszzz"); }
private static void TestBodyParser() { string test = @"<![CDATA[ v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:10.0pt; mso-fareast-language:EN-US;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} --> This is a html email Tony Arrighi Interface Solutions Architect Mitie 35 Duchess Road, Rutherglen, Glasgow, Lanarkshire, G73 1AU, UK T: +44 (0)141 278 5861 | M: +44 (0)7979 702388 www.mitie.com MITIE Group plc is registered in Scotland under company number SC19230 at 35 Duchess Road, Rutherglen, Glasgow, G73 1AU, UK ]]>"; MFM.Lbg.Helper.Misc Misc = new MFM.Lbg.Helper.Misc(); Misc.CleanVariableSourcedBodyText(test); }