Esempio n. 1
0
            public void UpdateProcessed(IOperationProgressUpdater updater)
            {
                if (!m_hasUpdates)
                    return;

                m_hasUpdates = false;
                using (var rd = m_statUpdateCommand.ExecuteReader())
                {
                    var filesprocessed = 0L;
                    var processedsize = 0L;

                    if (rd.Read())
                    {
                        filesprocessed += rd.ConvertValueToInt64(0, 0);
                        processedsize += rd.ConvertValueToInt64(1, 0);
                    }

                    updater.UpdatefilesProcessed(filesprocessed, processedsize);
                }
            }
Esempio n. 2
0
            public void UpdateProcessed(IOperationProgressUpdater updater)
            {
                if (!m_hasUpdates)
                    return;
                    
                m_hasUpdates = false;
                using(var rd = m_statUpdateCommand.ExecuteReader())
                {                    
                    var filesprocessed = 0L;
                    var processedsize = 0L;
                    
                    if (rd.Read())
                    {
                        var r0 = rd.GetValue(0);
                        var r1 = rd.GetValue(1);
                    
                        if (r0 != null && r0 != DBNull.Value)
                            filesprocessed = Convert.ToInt64(r0);
                    
                        if (r1 != null && r1 != DBNull.Value)
                            processedsize = Convert.ToInt64(r1);
                    }

                    updater.UpdatefilesProcessed(filesprocessed, processedsize);
                }
            }