Plugin.SecureStorage.SecureStorageImplementation.RemoveRecord C# (CSharp) Method

RemoveRecord() private method

Removes the record.
private RemoveRecord ( string key ) : SecStatusCode
key string Key.
return SecStatusCode
        private SecStatusCode RemoveRecord(string key)
        {
            SecStatusCode ssc;
            SecRecord found = GetRecord(key, out ssc);

            // if it exists, delete it
            if (ssc == SecStatusCode.Success)
            {
                // this has to be different that the one queried
                var sr = new SecRecord(SecKind.GenericPassword);
                sr.Account = key;
                sr.ValueData = found.ValueData;
                return SecKeyChain.Remove(sr);
            }

            return SecStatusCode.NoSuchKeyChain;
        }
    }