using System.Threading.Tasks;
namespace ElectronNET.API.Interfaces
{
///
/// Allows you to execute native JavaScript/TypeScript code from the host process.
///
/// It is only possible if the Electron.NET CLI has previously added an
/// ElectronHostHook directory:
/// electronize add HostHook
///
public interface IHostHook
{
///
/// Execute native JavaScript/TypeScript code.
///
/// Socket name registered on the host.
/// Optional parameters.
void Call(string socketEventName, params dynamic[] arguments);
///
/// Execute native JavaScript/TypeScript code.
///
/// Results from the executed host code.
/// Socket name registered on the host.
/// Optional parameters.
///
Task CallAsync(string socketEventName, params dynamic[] arguments);
}
}