forked from vpnhood/VpnHood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup, Simplify Client Country Filter
- Loading branch information
Showing
173 changed files
with
10,371 additions
and
10,494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
namespace VpnHood.App.Launcher | ||
namespace VpnHood.App.Launcher; | ||
|
||
public class PublishInfo | ||
{ | ||
public class PublishInfo | ||
public PublishInfo(string version, string targetFramework, string launchPath) | ||
{ | ||
public PublishInfo(string version, string targetFramework, string launchPath) | ||
{ | ||
Version = version; | ||
TargetFramework = targetFramework; | ||
LaunchPath = launchPath; | ||
} | ||
|
||
/// <summary> | ||
/// Publish version | ||
/// </summary> | ||
public string Version { get; set; } | ||
|
||
/// <summary> | ||
/// TargetFramework version | ||
/// </summary> | ||
public string TargetFramework { get; set; } | ||
|
||
/// <summary> | ||
/// Entry point dll of package after updating | ||
/// </summary> | ||
public string LaunchPath { get; set; } | ||
|
||
/// <summary> | ||
/// This argument will pass to LaunchPath | ||
/// </summary> | ||
public string[]? LaunchArguments { get; set; } | ||
|
||
/// <summary> | ||
/// Url to Updated PublishInfo for next releases | ||
/// </summary> | ||
public string? UpdateUrl { get; set; } | ||
|
||
/// <summary> | ||
/// Url to download this version | ||
/// </summary> | ||
public string? PackageDownloadUrl { get; set; } | ||
|
||
/// <summary> | ||
/// PackageFileName | ||
/// </summary> | ||
public string? PackageFileName { get; set; } | ||
Version = version; | ||
TargetFramework = targetFramework; | ||
LaunchPath = launchPath; | ||
} | ||
|
||
/// <summary> | ||
/// Publish version | ||
/// </summary> | ||
public string Version { get; set; } | ||
|
||
/// <summary> | ||
/// TargetFramework version | ||
/// </summary> | ||
public string TargetFramework { get; set; } | ||
|
||
/// <summary> | ||
/// Entry point dll of package after updating | ||
/// </summary> | ||
public string LaunchPath { get; set; } | ||
|
||
/// <summary> | ||
/// This argument will pass to LaunchPath | ||
/// </summary> | ||
public string[]? LaunchArguments { get; set; } | ||
|
||
/// <summary> | ||
/// Url to Updated PublishInfo for next releases | ||
/// </summary> | ||
public string? UpdateUrl { get; set; } | ||
|
||
/// <summary> | ||
/// Url to download this version | ||
/// </summary> | ||
public string? PackageDownloadUrl { get; set; } | ||
|
||
/// <summary> | ||
/// PackageFileName | ||
/// </summary> | ||
public string? PackageFileName { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
using System; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace VpnHood.App.Launcher | ||
namespace VpnHood.App.Launcher; | ||
|
||
internal class SimpleLogger : ILogger | ||
{ | ||
internal class SimpleLogger : ILogger | ||
{ | ||
private readonly LoggerExternalScopeProvider _scopeProvider = new(); | ||
private readonly LoggerExternalScopeProvider _scopeProvider = new(); | ||
|
||
public IDisposable BeginScope<TState>(TState state) | ||
{ | ||
return _scopeProvider.Push(state); | ||
} | ||
public IDisposable BeginScope<TState>(TState state) | ||
{ | ||
return _scopeProvider.Push(state); | ||
} | ||
|
||
public bool IsEnabled(LogLevel logLevel) | ||
{ | ||
return true; | ||
} | ||
public bool IsEnabled(LogLevel logLevel) | ||
{ | ||
return true; | ||
} | ||
|
||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, | ||
Func<TState, Exception?, string> formatter) | ||
{ | ||
var message = formatter(state, exception); | ||
Console.WriteLine(message); | ||
} | ||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, | ||
Func<TState, Exception?, string> formatter) | ||
{ | ||
var message = formatter(state, exception); | ||
Console.WriteLine(message); | ||
} | ||
} |
Oops, something went wrong.