private void Create() { log.InfoFormat("Creating new CKAN registry at {0}", path); registry = Registry.Empty(); AscertainDefaultRepo(); Save(); }
private void Load() { // Our registry needs to know our KSP install when upgrading from older // registry formats. This lets us encapsulate that to make it available // after deserialisation. var settings = new JsonSerializerSettings { Context = new System.Runtime.Serialization.StreamingContext( System.Runtime.Serialization.StreamingContextStates.Other, ksp ) }; log.DebugFormat("Trying to load registry from {0}", path); string json = File.ReadAllText(path); log.Debug("Registry JSON loaded; parsing..."); // A 0-byte registry.json file loads as null without exceptions registry = JsonConvert.DeserializeObject<Registry>(json, settings) ?? Registry.Empty(); log.Debug("Registry loaded and parsed"); ScanDlc(); log.InfoFormat("Loaded CKAN registry at {0}", path); }
private void Create() { log.InfoFormat("Creating new CKAN registry at {0}", path); registry = Registry.Empty(); Save(); }
private void Create() { registry = Registry.Empty(); log.DebugFormat("Creating new CKAN registry at {0}", path); Save(); }
private void Create() { registry = Registry.Empty(ksp.tryGetFactorioAuthData()); log.DebugFormat("Creating new CFAN registry at {0}", path); Save(); }