Exemplo n.º 1
0
        ExternalLinks ReadExistingDataFromFile(File file)
        {
            _file = file;

            if (!file.Exists())
            {
                _log.Debug(x => x.Write("No existing catalogue file found: {0}", file.Name));

                return new ExternalLinks();
            }

            return new ExternalLinks(JsonUtil.Get<Remote[]>(file.ReadToEnd()) ?? new Remote[0]);
        }
Exemplo n.º 2
0
        Entries ReadExistingConfigurationFromFile(File configurationFile)
        {
            _configurationPath = configurationFile;

            if (!configurationFile.Exists())
            {
                _log.Debug(x => x.Write("No existing configuration file found: {0}", configurationFile.Name));

                return new Entries();
            }

            return new Entries(JsonUtil.Get<Entry[]>(configurationFile.ReadToEnd()) ?? new Entry[0]);
        }