| WikiClientHelperBuildUserAgent(Assembly, String) Method |
This is preliminary documentation and is subject to change.
Builds a valid
User-Agent header value from the information inferred from the specified assembly,
which can be used in
ClientUserAgent.
Namespace: WikiClientLibrary.ClientAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax public static string BuildUserAgent(
Assembly assembly,
string? comment
)
Public Shared Function BuildUserAgent (
assembly As Assembly,
comment As String
) As String
Dim assembly As [Assembly]
Dim comment As String
Dim returnValue As String
returnValue = WikiClientHelper.BuildUserAgent(assembly,
comment)
public:
static String^ BuildUserAgent(
Assembly^ assembly,
String^ comment
)
static member BuildUserAgent :
assembly : Assembly *
comment : string -> string
Parameters
- assembly Assembly
- The assembly from which to acquire the user agent information.
- comment String
- Optional comment in User Agent. Can be null.
Return Value
StringA
User-Agent header value string, in the form
assembly-name/assembly-version (comment), such as
App1/1.0.
Remarks To generate User-Agent for your application automatically, use BuildUserAgent(typeof(Program), "comment"),
where Program is a class in your application assembly.
See Also