public void Given() { var extractor = new RuleExtractor("LessFiles\\ValidNonImporting.less"); rules = extractor.ExtractRules(); var formatter = new RazorFormatter("Formatting\\TestTemplate.cshtml"); result = formatter.FormatDocumentation(rules); }
/// <summary> /// Overrides the base monitor execute based off the notifying trigger. /// </summary> /// <param name="value"> /// The model to be used by the monitor /// </param> public override void OnNext(TModel value) { if (!Messages.Any()) { return; } var formatter = new RazorFormatter(value); foreach (var message in Messages) { if (value.Contacts.Any() && message.SendToCustomer) { // add the additional contacts to the recipients list if (!message.Recipients.EndsWith(";")) { message.Recipients += ";"; } if (message.Recipients[0] == ';') { message.Recipients = message.Recipients.TrimStart(';'); } message.Recipients = string.Format("{0}{1}", message.Recipients, string.Join(";", value.Contacts)); } // send the message NotificationContext.Send(message, formatter); } }