justinjstark / smtprouter Goto Github PK
View Code? Open in Web Editor NEWAn SMTP server that captures and reroutes emails for test environments
An SMTP server that captures and reroutes emails for test environments
I'm trying to hit the balance of using Dependency Injection and allowing for explicit stack configuration. Each middleware should be able to use dependencies that are injected (ex: an HttpPost middleware that uses IHttpClientFactory). This requires sending the IServiceProvider down to the stack configuration (which makes it U-G-L-Y) or using a completely different technique to set up a Stack (I'm looking for patterns).
The bottom line is there are certain dependencies which we expect to be injected (ILogger, IHttpClientFactory, etc) and some parameters we want to inject during Stack configuration (Log formatter, rerouteRules, etc).
โ src git:(master) dotnet run --project SmtpRouter/SmtpRouter.csproj
Configuration Result:
[Success] Name SMTP Router
[Success] Description An SMTP server which reroutes emails for a test environment
[Success] ServiceName SMTP Router
Topshelf v4.1.0.172, .NET Framework v4.0.30319.42000
Topshelf.Runtime.Windows.WindowsHostEnvironment Error: 0 : Unable to get parent process (ignored), System.DllNotFoundException: Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libkernel32.dll, 1): image not found
at Topshelf.Runtime.Windows.Kernel32.CreateToolhelp32Snapshot(UInt32 dwFlags, UInt32 th32ProcessID)
at Topshelf.Runtime.Windows.WindowsHostEnvironment.GetParent(Process child)
Topshelf.HostFactory Error: 0 : The service terminated abnormally, System.PlatformNotSupportedException: ServiceController enables manipulating and accessing Windows services and it is not applicable for other operating systems.
at System.ServiceProcess.ServiceController.GetServices()
at Topshelf.Runtime.Windows.WindowsHostEnvironment.IsServiceListed(String serviceName)
at Topshelf.Hosts.ConsoleRunHost.Run()
at Topshelf.HostFactory.Run(Action`1 configureCallback)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.