C# Class WopiHost.Url.WopiUrlGenerator

Generates WOPI URLs according to the specification WOPI v2 spec: http://wopi.readthedocs.io/en/latest/discovery.html WOPI v1 spec: https://msdn.microsoft.com/en-us/library/hh695362(v=office.12).aspx
ファイルを表示 Open project: petrsvihlik/WopiHost

Private Properties

Property Type Description
ResolveOptionalParameter string

Public Methods

Method Description
GetContainerUrl ( string containerIdentifier, string accessToken ) : string
GetFileUrlAsync ( string extension, string fileIdentifier, string accessToken, WopiActionEnum action, WopiUrlSettings urlSettings = null ) : Task

Generates an URL for a given file and action.

WopiUrlGenerator ( string wopiClientUrl, string wopiHostUrl, WopiUrlSettings urlSettings = null ) : System

Creates a new instance of WOPI URL generator class.

Private Methods

Method Description
ResolveOptionalParameter ( string name, string value, WopiUrlSettings urlSettings ) : string

Method Details

GetContainerUrl() public method

public GetContainerUrl ( string containerIdentifier, string accessToken ) : string
containerIdentifier string
accessToken string
return string

GetFileUrlAsync() public method

Generates an URL for a given file and action.
public GetFileUrlAsync ( string extension, string fileIdentifier, string accessToken, WopiActionEnum action, WopiUrlSettings urlSettings = null ) : Task
extension string File extension used to identify a correct URL template.
fileIdentifier string Identifier of a file which an object of interest.
accessToken string Access token that will be added to the URL.
action WopiActionEnum Action used to identify a correct URL template.
urlSettings WopiUrlSettings Additional URL settings (if not specified, defaults passed to the class constructor will be used).
return Task

WopiUrlGenerator() public method

Creates a new instance of WOPI URL generator class.
public WopiUrlGenerator ( string wopiClientUrl, string wopiHostUrl, WopiUrlSettings urlSettings = null ) : System
wopiClientUrl string URL of the WOPI client (OWA/OOS/etc.)
wopiHostUrl string URL of the WOPI host (endpoint serving the content to WOPI client).
urlSettings WopiUrlSettings Additional settings influencing behavior of the WOPI client.
return System