Beispiel #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);
 }
Beispiel #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);
         }
     }
 }
Beispiel #3
0
 public void Dispose()
 {
     WorldSelector.Dispose();
     _store.Dispose();
 }