<PackageReference Include="Relativity.Server.Import.SDK" Version="2.9.2" />

NativeFileNameViewFieldsHelper

using FileNaming.CustomFileNaming; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; namespace kCura.WinEDDS.FileNaming.CustomFileNaming { public class NativeFileNameViewFieldsHelper : INativeFileNameViewFieldsHelper { [Serializable] [CompilerGenerated] internal sealed class _Closure$__ { public static readonly _Closure$__ $I; public static Func<FieldDescriptorPart, int> $I2-0; static _Closure$__() { $I = new _Closure$__(); } internal int _Lambda$__2-0(FieldDescriptorPart item) { return item.Value; } } [CompilerGenerated] internal sealed class _Closure$__1-0 { public List<int> $VB$Local_fieldsIds; internal bool _Lambda$__0(ViewFieldInfo x) { return $VB$Local_fieldsIds.Contains(x.FieldArtifactId); } internal int _Lambda$__1(ViewFieldInfo x) { return $VB$Local_fieldsIds.IndexOf(x.FieldArtifactId); } } private ViewFieldInfo[] FilterAndSortFields(ExportFile exportFile, List<int> fieldsIds) { return (from x in exportFile.AllExportableFields where fieldsIds.Contains(x.FieldArtifactId) orderby fieldsIds.IndexOf(x.FieldArtifactId) select x).ToArray(); } ViewFieldInfo[] INativeFileNameViewFieldsHelper.FilterAndSortFields(ExportFile exportFile, List<int> fieldsIds) { return this.FilterAndSortFields(exportFile, fieldsIds); } public void PopulateNativeFileNameViewFields(ExtendedExportFile ExportSettings) { if (ExportSettings.CustomFileNaming != null && ExportSettings.CustomFileNaming.DescriptorParts() != null) { IEnumerable<FieldDescriptorPart> source = ExportSettings.CustomFileNaming.DescriptorParts().OfType<FieldDescriptorPart>(); ExportSettings.SelectedNativesNameViewFields = FilterAndSortFields(ExportSettings, source.Select((_Closure$__.$I2-0 != null) ? _Closure$__.$I2-0 : (_Closure$__.$I2-0 = ((FieldDescriptorPart item) => item.Value))).ToList()).ToList(); } } void INativeFileNameViewFieldsHelper.PopulateNativeFileNameViewFields(ExtendedExportFile ExportSettings) { this.PopulateNativeFileNameViewFields(ExportSettings); } } }