예제 #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Session.DefaultDataBase           = "twitterlike";
            DeNSo.Core.Configuration.BasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "densosamples/" + System.Diagnostics.Process.GetCurrentProcess().Id);

            if (!Directory.Exists(DeNSo.Core.Configuration.BasePath))
            {
                Directory.CreateDirectory(DeNSo.Core.Configuration.BasePath);
            }

            EventP2PDispatcher.EnableP2PEventMesh();
            EventP2PDispatcher.MakeNodeAvaiableToPNRP(Cloud.Available);
        }
예제 #2
0
 protected override void OnExit(ExitEventArgs e)
 {
     EventP2PDispatcher.StopP2PEventMesh();
     Session.ShutDown();
     base.OnExit(e);
 }