Class VersionHeaderBuilder (4.4.0)

public sealed class VersionHeaderBuilder

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.Api.Gax

Assembly

Google.Api.Gax.dll

Fields

HeaderName

public const string HeaderName = "x-goog-api-client"

The name of the header to set.

Field Value
Type Description
string

Methods

AppendAssemblyVersion(string, Type)

public VersionHeaderBuilder AppendAssemblyVersion(string name, Type type)

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

Parameters
Name Description
name string
type Type
Returns
Type Description
VersionHeaderBuilder

AppendDotNetEnvironment()

public VersionHeaderBuilder AppendDotNetEnvironment()

Appends the .NET environment information to the list.

Returns
Type Description
VersionHeaderBuilder

AppendVersion(string, string)

public VersionHeaderBuilder AppendVersion(string name, string version)

Appends the given name/version string to the list.

Parameters
Name Description
name string

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

version string

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

Returns
Type Description
VersionHeaderBuilder

Clone()

public VersionHeaderBuilder Clone()

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

Returns
Type Description
VersionHeaderBuilder

A clone of this builder.

ToString()

public override string ToString()
Returns
Type Description
string
Overrides