Example #1
0
        static void Main(string[] args)
        {
            var path      = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "data");
            var extractor = DataExtractor.Load(path, overwrite: false);

            extractor.SaveData(path);

            // Copy to PCL project for embedding
            var filePath = Path.Combine(path, "tz.dat");

            File.Copy(filePath, @"..\..\..\TimeZoneNames\tz.dat", true);
        }
Example #2
0
        static void Main(string[] args)
        {
            var path      = Path.Combine(AppContext.BaseDirectory, "data");
            var extractor = DataExtractor.Load(path, overwrite: false);

            var dataFileName   = "data.json.gz";
            var outputFilePath = Path.Combine(path, dataFileName);

            extractor.SaveData(outputFilePath);

            File.Copy(outputFilePath, $@"..\TimeZoneNames\{dataFileName}", true);
        }
Example #3
0
        static void Main(string[] args)
        {
            var path      = Path.Combine(".", "data");
            var extractor = DataExtractor.Load("data", overwrite: false);

            var dataFileName   = "data.json.gz";
            var outputFilePath = Path.Combine(path, dataFileName);

            extractor.SaveData(outputFilePath);

            var destPath = Path.Combine("..", "..", "..", "..", "TimeZoneNames", dataFileName);

            File.Copy(outputFilePath, destPath, true);
        }
Example #4
0
        static void Main(string[] args)
        {
            var path      = Path.Combine(PlatformServices.Default.Application.ApplicationBasePath, "data");
            var extractor = DataExtractor.Load(path, overwrite: true);

            extractor.SaveData(path);

            // Copy to PCL project for embedding
            var filePath = Path.Combine(path, "tz.dat");
            var destPath = Path.Combine("..", "TimeZoneNames", "tz.dat");

            Console.WriteLine("Copy from: " + filePath);
            Console.WriteLine("Copy to: " + destPath);
            File.Copy(filePath, destPath, true);
        }