Exemplo n.º 1
0
        public static List <PwEntry> GetEntries(this PwDatabase db, Func <PwDatabase, PwEntry, bool> matchFunction = null)
        {
            List <PwEntry> entries = new List <PwEntry>();

            db.TraverseEntries(entry =>
            {
                bool isMatch = true;
                if (matchFunction != null)
                {
                    isMatch = matchFunction(db, entry);
                }
                if (isMatch)
                {
                    entries.Add(entry);
                }
                return(true);
            });
            return(entries);
        }