ResponseHelpersExceptionResponseBuilderT(AlpacaErrors, String, UInt32, UInt32) Method

This generates a Response of a given Type with a custom message and Error Code

Definition

Namespace: ASCOM.Common.Helpers
Assembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static T ExceptionResponseBuilder<T>(
	AlpacaErrors code,
	string message,
	uint clientTransactionID = 0,
	uint serverTransactionID = 0
)
where T : new(), Response

Parameters

code  AlpacaErrors
The Alpaca Error Code
message  String
The message to use
clientTransactionID  UInt32  (Optional)
The Client Transaction ID
serverTransactionID  UInt32  (Optional)
The Server Transaction ID

Type Parameters

T
The Type of Response to create and fill

Return Value

T
A populated exception

Exceptions

ArgumentExceptionIf the supplied exception is null

Version Information

.NET Standard

Supported in: 2.0

See Also