XMLImportExport 1.0.1
dotnet add package XMLImportExport --version 1.0.1
NuGet\Install-Package XMLImportExport -Version 1.0.1
<PackageReference Include="XMLImportExport" Version="1.0.1" />
paket add XMLImportExport --version 1.0.1
#r "nuget: XMLImportExport, 1.0.1"
// Install XMLImportExport as a Cake Addin #addin nuget:?package=XMLImportExport&version=1.0.1 // Install XMLImportExport as a Cake Tool #tool nuget:?package=XMLImportExport&version=1.0.1
XMLImportExport
1 Introduction
The XMLImportExport
library offers utility methods for the export of whole database tables into XML files as well as a WPF-Window for viewing the export or import progress.
2 API
2.1 DuplicateNameException (Exception)
Indicates, that a name of an entry is duplicated.
Accessible Interface:
public DuplicateNameException(string message, Exception innerException)
2.2 ExportThread (abstract class)
A default
ThreadStepper
for an export of data.
Accessible Interface:
protected ExportThread(string fileDestination, string exportFailedStep, string exportFailedMessage)
public override void run()
protected abstract void runExport()
2.3 ImportThread (abstract class)
A default
ThreadStepper
for an import of data supporting some utility methods.
Accessible Interface:
protected ImportThread(string fileSource, string importFailedStep, string importFailedMessage, string formatExceptionHeader, string dbConstraintExceptionHeader, Dictionary<string, string> dbConstraintMessages)
protected abstract void runImport()
protected TimeSpan ParseManualTime(string timestring)
protected bool CheckVersionImportable(string maximumVersion, string actualVersion)
protected FormatException AssembleFormatException(string message, Exception innerException)
protected FormatException ParseDBConstraintException(string message, Exception e)
2.4 ThreadProcessViewer (Window)
A dialog with a header, progress bar and closing button that guides a
ThreadStepper
through it's process execution.The dialog shows the current progress in percent including the message broadcasted from the
ThreadStepper
and offers events to catch whenever the process finishes either successful (ProcessSucceeded
) or not (ProcessFailed
).The appearance of the dialog can be configured using the
ThreadProcessViewerConfig
. The dialog should be shown via theWindow.ShowDialog
-method.
Accessible Interface:
public delegate void ProcessFailedHandler(string message)
public event ProcessFailedHandler ProcessFailed
public delegate void ProcessSucceededHandler()
public event ProcessSucceededHandler ProcessSucceeded
public ThreadProcessViewer(ThreadStepper stepper, ThreadProcessViewerConfig config)
2.5 ThreadProcessViewerConfig
Configuration for a
ThreadProcessViewer
Accessible Interface:
public string Title
public string FinishButtonCaption
public ThreadProcessViewerStyle Style
2.6 ThreadProcessViewerStyle
Configurable style information for a
ThreadProcessViewer
Accessible Interface:
public SolidColorBrush HeaderBackground
public SolidColorBrush Background
public FontFamily HeaderFontFamily
public FontFamily FontFamily
public int HeaderFontSize
public int FontSize
public SolidColorBrush HeaderBorderColor
public int HeaderBorderThickness
2.7 ThreadStepper (abstract class)
The
ThreadStepper
runs a specific process usingrun
that is guided by progress events usingCallStep(float, string)
andCallFinished(Exception)
.The events triggered by those methods can be accessed using
StepDone
andFinished
and can be visualized using aThreadProcessViewer
.
Accessible Interface:
public delegate void StepHandler(float percentage, string message)
public event StepHandler StepDone
public delegate void ResultHandler(Exception result)
public event ResultHandler Finished
protected void CallStep(float percentage, string message)
protected void CallFinished(Exception exc = null)
public abstract void run()
2.8 XMLExport (static class)
Provides helper methods for the XML export.
Accessible Interface:
public static XElement ExportDataFromTable<T>(System.Data.Entity.DbSet<T> table, List<string> columns, Dictionary<string, Func<T, object>> additionalComputedProperties = null, Func<T, bool> filter = null, Dictionary<string, Func<object, object>> mappings = null, Func<T, List<XElement>> computeChildren = null) where T : class
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- EntityFramework (>= 6.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 190 | 6/25/2023 |