public static PwGroup GetExportGroup(PwDatabase database)
        {
            var syncGroup = database.RootGroup.Groups.Single(g => GroupExtensions.IsCustomAttributeSet(g, AttributeFlags.IsSyncGroup));

            if (syncGroup != null)
            {
                return(syncGroup.Groups.Single(g => GroupExtensions.IsCustomAttributeSet(g, AttributeFlags.IsExportGroup)));
            }
            return(null);
        }
 public static PwGroup GetGroupsByAttributes(PwDatabase database, AttributeFlags attribute, bool recursive = false)
 {
     foreach (PwGroup rootGroup in database.RootGroup.GetGroups(recursive))
     {
         if (GroupExtensions.IsCustomAttributeSet(rootGroup, attribute))
         {
             return(rootGroup);
         }
     }
     return(null);
 }