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: SwissDecTXAssembly: SwissDecTX.Transmitter5 (in SwissDecTX.Transmitter5.dll) Version: 5.0.0.0 (5.0.0.0)
Syntaxpublic void CheckInteroperabilityWithStringOperands(
string appVersion,
string monitoringID,
string firstOperand,
string secondOperand,
out string additionResult,
out string subtractionResult,
ref string constString,
out string serverTime,
int lcid
)
Public Sub CheckInteroperabilityWithStringOperands (
appVersion As String,
monitoringID As String,
firstOperand As String,
secondOperand As String,
<OutAttribute> ByRef additionResult As String,
<OutAttribute> ByRef subtractionResult As String,
ByRef constString As String,
<OutAttribute> ByRef serverTime As String,
lcid As Integer
)
public:
virtual void CheckInteroperabilityWithStringOperands(
String^ appVersion,
String^ monitoringID,
String^ firstOperand,
String^ secondOperand,
[OutAttribute] String^% additionResult,
[OutAttribute] String^% subtractionResult,
String^% constString,
[OutAttribute] String^% serverTime,
int lcid
) sealed
function CheckInteroperabilityWithStringOperands(appVersion, monitoringID, firstOperand, secondOperand, additionResult, subtractionResult, constString, serverTime, 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.
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.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);
} catch (Exception ex) {
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
See Also