mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Namespace / visibility review
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using NuGet.Common;
|
||||
using NuGet.Versioning;
|
||||
using Squirrel.NuGet;
|
||||
using Squirrel.Windows;
|
||||
|
||||
namespace Squirrel.Csq.Commands;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Squirrel.NuGet;
|
||||
using Squirrel.Windows;
|
||||
|
||||
namespace Squirrel.Packaging.Windows.Commands;
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@ using System.Runtime.Versioning;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Squirrel
|
||||
namespace Squirrel.Packaging
|
||||
{
|
||||
// https://stackoverflow.com/a/43229358/184746
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
internal class StringFileInfo
|
||||
public class StringFileInfo
|
||||
{
|
||||
[DllImport("version.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern int GetFileVersionInfoSize(string lptstrFilename, out int lpdwHandle);
|
||||
@@ -5,7 +5,7 @@ using System.IO.Compression;
|
||||
|
||||
namespace Squirrel.Compression
|
||||
{
|
||||
public sealed class BZip2Stream : Stream
|
||||
internal sealed class BZip2Stream : Stream
|
||||
{
|
||||
private readonly Stream stream;
|
||||
private bool isDisposed;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Squirrel.Compression
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
public class BinaryPatchUtility
|
||||
internal class BinaryPatchUtility
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a binary patch (in <a href="http://www.daemonology.net/bsdiff/">bsdiff</a> format) that can be used
|
||||
|
||||
@@ -12,7 +12,7 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Squirrel.Compression
|
||||
{
|
||||
public class DeltaPackage
|
||||
internal class DeltaPackage
|
||||
{
|
||||
private readonly ILogger _log;
|
||||
private readonly string _baseTempDir;
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Squirrel.Compression
|
||||
{
|
||||
public static class EasyZip
|
||||
internal static class EasyZip
|
||||
{
|
||||
public static void ExtractZipToDirectory(ILogger logger, string inputFile, string outputDirectory)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Runtime.Versioning;
|
||||
namespace Squirrel.Compression
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class MsDeltaCompression
|
||||
internal class MsDeltaCompression
|
||||
{
|
||||
/// <summary>
|
||||
/// The ApplyDelta function use the specified delta and source files to create a new copy of the target file.
|
||||
@@ -66,7 +66,7 @@ namespace Squirrel.Compression
|
||||
IntPtr targetFileTime,
|
||||
[MarshalAs(UnmanagedType.U4)] HashAlgId hashAlgId,
|
||||
string deltaName);
|
||||
|
||||
|
||||
private enum HashAlgId
|
||||
{
|
||||
/// <summary>No signature.</summary>
|
||||
@@ -75,7 +75,7 @@ namespace Squirrel.Compression
|
||||
/// <summary>32-bit CRC defined in msdelta.dll.</summary>
|
||||
Crc32 = 32,
|
||||
}
|
||||
|
||||
|
||||
/// <remarks>
|
||||
/// http://msdn.microsoft.com/en-us/library/bb417345.aspx#deltaflagtypeflags
|
||||
/// </remarks>
|
||||
@@ -130,7 +130,7 @@ namespace Squirrel.Compression
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.Bool)] public bool Editable;
|
||||
}
|
||||
|
||||
|
||||
//public void CreateDelta(string oldFilePath, string newFilePath, string deltaFilePath)
|
||||
//{
|
||||
// const string? sourceOptionsName = null;
|
||||
|
||||
@@ -11,7 +11,7 @@ using Microsoft.Win32;
|
||||
using NuGet.Versioning;
|
||||
using Squirrel.Sources;
|
||||
|
||||
namespace Squirrel
|
||||
namespace Squirrel.Windows
|
||||
{
|
||||
public static partial class Runtimes
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Versioning;
|
||||
using NuGet.Versioning;
|
||||
|
||||
namespace Squirrel
|
||||
namespace Squirrel.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains static properties to access common supported runtimes, and a function to search for a runtime by name
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Text;
|
||||
|
||||
// All of this code is from http://vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp
|
||||
|
||||
namespace Squirrel.Shell
|
||||
namespace Squirrel.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ShellLink.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
using Squirrel.Windows;
|
||||
|
||||
namespace Squirrel.Tests
|
||||
{
|
||||
|
||||
@@ -7,10 +7,11 @@ using System.Text;
|
||||
using Squirrel;
|
||||
using Squirrel.Tests.TestHelpers;
|
||||
using Xunit;
|
||||
using Squirrel.Shell;
|
||||
using Squirrel.Windows;
|
||||
using System.Collections.Generic;
|
||||
using Xunit.Abstractions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
namespace Squirrel.Tests
|
||||
{
|
||||
@@ -29,7 +30,7 @@ namespace Squirrel.Tests
|
||||
[InlineData("/file", "\\file")]
|
||||
[InlineData("/file/", "\\file")]
|
||||
[InlineData("one\\two\\..\\file", "one\\file")]
|
||||
[InlineData("C:/AnApp/file/", "C:\\AnApp\\file")]
|
||||
[InlineData("C:/AnApp/file/", "C:\\AnApp\\file")]
|
||||
public void PathIsNormalized(string input, string expected)
|
||||
{
|
||||
var exp = Path.GetFullPath(expected);
|
||||
@@ -53,9 +54,11 @@ namespace Squirrel.Tests
|
||||
Assert.Equal(isIn, fileInDir);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[SkippableFact]
|
||||
[SupportedOSPlatform("windows")]
|
||||
public void SetAppIdOnShortcutTest()
|
||||
{
|
||||
Skip.IfNot(SquirrelRuntimeInfo.IsWindows);
|
||||
var sl = new ShellLink() {
|
||||
Target = @"C:\Windows\Notepad.exe",
|
||||
Description = "It's Notepad",
|
||||
|
||||
Reference in New Issue
Block a user