KeplerExportManager
using kCura.EDDS.WebAPI.ExportManagerBase;
using kCura.WinEDDS.Mapping;
using kCura.WinEDDS.Service.Export;
using Microsoft.VisualBasic.CompilerServices;
using Relativity.DataExchange.Service;
using Relativity.DataTransfer.Legacy.SDK.ImportExport.V1.Models;
using System;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Web.Services.Protocols;
namespace kCura.WinEDDS.Service.Replacement
{
public class KeplerExportManager : KeplerManager, IExportManager
{
[CompilerGenerated]
internal sealed class _Closure$__1-0
{
public int $VB$Local_appID;
public Guid $VB$Local_runId;
public int $VB$Local_artifactTypeID;
public int[] $VB$Local_avfIds;
public int $VB$Local_chunkSize;
public bool $VB$Local_displayMulticodesAsNested;
public char $VB$Local_multiValueDelimiter;
public char $VB$Local_nestedValueDelimiter;
public int[] $VB$Local_textPrecedenceAvfIds;
public int $VB$Local_index;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<object[][]> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__1-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<object[][]>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
[CompilerGenerated]
internal sealed class _Closure$__2-0
{
public int $VB$Local_appID;
public Guid $VB$Local_runId;
public int $VB$Local_artifactTypeID;
public int[] $VB$Local_avfIds;
public int $VB$Local_chunkSize;
public bool $VB$Local_displayMulticodesAsNested;
public char $VB$Local_multiValueDelimiter;
public char $VB$Local_nestedValueDelimiter;
public int[] $VB$Local_textPrecedenceAvfIds;
public int $VB$Local_productionId;
public int $VB$Local_index;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<object[][]> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__2-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<object[][]>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
[CompilerGenerated]
internal sealed class _Closure$__3-0
{
public int $VB$Local_appID;
public int $VB$Local_viewArtifactID;
public int $VB$Local_parentArtifactID;
public bool $VB$Local_includeSubFolders;
public int[] $VB$Local_avfIds;
public int $VB$Local_startAtRecord;
public int $VB$Local_artifactTypeID;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<InitializationResults> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__3-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
[CompilerGenerated]
internal sealed class _Closure$__4-0
{
public int $VB$Local_appID;
public int $VB$Local_productionArtifactID;
public int[] $VB$Local_avfIds;
public int $VB$Local_startAtRecord;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<InitializationResults> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__4-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
[CompilerGenerated]
internal sealed class _Closure$__5-0
{
public int $VB$Local_appID;
public int $VB$Local_searchArtifactID;
public int[] $VB$Local_avfIds;
public int $VB$Local_startAtRecord;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<InitializationResults> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__5-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
[CompilerGenerated]
internal sealed class _Closure$__6-0
{
public int $VB$Local_appID;
public KeplerExportManager $VB$Me;
[AsyncStateMachine(typeof(VB$StateMachine___Lambda$__0))]
internal Task<bool> _Lambda$__0(IServiceProxyFactory s)
{
VB$StateMachine___Lambda$__0 stateMachine = default(VB$StateMachine___Lambda$__0);
stateMachine.$VB$NonLocal__Closure$__6-0 = this;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<bool>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
}
}
public KeplerExportManager(IServiceProxyFactory serviceProxyFactory, IServiceExceptionMapper exceptionMapper, Func<string> correlationIdFunc)
: base(serviceProxyFactory, exceptionMapper, correlationIdFunc)
{
}
public object[] RetrieveResultsBlockStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int index)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__1-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__1-0.VB$StateMachine___Lambda$__0);
_Closure$__1-0 $VB$NonLocal__Closure$__1-;
stateMachine.$VB$NonLocal__Closure$__1-0 = $VB$NonLocal__Closure$__1-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<object[][]>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
object[] IExportManager.RetrieveResultsBlockStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int index)
{
return this.RetrieveResultsBlockStartingFromIndex(appID, runId, artifactTypeID, avfIds, chunkSize, displayMulticodesAsNested, multiValueDelimiter, nestedValueDelimiter, textPrecedenceAvfIds, index);
}
object[] kCura.WinEDDS.Service.Export.IExportManager.RetrieveResultsBlockStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int index)
{
return this.RetrieveResultsBlockStartingFromIndex(appID, runId, artifactTypeID, avfIds, chunkSize, displayMulticodesAsNested, multiValueDelimiter, nestedValueDelimiter, textPrecedenceAvfIds, index);
}
public object[] RetrieveResultsBlockForProductionStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int productionId, int index)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__2-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__2-0.VB$StateMachine___Lambda$__0);
_Closure$__2-0 $VB$NonLocal__Closure$__2-;
stateMachine.$VB$NonLocal__Closure$__2-0 = $VB$NonLocal__Closure$__2-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<object[][]>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
object[] IExportManager.RetrieveResultsBlockForProductionStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int productionId, int index)
{
return this.RetrieveResultsBlockForProductionStartingFromIndex(appID, runId, artifactTypeID, avfIds, chunkSize, displayMulticodesAsNested, multiValueDelimiter, nestedValueDelimiter, textPrecedenceAvfIds, productionId, index);
}
object[] kCura.WinEDDS.Service.Export.IExportManager.RetrieveResultsBlockForProductionStartingFromIndex(int appID, Guid runId, int artifactTypeID, int[] avfIds, int chunkSize, bool displayMulticodesAsNested, char multiValueDelimiter, char nestedValueDelimiter, int[] textPrecedenceAvfIds, int productionId, int index)
{
return this.RetrieveResultsBlockForProductionStartingFromIndex(appID, runId, artifactTypeID, avfIds, chunkSize, displayMulticodesAsNested, multiValueDelimiter, nestedValueDelimiter, textPrecedenceAvfIds, productionId, index);
}
public InitializationResults InitializeFolderExport(int appID, int viewArtifactID, int parentArtifactID, bool includeSubFolders, int[] avfIds, int startAtRecord, int artifactTypeID)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__3-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__3-0.VB$StateMachine___Lambda$__0);
_Closure$__3-0 $VB$NonLocal__Closure$__3-;
stateMachine.$VB$NonLocal__Closure$__3-0 = $VB$NonLocal__Closure$__3-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
InitializationResults IExportManager.InitializeFolderExport(int appID, int viewArtifactID, int parentArtifactID, bool includeSubFolders, int[] avfIds, int startAtRecord, int artifactTypeID)
{
return this.InitializeFolderExport(appID, viewArtifactID, parentArtifactID, includeSubFolders, avfIds, startAtRecord, artifactTypeID);
}
InitializationResults kCura.WinEDDS.Service.Export.IExportManager.InitializeFolderExport(int appID, int viewArtifactID, int parentArtifactID, bool includeSubFolders, int[] avfIds, int startAtRecord, int artifactTypeID)
{
return this.InitializeFolderExport(appID, viewArtifactID, parentArtifactID, includeSubFolders, avfIds, startAtRecord, artifactTypeID);
}
public InitializationResults InitializeProductionExport(int appID, int productionArtifactID, int[] avfIds, int startAtRecord)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__4-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__4-0.VB$StateMachine___Lambda$__0);
_Closure$__4-0 $VB$NonLocal__Closure$__4-;
stateMachine.$VB$NonLocal__Closure$__4-0 = $VB$NonLocal__Closure$__4-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
InitializationResults IExportManager.InitializeProductionExport(int appID, int productionArtifactID, int[] avfIds, int startAtRecord)
{
return this.InitializeProductionExport(appID, productionArtifactID, avfIds, startAtRecord);
}
InitializationResults kCura.WinEDDS.Service.Export.IExportManager.InitializeProductionExport(int appID, int productionArtifactID, int[] avfIds, int startAtRecord)
{
return this.InitializeProductionExport(appID, productionArtifactID, avfIds, startAtRecord);
}
public InitializationResults InitializeSearchExport(int appID, int searchArtifactID, int[] avfIds, int startAtRecord)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__5-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__5-0.VB$StateMachine___Lambda$__0);
_Closure$__5-0 $VB$NonLocal__Closure$__5-;
stateMachine.$VB$NonLocal__Closure$__5-0 = $VB$NonLocal__Closure$__5-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<InitializationResults>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
InitializationResults IExportManager.InitializeSearchExport(int appID, int searchArtifactID, int[] avfIds, int startAtRecord)
{
return this.InitializeSearchExport(appID, searchArtifactID, avfIds, startAtRecord);
}
InitializationResults kCura.WinEDDS.Service.Export.IExportManager.InitializeSearchExport(int appID, int searchArtifactID, int[] avfIds, int startAtRecord)
{
return this.InitializeSearchExport(appID, searchArtifactID, avfIds, startAtRecord);
}
public bool HasExportPermissions(int appID)
{
return Execute(delegate(IServiceProxyFactory s) {
_Closure$__6-0.VB$StateMachine___Lambda$__0 stateMachine = default(_Closure$__6-0.VB$StateMachine___Lambda$__0);
_Closure$__6-0 $VB$NonLocal__Closure$__6-;
stateMachine.$VB$NonLocal__Closure$__6-0 = $VB$NonLocal__Closure$__6-;
stateMachine.$VB$Local_s = s;
stateMachine.$State = -1;
stateMachine.$Builder = AsyncTaskMethodBuilder<bool>.Create();
stateMachine.$Builder.Start(ref stateMachine);
return stateMachine.$Builder.Task;
});
}
bool IExportManager.HasExportPermissions(int appID)
{
return this.HasExportPermissions(appID);
}
bool kCura.WinEDDS.Service.Export.IExportManager.HasExportPermissions(int appID)
{
return this.HasExportPermissions(appID);
}
protected override Exception ConvertSoapExceptionToRelativityException(SoapException soapException)
{
if (Operators.CompareString(soapException.get_Detail().SelectNodes("ExceptionType").Item(0)
.InnerText, "Relativity.Core.Exception.InsufficientAccessControlListPermissions", false) != 0)
return base.ConvertSoapExceptionToRelativityException(soapException);
return new ExportManager.InsufficientPermissionsForExportException(soapException.get_Detail().SelectNodes("ExceptionMessage")[0].InnerText, (Exception)soapException);
}
private object[][] UnwrapAndRehydrateStrings(ExportDataWrapper wrapper)
{
if (wrapper.Unwrap() != null) {
object[][] array = wrapper.Unwrap();
object[][] array2 = array;
foreach (object[] array3 in array2) {
if (array3 == null)
throw new Exception("Invalid (null) row retrieved from server");
int num = checked(array3.Length - 1);
for (int j = 0; j <= num; j = checked(j + 1)) {
if (array3[j] is byte[])
array3[j] = Encoding.Unicode.GetString((byte[])array3[j]);
}
}
return array;
}
return null;
}
}
}