public string SuggestConnectionString(long identifier)
        {
            if (ApplicationUtility.IsRunningOnMono)
            {
                return(null);
            }

            string directoryPath = SettingsUtility.GetBaseDirectoryPath();
            string fileName      = string.Format(CultureInfo.InvariantCulture, DatabaseFileTemplate, identifier);

            var path = Path.Combine(directoryPath, fileName);

            path = Path.ChangeExtension(path, DatabaseFileExtension);

            return(string.Format(CultureInfo.InvariantCulture, SuggestConnectionStringTemplate, path));
        }
        public IEnumerable <IRegistration> SelectRegistrations()
        {
            var registrations = new List <Registration>();

            var baseDirectoryPath = SettingsUtility.GetBaseDirectoryPath();

            var files = Directory.GetFiles(baseDirectoryPath, "*.dat");

            foreach (var file in files)
            {
                var identifierValue = Path.GetFileNameWithoutExtension(file);

                if (!long.TryParse(identifierValue, out var identifier))
                {
                    continue;
                }

                var creationUtcTime = File.GetCreationTimeUtc(file);
                registrations.Add(new Registration(identifier, creationUtcTime));
            }

            return(registrations);
        }