VolumeInfo
using Microsoft.VisualBasic.CompilerServices;
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace kCura.WinEDDS.Exporters
{
[Serializable]
public class VolumeInfo : ISerializable
{
private string _subdirectoryImagePrefix;
private string _subdirectoryNativePrefix;
private string _subdirectoryTextPrefix;
private string _subdirectoryPdfPrefix;
[CompilerGenerated]
private string _VolumePrefix;
[CompilerGenerated]
private int _VolumeStartNumber;
[CompilerGenerated]
private long _VolumeMaxSize;
[CompilerGenerated]
private int _SubdirectoryStartNumber;
[CompilerGenerated]
private long _SubdirectoryMaxSize;
[CompilerGenerated]
private bool _CopyNativeFilesFromRepository;
[CompilerGenerated]
private bool _CopyImageFilesFromRepository;
[CompilerGenerated]
private bool _CopyPdfFilesFromRepository;
public string VolumePrefix { get; set; }
public int VolumeStartNumber { get; set; }
public long VolumeMaxSize { get; set; }
public int SubdirectoryStartNumber { get; set; }
public long SubdirectoryMaxSize { get; set; }
public bool CopyNativeFilesFromRepository { get; set; }
public bool CopyImageFilesFromRepository { get; set; }
public bool CopyPdfFilesFromRepository { get; set; }
public string SubdirectoryImagePrefix {
get {
return BuildSubdirectoryPrefix(_subdirectoryImagePrefix, "IMAGES", includeTopFolder);
}
set {
_subdirectoryImagePrefix = value;
}
}
public string SubdirectoryNativePrefix {
get {
return BuildSubdirectoryPrefix(_subdirectoryNativePrefix, "NATIVES", includeTopFolder);
}
set {
_subdirectoryNativePrefix = value;
}
}
public string SubdirectoryFullTextPrefix {
get {
return BuildSubdirectoryPrefix(_subdirectoryTextPrefix, "TEXT", includeTopFolder);
}
set {
_subdirectoryTextPrefix = value;
}
}
public string SubdirectoryPdfPrefix {
get {
return BuildSubdirectoryPrefix(_subdirectoryPdfPrefix, "PDF", includeTopFolder);
}
set {
_subdirectoryPdfPrefix = value;
}
}
private string BuildSubdirectoryPrefix(string subdirectoryPrefix, string parentFolderPrefix, bool includeTopFolder = true)
{
if (!includeTopFolder)
return subdirectoryPrefix;
return parentFolderPrefix + "\\" + subdirectoryPrefix;
}
public VolumeInfo()
{
CopyNativeFilesFromRepository = true;
CopyImageFilesFromRepository = true;
CopyPdfFilesFromRepository = true;
CopyImageFilesFromRepository = true;
CopyNativeFilesFromRepository = true;
CopyPdfFilesFromRepository = true;
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("CopyNativeFilesFromRepository", CopyNativeFilesFromRepository, typeof(bool));
info.AddValue("CopyImageFilesFromRepository", CopyImageFilesFromRepository, typeof(bool));
info.AddValue("CopyPdfFilesFromRepository", CopyPdfFilesFromRepository, typeof(bool));
info.AddValue("SubdirectoryMaxSize", SubdirectoryMaxSize, typeof(long));
info.AddValue("SubdirectoryStartNumber", SubdirectoryStartNumber, typeof(int));
info.AddValue("SubdirectoryFullTextPrefix", this.get_SubdirectoryFullTextPrefix(false), typeof(string));
info.AddValue("SubdirectoryNativePrefix", this.get_SubdirectoryNativePrefix(false), typeof(string));
info.AddValue("SubdirectoryImagePrefix", this.get_SubdirectoryImagePrefix(false), typeof(string));
info.AddValue("SubdirectoryPdfPrefix", this.get_SubdirectoryPdfPrefix(false), typeof(string));
info.AddValue("VolumeMaxSize", VolumeMaxSize, typeof(long));
info.AddValue("VolumeStartNumber", VolumeStartNumber, typeof(int));
info.AddValue("VolumePrefix", VolumePrefix, typeof(string));
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
this.GetObjectData(info, context);
}
private VolumeInfo(SerializationInfo info, StreamingContext Context)
{
CopyNativeFilesFromRepository = true;
CopyImageFilesFromRepository = true;
CopyPdfFilesFromRepository = true;
bool flag = false;
bool flag2 = false;
try {
CopyImageFilesFromRepository = info.GetBoolean("CopyImageFilesFromRepository");
} catch (Exception projectError) {
ProjectData.SetProjectError(projectError);
flag = true;
ProjectData.ClearProjectError();
}
try {
CopyNativeFilesFromRepository = info.GetBoolean("CopyNativeFilesFromRepository");
} catch (Exception projectError2) {
ProjectData.SetProjectError(projectError2);
flag2 = true;
ProjectData.ClearProjectError();
}
try {
CopyPdfFilesFromRepository = info.GetBoolean("CopyPdfFilesFromRepository");
} catch (Exception projectError3) {
ProjectData.SetProjectError(projectError3);
CopyPdfFilesFromRepository = false;
ProjectData.ClearProjectError();
}
if (flag | flag2) {
bool boolean = info.GetBoolean("CopyFilesFromRepository");
if (flag)
CopyImageFilesFromRepository = boolean;
if (flag2)
CopyNativeFilesFromRepository = boolean;
}
SubdirectoryMaxSize = info.GetInt64("SubdirectoryMaxSize");
SubdirectoryStartNumber = info.GetInt32("SubdirectoryStartNumber");
this.set_SubdirectoryFullTextPrefix(true, info.GetString("SubdirectoryFullTextPrefix"));
this.set_SubdirectoryNativePrefix(true, info.GetString("SubdirectoryNativePrefix"));
this.set_SubdirectoryImagePrefix(true, info.GetString("SubdirectoryImagePrefix"));
VolumeMaxSize = info.GetInt64("VolumeMaxSize");
VolumeStartNumber = info.GetInt32("VolumeStartNumber");
VolumePrefix = info.GetString("VolumePrefix");
try {
this.set_SubdirectoryPdfPrefix(true, info.GetString("SubdirectoryPdfPrefix"));
} catch (Exception projectError4) {
ProjectData.SetProjectError(projectError4);
this.set_SubdirectoryPdfPrefix(true, "PDF");
ProjectData.ClearProjectError();
}
SerializationInfo serializationInfo = null;
}
}
}