ExportStatistics
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
namespace kCura.WinEDDS
{
public class ExportStatistics : Statistics
{
public int ExportedNativeCount;
public int ExportedPdfCount;
public int ExportedImageCount;
public int ExportedLongTextCount;
public override IDictionary ToDictionaryForProgress()
{
HybridDictionary hybridDictionary = new HybridDictionary();
TimeSpan timeSpan = base.FileTransferDuration;
if (!timeSpan.Equals(TimeSpan.Zero)) {
HybridDictionary hybridDictionary2 = hybridDictionary;
double num = (double)base.FileTransferredBytes;
timeSpan = base.FileTransferDuration;
hybridDictionary2.Add("Average file transfer rate", Statistics.ToFileSizeSpecification(num / timeSpan.TotalSeconds) + "/sec");
}
timeSpan = base.MetadataTransferDuration;
if (!timeSpan.Equals(TimeSpan.Zero) && base.MetadataTransferredBytes != 0) {
HybridDictionary hybridDictionary3 = hybridDictionary;
double num2 = (double)base.MetadataTransferredBytes;
timeSpan = base.MetadataTransferDuration;
hybridDictionary3.Add("Average long text transfer rate", Statistics.ToFileSizeSpecification(num2 / timeSpan.TotalHours) + "/hr");
}
return hybridDictionary;
}
public override IDictionary<string, object> ToDictionaryForLogs()
{
IDictionary<string, object> dictionary = base.ToDictionaryForLogs();
IDictionaryEnumerator enumerator = ToDictionaryForProgress().GetEnumerator();
while (enumerator.MoveNext()) {
object current = enumerator.Current;
DictionaryEntry dictionaryEntry = (current != null) ? ((DictionaryEntry)current) : default(DictionaryEntry);
dictionary.Add(dictionaryEntry.Key.ToString(), RuntimeHelpers.GetObjectValue(dictionaryEntry.Value));
}
return dictionary;
}
}
}