Beispiel #1
0
        public override void Run()
        {
            HttpListener httpListener = new HttpListener();
            httpListener.Prefixes.Add("http://localhost:10321/");
            httpListener.Start();

            var db = new MuseencStoreEntities(CloudConfigurationManager.GetSetting("Service.DbConnectionString"));

            RequestProcessor requestProcessor = new RequestProcessor(db);

            while(true)
            {
                var context = httpListener.GetContext();
                var req = context.Request;

                requestProcessor.ProcessRequest(req);

                byte[] buf = Encoding.UTF8.GetBytes("kutyámmajom");
                context.Response.OutputStream.Write(buf, 0, buf.Length);
                context.Response.Close();
            }
        }
Beispiel #2
0
 public RequestProcessor(MuseencStoreEntities db)
 {
     this.db = db;
 }