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)); } }
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( Resources.PanoramaUtil_VerifyFolder_Folder__0__does_not_exist_on_the_Panorama_server__1_, panoramaFolder, panoramaClient.ServerUri)); case FolderState.nopermission: throw new PanoramaServerException(string.Format( Resources.PanoramaUtil_VerifyFolder_User__0__does_not_have_permissions_to_upload_to_the_Panorama_folder__1_, server.Username, panoramaFolder)); case FolderState.notpanorama: throw new PanoramaServerException(string.Format( Resources.PanoramaUtil_VerifyFolder__0__is_not_a_Panorama_folder, panoramaFolder)); } }