Click or drag to resize

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: SwissDecTX
Assembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntax
public void CheckInteroperabilityWithOperands(
	string appVersion,
	string monitoringID,
	decimal firstOperand,
	decimal secondOperand,
	out decimal additionResult,
	out decimal subtractionResult,
	ref string constString,
	out DateTime 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.
Remarks
This 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.
Example
Calling 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);

           // TODO: display the operands and the results (if you are here, everything is correct as CheckInteroperability() verifies all return values!)

       } catch (Exception ex) {

           MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

       }
See Also