Ejemplo n.º 1
0
 public UserHost(IBasicApplicationLifetime lifetime, NormalizedPath userHostPath)
 {
     Directory.CreateDirectory(userHostPath);
     ApplicationLifetime  = lifetime;
     CommandRegister      = new CommandRegister();
     _xTypedObjectfactory = new XTypedFactory();
     UserKeyVault         = new UserKeyVault(userHostPath);
     _worldMapping        = new SimpleWorldLocalMapping(userHostPath.AppendPart("WorldLocalMapping.txt"));
     _store        = new GitWorldStore(userHostPath, _worldMapping, UserKeyVault.KeyStore, CommandRegister);
     WorldSelector = new WorldSelector(_store, CommandRegister, _xTypedObjectfactory, UserKeyVault.KeyStore, lifetime);
     CommandRegister.Register(this);
 }
Ejemplo n.º 2
0
 public void Refresh(IActivityMonitor m)
 {
     _store.PullAll(m);
     if (WorldSelector.CanClose)
     {
         var opened = WorldSelector.CurrentWorld.WorldName.FullName;
         if (opened != null)
         {
             WorldSelector.Close(m);
             WorldSelector.Open(m, opened);
         }
     }
 }
Ejemplo n.º 3
0
 public void Dispose()
 {
     WorldSelector.Dispose();
     _store.Dispose();
 }