/// <summary> /// Extension of the AppContext which contains the dispatcher. All we've done is throw in some dispatcher friendly components. /// </summary> /// <param name="LogOn">Example of something you might want encapulated and updated.</param> /// <param name="smtpClient">Powers the email client.</param> public ExampleContext(string LogOn, SmtpClient smtpClient) : base() { Dispatch = new Client(); this.LogOn = LogOn; Email = new Email.Client(smtpClient); File = new Io.Client(new Io.Strategy.Binary.BinaryStrategy()); Audit = new Audit.Client(); // This is passed as a ref because the audit class will register itself to various events depending on the audit level chosen. // Bootstrap the notification client. Notification = new Notification.Client(Email); var subjectResource = new Resource() { Value = "Example Subject: {0}", ResourceType = ResourceType.EmailSubject}; var bodyResource = new Resource { Value = "Example Body: {0}", ResourceType = ResourceType.EmailBody}; var emailTemplate = new ExampleEmailTemplate(typeof(object[]), subjectResource, bodyResource); Notification.AddEmailTemplate(ExampleContext.OnUserChange, emailTemplate); WireUpListeners(); WireUpRoutines(); WireUpCommandHubItems(); }
public Client(Email.Client emailClient) { _emailClient = emailClient; }