Class VersionHeaderBuilder (1.50.0)

public sealed class VersionHeaderBuilder : object

Helps build version strings for the x-goog-api-client header. The value is a space-separated list of name/value pairs, where the value should be a semantic version string. Names must be unique.

Inheritance

Object > VersionHeaderBuilder

Namespace

Google.Apis.Requests

Assembly

Google.Apis.dll

Fields

HeaderName

public const string HeaderName = null

The name of the header to set.

Field Value
TypeDescription
String

Methods

AppendAssemblyVersion(String, System.Type)

public VersionHeaderBuilder AppendAssemblyVersion(string name, System.Type type)

Appends a name/version string, taking the version from the version of the assembly containing the given type.

Parameters
NameDescription
nameString
typeSystem.Type
Returns
TypeDescription
VersionHeaderBuilder

AppendDotNetEnvironment()

public VersionHeaderBuilder AppendDotNetEnvironment()

Appends the .NET environment information to the list.

Returns
TypeDescription
VersionHeaderBuilder

AppendVersion(String, String)

public VersionHeaderBuilder AppendVersion(string name, string version)

Appends the given name/version string to the list.

Parameters
NameDescription
nameString

The name. Must not be null or empty, or contain a space or a slash.

versionString

The version. Must not be null, or contain a space or a slash.

Returns
TypeDescription
VersionHeaderBuilder

Clone()

public VersionHeaderBuilder Clone()

Clones this VersionHeaderBuilder, creating an independent copy with the same names/values.

Returns
TypeDescription
VersionHeaderBuilder

A clone of this builder.

ToString()

public override string ToString()
Returns
TypeDescription
String

Extension Method