Added Prism to example, Added ability to filter files and minor bugfixes

This commit is contained in:
Holger Boerchers 2018-07-28 23:57:14 +02:00
parent a18f7b0837
commit 0ed81d68c8
38 changed files with 15713 additions and 44 deletions

View File

@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
@ -11,6 +12,7 @@ namespace KattekerCreator
private string _programFile;
private string _publishDir;
private string _version;
private string _filterAsString;
[DisplayName("Program")]
[Description("Path to the program file")]
@ -60,6 +62,14 @@ namespace KattekerCreator
set => SetPropertyIfNotDefault(ref _version, value);
}
[DisplayName("Filter")]
[Description("Filter parameter. Use minimatch pattern.")]
public string FilterAsString
{
get => _filterAsString;
set => SetPropertyIfNotDefault(ref _filterAsString, value);
}
private static bool SetPropertyIfNotDefault<T>(ref T field, T value)
{
if (Equals(value, field)) return false;
@ -67,5 +77,7 @@ namespace KattekerCreator
field = value;
return true;
}
public string[] Filter => string.IsNullOrWhiteSpace(FilterAsString) ? new string[0] : FilterAsString.Split(';');
}
}

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Minimatch;
using Vestris.ResourceLib;
namespace KattekerCreator.Helper
@ -73,25 +74,33 @@ namespace KattekerCreator.Helper
#endif
}
public static IEnumerable<FileInfo> EnumerateFiles(string programFile, IEnumerable<string> userdefinedFileExclusions = null)
public static IList<FileInfo> EnumerateFiles(string path, IEnumerable<string> userdefinedFileExclusions = null)
{
if (string.IsNullOrWhiteSpace(programFile)) return null;
var directoryName = Path.GetDirectoryName(programFile);
if (directoryName == null) return null;
var files = new DirectoryInfo(directoryName).EnumerateFiles("*.*", SearchOption.AllDirectories);
var filter = FileExclusions(userdefinedFileExclusions).ToArray();
return files.Where(x => !filter.Any(y => x.Name.EndsWith(y, StringComparison.Ordinal)));
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentNullException(nameof(path));
var result = new DirectoryInfo(path).EnumerateFiles("*.*", SearchOption.AllDirectories).ToList();
var minimatchOptions = new Options {AllowWindowsPaths = true};
foreach (var pattern in FileExclusions(userdefinedFileExclusions))
{
var matcher = new Minimatcher(pattern, minimatchOptions);
for (var index = result.Count - 1; index >= 0; index--)
{
if (matcher.IsMatch(result[index].Name))
{
result.Remove(result[index]);
}
}
}
return result;
}
private static IEnumerable<string> FileExclusions(IEnumerable<string> userdefinedfileExclusions = null)
{
yield return ".pdb";
yield return ".tmp";
yield return ".obj";
yield return ".pch";
yield return ".vshost.exe";
yield return ".vshost.exe.config";
yield return ".vshost.exe.manifest";
yield return "*.pdb";
yield return "*.tmp";
yield return "*.obj";
yield return "*.pch";
yield return "*.vshost.exe*";
yield return "squirrelHelperInfo.json";
yield return "Katteker.config";

View File

@ -55,6 +55,7 @@
<Compile Include="IconExtractor\IconExtractor.cs" />
<Compile Include="IconExtractor\IconUtil.cs" />
<Compile Include="IconExtractor\NativeMethods.cs" />
<Compile Include="Helper\Minimatcher.cs" />
<Compile Include="PathFragments.cs" />
<Compile Include="PhysicalFile.cs" />
<Compile Include="Program.cs" />

View File

@ -183,7 +183,7 @@ namespace KattekerCreator
};
var path = Path.GetDirectoryName(_appArguments.ProgramFile) ?? string.Empty;
setupTmpl.Files.AddRange(additionalFiles);
var files = Utils.EnumerateFiles(_appArguments.ProgramFile).ToArray();
var files = Utils.EnumerateFiles(path, _appArguments.Filter).ToArray();
setupTmpl.InstallSize = (long) Math.Floor(files.Sum(x => x.Length) / 1024f);
setupTmpl.Files.AddRange(files.Select(x => new PhysicalFile(x.FullName, x.FullName.Replace(path, $"app-{_assemblyFileInfo.AssemblyVersion}"))));
var transformText = setupTmpl.TransformText();

View File

@ -1,7 +1,6 @@
<Application x:Class="Example.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Resources>
</Application.Resources>

View File

@ -1,9 +1,16 @@
namespace Example
using System.Windows;
namespace Example
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App
{
protected override void OnStartup(StartupEventArgs e)
{
var bootstrapper = new Bootstrapper();
bootstrapper.Run();
}
}
}

16
Example/Bootstrapper.cs Normal file
View File

@ -0,0 +1,16 @@
using System.Windows;
using Autofac;
using Prism.Autofac;
namespace Example
{
public class Bootstrapper : AutofacBootstrapper
{
protected override DependencyObject CreateShell() => Container.Resolve<MainWindow>();
protected override void InitializeShell()
{
(Shell as Window)?.Show();
}
}
}

View File

@ -41,8 +41,26 @@
<StartupObject>Example.App</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="Prism, Version=6.3.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Core.6.3.0\lib\net45\Prism.dll</HintPath>
</Reference>
<Reference Include="Prism.Autofac.Wpf, Version=6.3.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Autofac.6.3.0\lib\net45\Prism.Autofac.Wpf.dll</HintPath>
</Reference>
<Reference Include="Prism.Wpf, Version=6.3.0.0, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.6.3.0\lib\net45\Prism.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Prism.Wpf.6.3.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
@ -69,6 +87,7 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Bootstrapper.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
@ -95,6 +114,7 @@
<None Include="changelog.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@ -49,5 +49,5 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.53")]
[assembly: AssemblyFileVersion("1.0.53")]
[assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyFileVersion("1.1.0")]

8
Example/packages.config Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net45" />
<package id="Prism.Autofac" version="6.3.0" targetFramework="net45" />
<package id="Prism.Core" version="6.3.0" targetFramework="net45" />
<package id="Prism.Wpf" version="6.3.0" targetFramework="net45" />
</packages>

View File

@ -83,9 +83,15 @@ namespace Katteker
private async void UpdateWindow_Load(object sender, EventArgs e)
{
var changelogContent = await ChangelogHelper.LoadChangelogAsync(Changelog, PublishPath).ConfigureAwait(false);
var changelogContent = "No changelog provided.";
if (Changelog != null)
{
changelogContent = await ChangelogHelper.LoadChangelogAsync(Changelog, PublishPath).ConfigureAwait(false);
}
changelogContent = changelogContent.ChangelogAsHtml(Path.GetExtension(Changelog));
Invoke(new Action(() => changelogBrowser.DocumentText = changelogContent));
if (_entry == null)
{
Invoke(new Action(() => { WriteTitle(Resources.No_update_available); }));

View File

@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -12,6 +13,7 @@ namespace Katteker
public static class UserInterface
{
private static UpdateManager _manager;
private static Action _restartApp;
/// <summary>
/// Checks for Updates.
@ -38,6 +40,7 @@ namespace Katteker
}
var releases = (await _manager.CheckForUpdateAsync().ConfigureAwait(false)).ToArray();
_restartApp = () => _manager.RestartApp();
if (releases.Any() || !isStartup)
{
var thread = new Thread(ThreadProcess);
@ -49,13 +52,13 @@ namespace Katteker
private static void ThreadProcess(object argument)
{
var entry = (ReleaseEntry) argument;
var entry = argument as ReleaseEntry;
using (var window = new UpdateWindow(_manager, entry))
{
var dialogResult = window.ShowDialog();
if (dialogResult == DialogResult.OK)
{
_manager.RestartApp();
_restartApp?.Invoke();
}
}
}

View File

@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Katteker.Test</RootNamespace>
<AssemblyName>Katteker.Test</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
@ -20,6 +20,7 @@
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -50,11 +51,72 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="testdata\Autofac.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Autofac.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Example.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Example.pdb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Example.vshost.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Katteker.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Katteker.pdb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Katteker.UserInterface.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Katteker.UserInterface.pdb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Katteker.UserInterface.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Microsoft.Practices.ServiceLocation.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Microsoft.Practices.ServiceLocation.pdb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Microsoft.Practices.ServiceLocation.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.Autofac.Wpf.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.Autofac.Wpf.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.Wpf.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.Wpf.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\Prism.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="testdata\System.Windows.Interactivity.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Creator\KattekerCreator.csproj">
<Project>{53d065eb-8818-4f60-9ebe-75705e1bb00d}</Project>
<Name>KattekerCreator</Name>
</ProjectReference>
<ProjectReference Include="..\Katteker\Katteker.csproj">
<Project>{A45E1C59-BA9E-452C-A5E2-50DE49D53E92}</Project>
<Name>Katteker</Name>
@ -62,6 +124,21 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="testdata\changelog.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="testdata\Example.exe.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="testdata\Katteker.UserInterface.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="testdata\Prism.Autofac.Wpf.dll.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="testdata\squirrelHelperInfo.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -9,7 +9,8 @@ namespace Katteker.Test
public class KattekerLibTest
{
private static readonly string BaseDir = AppDomain.CurrentDomain.BaseDirectory;
private static readonly string ExampleFile = Path.Combine(BaseDir, "testdata", "Example.exe");
private static readonly string ExamplePath = Path.Combine(BaseDir, "testdata");
private static readonly string ExampleFile = Path.Combine(ExamplePath, "Example.exe");
[Test]
public void Sha1ChecksumOfFile()
@ -53,7 +54,14 @@ namespace Katteker.Test
public void TestGetLocalAppDataDirectory()
{
var expected = Utility.GetLocalAppDataDirectory();
Assert.IsTrue(expected.Contains("AppData\\Local"));
Assert.IsTrue(expected.Contains("AppData\\Local\\Programs"));
}
[Test]
public void TestEnumerateFiles()
{
var list = KattekerCreator.Helper.Utils.EnumerateFiles(ExamplePath, new[] {"*.xml"});
Assert.AreEqual(13, list.Count);
}
}
}

BIN
Katteker.Test/testdata/Autofac.dll vendored Normal file

Binary file not shown.

6923
Katteker.Test/testdata/Autofac.xml vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NuGet.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.8.50926.602" newVersion="2.8.50926.602" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Mono.Cecil" publicKeyToken="0738eb9f132ed756" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.9.5.0" newVersion="0.9.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DeltaCompressionDotNet.MsDelta" publicKeyToken="46b2138a390abf55" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.19.2.0" newVersion="0.19.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,155 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Katteker.UserInterface</name>
</assembly>
<members>
<member name="T:Katteker.NativeMethods">
<summary>
Native methods.
</summary>
</member>
<member name="F:Katteker.NativeMethods.HTCAPTION">
<summary>
Hit Test Caption
</summary>
</member>
<member name="F:Katteker.NativeMethods.WM_NCLBUTTONDOWN">
<summary>
Posted when the user presses the left mouse button while the cursor is within the nonclient area of a window.
</summary>
</member>
<member name="M:Katteker.NativeMethods.ReleaseCapture">
<summary>
Release the capture
</summary>
</member>
<member name="M:Katteker.NativeMethods.SendMessage(System.IntPtr,System.Int32,System.Int32,System.Int32)">
<summary>
Send message
</summary>
</member>
<member name="M:Katteker.NativeMethods.SetProcessDPIAware">
<summary>
Set Process API aware
</summary>
</member>
<member name="T:Katteker.UserInterface">
<summary>
The wrapper to add Katteker-capability to older Programs.
</summary>
</member>
<member name="M:Katteker.UserInterface.CheckForUpdateAsync">
<summary>
Checks for Updates.
</summary>
<returns>Task</returns>
</member>
<member name="M:Katteker.UserInterface.CheckForUpdateAsync(System.Boolean)">
<summary>
Checks for Updates.
</summary>
<param name="isStartup">Is this Method called on Startup of the Program.</param>
<returns>Task</returns>
</member>
<member name="T:Katteker.Properties.Resources">
<summary>
Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.ResourceManager">
<summary>
Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.Culture">
<summary>
Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.CouldNotUpdateYourApplication">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Could not update your application. ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.Installed_new_Version">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Installed new Version! Would you like to restart the Application? ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.New_Version">
<summary>
Sucht eine lokalisierte Zeichenfolge, die New Version ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.No_update_available">
<summary>
Sucht eine lokalisierte Zeichenfolge, die No update available. ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.SquirrelWrapper_CheckForUpdate">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Can&apos;t find configuration File. Ask your local distributor. ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.SquirrelWrapper_CheckForUpdate_AskYourLocalDistributor">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Ask your local distributor. ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.SquirrelWrapper_CheckForUpdate_Error">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Error with Configuration-File ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.SquirrelWrapper_CheckForUpdate_ErrorWithUpdate">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Error with Update ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.Updater">
<summary>
Sucht eine lokalisierte Zeichenfolge, die Updater ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.You_can_update_to_Version">
<summary>
Sucht eine lokalisierte Zeichenfolge, die You can update to Version: ähnelt.
</summary>
</member>
<member name="P:Katteker.Properties.Resources.You_re_up_to_date">
<summary>
Sucht eine lokalisierte Zeichenfolge, die You&apos;re up to date. ähnelt.
</summary>
</member>
<member name="T:Katteker.UpdateWindow">
<summary>
Shows the Update Window.
</summary>
</member>
<member name="M:Katteker.UpdateWindow.#ctor(Katteker.UpdateManager,Katteker.ReleaseEntry)">
<summary>
The Update Window
</summary>
</member>
<member name="M:Katteker.UpdateWindow.Dispose(System.Boolean)">
<inheritdoc />
<summary>
Clean up any resources being used.
</summary>
<param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
</member>
<member name="F:Katteker.UpdateWindow.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:Katteker.UpdateWindow.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
</members>
</doc>

BIN
Katteker.Test/testdata/Katteker.dll vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,268 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Microsoft.Practices.ServiceLocation</name>
</assembly>
<members>
<member name="T:Microsoft.Practices.ServiceLocation.ActivationException">
<summary>
The standard exception thrown when a ServiceLocator has an error in resolving an object.
</summary>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ActivationException.#ctor">
<summary>
Initializes a new instance of the <see cref="T:System.Exception" /> class.
</summary>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ActivationException.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:System.Exception" /> class with a specified error message.
</summary>
<param name="message">
The message that describes the error.
</param>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ActivationException.#ctor(System.String,System.Exception)">
<summary>
Initializes a new instance of the <see cref="T:System.Exception" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.
</summary>
<param name="message">
The error message that explains the reason for the exception.
</param>
<param name="innerException">
The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
</param>
</member>
<member name="T:Microsoft.Practices.ServiceLocation.IServiceLocator">
<summary>
The generic Service Locator interface. This interface is used
to retrieve services (instances identified by type and optional
name) from a container.
</summary>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetInstance(System.Type)">
<summary>
Get an instance of the given <paramref name="serviceType"/>.
</summary>
<param name="serviceType">Type of object requested.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is an error resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetInstance(System.Type,System.String)">
<summary>
Get an instance of the given named <paramref name="serviceType"/>.
</summary>
<param name="serviceType">Type of object requested.</param>
<param name="key">Name the object was registered with.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is an error resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetAllInstances(System.Type)">
<summary>
Get all instances of the given <paramref name="serviceType"/> currently
registered in the container.
</summary>
<param name="serviceType">Type of object requested.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>A sequence of instances of the requested <paramref name="serviceType"/>.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetInstance``1">
<summary>
Get an instance of the given <typeparamref name="TService"/>.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetInstance``1(System.String)">
<summary>
Get an instance of the given named <typeparamref name="TService"/>.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<param name="key">Name the object was registered with.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.IServiceLocator.GetAllInstances``1">
<summary>
Get all instances of the given <typeparamref name="TService"/> currently
registered in the container.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>A sequence of instances of the requested <typeparamref name="TService"/>.</returns>
</member>
<member name="T:Microsoft.Practices.ServiceLocation.ServiceLocator">
<summary>
This class provides the ambient container for this application. If your
framework defines such an ambient container, use ServiceLocator.Current
to get it.
</summary>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocator.SetLocatorProvider(Microsoft.Practices.ServiceLocation.ServiceLocatorProvider)">
<summary>
Set the delegate that is used to retrieve the current container.
</summary>
<param name="newProvider">Delegate that, when called, will return
the current ambient container.</param>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.ServiceLocator.Current">
<summary>
The current ambient container.
</summary>
</member>
<member name="T:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase">
<summary>
This class is a helper that provides a default implementation
for most of the methods of <see cref="T:Microsoft.Practices.ServiceLocation.IServiceLocator"/>.
</summary>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetService(System.Type)">
<summary>
Implementation of <see cref="M:System.IServiceProvider.GetService(System.Type)"/>.
</summary>
<param name="serviceType">The requested service.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is an error in resolving the service instance.</exception>
<returns>The requested object.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(System.Type)">
<summary>
Get an instance of the given <paramref name="serviceType"/>.
</summary>
<param name="serviceType">Type of object requested.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is an error resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(System.Type,System.String)">
<summary>
Get an instance of the given named <paramref name="serviceType"/>.
</summary>
<param name="serviceType">Type of object requested.</param>
<param name="key">Name the object was registered with.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is an error resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetAllInstances(System.Type)">
<summary>
Get all instances of the given <paramref name="serviceType"/> currently
registered in the container.
</summary>
<param name="serviceType">Type of object requested.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>A sequence of instances of the requested <paramref name="serviceType"/>.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance``1">
<summary>
Get an instance of the given <typeparamref name="TService"/>.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance``1(System.String)">
<summary>
Get an instance of the given named <typeparamref name="TService"/>.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<param name="key">Name the object was registered with.</param>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetAllInstances``1">
<summary>
Get all instances of the given <typeparamref name="TService"/> currently
registered in the container.
</summary>
<typeparam name="TService">Type of object requested.</typeparam>
<exception cref="T:Microsoft.Practices.ServiceLocation.ActivationException">if there is are errors resolving
the service instance.</exception>
<returns>A sequence of instances of the requested <typeparamref name="TService"/>.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.DoGetInstance(System.Type,System.String)">
<summary>
When implemented by inheriting classes, this method will do the actual work of resolving
the requested service instance.
</summary>
<param name="serviceType">Type of instance requested.</param>
<param name="key">Name of registered service you want. May be null.</param>
<returns>The requested service instance.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.DoGetAllInstances(System.Type)">
<summary>
When implemented by inheriting classes, this method will do the actual work of
resolving all the requested service instances.
</summary>
<param name="serviceType">Type of service requested.</param>
<returns>Sequence of service instance objects.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.FormatActivationExceptionMessage(System.Exception,System.Type,System.String)">
<summary>
Format the exception message for use in an <see cref="T:Microsoft.Practices.ServiceLocation.ActivationException"/>
that occurs while resolving a single service.
</summary>
<param name="actualException">The actual exception thrown by the implementation.</param>
<param name="serviceType">Type of service requested.</param>
<param name="key">Name requested.</param>
<returns>The formatted exception message string.</returns>
</member>
<member name="M:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.FormatActivateAllExceptionMessage(System.Exception,System.Type)">
<summary>
Format the exception message for use in an <see cref="T:Microsoft.Practices.ServiceLocation.ActivationException"/>
that occurs while resolving multiple service instances.
</summary>
<param name="actualException">The actual exception thrown by the implementation.</param>
<param name="serviceType">Type of service requested.</param>
<returns>The formatted exception message string.</returns>
</member>
<member name="T:Microsoft.Practices.ServiceLocation.ServiceLocatorProvider">
<summary>
This delegate type is used to provide a method that will
return the current container. Used with the <see cref="T:Microsoft.Practices.ServiceLocation.ServiceLocator"/>
static accessor class.
</summary>
<returns>An <see cref="T:Microsoft.Practices.ServiceLocation.IServiceLocator"/>.</returns>
</member>
<member name="T:Microsoft.Practices.ServiceLocation.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.Properties.Resources.ActivateAllExceptionMessage">
<summary>
Looks up a localized string similar to Activation error occurred while trying to get all instances of type {0}.
</summary>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.Properties.Resources.ActivationExceptionMessage">
<summary>
Looks up a localized string similar to Activation error occurred while trying to get instance of type {0}, key &quot;{1}&quot;.
</summary>
</member>
<member name="P:Microsoft.Practices.ServiceLocation.Properties.Resources.ServiceLocationProviderNotSetMessage">
<summary>
Looks up a localized string similar to ServiceLocationProvider must be set..
</summary>
</member>
</members>
</doc>

Binary file not shown.

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,266 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Prism.Autofac.Wpf</name>
</assembly>
<members>
<member name="T:Prism.Autofac.AutofacBootstrapper">
<summary>
Base class that provides a basic bootstrapping sequence that
registers most of the Prism Library assets
in an Autofac <see cref="T:Autofac.IContainer"/>.
</summary>
<remarks>
This class must be overridden to provide application specific configuration.
</remarks>
</member>
<member name="P:Prism.Autofac.AutofacBootstrapper.Container">
<summary>
Gets the default Autofac <see cref="T:Autofac.IContainer"/> for the application.
</summary>
<value>The default <see cref="T:Autofac.IContainer"/> instance.</value>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.Run(System.Boolean)">
<summary>
Run the bootstrapper process.
</summary>
<param name="runWithDefaultConfiguration">If <see langword="true"/>, registers default Prism Library services in the container. This is the default behavior.</param>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.ConfigureServiceLocator">
<summary>
Configures the LocatorProvider for the <see cref="T:Microsoft.Practices.ServiceLocation.ServiceLocator" />.
</summary>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.ConfigureViewModelLocator">
<summary>
Configures the <see cref="T:Prism.Mvvm.ViewModelLocator"/> used by Prism.
</summary>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.RegisterFrameworkExceptionTypes">
<summary>
Registers in the Autofac <see cref="T:Autofac.IContainer"/> the <see cref="T:System.Type"/> of the Exceptions
that are not considered root exceptions by the <see cref="T:System.ExceptionExtensions"/>.
</summary>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.CreateContainerBuilder">
<summary>
Creates the <see cref="T:Autofac.ContainerBuilder"/> that will be used to create the default container.
</summary>
<returns>A new instance of <see cref="T:Autofac.ContainerBuilder"/>.</returns>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.ConfigureContainerBuilder(Autofac.ContainerBuilder)">
<summary>
Configures the <see cref="T:Autofac.ContainerBuilder"/>.
May be overwritten in a derived class to add specific type mappings required by the application.
</summary>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.CreateContainer(Autofac.ContainerBuilder)">
<summary>
Creates the Autofac <see cref="T:Autofac.IContainer"/> that will be used as the default container.
</summary>
<returns>A new instance of <see cref="T:Autofac.IContainer"/>.</returns>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.InitializeModules">
<summary>
Initializes the modules. May be overwritten in a derived class to use a custom Modules Catalog
</summary>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.RegisterTypeIfMissing``2(Autofac.ContainerBuilder,System.Boolean)">
<summary>
Registers a type in the container only if that type was not already registered.
</summary>
<typeparam name="TFrom">The interface type to register.</typeparam>
<typeparam name="TTarget">The type implementing the interface.</typeparam>
<param name="builder">The <see cref="T:Autofac.ContainerBuilder"/> instance.</param>
<param name="registerAsSingleton">Registers the type as a singleton.</param>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.RegisterTypeIfMissing(System.Type,System.Type,System.Boolean)">
<summary>
Registers a type in the container only if that type was not already registered.
</summary>
<param name="fromType">The interface type to register.</param>
<param name="toType">The type implementing the interface.</param>
<param name="registerAsSingleton">Registers the type as a singleton.</param>
</member>
<member name="M:Prism.Autofac.AutofacBootstrapper.RegisterInstance``1(``0,System.Type,System.String,System.Boolean)">
<summary>
Registers an object instance in the container.
</summary>
<param name="instance">Object instance.</param>
<param name="fromType">The interface type to register.</param>
<param name="key">Optional key for registration.</param>
<param name="registerAsSingleton">Registers the type as a singleton.</param>
</member>
<member name="M:Prism.Autofac.AutofacExtensions.RegisterTypeForNavigation``1(Autofac.ContainerBuilder,System.String)">
<summary>
Registers an object for navigation.
</summary>
<typeparam name="T">The Type of the object to register</typeparam>
<param name="builder"><see cref="T:Autofac.ContainerBuilder"/> used to build <see cref="T:Autofac.IContainer"/></param>
<param name="name">The unique name to register with the object</param>
</member>
<member name="T:Prism.Autofac.AutofacServiceLocatorAdapter">
<summary>
Defines a <see cref="T:Autofac.IContainer"/> adapter for the <see cref="T:Microsoft.Practices.ServiceLocation.IServiceLocator"/> interface to be used by the Prism Library.
</summary>
</member>
<member name="M:Prism.Autofac.AutofacServiceLocatorAdapter.#ctor(Autofac.IContainer)">
<summary>
Initializes a new instance of <see cref="T:Prism.Autofac.AutofacServiceLocatorAdapter"/>.
</summary>
<param name="container">The <see cref="T:Autofac.IContainer"/> that will be used
by the <see cref="M:Prism.Autofac.AutofacServiceLocatorAdapter.DoGetInstance(System.Type,System.String)"/> and <see cref="M:Prism.Autofac.AutofacServiceLocatorAdapter.DoGetAllInstances(System.Type)"/> methods.</param>
</member>
<member name="M:Prism.Autofac.AutofacServiceLocatorAdapter.DoGetInstance(System.Type,System.String)">
<summary>
Resolves the instance of the requested service.
</summary>
<param name="serviceType">Type of instance requested.</param>
<param name="key">Name of registered service you want. May be null.</param>
<returns>The requested service instance.</returns>
</member>
<member name="M:Prism.Autofac.AutofacServiceLocatorAdapter.DoGetAllInstances(System.Type)">
<summary>
Resolves all the instances of the requested service.
</summary>
<param name="serviceType">Type of service requested.</param>
<returns>Sequence of service instance objects.</returns>
</member>
<member name="T:Prism.Autofac.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.BootstrapperSequenceCompleted">
<summary>
Looks up a localized string similar to Bootstrapper sequence completed..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringAutofacContainer">
<summary>
Looks up a localized string similar to Configuring the Autofac container..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringAutofacContainerBuilder">
<summary>
Looks up a localized string similar to Configuring the Autofac container builder..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringDefaultRegionBehaviors">
<summary>
Looks up a localized string similar to Configuring default region behaviors..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringModuleCatalog">
<summary>
Looks up a localized string similar to Configuring module catalog..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringRegionAdapters">
<summary>
Looks up a localized string similar to Configuring region adapters..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringServiceLocatorSingleton">
<summary>
Looks up a localized string similar to Configuring ServiceLocator singleton..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.ConfiguringViewModelLocator">
<summary>
Looks up a localized string similar to Configuring the ViewModelLocator to use Autofac..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.CreatingAutofacContainer">
<summary>
Looks up a localized string similar to Creating Autofac container..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.CreatingAutofacContainerBuilder">
<summary>
Looks up a localized string similar to Creating Autofac container builder..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.CreatingModuleCatalog">
<summary>
Looks up a localized string similar to Creating module catalog..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.CreatingShell">
<summary>
Looks up a localized string similar to Creating the shell..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.InitializingModules">
<summary>
Looks up a localized string similar to Initializing modules..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.InitializingShell">
<summary>
Looks up a localized string similar to Initializing the shell..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.LoggerCreatedSuccessfully">
<summary>
Looks up a localized string similar to Logger was created successfully..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.NotOverwrittenGetModuleEnumeratorException">
<summary>
Looks up a localized string similar to The method &apos;GetModuleEnumerator&apos; of the bootstrapper must be overwritten in order to use the default module initialization logic..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.NullAutofacContainerBuilderException">
<summary>
Looks up a localized string similar to The ContainerBuilder is required and cannot be null..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.NullAutofacContainerException">
<summary>
Looks up a localized string similar to The IContainer is required and cannot be null..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.NullLoggerFacadeException">
<summary>
Looks up a localized string similar to The ILoggerFacade is required and cannot be null..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.NullModuleCatalogException">
<summary>
Looks up a localized string similar to The IModuleCatalog is required and cannot be null in order to initialize the modules..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.RegisteringFrameworkExceptionTypes">
<summary>
Looks up a localized string similar to Registering Framework Exception Types..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.SettingTheRegionManager">
<summary>
Looks up a localized string similar to Setting the RegionManager..
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.TypeMappingAlreadyRegistered">
<summary>
Looks up a localized string similar to Type &apos;{0}&apos; was already registered by the application. Skipping....
</summary>
</member>
<member name="P:Prism.Autofac.Properties.Resources.UpdatingRegions">
<summary>
Looks up a localized string similar to Updating Regions..
</summary>
</member>
</members>
</doc>

BIN
Katteker.Test/testdata/Prism.Wpf.dll vendored Normal file

Binary file not shown.

5527
Katteker.Test/testdata/Prism.Wpf.xml vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
Katteker.Test/testdata/Prism.dll vendored Normal file

Binary file not shown.

1275
Katteker.Test/testdata/Prism.xml vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

5
Katteker.Test/testdata/changelog.md vendored Normal file
View File

@ -0,0 +1,5 @@
# Changelog
## 1.0.0
- Hello World

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>

View File

@ -1,25 +1,23 @@
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace Katteker
{
/// <summary>
/// Configuration of a Katteker-Deployment
/// </summary>
[DataContract]
[Serializable]
public class KattekerConfig
{
/// <summary>
/// Publish path
/// </summary>
[DataMember]
public string Publish { get; set; }
/// <summary>
/// Name of the changelog file.
/// </summary>
[DataMember]
public string Changelog { get; set; }
/// <summary>
@ -31,10 +29,10 @@ namespace Katteker
public static KattekerConfig ReadFromFile(string path)
{
if (!File.Exists(path)) throw new FileNotFoundException();
var dataContractJsonSerializer = new DataContractJsonSerializer(typeof(KattekerConfig));
var serializer = new BinaryFormatter();
using (var fileStream = File.OpenRead(path))
{
var obj = dataContractJsonSerializer.ReadObject(fileStream);
var obj = serializer.Deserialize(fileStream);
return (KattekerConfig)obj;
}
}
@ -48,8 +46,8 @@ namespace Katteker
if (File.Exists(path)) File.Delete(path);
using (var fileStream = File.OpenWrite(path))
{
var dataContractJsonSerializer = new DataContractJsonSerializer(typeof(KattekerConfig));
dataContractJsonSerializer.WriteObject(fileStream, this);
var serializer = new BinaryFormatter();
serializer.Serialize(fileStream, this);
}
}
}

View File

@ -101,12 +101,10 @@ namespace Katteker
{
exeToStart = exeToStart ?? Path.GetFileName(Assembly.GetEntryAssembly().Location);
var program = Path.Combine(_rootAppDirectory, exeToStart);
if (File.Exists(program))
{
Process.Start(program, arguments);
Thread.Sleep(500);
Environment.Exit(0);
}
if (!File.Exists(program)) throw new FileNotFoundException(program);
Process.Start(program, arguments);
Thread.Sleep(500);
Environment.Exit(0);
}
/// <summary>

View File

@ -12,7 +12,7 @@ namespace Katteker
{
internal static string GetLocalAppDataDirectory()
{
return Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs");
}
internal static string GetApplicationName(Assembly assembly = null) => (assembly ?? Assembly.GetEntryAssembly()).GetName().Name;