C# Класс Microsoft.Protocols.TestSuites.MS_WOPI.MS_WOPIManagedCodeSUTControlAdapter

The implementation of the IMS-WOPIManagedCodeSUTControlAdapter interface.
Наследование: Microsoft.Protocols.TestTools.ManagedAdapterBase, IMS_WOPIManagedCodeSUTControlAdapter
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

GenerateRequestWOPIViewUrl() защищенный Метод

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.
Результат string

GetAbsoluteRequestUrlWithToken() защищенный Метод

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.
Результат string

GetTokenByResponseOfRequestView() защищенный Метод

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.
Результат string

GetWOPIRootResourceUrl() публичный Метод

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.
Результат string

GetWOPISrcValueByResponseOfRequestViewFile() защищенный Метод

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.
Результат string

Initialize() публичный Метод

The Overridden Initialize method, it includes the initialization logic of this adapter.
public Initialize ( ITestSite testSite ) : void
testSite ITestSite The ITestSite member of ManagedAdapterBase
Результат void

ReadHtmlContentFromResponse() защищенный Метод

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.
Результат string

TriggerRequestViewByUrl() защищенный Метод

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.
Результат string