/// <summary> /// Returns a list of all the Schemas defined in Linkar Schemas, or the EntryPoint account data files, synchronously only, with TABLE output format. /// </summary> /// <param name="credentialOptions">Object with data necessary to access the Linkar Server: Username, Password, EntryPoint, Language, FreeText.</param> /// <param name="lkSchemasOptions">This object defines the different options in base of the asked Schema Type: LKSCHEMAS, SQLMODE o DICTIONARIES.</param> /// <param name="customVars">Free text sent to the database allows management of additional behaviours in SUB.LK.MAIN.CONTROL.CUSTOM, which is called when this parameter is set.</param> /// <param name="receiveTimeout">Maximum time in seconds that the client will wait for a response from the server. Default = 0 to wait indefinitely.</param> /// <returns>The results of the operation.</returns> /// <example> /// <code lang="CS"> /// using Linkar; /// using Linkar.Functions.Direct.TABLE; /// /// class Test /// { /// public string MyLkSchemas() /// { /// string result = ""; /// try /// { /// CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin"); /// LkSchemasOptions options = new LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, false, false); /// result = Functions.LkSchemas(credentials, options); /// } /// catch (Exception ex) /// { /// string error = ex.Message; /// // Do something /// } /// return result; /// } /// } /// </code> /// <code lang="VB"> /// Imports Linkar /// Imports Linkar.Functions.Direct.TABLE /// /// Class Test /// /// Public Function MyLkSchemas() As String /// Dim result As String = "" /// /// Try /// Dim credentials As CredentialOptions = New CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin") /// /// Dim options As LkSchemasOptions = New LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, False, False); /// result = Functions.LkSchemas(credentials, options) /// Catch ex As Exception /// Dim[error] As String = ex.Message /// ' Do something /// /// End Try /// /// Return result /// End Function /// End Class /// </code> /// </example> /// <remarks> /// TABLE output format uses the defined control characters in <see href="http://kosday.com/Manuals/en_web_linkar/lk_schemas_ep_parameters.html">EntryPoints Parameters</see> Table Row Separator and Column Row Separator. /// <para>By default: /// <list type="bullet"> /// <item>TAB char (9) for columns.</item> /// <item>VT char (11) for rows.</item> /// </list> /// </para> /// </remarks> public static string LkSchemas(CredentialOptions credentialOptions, LkSchemasOptions lkSchemasOptions = null, string customVars = "", int receiveTimeout = 0) { return(DirectFunctions.LkSchemas(credentialOptions, lkSchemasOptions, DATAFORMATSCH_TYPE.TABLE, customVars, receiveTimeout)); }
/// <summary> /// Returns a list of all the Schemas defined in Linkar Schemas, or the EntryPoint account data files, synchronously only, with TABLE output format. /// </summary> /// <param name="lkSchemasOptions">This object defines the different options in base of the asked Schema Type: LKSCHEMAS, SQLMODE o DICTIONARIES.</param> /// <param name="customVars">Free text sent to the database allows management of additional behaviours in SUB.LK.MAIN.CONTROL.CUSTOM, which is called when this parameter is set.</param> /// <param name="receiveTimeout">Maximum time in seconds that the client will wait for a response from the server. Default = 0 to wait indefinitely.</param> /// <returns>The results of the operation.</returns> /// <example> /// <code lang="CS"> /// using Linkar; /// using Linkar.Functions.Persistent.TABLE; /// /// class Test /// { /// public string MyLkSchemas() /// { /// string result = ""; /// try /// { /// CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin"); /// LinkarClient client = new LinkarClient(); /// client.Login(credentials); /// LkSchemasOptions options = new LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, false, false); /// result = client.LkSchemas(options); /// client.Logout(); /// } /// catch (Exception ex) /// { /// string error = ex.Message; /// // Do something /// } /// return result; /// } /// } /// </code> /// <code lang="VB"> /// Imports Linkar /// Imports Linkar.Functions.Persistent.TABLE /// /// Class Test /// /// Public Function MyLkSchemas() As String /// Dim result As String = "" /// /// Try /// Dim credentials As CredentialOptions = New CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin") /// /// Dim client As LinkarClient = New LinkarClient() /// /// client.Login(credentials) /// Dim options As LkSchemasOptions = New LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, False, False); /// result = client.LkSchemas(options) /// client.Logout() /// /// Catch ex As Exception /// /// Dim[error] As String = ex.Message /// ' Do something /// End Try /// /// Return result /// End Function /// End Class /// </code> /// </example> /// <remarks> /// TABLE output format uses the defined control characters in <see href="http://kosday.com/Manuals/en_web_linkar/lk_schemas_ep_parameters.html">EntryPoints Parameters</see> Table Row Separator and Column Row Separator. /// <para>By default: /// <list type="bullet"> /// <item>TAB char (9) for columns.</item> /// <item>VT char (11) for rows.</item> /// </list> /// </para> /// </remarks> public string LkSchemas(LkSchemasOptions lkSchemasOptions = null, string customVars = "", int receiveTimeout = 0) { return(this._LinkarClt.LkSchemas(lkSchemasOptions, DATAFORMATSCH_TYPE.TABLE, customVars, receiveTimeout)); }
/// <summary> /// Returns a list of all the Schemas defined in Linkar Schemas, or the EntryPoint account data files, in a asynchronous way with TABLE output format. /// </summary> /// <param name="credentialOptions">Object with data necessary to access the Linkar Server: Username, Password, EntryPoint, Language, FreeText.</param> /// <param name="lkSchemasOptions">This object defines the different options in base of the asked Schema Type: LKSCHEMAS, SQLMODE o DICTIONARIES.</param> /// <param name="customVars">Free text sent to the database allows management of additional behaviours in SUB.LK.MAIN.CONTROL.CUSTOM, which is called when this parameter is set.</param> /// <param name="receiveTimeout">Maximum time in seconds that the client will wait for a response from the server. Default = 0 to wait indefinitely.</param> /// <returns>The results of the operation.</returns> /// <example> /// <code lang="CS"> /// using Linkar; /// using Linkar.Functions.Direct.TABLE; /// /// class Test /// { /// public string MyLkSchemas() /// { /// string result = ""; /// try /// { /// CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin"); /// LkSchemasOptions options = new LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, false, false); /// result = Functions.LkSchemasAsync(credentials, options).Result; /// } /// catch (Exception ex) /// { /// string error = ex.Message; /// // Do something /// } /// return result; /// } /// } /// </code> /// <code lang="VB"> /// Imports Linkar /// Imports Linkar.Functions.Direct.TABLE /// /// Class Test /// /// Public Function MyLkSchemas() As String /// Dim result As String = "" /// /// Try /// Dim credentials As CredentialOptions = New CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin") /// /// Dim options As LkSchemasOptions = New LkSchemasOptions(RowHeaders.TYPE.MAINLABEL, False, False); /// result = Functions.LkSchemasAsync(credentials, options).Result /// Catch ex As Exception /// Dim[error] As String = ex.Message /// ' Do something /// /// End Try /// /// Return result /// End Function /// End Class /// </code> /// </example> /// <remarks> /// TABLE output format uses the defined control characters in <see href="http://kosday.com/Manuals/en_web_linkar/lk_schemas_ep_parameters.html">EntryPoints Parameters</see> Table Row Separator and Column Row Separator. /// <para>By default: /// <list type="bullet"> /// <item>TAB char (9) for columns.</item> /// <item>VT char (11) for rows.</item> /// </list> /// </para> /// </remarks> public static Task <string> LkSchemasAsync(CredentialOptions credentialOptions, LkSchemasOptions lkSchemasOptions = null, string customVars = "", int receiveTimeout = 0) { var task = new Task <string>(() => { return(LkSchemas(credentialOptions, lkSchemasOptions, customVars, receiveTimeout)); }); task.Start(); return(task); }