public void SaveEntries(IEnumerable <Credential> entries)
        {
            CredentialsWrapper credentials = new CredentialsWrapper()
            {
                Credentials = entries.ToList()
            };
            string serializedCreds = JsonConvert.SerializeObject(credentials, Constants.JsonSerializerSettings);

            lock (lockObject)
            {
                WriteToFile(this.fileName, serializedCreds);
            }
        }
        public IEnumerable <Credential> LoadEntries()
        {
            if (!File.Exists(this.fileName))
            {
                return(Enumerable.Empty <Credential>());
            }

            string serializedCreds;

            lock (lockObject)
            {
                serializedCreds = File.ReadAllText(this.fileName);
            }

            CredentialsWrapper creds = JsonConvert.DeserializeObject <CredentialsWrapper>(serializedCreds, Constants.JsonSerializerSettings);

            if (creds != null)
            {
                return(creds.Credentials);
            }
            return(Enumerable.Empty <Credential>());
        }