Simple.CredentialManager.Credential.LoadAll C# (CSharp) Method

LoadAll() public static method

Loads all credentials
public static LoadAll ( ) : IEnumerable
return IEnumerable
        public static IEnumerable<Credential> LoadAll()
        {
            UnmanagedCodePermission.Demand();

            return NativeMethods.CredEnumerate()
                .Select(c => new Credential(c.UserName, null, c.TargetName))
                .Where(c=>c.Load());
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Loads all credentials with filter
 /// </summary>
 /// <param name="filter">Pointer to a null-terminated string that contains the filter for the returned credentials.
 /// Only credentials with a TargetName matching the filter will be returned. The filter specifies a name prefix followed by an asterisk.
 /// For instance, the filter "FRED*" will return all credentials with a TargetName beginning with the string "FRED".
 /// If NULL is specified, all credentials will be returned.</param>
 /// <returns>Credentials collection</returns>
 public static IEnumerable <Credential> GetAllCredentials(string filter)
 {
     return(Credential.LoadAll(filter));
 }
All Usage Examples Of Simple.CredentialManager.Credential::LoadAll