Esempio n. 1
0
        private InMemoryServer CreateServer(Func <IPrincipal> getPrincipal)
        {
            var server = new InMemoryServer();

            var handler = new AuthorizationTestMessageHandler();

            handler.GetPrincipal = getPrincipal;

            server.Configuration.MessageHandlers.Add(handler);
            server.Configuration.MapHttpAttributeRoutes();

            return(server);
        }
        private InMemoryServer CreateServer(Func<IPrincipal> getPrincipal)
        {
            var server = new InMemoryServer();

            var handler = new AuthorizationTestMessageHandler();
            handler.GetPrincipal = getPrincipal;

            server.Configuration.MessageHandlers.Add(handler);
            server.Configuration.MapHttpAttributeRoutes();

            return server;
        }