Click or drag to resize

Transmitter5CheckInteroperabilityWithStringOperands 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 CheckInteroperabilityWithStringOperands(
	string appVersion,
	string monitoringID,
	string firstOperand,
	string secondOperand,
	out string additionResult,
	out string subtractionResult,
	ref string constString,
	out string serverTime,
	int lcid
)

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  String
The first of the two operands used for computation tests. The only acceptable value is 999'000'000'000 (999 billions)
secondOperand  String
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  String
The result of the addition of the two operands, rounded to two decimals.
subtractionResult  String
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  String
Contains the server's time upon return from the call. Formatting depends on the lcid.
lcid  Int32
The locale identifier (see http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx) that tells the transmitter how to convert to/from string representation, i.e. which decimal separator to use, comma or dot, etc. Use 1033 (hexadecimal 0x409) for US-English convention (decimal separator as a dot, e.g. "123.45"). If you pass 0 the conversion will be made according to the current culture.
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.CheckInteroperabilityWithStringOperands()
   using SwissDecTX;

// ...

       try {

           var tx = new Transmitter5();

           string serverTime;
           var constString = "ÄËÖÜÁÉÓÚÀÈÒÙÂÊÔÛ";
           string additionResult, subtractionResult;

           tx.CheckInteroperabilityWithStringOperands(appVersion, "Your Monitoring ID", "999000000000.00", "1234.56", out additionResult, out subtractionResult, ref constString, out serverTime, 1033);

           // 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