Skip to content
Paul Spangler edited this page May 8, 2019 · 1 revision

NationalInstruments.SystemLink.Clients.Core

Contents

ApiError type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

Represents the standard error structure for SystemLink API responses.

Args property

Summary

Gets or sets the list of positional arguments formatted into the error.

Code property

Summary

Gets or sets the numeric code associated with the error.

InnerErrors property

Summary

Gets or sets the list of inner errors.

Message property

Summary

Gets or sets the error message.

Name property

Summary

Gets or sets the name of the error.

ResourceId property

Summary

Gets or sets the ID of the resource associated with the error, if any. Set ResourceType when setting this property.

ResourceType property

Summary

Gets or sets the type of resource associated with the error, if any. Set this when setting ResourceId.

ApiException type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

Represents errors that occur when calling SystemLink APIs.

#ctor() constructor

Summary

Initializes an empty exception.

Parameters

This constructor has no parameters.

#ctor(message) constructor

Summary

Initializes an exception with a message.

Parameters
Name Type Description
message System.String The message describing the error.

#ctor(error) constructor

Summary

Initializes an exception from an ApiError.

Parameters
Name Type Description
error NationalInstruments.SystemLink.Clients.Core.ApiError The error returned by the API.

#ctor(message,inner) constructor

Summary

Initializes an exception with a message and inner exception.

Parameters
Name Type Description
message System.String The message describing the error.
inner System.Exception The inner exception that caused the error.

#ctor(error,inner) constructor

Summary

Initializes an exception from an ApiError with an inner exception.

Parameters
Name Type Description
error NationalInstruments.SystemLink.Clients.Core.ApiError The error returned by the API.
inner System.Exception The inner exception that caused the error.

#ctor() constructor

Summary

Deserializes an exception.

Parameters

This constructor has no parameters.

Error property

Summary

Gets the error information returned by the SystemLink API, or null if the API did not return one or the error occurred trying to call the API.

GetObjectData() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

CloudHttpConfiguration type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

An HttpConfiguration specifically for use with SystemLink Cloud.

#ctor(apiKey) constructor

Summary

Initializes a configuration for SystemLink Cloud using API key-based authentication.

Parameters
Name Type Description
apiKey System.String The API key to send with requests.
Exceptions
Name Description
System.ArgumentNullException if apiKey is null.

HttpConfiguration type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

Contains common configuration information for using HTTP client APIs for SystemLink.

#ctor(serverUri) constructor

Summary

Initializes a configuration with anonymous access. Any API calls that require authorization will fail.

Parameters
Name Type Description
serverUri System.Uri The scheme, host, and port (if not default)
of the web server hosting the SystemLink service to connect to.
Additional Uri properties such as PathAndQuery are ignored.
Exceptions
Name Description
System.ArgumentNullException if serverUri is null.
System.ArgumentException if serverUri is missing scheme or host information.

#ctor(serverUri,username,password) constructor

Summary

Initializes a configuration with username and password-based HTTP authentication. Only valid for SystemLink server. HTTPS is highly recommended: sending a password over HTTP can be intercepted by other devices with access to the network.

Parameters
Name Type Description
serverUri System.Uri The scheme, host, and port (if not default)
of the web server hosting the SystemLink service to connect to.
Additional Uri properties such as PathAndQuery are ignored.
username System.String The name of the user to use when authorization is required.
password System.String The user's password to use when authorization is required.
Exceptions
Name Description
System.ArgumentNullException if serverUri,
username, or password is null.
System.ArgumentException if serverUri is missing scheme or host information.

#ctor(serverUri,apiKey) constructor

Summary

Initializes a configuration with API key-based authentication. Only valid for SystemLink cloud. HTTPS is highly recommended: sending an API key over HTTP can be intercepted by other devices with access to the network.

Parameters
Name Type Description
serverUri System.Uri The scheme, host, and port (if not default)
of the web server hosting the SystemLink service to connect to.
Additional Uri properties such as PathAndQuery are ignored.
apiKey System.String The API key to send with requests.
Exceptions
Name Description
System.ArgumentNullException if serverUri or apiKey is null.
System.ArgumentException if serverUri is missing scheme or host information.

DefaultTimeoutMilliseconds constants

Summary

The default value of TimeoutMilliseconds to use when making API calls.

ApiKeys property

Summary

Gets the available API keys to use for authorization, or null if none were provided.

Password property

Summary

Gets the password to use for HTTP authentication, or null if none was provided.

ServerUri property

Summary

Gets the Scheme, Host, and Port of the web server hosting the SystemLink service to connect to. Additional Uri properties such as PathAndQuery are ignored.

TimeoutMilliseconds property

Summary

Gets or sets the number of milliseconds before a request times out with an error. Changing the timeout will not affect APIs that have already read the configuration.

UserAgent property

Summary

Gets or sets the string to pass the web server as the product name or names making the request, or null to use a library-specific default. Changing the user-agent will not affect APIs that have already read the configuration.

Username property

Summary

Gets the username to use for HTTP authentication, or null if none was provided.

HttpConfigurationManager type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

Factory for HttpConfiguration objects.

HttpLocalhostConfigurationId constants

Summary

The default ID of the SystemLink Server's configuration on the SystemLink Server itself.

HttpMasterConfigurationId constants

Summary

The default ID of the SystemLink Server's configuration on systems registered using SystemLink Client.

GetConfiguration() method

Summary

Gets the default configuration.

Returns

The default configuration.

Parameters

This method has no parameters.

Exceptions
Name Description
NationalInstruments.SystemLink.Clients.Core.ApiException if the default configuration is not found.

GetConfiguration(id,enableFallbacks) method

Summary

Gets a configuration by ID.

Returns

The configuration.

Parameters
Name Type Description
id System.String The ID of the configuration to find.
enableFallbacks System.Boolean Whether or not to fallback to other known configurations, if id is unavailable.
Exceptions
Name Description
System.ArgumentException if id is null and enableFallbacks is false.
NationalInstruments.SystemLink.Clients.Core.ApiException if no configuration with the provided ID is found, and no fallbacks were viable.

IHttpConfiguration type

Namespace

NationalInstruments.SystemLink.Clients.Core

Summary

Represents the configuration for accessing a SystemLink service over HTTP.

ApiKeys property

Summary

Gets the available API keys to use for authorization, or null if none were provided.

Password property

Summary

Gets the password to use for HTTP authentication, or null if none was provided.

ServerUri property

Summary

Gets the Scheme, Host, and Port of the web server hosting the SystemLink service to connect to. Additional Uri properties such as PathAndQuery are ignored.

TimeoutMilliseconds property

Summary

Gets the number of milliseconds before a request times out with an error.

UserAgent property

Summary

Gets the string to pass the web server as the product name or names making the request, or null to use a library-specific default.

Username property

Summary

Gets the username to use for HTTP authentication, or null if none was provided.

Clone this wiki locally