ExtendedExporter
using kCura.WinEDDS.Exporters;
using kCura.WinEDDS.FileNaming.CustomFileNaming;
using kCura.WinEDDS.Service.Export;
using Relativity.DataExchange.Process;
using Relativity.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
namespace kCura.WinEDDS
{
public class ExtendedExporter : Exporter
{
[Serializable]
[CompilerGenerated]
internal new sealed class _Closure$__
{
public static readonly _Closure$__ $I;
public static Func<ViewFieldInfo, int> $I6-0;
static _Closure$__()
{
$I = new _Closure$__();
}
internal int _Lambda$__6-0(ViewFieldInfo item)
{
return item.AvfId;
}
}
private ExtendedExportFile _exportSettings;
private readonly INativeFileNameViewFieldsHelper _nativeFileNameViewFieldHelper;
[Obsolete("This constructor is marked for deprecation. Please use the constructor that requires a logger instance.")]
public ExtendedExporter(ExtendedExportFile exportFile, ProcessContext context, ILoadFileHeaderFormatterFactory loadFileFormatterFactory, Func<string> correlationIdFunc)
: base(exportFile, context, loadFileFormatterFactory, correlationIdFunc)
{
_exportSettings = (base.Settings as ExtendedExportFile);
_nativeFileNameViewFieldHelper = new NativeFileNameViewFieldsHelper();
}
[Obsolete("This constructor is marked for deprecation. Please use the constructor that requires a logger instance.")]
public ExtendedExporter(ExtendedExportFile exportFile, ProcessContext context, IServiceFactory serviceFactory, ILoadFileHeaderFormatterFactory loadFileFormatterFactory, IExportConfig exportConfig, Func<string> correlationIdFunc)
: base(exportFile, context, serviceFactory, loadFileFormatterFactory, exportConfig, correlationIdFunc)
{
_exportSettings = (base.Settings as ExtendedExportFile);
_nativeFileNameViewFieldHelper = new NativeFileNameViewFieldsHelper();
}
public ExtendedExporter(ExtendedExportFile exportFile, ProcessContext context, IServiceFactory serviceFactory, ILoadFileHeaderFormatterFactory loadFileFormatterFactory, IExportConfig exportConfig, ILog logger, CancellationToken cancellationToken, Func<string> correlationIdFunc)
: base(exportFile, context, serviceFactory, loadFileFormatterFactory, exportConfig, logger, cancellationToken, correlationIdFunc)
{
_exportSettings = (base.Settings as ExtendedExportFile);
_nativeFileNameViewFieldHelper = new NativeFileNameViewFieldsHelper();
}
protected override ObjectExportInfo CreateObjectExportInfo()
{
return new ExtendedObjectExportInfo(FieldLookupService) {
SelectedNativeFileNameViewFields = _exportSettings.SelectedNativesNameViewFields.ToList()
};
}
protected override List<int> GetAvfIds()
{
_nativeFileNameViewFieldHelper.PopulateNativeFileNameViewFields(_exportSettings);
HashSet<int> hashSet = new HashSet<int>(base.GetAvfIds());
hashSet.UnionWith(_exportSettings.SelectedNativesNameViewFields.Select((_Closure$__.$I6-0 != null) ? _Closure$__.$I6-0 : (_Closure$__.$I6-0 = ((ViewFieldInfo item) => item.AvfId))));
return hashSet.ToList();
}
}
}