Transmitter5CheckInteroperabilityWithOperands Method |
Check inter-operability between SwissDecTX and the SwissDec web service, as required by test-case UC011. This call validates all the requirements specified in UC011 of the SwissDec Transmitter Requirements but let you enter some parameters to test valid and invalid operands.
Namespace: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic void CheckInteroperabilityWithOperands(
string appVersion,
string monitoringID,
decimal firstOperand,
decimal secondOperand,
out decimal additionResult,
out decimal subtractionResult,
ref string constString,
out DateTime serverTime
)
Public Sub CheckInteroperabilityWithOperands (
appVersion As String,
monitoringID As String,
firstOperand As Decimal,
secondOperand As Decimal,
<OutAttribute> ByRef additionResult As Decimal,
<OutAttribute> ByRef subtractionResult As Decimal,
ByRef constString As String,
<OutAttribute> ByRef serverTime As DateTime
)
public:
virtual void CheckInteroperabilityWithOperands(
String^ appVersion,
String^ monitoringID,
Decimal firstOperand,
Decimal secondOperand,
[OutAttribute] Decimal% additionResult,
[OutAttribute] Decimal% subtractionResult,
String^% constString,
[OutAttribute] DateTime% serverTime
) sealed
function CheckInteroperabilityWithOperands(appVersion, monitoringID, firstOperand, secondOperand, additionResult, subtractionResult, constString, serverTime);
Parameters
- appVersion String
- UserAgent/Version as it appears in your declarations.
- monitoringID String
- Your monitoring ID. Contact SwissDec to obtain your own private monitoring ID. You can use "monitoringID" or "tester" as a generic ID of you don't have your own yet.
- firstOperand Decimal
- The first of the two operands used for computation tests. The only acceptable value is 999'000'000'000 (999 billions)
- secondOperand Decimal
- The second of the two operands to be used for computation tests. This value is arbitrary. You must provide an user interface to enter test values and display the results.
- additionResult Decimal
- The result of the addition of the two operands, rounded to two decimals.
- subtractionResult Decimal
- The result of the subtraction of the two operands, rounded to two decimals.
- constString String
- Must contain the string ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ on input, should contain äëöüáéóúàèòùâêôû upon return from the call.
- serverTime DateTime
- Contains the server's time upon return from the call.
RemarksThis method checks
all the requirements, including correctness of all parameters returned by the server, accuracy and correctness of calculations, character conversion and maximum time difference. Exceptions are thrown when the method detects an anomaly in the reply, so if this call completes successfully, you can be confident that the interop test went well and that every test has passed. The transmission is also signed and encrypted using the installed certificates (see
SetReceiverCertificate(String, Transmitter5CertificateSearchMode),
SetTransmitterCertificate(String, Transmitter5CertificateSearchMode) and
InstallCertificates(String, String, String, String, Boolean)) and the signature and validity of the server reply is checked.
ExampleCalling Transmitter.CheckInteroperabilityWithOperands()
using SwissDecTX;
try {
var tx = new Transmitter5();
DateTime serverTime;
var constString = "ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ";
decimal additionResult, subtractionResult;
tx.CheckInteroperabilityWithOperands(appVersion, "Your Monitoring ID", 999000000000.00m, 1234.56m, out additionResult, out subtractionResult, ref constString, out serverTime);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also