public InvoiceEmailer CreateInvoiceEmailer()
        {
            Func <Email, Email> identifyFn = x => x;

            return(_featureDecisions.IncludeOrderCancellationInEmail()
                ? new InvoiceEmailer(InvoiceEmailer.AddOrderCancellationInEmail)
                : new InvoiceEmailer(identifyFn));
        }
        public Email GenerateInvoiceEmail()
        {
            var baseEmail = BuildEmailForInvoice(this.Invoice);

            if (_featureDecisions.IncludeOrderCancellationInEmail())
            {
                return(AddOrderCancellationInEmail(baseEmail));
            }
            else
            {
                return(baseEmail);
            }
        }
 public InvoiceEmailer CreateInvoiceEmailer(Invoice invoice)
 => new InvoiceEmailer(invoice, new InvoiceEmailerConfig
 {
     AddOrderCancellationContentToEmail = _featureDecisions.IncludeOrderCancellationInEmail()
 });