private bool Equals(Server other) { return string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && Equals(URI, other.URI); }
private static string LABKEY_CSRF = "X-LABKEY-CSRF"; // Not L10N public WebClientWithCredentials(Uri serverUri, string username, string password) { // Add the Authorization header Headers.Add(HttpRequestHeader.Authorization, Server.GetBasicAuthHeader(username, password)); _serverUri = serverUri; }
public static void VerifyFolder(IPanoramaClient panoramaClient, Server server, string panoramaFolder) { switch (panoramaClient.IsValidFolder(panoramaFolder, server.Username, server.Password)) { case FolderState.notfound: throw new PanoramaServerException( string.Format( "Folder {0} does not exist on the Panorama server {1}", panoramaFolder, panoramaClient.ServerUri)); case FolderState.nopermission: throw new PanoramaServerException(string.Format( "User {0} does not have permissions to upload to the Panorama folder {1}", server.Username, panoramaFolder)); case FolderState.notpanorama: throw new PanoramaServerException(string.Format( "{0} is not a Panorama folder", panoramaFolder)); } }
private bool Equals(Server other) { return(string.Equals(Username, other.Username) && string.Equals(Password, other.Password) && Equals(URI, other.URI)); }