public void TestDbOutput() { var outputterClass = "API.Output.Outputters.DbOutput"; var outputterObj = OutputterFactory.GetOutputter(outputterClass); outputterObj.Output("Hello World"); Assert.AreEqual("DbOutput:Hello World", outputterObj.Result); }
static void Main(string[] args) { var outputterClass = ConfigurationSettings.AppSettings.Get("Outputter"); var outputterObj = OutputterFactory.GetOutputter(outputterClass); outputterObj.Output("Hello World"); Console.ReadLine(); }
public IHttpActionResult Post([FromBody] string message) { var outputterClass = ConfigurationSettings.AppSettings.Get("Outputter"); var outputterObj = OutputterFactory.GetOutputter(outputterClass); outputterObj.Output(message); return(Ok()); }