public void RemoveCredentials(BitsCredentials credentials) { try { if (job2 != null) // only supported from IBackgroundCopyJob2 and above { job2.RemoveCredentials((BG_AUTH_TARGET)credentials.AuthenticationTarget, (BG_AUTH_SCHEME)credentials.AuthenticationScheme); } } catch (COMException exception) { manager.PublishException(this, exception); } }
/// <summary>Removes the specified scheme.</summary> /// <param name="scheme">The scheme.</param> /// <param name="target">The target.</param> /// <returns></returns> public bool Remove(BackgroundCopyJobCredentialScheme scheme, BackgroundCopyJobCredentialTarget target) { try { ijob2.RemoveCredentials((BG_AUTH_TARGET)target, (BG_AUTH_SCHEME)scheme); if (dict != null) { Values.Remove(MakeKey(scheme, target)); } return(true); } catch { return(false); } }