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.
Inherited Members
Namespace: Google.Apis.Requests
Assembly: Google.Apis.dll
Syntax
public sealed class VersionHeaderBuilder
Fields
HeaderName
The name of the header to set.
Declaration
public const string HeaderName = "x-goog-api-client"
Field Value
Type | Description |
---|---|
string |
Methods
AppendAssemblyVersion(string, Type)
Appends a name/version string, taking the version from the version of the assembly containing the given type.
Declaration
public VersionHeaderBuilder AppendAssemblyVersion(string name, Type type)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
Type | type |
Returns
Type | Description |
---|---|
VersionHeaderBuilder |
AppendDotNetEnvironment()
Appends the .NET environment information to the list.
Declaration
public VersionHeaderBuilder AppendDotNetEnvironment()
Returns
Type | Description |
---|---|
VersionHeaderBuilder |
AppendVersion(string, string)
Appends the given name/version string to the list.
Declaration
public VersionHeaderBuilder AppendVersion(string name, string version)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name. Must not be null or empty, or contain a space or a slash. |
string | version | The version. Must not be null, or contain a space or a slash. |
Returns
Type | Description |
---|---|
VersionHeaderBuilder |
Clone()
Clones this VersionHeaderBuilder, creating an independent copy with the same names/values.
Declaration
public VersionHeaderBuilder Clone()
Returns
Type | Description |
---|---|
VersionHeaderBuilder | A clone of this builder. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |