C# Class Microsoft.Protocols.TestSuites.MS_WOPI.MS_WOPIManagedCodeSUTControlAdapter

The implementation of the IMS-WOPIManagedCodeSUTControlAdapter interface.
Inheritance: Microsoft.Protocols.TestTools.ManagedAdapterBase, IMS_WOPIManagedCodeSUTControlAdapter
Afficher le fichier Open project: OfficeDev/Interop-TestSuites

Méthodes publiques

Méthode Description
GetWOPIRootResourceUrl ( string absoluteUrlOfResource, WOPIRootResourceUrlType rootResourceType, string userName, string password, string domain ) : string

A method used to get the WOPI resource URL by specified user credentials.

Initialize ( ITestSite testSite ) : void

The Overridden Initialize method, it includes the initialization logic of this adapter.

Méthodes protégées

Méthode Description
GenerateRequestWOPIViewUrl ( string absoluteUrlOfResource, WOPIRootResourceUrlType rootResourceType ) : string

A method is used to generate request URL for viewing a normal resource in WOPI mode.

GetAbsoluteRequestUrlWithToken ( string wopiResourceUrl, string tokenValue ) : string

A method is used to get the absolute request URL with the token.

GetTokenByResponseOfRequestView ( string responseOfRequestViewResource ) : string

A method is used to get the token value from a html response which is returned by WOPI server when it receive a WOPI view request.

GetWOPISrcValueByResponseOfRequestViewFile ( string responseOfRequestViewFile ) : string

A method is used to get the WOPISrc URL parameter value from a html response which is returned by WOPI server when it receive a WOPI view request.

ReadHtmlContentFromResponse ( HttpWebResponse response ) : string

A method is used to read html contents from the http response. If could not read the html contents, it will throw an exception.

TriggerRequestViewByUrl ( string requestViewResourceUrl, string userName, string password, string domain ) : string

A method is used to send a WOPI view request to the WOPI server and get a html response.

Method Details

GenerateRequestWOPIViewUrl() protected méthode

A method is used to generate request URL for viewing a normal resource in WOPI mode.
protected GenerateRequestWOPIViewUrl ( string absoluteUrlOfResource, WOPIRootResourceUrlType rootResourceType ) : string
absoluteUrlOfResource string A parameter represents the absolute URL of a normal resource.
rootResourceType WOPIRootResourceUrlType A parameter indicating the WOPI root resource URL type.
Résultat string

GetAbsoluteRequestUrlWithToken() protected méthode

A method is used to get the absolute request URL with the token.
protected GetAbsoluteRequestUrlWithToken ( string wopiResourceUrl, string tokenValue ) : string
wopiResourceUrl string The value of the WOPI request URL.
tokenValue string The value of the token.
Résultat string

GetTokenByResponseOfRequestView() protected méthode

A method is used to get the token value from a html response which is returned by WOPI server when it receive a WOPI view request.
protected GetTokenByResponseOfRequestView ( string responseOfRequestViewResource ) : string
responseOfRequestViewResource string A parameter represents the html response which should contains token and WOPIsrc URL parameter.
Résultat string

GetWOPIRootResourceUrl() public méthode

A method used to get the WOPI resource URL by specified user credentials.
public GetWOPIRootResourceUrl ( string absoluteUrlOfResource, WOPIRootResourceUrlType rootResourceType, string userName, string password, string domain ) : string
absoluteUrlOfResource string A parameter represents the absolute URL of normal resource which will be used to get a WOPI resource URL.
rootResourceType WOPIRootResourceUrlType A parameter indicating the WOPI root resource URL type will be return.
userName string A parameter represents the name of user whose associated token will be return in the WOPI resource URL.
password string A parameter represents the password of the user.
domain string A parameter represents the domain of the user.
Résultat string

GetWOPISrcValueByResponseOfRequestViewFile() protected méthode

A method is used to get the WOPISrc URL parameter value from a html response which is returned by WOPI server when it receive a WOPI view request.
protected GetWOPISrcValueByResponseOfRequestViewFile ( string responseOfRequestViewFile ) : string
responseOfRequestViewFile string A parameter represents the html response which should contains token and WOPIsrc URL parameter.
Résultat string

Initialize() public méthode

The Overridden Initialize method, it includes the initialization logic of this adapter.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite The ITestSite member of ManagedAdapterBase
Résultat void

ReadHtmlContentFromResponse() protected méthode

A method is used to read html contents from the http response. If could not read the html contents, it will throw an exception.
protected ReadHtmlContentFromResponse ( HttpWebResponse response ) : string
response System.Net.HttpWebResponse A parameter represents http response which should contain html contents.
Résultat string

TriggerRequestViewByUrl() protected méthode

A method is used to send a WOPI view request to the WOPI server and get a html response.
protected TriggerRequestViewByUrl ( string requestViewResourceUrl, string userName, string password, string domain ) : string
requestViewResourceUrl string A parameter represents the request URL for viewing a resource by using WOPI mode.
userName string A parameter represents the name of user whose associated token will be return in the HTML content.
password string A parameter represents the password of the user.
domain string A parameter represents the domain of the user.
Résultat string