mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 05:34:48 +00:00
Merge of theolivenbaum PR
This commit is contained in:
@@ -95,8 +95,6 @@ namespace ElectronNET.API.Interfaces
|
||||
/// </summary>
|
||||
string Name
|
||||
{
|
||||
[Obsolete("Use the asynchronous version NameAsync instead")]
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
@@ -108,7 +106,7 @@ namespace ElectronNET.API.Interfaces
|
||||
/// should usually also specify a productName field, which is your application's full capitalized name, and
|
||||
/// which will be preferred over name by Electron.
|
||||
/// </summary>
|
||||
Task<string> NameAsync { get; }
|
||||
Task<string> GetNameAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A <see cref="CommandLine"/> object that allows you to read and manipulate the command line arguments that Chromium uses.
|
||||
@@ -125,8 +123,6 @@ namespace ElectronNET.API.Interfaces
|
||||
/// </summary>
|
||||
string UserAgentFallback
|
||||
{
|
||||
[Obsolete("Use the asynchronous version UserAgentFallbackAsync instead")]
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
@@ -138,7 +134,7 @@ namespace ElectronNET.API.Interfaces
|
||||
/// custom value as early as possible in your app's initialization to ensure that your overridden value
|
||||
/// is used.
|
||||
/// </summary>
|
||||
Task<string> UserAgentFallbackAsync { get; }
|
||||
Task<string> GetUserAgentFallbackAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Emitted when a MacOS user wants to open a file with the application. The open-file event is usually emitted
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using Quobject.SocketIoClientDotNet.Client;
|
||||
|
||||
namespace ElectronNET.API.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrapper for the underlying Socket connection
|
||||
/// </summary>
|
||||
public interface IApplicationSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Socket used to communicate with main.js
|
||||
/// </summary>
|
||||
Socket Socket { get; }
|
||||
}
|
||||
}
|
||||
@@ -13,14 +13,26 @@ namespace ElectronNET.API.Interfaces
|
||||
/// <summary>
|
||||
/// Whether to automatically download an update when it is found. (Default is true)
|
||||
/// </summary>
|
||||
bool AutoDownload { get; set; }
|
||||
bool AutoDownload { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to automatically download an update when it is found. (Default is true)
|
||||
/// </summary>
|
||||
Task<bool> IsAutoDownloadEnabledAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to automatically install a downloaded update on app quit (if `QuitAndInstall` was not called before).
|
||||
///
|
||||
/// Applicable only on Windows and Linux.
|
||||
/// </summary>
|
||||
bool AutoInstallOnAppQuit { get; set; }
|
||||
bool AutoInstallOnAppQuit { set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to automatically install a downloaded update on app quit (if `QuitAndInstall` was not called before).
|
||||
///
|
||||
/// Applicable only on Windows and Linux.
|
||||
/// </summary>
|
||||
Task<bool> IsAutoInstallOnAppQuitEnabledAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// *GitHub provider only.* Whether to allow update to pre-release versions.
|
||||
@@ -28,47 +40,57 @@ namespace ElectronNET.API.Interfaces
|
||||
///
|
||||
/// If "true", downgrade will be allowed("allowDowngrade" will be set to "true").
|
||||
/// </summary>
|
||||
bool AllowPrerelease { get; set; }
|
||||
bool AllowPrerelease { set; }
|
||||
|
||||
/// <summary>
|
||||
/// *GitHub provider only.* Whether to allow update to pre-release versions.
|
||||
/// Defaults to "true" if application version contains prerelease components (e.g. "0.12.1-alpha.1", here "alpha" is a prerelease component), otherwise "false".
|
||||
///
|
||||
/// If "true", downgrade will be allowed("allowDowngrade" will be set to "true").
|
||||
/// </summary>
|
||||
Task<bool> IsAllowPrereleaseEnabledAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// *GitHub provider only.*
|
||||
/// Get all release notes (from current version to latest), not just the latest (Default is false).
|
||||
/// </summary>
|
||||
bool FullChangelog { get; set; }
|
||||
bool FullChangelog { set; }
|
||||
|
||||
/// <summary>
|
||||
/// *GitHub provider only.*
|
||||
/// Get all release notes (from current version to latest), not just the latest (Default is false).
|
||||
/// </summary>
|
||||
Task<bool> IsFullChangeLogEnabledAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel).
|
||||
/// Taken in account only if channel differs (pre-release version component in terms of semantic versioning).
|
||||
/// Default is false.
|
||||
/// </summary>
|
||||
bool AllowDowngrade { get; set; }
|
||||
bool AllowDowngrade { set; }
|
||||
|
||||
Task<bool> IsAllowDowngradeEnabledAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// For test only.
|
||||
/// </summary>
|
||||
string UpdateConfigPath { get; }
|
||||
Task<string> GetUpdateConfigPathAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The current application version
|
||||
/// </summary>
|
||||
Task<SemVer> CurrentVersionAsync { get; }
|
||||
Task<SemVer> GetCurrentVersionAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the update channel. Not applicable for GitHub.
|
||||
/// Doesn’t return channel from the update configuration, only if was previously set.
|
||||
/// </summary>
|
||||
string Channel { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the update channel. Not applicable for GitHub.
|
||||
/// Doesn’t return channel from the update configuration, only if was previously set.
|
||||
/// </summary>
|
||||
Task<string> ChannelAsync { get; }
|
||||
Task<string> GetChannelAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The request headers.
|
||||
/// </summary>
|
||||
Task<Dictionary<string, string>> RequestHeadersAsync { get; }
|
||||
Task<Dictionary<string, string>> GetRequestHeadersAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The request headers.
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Electron's process object is extended from the Node.js process object. It adds the
|
||||
/// events, properties, and methods.
|
||||
/// </summary>
|
||||
public interface IProcess
|
||||
{
|
||||
/// <summary>
|
||||
/// The process.execPath property returns the absolute pathname of the executable that
|
||||
/// started the Node.js process. Symbolic links, if any, are resolved.
|
||||
/// </summary>
|
||||
Task<string> ExecPathAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The process.argv property returns an array containing the command-line arguments passed
|
||||
/// when the Node.js process was launched. The first element will be process.execPath. See
|
||||
/// process.argv0 if access to the original value of argv[0] is needed. The second element
|
||||
/// will be the path to the JavaScript file being executed. The remaining elements will be
|
||||
/// any additional command-line arguments
|
||||
/// </summary>
|
||||
Task<string[]> ArgvAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The process.execPath property returns the absolute pathname of the executable that
|
||||
/// started the Node.js process. Symbolic links, if any, are resolved.
|
||||
/// </summary>
|
||||
Task<string> TypeAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The process.versions property returns an object listing the version strings of
|
||||
/// chrome and electron.
|
||||
/// </summary>
|
||||
Task<ProcessVersions> VersionsAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A Boolean. When app is started by being passed as parameter to the default app, this
|
||||
/// property is true in the main process, otherwise it is false.
|
||||
/// </summary>
|
||||
Task<bool> DefaultAppAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A Boolean, true when the current renderer context is the "main" renderer frame. If you
|
||||
/// want the ID of the current frame you should use webFrame.routingId
|
||||
/// </summary>
|
||||
Task<bool> IsMainFrameAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A String representing the path to the resources directory.
|
||||
/// </summary>
|
||||
Task<string> ResourcesPathAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of seconds the current Node.js process has been running. The return value
|
||||
/// includes fractions of a second. Use Math.floor() to get whole seconds.
|
||||
/// </summary>
|
||||
Task<double> UpTimeAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The PID of the electron process
|
||||
/// </summary>
|
||||
Task<int> PidAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The operating system CPU architecture for which the Node.js binary was compiled
|
||||
/// </summary>
|
||||
Task<string> ArchAsync { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A string identifying the operating system platform on which the Node.js process is running
|
||||
/// </summary>
|
||||
Task<string> PlatformAsync { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user