public LogsTableReader(CloudStorageAccount storageAccount, string tableName, bool tableRotationEnabled)
 {
     if (tableRotationEnabled)
     {
         m_cloudTableFactory = new RotatedCloudTableFactory(storageAccount, tableName);
     }
     else
     {
         m_cloudTableFactory = new SingleInstanceCloudTableFactory(new AsyncLazy <CloudTable>(() => storageAccount.CreateTable(tableName)));
     }
 }
        public Task <CloudTable> Create(DateTimeOffset time)
        {
            var tableName = m_tableName + time.Date.ToString("yyyyMMdd");

            if (!m_tableCache.TryGetValue(tableName, out var table))
            {
                if (m_tableCache.Count > 365)
                {
                    m_tableCache.Clear();
                }

                table = m_tableCache.GetOrAdd(tableName, name => new AsyncLazy <CloudTable>(() => m_account.CreateTable(name)));
            }

            return(table.Value);
        }