public RuleCollectionView(CSPRuleCollector collector) { this.collector = collector; collector.OnRuleAddedOrModified += AddToListViewOnUIThread; InitializeComponent(); }
private void ValidateCSPReportSet( string documentUri, string expectedCsp, string[] cspReportsUnsafeInline, string[] cspReportsUnsafeEval) { CSPRuleCollector collector = new CSPRuleCollector(logger); foreach (var cspReport in cspReportsUnsafeInline.Select(cspReportAsString => CSPReport.Parse(cspReportAsString))) { collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeInline); } foreach (var cspReport in cspReportsUnsafeEval.Select(cspReportAsString => CSPReport.Parse(cspReportAsString))) { collector.Add(cspReport, CSPRuleCollector.InterpretBlank.UnsafeEval); } Assert.AreEqual(collector.Get(documentUri), expectedCsp); }
public FiddlerExtension() { logger = new FiddlerAppLogger(); collector = new CSPRuleCollector(logger); }