XMLImportExport 1.0.1

dotnet add package XMLImportExport --version 1.0.1
NuGet\Install-Package XMLImportExport -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XMLImportExport" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XMLImportExport --version 1.0.1
#r "nuget: XMLImportExport, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 the Window.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 using run that is guided by progress events using CallStep(float, string) and CallFinished(Exception).

The events triggered by those methods can be accessed using StepDone and Finished and can be visualized using a ThreadProcessViewer.

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 Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 147 6/25/2023