예제 #1
0
        public static ScribbleController GetInitialisedScribbleController(IScribbleService scribbleService)
        {
            var controller = new ScribbleController(scribbleService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri("http://localhost/api/") },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
예제 #2
0
        public ScribbleController(IScribbleService scribbleService)
        {
            Check.If(scribbleService).IsNotNull();

            _scribbleService = scribbleService;
        }