Class HeadendClient
Extends the HeadendClient class generated by modelgen with static creation methods.
Implements
Namespace: Neon.Kube.Clients
Assembly: Neon.Kube.dll
Syntax
public class HeadendClient : IGeneratedServiceClient
Constructors
HeadendClient(HttpClient, IRetryPolicy)
Used in special situations (like ASP.NET Blazor) where a special HttpClient needs to be created and provided.
Declaration
public HeadendClient(HttpClient httpClient, IRetryPolicy retryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
HttpClient | httpClient | The special HttpClient instance to be wrapped. |
IRetryPolicy | retryPolicy | Optionally specifies a default retry policy (defaults to NoRetryPolicy). |
HeadendClient(HttpMessageHandler, bool, IRetryPolicy)
Used to construct a client for most situations, optionally specifying a custom HttpMessageHandler and/or IRetryPolicy.
Declaration
public HeadendClient(HttpMessageHandler handler = null, bool disposeHandler = false, IRetryPolicy retryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
HttpMessageHandler | handler | An optional message handler. This defaults to a reasonable handler with compression enabled. |
bool | disposeHandler | Indicates whether the handler passed will be disposed automatically (defaults to |
IRetryPolicy | retryPolicy | Optionally specifies a default retry policy (defaults to NoRetryPolicy). |
Properties
BaseAddress
Accesses the underlying BaseAddress.
Declaration
public Uri BaseAddress { get; set; }
Property Value
Type | Description |
---|---|
Uri |
Cluster
Cluster related service methods.
Declaration
public HeadendClient.__Cluster Cluster { get; }
Property Value
Type | Description |
---|---|
HeadendClient.__Cluster |
ClusterSetup
ClusterSetup related service methods.
Declaration
public HeadendClient.__ClusterSetup ClusterSetup { get; }
Property Value
Type | Description |
---|---|
HeadendClient.__ClusterSetup |
DefaultRequestHeaders
Returns the underlying DefaultRequestHeaders.
Declaration
public HttpRequestHeaders DefaultRequestHeaders { get; }
Property Value
Type | Description |
---|---|
HttpRequestHeaders |
GeneratorVersion
Returns the version of the Neon.ModelGen assembly that generated this code plus the generated code schema version. This is formatted like:
SEMANTIC-VERSION:SCHEMA
where SCHEMA-VERSION is the Neon.ModelGen assembly version and SCHEMA is a simple integer schema version number. The version will be incremented if or when the code generated by future versions of the Neon.ModelGen assembly changes enough to become incompatible with older versions of the Neon.Xunit.XunitExtensions.ValidateController() method. This is likely to never change, but future proofing is always a good idea.
Declaration
public string GeneratorVersion { get; }
Property Value
Type | Description |
---|---|
string |
HttpClient
Returns the underlying HttpClient.
Declaration
public HttpClient HttpClient { get; }
Property Value
Type | Description |
---|---|
HttpClient |
JsonClient
Returns the underlying JsonClient.
Declaration
public JsonClient JsonClient { get; }
Property Value
Type | Description |
---|---|
JsonClient |
NeonDesktop
NeonDesktop related service methods.
Declaration
public HeadendClient.__NeonDesktop NeonDesktop { get; }
Property Value
Type | Description |
---|---|
HeadendClient.__NeonDesktop |
RetryPolicy
Returns the underlying DefaultRequestHeaders.
Declaration
public IRetryPolicy RetryPolicy { get; set; }
Property Value
Type | Description |
---|---|
IRetryPolicy |
Timeout
Accesses the underlying Timeout.
Declaration
public TimeSpan Timeout { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
Create(Uri, IRetryPolicy)
Creates a HeadendClient.
Declaration
public static HeadendClient Create(Uri baseAddress = null, IRetryPolicy retryPolicy = null)
Parameters
Type | Name | Description |
---|---|---|
Uri | baseAddress | Optionally specifies the base URI for the client. This defaults to the headend service URI returned by HeadendUri. |
IRetryPolicy | retryPolicy | Optionally specifies a default retry policy (defaults to NoRetryPolicy). |
Returns
Type | Description |
---|---|
HeadendClient | The new HeadendClient. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Releases any important resources associated with the instance.
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Pass |
~HeadendClient()
Finalizer.
Declaration
protected ~HeadendClient()