public RegexConfiguration GetConfiguration(string path) { MatchConfig matcher = Matcher.GetConfiguration(path); ReplaceConfig replacer = Replacer.GetConfiguration(path); return(new RegexConfiguration(matcher, replacer)); }
private static void TestListen() { if (!IsUserAdministrator()) { Con.WriteLine("Please start as Admin"); Con.ReadKey(); return; } var app = new LiteFiddlerApp(ReplaceConfig.GenerateFromJson("HackList.json"), int.Parse(ConfigurationManager.AppSettings["FiddlerPort"])); app.Listen(); Con.ReadKey(); app.Stop(); }
public void Intro() { // Sample: Intro DlpServiceClient client = DlpServiceClient.Create(); ContentItem content = new ContentItem { Type = "text/plain", Value = "Hi! My phone number is 555-1234-567. Please call me!" }; ReplaceConfig replace = new ReplaceConfig { ReplaceWith = "(Redacted)" }; var response = client.RedactContent(new InspectConfig(), new[] { content }, new[] { replace }); var item = response.Items[0]; Console.WriteLine(item.Value); // End sample Assert.Equal("Hi! My phone number is (Redacted). Please call me!", item.Value); }
internal RegexConfiguration(MatchConfig matcher, ReplaceConfig replacer) { Matcher = matcher; Replacer = replacer; }