| LinkarCltSendCommandAsync_Text Method (LinkarCltOperationAsyncCallbackString, CredentialsOptions, String, ENVELOPE_FORMAT, Int32) |
Allows making different operations, through some templates in standar format (XML, JSON), in a Asynchronous way.
Direct Method.
Namespace:
LinkarClient
Assemblies:
LinkarClientCore (in LinkarClientCore.dll) Version: 2.1.0.0
LinkarClientMono (in LinkarClientMono.dll) Version: 2.1.0.0 (2.1.0.0)
LinkarClient (in LinkarClient.dll) Version: 2.1.0.0 (2.1.0.0)
Syntax public static void SendCommandAsync_Text(
OperationAsyncCallbackString cmdSendCommandFinished,
CredentialsOptions credentialsOptions,
string command,
ENVELOPE_FORMAT commandFormat = ENVELOPE_FORMAT.XML,
int receiveTimeout = 0
)
Public Shared Sub SendCommandAsync_Text (
cmdSendCommandFinished As OperationAsyncCallbackString,
credentialsOptions As CredentialsOptions,
command As String,
Optional commandFormat As ENVELOPE_FORMAT = ENVELOPE_FORMAT.XML,
Optional receiveTimeout As Integer = 0
)
public:
static void SendCommandAsync_Text(
OperationAsyncCallbackString^ cmdSendCommandFinished,
CredentialsOptions^ credentialsOptions,
String^ command,
ENVELOPE_FORMAT commandFormat = ENVELOPE_FORMAT::XML,
int receiveTimeout = 0
)
static member SendCommandAsync_Text :
cmdSendCommandFinished : OperationAsyncCallbackString *
credentialsOptions : CredentialsOptions *
command : string *
?commandFormat : ENVELOPE_FORMAT *
?receiveTimeout : int
(* Defaults:
let _commandFormat = defaultArg commandFormat ENVELOPE_FORMAT.XML
let _receiveTimeout = defaultArg receiveTimeout 0
*)
-> unit
Parameters
- cmdSendCommandFinished
- Type: LinkarClientOperationAsyncCallbackString
Return type in asynchronous methods - credentialsOptions
- Type: LinkarCommonCredentialsOptions
Object that defines the necessary data to access to the Linkar Server: Username, Password, EntryPoint, Language, FreeText.
- command
- Type: SystemString
Content of the operation you want to send. - commandFormat (Optional)
- Type: LinkarCommonENVELOPE_FORMAT
Indicates in what format you are doing the operation: XML or JSON. - receiveTimeout (Optional)
- Type: SystemInt32
It's the maximum time in seconds that the client will keep waiting the answer by the server. By default -1 (wait indefinitely).
Remarks
The command argument is a string of characters where you specify the operation, along with your options, that you want to execute. To facilitate the use of SendCommand, a list of templates is provided for each operation along with all its options. You can consult the XML and JSON templates
herehttps://github.com/kosday/Linkar-from-Operating-System-shell-lksendcomand-command_self
Examples CredentialsOptions crdOpt = new CredentialsOptions("127.0.0.1", 11300, "admin", "admin", "ENTRYPOINT");
string commandTemplate =
"<COMMAND NAME=\"READ\">\r\n" +
" <CALCULATED>False</CALCULATED>\r\n" +
" <DICTIONARIES>False</DICTIONARIES>\r\n" +
" <CONVERSION>False</CONVERSION>\r\n" +
" <FORMAT_SPEC>False</FORMAT_SPEC>\r\n" +
" <ORIGINAL_RECORDS>False</ORIGINAL_RECORDS>\r\n" +
" <CUSTOM_VARS></CUSTOM_VARS>\r\n" +
" <OUTPUT_FORMAT>MV</OUTPUT_FORMAT>\r\n" +
" <FILE_NAME>LK.CUSTOMERS</FILE_NAME>\r\n" +
" <RECORD_IDS>\r\n" +
" <ID>2</ID>\r\n" +
" </RECORD_IDS>\r\n" +
" <RECORD_DICTCLAUSE></RECORD_DICTCLAUSE>\r\n" +
"</COMMAND>";
ENVELOPE_FORMAT commandFormat = ENVELOPE_FORMAT.XML;
LinkarClt.SendCommandAsync_Text(new LinkarClt.OperationAsyncCallbackString(ExecuteAsyncFinished), crdOpt, commandTemplate, commandFormat);
Dim crdOpt As CredentialsOptions = New CredentialsOptions("127.0.0.1", 11300, "admin", "admin", "ENTRYPOINT")
Dim commandTemplate As String =
"<COMMAND NAME=\"READ\">" & vbCrLf &
" <CALCULATED>False</CALCULATED>" & vbCrLf &
" <DICTIONARIES>False</DICTIONARIES>" & vbCrLf &
" <CONVERSION>False</CONVERSION>" & vbCrLf &
" <FORMAT_SPEC>False</FORMAT_SPEC>" & vbCrLf &
" <ORIGINAL_RECORDS>False</ORIGINAL_RECORDS>" & vbCrLf &
" <CUSTOM_VARS></CUSTOM_VARS>" & vbCrLf &
" <OUTPUT_FORMAT>MV</OUTPUT_FORMAT>" & vbCrLf &
" <FILE_NAME>LK.CUSTOMERS</FILE_NAME>" & vbCrLf &
" <RECORD_IDS>" & vbCrLf &
" <ID>2</ID>" & vbCrLf &
" </RECORD_IDS>" & vbCrLf &
" <RECORD_DICTCLAUSE></RECORD_DICTCLAUSE>\" & vbCrLf &
"</COMMAND>";
Dim commandFormat As ENVELOPE_FORMAT = ENVELOPE_FORMAT.XML
Dim outputStringType As DATAFORMAT_TYPE = DATAFORMAT_TYPE.MV
LinkarClt.SendCommandAsync_Text(New LinkarClt.OperationAsyncCallbackString(ExecuteAsyncFinished), crdOpt, commandTemplate, commandFormat)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also