ClientIdentity
Class in BIM.works_SDK.
API catalogue · BIM.works_SDK · Class
public sealed class ClientIdentityWhat this SDK says it is, on every request: the X-BIMworks-Client header, the User-Agent, and the first message of its WebSocket. BIM.works support reads it to see which SDK, version and application made a call. Immutable: every With... returns a new identity. The Java and JavaScript SDKs write the same format.
Inheritance and interfaces#
System.Object
Members#
| Member | Kind | Description |
|---|---|---|
| Create(string, string) | Method | A new identity for an SDK id, with this runtime and platform and a fresh instance id |
| ForThisSdk() | Method | What this SDK is: dotnet, its version and commit (AssemblyInformationalVersion) and build time (AssemblyMetadata "BuildDate") |
| Get(string) | Method | A field by its wire key (sdk, v, app, rt, inst, ...), or null |
| Header | Property | The value of X-BIMworks-Client |
| HeaderName | Field | The name of the header |
| Hello() | Method | The socket's first message: a heartbeat to servers that predate it, the identity to the others |
| ToString() | Method | |
| UserAgent | Property | bimworks-<sdk>/<version> (<runtime>; <os>) <application> |
| WithApplication(string, string) | Method | The application that uses the SDK, sent as name/version. Letters, digits and . _ + -; anything else becomes _ |
| WithBuild(string, string, string) | Method | With the build's version, time (UTC, ISO 8601) and commit; a version of "DEV" or nothing is sent as dev |
| WithSpec(string, string, string) | Method | For an SDK generated from the OpenAPI spec: the spec's version, the first 12 hex digits of its SHA-256, and generator/version |
| WithoutPlatform() | Method | Without the runtime and the platform |
Create(string, string)#
public static ClientIdentity Create(string sdk, string lang)A new identity for an SDK id, with this runtime and platform and a fresh instance id
Parameters#
| Name | Type | Description |
|---|---|---|
sdk |
System.String |
|
lang |
System.String |
ForThisSdk()#
public static ClientIdentity ForThisSdk()What this SDK is: dotnet, its version and commit (AssemblyInformationalVersion) and build time (AssemblyMetadata "BuildDate")
Get(string)#
public string Get(string key)A field by its wire key (sdk, v, app, rt, inst, ...), or null
Parameters#
| Name | Type | Description |
|---|---|---|
key |
System.String |
Header#
public string Header { get; }The value of X-BIMworks-Client
HeaderName#
public const string HeaderName = "X-BIMworks-Client"The name of the header
Hello()#
public string Hello()The socket's first message: a heartbeat to servers that predate it, the identity to the others
ToString()#
public override string ToString()UserAgent#
public string UserAgent { get; }bimworks-<sdk>/<version> (<runtime>; <os>) <application>
WithApplication(string, string)#
public ClientIdentity WithApplication(string name, string version)The application that uses the SDK, sent as name/version. Letters, digits and . _ + -; anything else becomes _
Parameters#
| Name | Type | Description |
|---|---|---|
name |
System.String |
|
version |
System.String |
WithBuild(string, string, string)#
public ClientIdentity WithBuild(string version, string built, string commit)With the build's version, time (UTC, ISO 8601) and commit; a version of "DEV" or nothing is sent as dev
Parameters#
| Name | Type | Description |
|---|---|---|
version |
System.String |
|
built |
System.String |
|
commit |
System.String |
WithSpec(string, string, string)#
public ClientIdentity WithSpec(string spec, string specSha, string generator)For an SDK generated from the OpenAPI spec: the spec's version, the first 12 hex digits of its SHA-256, and generator/version
Parameters#
| Name | Type | Description |
|---|---|---|
spec |
System.String |
|
specSha |
System.String |
|
generator |
System.String |
WithoutPlatform()#
public ClientIdentity WithoutPlatform()Without the runtime and the platform
Inherited members#
System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.ReferenceEquals(System.Object,System.Object)