C# Class TableauServerSignedInRequestBase, TabMigrate

Abstract class for making requests AFTER having logged into the server
Inheritance: TableauServerRequestBase
Mostrar archivo Open project: tableau/TabMigrate

Protected Properties

Property Type Description
_onlineSession TableauServerSignIn,

Public Methods

Method Description
TableauServerSignedInRequestBase ( TableauServerSignIn, login ) : System

Constructor

Protected Methods

Method Description
CreateAndSendMimeLoggedInRequest ( string url, string protocol, MimeWriterBase, mimeToSend, Nullable requestTimeout = null ) : WebRequest

Creates a web request with a MIME payload and send it to server

CreateLoggedInWebClient ( ) : WebClient

Web client class used for downloads from Tableau Server

CreateLoggedInWebRequest ( string url, string protocol = "GET", Nullable requestTimeout = null ) : WebRequest

Creates a web request and appends the user credential tokens necessary

DownloadFile ( string urlDownload, string downloadToDirectory, string baseFilename, DownloadPayloadTypeHelper, downloadTypeMapper ) : string

Download a file

GetWebReponseLogErrors ( WebRequest webRequest, string description ) : WebResponse

Get the web response; log any error codes that occur and rethrow the exception. This allows us to get error log data with detailed information

Private Methods

Method Description
AppendLoggedInHeadersForRequest ( WebHeaderCollection webHeaders ) : void

Adds header information that authenticates the request to Tableau Online

AttemptToLogWebException ( WebException webException, string description, TaskStatusLogs, onlineStatusLog ) : void

Attempt to log any detailed information we find about the failed web request

DownloadFile_inner ( string urlDownload, string downloadToDirectory, string baseFilename, DownloadPayloadTypeHelper, downloadTypeMapper ) : string

Downloads a file

Method Details

CreateAndSendMimeLoggedInRequest() protected method

Creates a web request with a MIME payload and send it to server
protected CreateAndSendMimeLoggedInRequest ( string url, string protocol, MimeWriterBase, mimeToSend, Nullable requestTimeout = null ) : WebRequest
url string
protocol string e.g. "PUT" "POST"
mimeToSend MimeWriterBase, Mime data we are goign to send
requestTimeout Nullable
return WebRequest

CreateLoggedInWebClient() protected method

Web client class used for downloads from Tableau Server
protected CreateLoggedInWebClient ( ) : WebClient
return WebClient

CreateLoggedInWebRequest() protected method

Creates a web request and appends the user credential tokens necessary
protected CreateLoggedInWebRequest ( string url, string protocol = "GET", Nullable requestTimeout = null ) : WebRequest
url string
protocol string
requestTimeout Nullable Useful for specifying timeouts for operations that can take a long time
return WebRequest

DownloadFile() protected method

Download a file
protected DownloadFile ( string urlDownload, string downloadToDirectory, string baseFilename, DownloadPayloadTypeHelper, downloadTypeMapper ) : string
urlDownload string
downloadToDirectory string
baseFilename string
downloadTypeMapper DownloadPayloadTypeHelper,
return string

GetWebReponseLogErrors() protected method

Get the web response; log any error codes that occur and rethrow the exception. This allows us to get error log data with detailed information
protected GetWebReponseLogErrors ( WebRequest webRequest, string description ) : WebResponse
webRequest WebRequest
description string
return WebResponse

TableauServerSignedInRequestBase() public method

Constructor
public TableauServerSignedInRequestBase ( TableauServerSignIn, login ) : System
login TableauServerSignIn,
return System

Property Details

_onlineSession protected_oe property

protected TableauServerSignIn, _onlineSession
return TableauServerSignIn,