Class LauncherBase
- Namespace
- PuppeteerSharp
- Assembly
- PuppeteerSharp.dll
Represents a Base process and any associated temporary user data directory that have created by Puppeteer and therefore must be cleaned up when no longer needed.
public abstract class LauncherBase : IDisposable
- Inheritance
-
LauncherBase
- Implements
- Derived
Constructors
LauncherBase(string, LaunchOptions)
Initializes a new instance of the LauncherBase class.
protected LauncherBase(string executable, LaunchOptions options)
Parameters
executable
stringFull path of executable.
options
LaunchOptionsOptions for launching Base.
Properties
EndPoint
Gets Base endpoint.
public string EndPoint { get; }
Property Value
HasExited
Indicates whether Base process has exited.
public bool HasExited { get; }
Property Value
IsExiting
Indicates whether Base process is exiting.
public bool IsExiting { get; }
Property Value
Process
Gets Base process details.
public Process Process { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Disposes Base process and any temporary user directory.
protected virtual void Dispose(bool disposing)
Parameters
EnsureExitAsync(TimeSpan?)
Asynchronously waits for graceful Base process exit within a given timeout period. Kills the Base process if it has not exited within this period.
public Task EnsureExitAsync(TimeSpan? timeout)
Parameters
timeout
TimeSpan?The maximum waiting time for a graceful process exit.
Returns
- Task
Task which resolves when the process is exited or killed.
~LauncherBase()
Finalizes an instance of the LauncherBase class.
protected ~LauncherBase()
GetDefaultBuildIdAsync()
Default build.
public abstract Task<string> GetDefaultBuildIdAsync()
Returns
KillAsync()
Asynchronously kills Base process.
public Task KillAsync()
Returns
- Task
Task which resolves when the process is killed.
SetEnvVariables(IDictionary<string, string>, IDictionary<string, string>, IDictionary)
Set Env Variables.
protected static void SetEnvVariables(IDictionary<string, string> environment, IDictionary<string, string> customEnv, IDictionary realEnv)
Parameters
environment
IDictionary<string, string>The environment.
customEnv
IDictionary<string, string>The customEnv.
realEnv
IDictionaryThe realEnv.
StartAsync()
Asynchronously starts Base process.
public Task StartAsync()
Returns
- Task
Task which resolves when after start process begins.
WaitForExitAsync(TimeSpan?)
Waits for Base process exit within a given timeout.
public Task<bool> WaitForExitAsync(TimeSpan? timeout)
Parameters
timeout
TimeSpan?The maximum wait period.