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
System.Object
VersionHeaderBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api.Gax
Assembly: Google.Api.Gax.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 |
---|---|
System.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 |
---|---|---|
System.String | name | |
System.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 |
---|---|---|
System.String | name | The name. Must not be null or empty, or contain a space or a slash. |
System.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 |
---|---|
System.String |
Overrides
System.Object.ToString()