public static bool Load(string targetName, out CredetiansReadArg credetiansReadArg) { if (!CreadentialsManager.Load(targetName, CredentialTypeDefault, out CredentialOutput credentialOutput)) { credetiansReadArg = default; return(false); } credetiansReadArg = new CredetiansReadArg( credentialOutput.Comment, credentialOutput.LastWriteTimeUtc, credentialOutput.Password, credentialOutput.UserName); return(true); }
public static void Wrtire(CredetiansWriteArg credetiansWriteArg) { if (!CreadentialsManager.TryWrite(new CredentialInput( FlagsDefault, CredentialTypeDefault, credetiansWriteArg.TargetName, credetiansWriteArg.Comment, credetiansWriteArg.Password, PersistanceTypeDefault, credetiansWriteArg.UserName))) { throw new InvalidOperationException("Can't write creadentials."); } }
public static void Delete(string targetName) => CreadentialsManager.Delete(targetName, CredentialTypeDefault);