Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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());
        }