fixed warnings.
This commit is contained in:
parent
ebc776459d
commit
92b32975e8
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace KattekerCreator.Helper
|
namespace KattekerCreator.Helper
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@ namespace KattekerCreator
|
|||||||
var additionalFiles = new[]
|
var additionalFiles = new[]
|
||||||
{
|
{
|
||||||
new PhysicalFile(appStubFile, Path.GetFileName(_appArguments.ProgramFile)),
|
new PhysicalFile(appStubFile, Path.GetFileName(_appArguments.ProgramFile)),
|
||||||
new PhysicalFile(configFile, Path.Combine($"app-{_assemblyFileInfo.AssemblyVersion}", Path.GetFileName(configFile)))
|
new PhysicalFile(configFile, Path.Combine($"app-{_assemblyFileInfo.AssemblyVersion}", Path.GetFileName(configFile) ?? string.Empty))
|
||||||
};
|
};
|
||||||
var templateFile = GenerateNsisTemplate(additionalFiles);
|
var templateFile = GenerateNsisTemplate(additionalFiles);
|
||||||
//Start makensis.exe
|
//Start makensis.exe
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<Application x:Class="Example.App"
|
<Application x:Class="Example.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:Example"
|
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
using System.Windows;
|
namespace Example
|
||||||
|
|
||||||
namespace Example
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for App.xaml
|
/// Interaction logic for App.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Example"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
Title="MainWindow"
|
Title="MainWindow"
|
||||||
Width="800"
|
Width="800"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
[assembly: AssemblyTitle("Katteker.Test")]
|
[assembly: AssemblyTitle("Katteker.Test")]
|
||||||
|
@ -61,11 +61,15 @@ namespace Katteker
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var response = await webReq.GetResponseAsync().ConfigureAwait(false))
|
using (var response = await webReq.GetResponseAsync().ConfigureAwait(false))
|
||||||
using (var sr = new StreamReader(response.GetResponseStream()))
|
{
|
||||||
|
var responseStream = response.GetResponseStream();
|
||||||
|
if (responseStream == null) return null;
|
||||||
|
using (var sr = new StreamReader(responseStream))
|
||||||
{
|
{
|
||||||
return await sr.ReadToEndAsync().ConfigureAwait(false);
|
return await sr.ReadToEndAsync().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
// ignore;
|
// ignore;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using Semver;
|
using Semver;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Katteker
|
namespace Katteker
|
||||||
@ -29,7 +30,7 @@ namespace Katteker
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct release entry from string.
|
/// Construct release entry from string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <exception cref="ArgumentOutOfRangeException"></exception>
|
/// <exception cref="FileLoadException"></exception>
|
||||||
public ReleaseEntry(string line)
|
public ReleaseEntry(string line)
|
||||||
{
|
{
|
||||||
var elements = line?.Split(Seperator);
|
var elements = line?.Split(Seperator);
|
||||||
@ -38,7 +39,7 @@ namespace Katteker
|
|||||||
Filename = elements[1];
|
Filename = elements[1];
|
||||||
Filesize = long.Parse(elements[2]);
|
Filesize = long.Parse(elements[2]);
|
||||||
var fileSegments = Regex.Match(Filename, FilenameRegex);
|
var fileSegments = Regex.Match(Filename, FilenameRegex);
|
||||||
if (fileSegments.Groups.Count < 3) throw new ArgumentOutOfRangeException("Filename is not compilant.");
|
if (fileSegments.Groups.Count < 3) throw new FileLoadException("Filename not compilant.");
|
||||||
ApplicationName = fileSegments.Groups[1].Value;
|
ApplicationName = fileSegments.Groups[1].Value;
|
||||||
Version = SemVersion.Parse(fileSegments.Groups[2].Value);
|
Version = SemVersion.Parse(fileSegments.Groups[2].Value);
|
||||||
IsDelta = fileSegments.Groups[3].Value != "full";
|
IsDelta = fileSegments.Groups[3].Value != "full";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user