Exemplo n.º 1
0
 private bool Equals(Server other)
 {
     return string.Equals(Username, other.Username) &&
            string.Equals(Password, other.Password) &&
            Equals(URI, other.URI);
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 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));
     }
 }
Exemplo n.º 4
0
 private bool Equals(Server other)
 {
     return(string.Equals(Username, other.Username) &&
            string.Equals(Password, other.Password) &&
            Equals(URI, other.URI));
 }