/// <summary>
        /// Returns the Schema properties list defined in Linkar Schemas or the file dictionaries, in a asynchronous way with TABLE output format.
        /// </summary>
        /// <param name="filename">File name to LkProperties</param>
        /// <param name="lkPropertiesOptions">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 MyLkProperties()
        ///         {
        ///             string result = "";
        ///             try
        ///             {
        ///                 CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin");
        ///                 LinkarClient client = new LinkarClient();
        ///                 client.Login(credentials);
        ///                 LkPropertiesOptions options = new LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, false, false, false);
        ///                 result = client.LkPropertiesAsync("LK.CUSTOMERS", options).Result;
        ///                 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 MyLkProperties() 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 LkPropertiesOptions = New LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, False, False, False);
        ///         result = client.LkPropertiesAsync("LK.CUSTOMERS",options).Result
        ///             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 Task <string> LkPropertiesAsync(string filename, LkPropertiesOptions lkPropertiesOptions = null, string customVars = "", int receiveTimeout = 0)
        {
            var task = new Task <string>(() =>
            {
                return(this.LkProperties(filename, lkPropertiesOptions, customVars, receiveTimeout));
            });

            task.Start();
            return(task);
        }
        /// <summary>
        /// Returns the Schema properties list defined in Linkar Schemas or the file dictionaries, synchronously only.
        /// </summary>
        /// <param name="filename">File name to LkProperties</param>
        /// <param name="lkPropertiesOptions">This object defines the different options in base of the asked Schema Type: LKSCHEMAS, SQLMODE o DICTIONARIES.</param>
        /// <param name="outputFormat">Indicates in what format you want to receive the data resulting from the operation: MV, XML, JSON or TABLE.</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>
        /// <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 LkProperties(string filename, LkPropertiesOptions lkPropertiesOptions = null, DATAFORMATSCH_TYPE outputFormat = DATAFORMATSCH_TYPE.MV, string customVars = "", int receiveTimeout = 0)
        {
            string lkPropertiesArgs = OperationArguments.GetLkPropertiesArgs(filename, lkPropertiesOptions, customVars);
            byte   opCode           = (byte)OPERATION_CODE.LKPROPERTIES;
            byte   byteInputFormat  = (byte)DATAFORMAT_TYPE.MV;
            byte   byteOutputFormat = (byte)outputFormat;
            string connectionInfo   = this._ConnectionInfo.ToString();
            string result           = Linkar.ExecutePersistentOperation(this._ConnectionInfo, opCode, lkPropertiesArgs, byteInputFormat, byteOutputFormat, receiveTimeout);

            return(result);
        }
        /// <summary>
        /// Compose the 3 items (CUSTOMVARS, OPTIONS and INPUTDATA) of the LkProperties operation.
        /// </summary>
        /// <param name="filename">File name to LkProperties</param>
        /// <param name="lkPropertiesOptions">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>
        /// <returns>A string ready to be used in Linkar.ExecuteDirectOperation and Linkar.ExecutePersistentOperation.</returns>
        public static string GetLkPropertiesArgs(string filename, LkPropertiesOptions lkPropertiesOptions, string customVars)
        {
            if (lkPropertiesOptions == null)
            {
                lkPropertiesOptions = new LkPropertiesOptions();
            }
            string options = lkPropertiesOptions.ToString();

            string cmdArgs = customVars + ASCII_Chars.US_str + options + ASCII_Chars.US_str + filename;

            return(cmdArgs);
        }
 /// <summary>
 /// Returns the Schema properties list defined in Linkar Schemas or the file dictionaries, synchronously only, with TABLE output format.
 /// </summary>
 /// <param name="filename">File name to LkProperties</param>
 /// <param name="lkPropertiesOptions">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 MyLkProperties()
 ///         {
 ///             string result = "";
 ///             try
 ///             {
 ///                 CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin");
 ///                 LinkarClient client = new LinkarClient();
 ///                 client.Login(credentials);
 ///                 LkPropertiesOptions options = new LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, false, false, false);
 ///                 result = client.LkProperties("LK.CUSTOMERS", 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 MyLkProperties() 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 LkPropertiesOptions = New LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, False, False, False);
 ///         result = client.LkProperties("LK.CUSTOMERS",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 LkProperties(string filename, LkPropertiesOptions lkPropertiesOptions = null, string customVars = "", int receiveTimeout = 0)
 {
     return(this._LinkarClt.LkProperties(filename, lkPropertiesOptions, DATAFORMATSCH_TYPE.TABLE, customVars, receiveTimeout));
 }
        /// <summary>
        /// Returns the Schema properties list defined in Linkar Schemas or the file dictionaries, synchronously only.
        /// </summary>
        /// <param name="credentialOptions">Object with data necessary to access the Linkar Server: Username, Password, EntryPoint, Language, FreeText.</param>
        /// <param name="filename">File name to LkProperties.</param>
        /// <param name="lkPropertiesOptions">This object defines the different options in base of the asked Schema Type: LKSCHEMAS, SQLMODE o DICTIONARIES.</param>
        /// <param name="outputFormat">Indicates in what format you want to receive the data resulting from the operation: MV, XML, JSON or TABLE.</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>
        /// <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 LkProperties(CredentialOptions credentialOptions, string filename, LkPropertiesOptions lkPropertiesOptions = null,
                                          DATAFORMATSCH_TYPE outputFormat = DATAFORMATSCH_TYPE.MV,
                                          string customVars = "", int receiveTimeout = 0)
        {
            string lkPropertiesArgs = OperationArguments.GetLkPropertiesArgs(filename, lkPropertiesOptions, customVars);
            byte   opCode           = (byte)OPERATION_CODE.LKPROPERTIES;
            byte   byteInputFormat  = (byte)DATAFORMAT_TYPE.MV;
            byte   byteOutputFormat = (byte)outputFormat;
            string result           = Linkar.ExecuteDirectOperation(credentialOptions, opCode, lkPropertiesArgs, byteInputFormat, byteOutputFormat, receiveTimeout);

            return(result);
        }
 /// <summary>
 /// Returns the Schema properties list defined in Linkar Schemas or the file dictionaries, 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="filename">File name to LkProperties</param>
 /// <param name="lkPropertiesOptions">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 MyLkProperties()
 ///         {
 ///             string result = "";
 ///             try
 ///             {
 ///                 CredentialOptions credentials = new CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin");
 ///                 LkPropertiesOptions options = new LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, false, false, false);
 ///                 result = Functions.LkProperties(credentials, "LK.CUSTOMERS", 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 MyLkProperties() As String
 ///         Dim result As String = ""
 ///
 ///         Try
 ///             Dim credentials As CredentialOptions = New CredentialOptions("127.0.0.1", "EPNAME", 11300, "admin", "admin")
 ///
 ///             Dim options As LkPropertiesOptions = New LkPropertiesOptions(RowHeaders.TYPE.MAINLABEL, False, False, False);
 ///             result = Functions.LkProperties(credentials, "LK.CUSTOMERS",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 LkProperties(CredentialOptions credentialOptions, string filename, LkPropertiesOptions lkPropertiesOptions = null,
                                   string customVars = "", int receiveTimeout = 0)
 {
     return(DirectFunctions.LkProperties(credentialOptions, filename, lkPropertiesOptions, DATAFORMATSCH_TYPE.TABLE, customVars, receiveTimeout));
 }