예제 #1
0
 public void StartServer()
 {
     SiteCreator site = new SiteCreator().Create();
     site.WriteWebConfig(new WebConfigBuilder(ResizerSectionContents()).Build());
     string path = site.dir;
     server = new ServerFactory().CreateAndStart(path, "/");
     Debug.WriteLine("Located at " + path);
 }
예제 #2
0
        public void StartServer()
        {
            SiteCreator site = new SiteCreator().Create();

            site.WriteWebConfig(new WebConfigBuilder(ResizerSectionContents()).Build());
            string path = site.dir;

            server = new ServerFactory().CreateAndStart(path, "/");
            Debug.WriteLine("Located at " + path);
        }
예제 #3
0
        static void Main(string[] args)
        {
            SiteCreator site = new SiteCreator().Create();
            site.WriteWebConfig(new HttpTestingFixture().buildWebConfig());

            string physical = site.dir;

            Server s = null;
            try {
                s = new ServerFactory().CreateAndStart(physical, "/");
                Console.WriteLine("Started server at " + s.RootUrl);
                Console.WriteLine("Physical location: " + s.PhysicalPath);
                Process.Start(s.PhysicalPath);
                Process.Start(s.RootUrl.TrimEnd('/') + "/image.jpg?width=200");
                Console.WriteLine("Press any key to stop the server");
                Console.ReadKey();
            } finally {
                if (s != null) s.Stop();
            }
        }