Exemple #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);
        }
Exemple #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());
        }