Exemple #1
0
 protected override void OnStart()
 {
   base.OnStart();
   var owinhost =
     Application.PeerCast.OutputStreamFactories.FirstOrDefault(factory => factory is OWINHostOutputStreamFactory) as OWINHostOutputStreamFactory;
   if (owinhost!=null) {
     if (application!=null) {
       owinhost.RemoveApplication(application);
     }
     application = owinhost.AddApplication("/admin", PathParameters.None, OnProcess);
   }
 }
Exemple #2
0
 protected override void OnStart()
 {
   Logger.AddWriter(logWriter);
   updater.NewVersionFound += OnNewVersionFound;
   updater.CheckVersion();
   var owinhost =
     Application.PeerCast.OutputStreamFactories.FirstOrDefault(factory => factory is OWINHostOutputStreamFactory) as OWINHostOutputStreamFactory;
   if (owinhost!=null) {
     if (application!=null) {
       owinhost.RemoveApplication(application);
     }
     application = owinhost.AddApplication("/api/1", PathParameters.None, OnProcess);
   }
 }