/// <summary>
 /// Gets the connection info. (some fields of <see cref="T:System.Data.Odbc.OdbcConnection"/>)
 /// If specified <c>odbcConnectionString</c> doesn`t work empty strings are returned in
 /// result fields.
 /// </summary>
 /// <param name="boxIdentity">The box identity.</param>
 /// <param name="lastReloadTime">The last reload time (for force reload of the cached value).</param>
 /// <param name="connectionString">The connection string.</param>
 public ConnectionInfo Value(string boxIdentity, DateTimeT lastReloadTime, string connectionString)
 {
     lock (this)
     {
         Dictionary<string, IComparable> cacheSetting = new Dictionary<string, IComparable>();
         cacheSetting.Add(Database.DatabaseBoxInfo.typeIdentifier + DatabaseBoxInfo.OdbcConnectionStringPropertyName, connectionString);
         if (IsObsolete(lastReloadTime, cacheSetting))
         {
             value = new ConnectionInfo();
             value = Ferda.Modules.Helpers.Data.Database.GetConnectionInfo(connectionString, boxIdentity);
         }
         if (value == null)
             value = new ConnectionInfo();
         return value;
     }
 }
        /// <summary>
        /// Gets names of (acceptable) data matrixes (tables) in the specified data source.
        /// </summary>
        /// <param name="boxIdentity">The box identity.</param>
        /// <param name="lastReloadTime">The last reload time (for force reload of the cached value).</param>
        /// <param name="connectionString">The connection string.</param>
        /// <param name="acceptableTypesOfTables">The acceptable types of tables.</param>
        /// <returns>
        /// Names of tables in specified (<c>connectionString</c>) data source.
        /// </returns>
        public string[] Value(string boxIdentity, DateTimeT lastReloadTime, string connectionString, string[] acceptableTypesOfTables)
        {
            lock (this)
            {
                Dictionary<string, IComparable> cacheSetting = new Dictionary<string, IComparable>();

                cacheSetting.Add(Database.DatabaseBoxInfo.typeIdentifier + DatabaseBoxInfo.OdbcConnectionStringPropertyName, connectionString);

                //string[] to string (IComparable needed)
                string comparableAcceptableTypesOfTables =
                    Ferda.Modules.Helpers.Common.Others.StringArray2String(acceptableTypesOfTables);
                cacheSetting.Add(Database.DatabaseBoxInfo.typeIdentifier + DatabaseBoxInfo.AcceptableTypesOfTablesPropertyName, comparableAcceptableTypesOfTables);

                if (IsObsolete(lastReloadTime, cacheSetting))
                {
                    value = new string[0];
                    value = Ferda.Modules.Helpers.Data.Database.GetTables(connectionString, null, boxIdentity);
                }
                if (value == null)
                    value = new string[0];
                return value;
            }
        }
 /// <summary>
 /// Tests if <c>propertyValue</c> of property named <c>propertyName</c>
 /// meets the requirements. Requirements are given by
 /// <see cref="T:Ferda.Modules.Serializer.BoxSerializer.Restriction">restrictions</see>.
 /// Iff <c>propertyValue</c> doesn`t meet the requirements than 
 /// <see cref="T:Ferda.Modules.BadValueError"/> is thrown.
 /// </summary>
 /// <param name="boxInfo">The box info</param>
 /// <param name="propertyName">Name of property.</param>
 /// <param name="propertyValue">A <see cref="T:Ferda.Modules.DateTimeT"/> value of property.</param>
 /// <exception cref="T:Ferda.Modules.BadValueError">
 /// This execption is thrown iff <c>propertyValue</c> doesn`t satisfy restrictions.
 /// </exception>
 public static void TryIsDateTimePropertyCorrect(IBoxInfo boxInfo, string propertyName, DateTimeT propertyValue)
 {
     //TODO BODY (BoxInfo.TryIsDateTimePropertyCorrect())
 }
 public ValueSubTypeEnum Value(string boxIdentity, DateTimeT lastReloadTime, string connectionString, string dataMatrixName, string columnSelectExpression, bool leaveConnection)
 {
     lock (this)
     {
         Dictionary<string, IComparable> cacheSetting = new Dictionary<string, IComparable>();
         cacheSetting.Add(Database.DatabaseBoxInfo.typeIdentifier + Database.DatabaseBoxInfo.OdbcConnectionStringPropertyName, connectionString);
         cacheSetting.Add(DataMatrix.DataMatrixBoxInfo.typeIdentifier + DataMatrix.DataMatrixBoxInfo.DataMatrixNamePropertyName, dataMatrixName);
         cacheSetting.Add(Column.ColumnBoxInfo.typeIdentifier + Column.ColumnBoxInfo.ColumnSelectExpressionPropertyName, columnSelectExpression);
         if (IsObsolete(lastReloadTime, cacheSetting))
         {
             value = ValueSubTypeEnum.Unknown;
             value = Ferda.Modules.Helpers.Data.Column.GetColumnSubTypeByDataType(
                         Ferda.Modules.Helpers.Data.Column.GetDataType(connectionString, dataMatrixName, columnSelectExpression, boxIdentity));
         }
         return value;
     }
 }
 public StatisticsInfo Value(string boxIdentity, DateTimeT lastReloadTime, string connectionString, string dataMatrixName, long dataMatrixRecordsCount, string columnSelectExpression, ValueSubTypeEnum columnValueSubType)
 {
     lock (this)
     {
         Dictionary<string, IComparable> cacheSetting = new Dictionary<string, IComparable>();
         cacheSetting.Add(Database.DatabaseBoxInfo.typeIdentifier + Database.DatabaseBoxInfo.OdbcConnectionStringPropertyName, connectionString);
         cacheSetting.Add(DataMatrix.DataMatrixBoxInfo.typeIdentifier + DataMatrix.DataMatrixBoxInfo.DataMatrixNamePropertyName, dataMatrixName);
         cacheSetting.Add(DataMatrix.DataMatrixBoxInfo.typeIdentifier + DataMatrix.DataMatrixBoxInfo.RecordCountPropertyName, dataMatrixRecordsCount);
         cacheSetting.Add(Column.ColumnBoxInfo.typeIdentifier + Column.ColumnBoxInfo.ColumnSelectExpressionPropertyName, columnSelectExpression);
         if (IsObsolete(lastReloadTime, cacheSetting))
         {
             value = new StatisticsInfo();
             value = Ferda.Modules.Helpers.Data.Column.GetStatistics(connectionString, dataMatrixName, columnSelectExpression, columnValueSubType, boxIdentity);
         }
         if (value == null)
             value = new StatisticsInfo();
         return value;
     }
 }