Class TargetAdapter
Represents an adapter for the Target domain to simplify the command interface.
public class TargetAdapter
- Inheritance
-
TargetAdapter
- Inherited Members
Constructors
TargetAdapter(IDevToolsSession)
Initializes a new instance of the TargetAdapter class.
public TargetAdapter(IDevToolsSession session)
Parameters
session
IDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
session
is null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
ActivateTarget(ActivateTargetCommandSettings, CancellationToken, int?, bool)
activateTarget
public Task<ActivateTargetCommandResponse?> ActivateTarget(ActivateTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ActivateTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
AttachToBrowserTarget(AttachToBrowserTargetCommandSettings?, CancellationToken, int?, bool)
attachToBrowserTarget
public Task<AttachToBrowserTargetCommandResponse> AttachToBrowserTarget(AttachToBrowserTargetCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
AttachToBrowserTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
AttachToTarget(AttachToTargetCommandSettings, CancellationToken, int?, bool)
attachToTarget
public Task<AttachToTargetCommandResponse> AttachToTarget(AttachToTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
AttachToTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
AutoAttachRelated(AutoAttachRelatedCommandSettings, CancellationToken, int?, bool)
autoAttachRelated
public Task<AutoAttachRelatedCommandResponse?> AutoAttachRelated(AutoAttachRelatedCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
AutoAttachRelatedCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CloseTarget(CloseTargetCommandSettings, CancellationToken, int?, bool)
closeTarget
public Task<CloseTargetCommandResponse> CloseTarget(CloseTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CloseTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CreateBrowserContext(CreateBrowserContextCommandSettings, CancellationToken, int?, bool)
createBrowserContext
public Task<CreateBrowserContextCommandResponse> CreateBrowserContext(CreateBrowserContextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CreateBrowserContextCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
CreateTarget(CreateTargetCommandSettings, CancellationToken, int?, bool)
createTarget
public Task<CreateTargetCommandResponse> CreateTarget(CreateTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
CreateTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
DetachFromTarget(DetachFromTargetCommandSettings, CancellationToken, int?, bool)
detachFromTarget
public Task<DetachFromTargetCommandResponse?> DetachFromTarget(DetachFromTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
DetachFromTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
DisposeBrowserContext(DisposeBrowserContextCommandSettings, CancellationToken, int?, bool)
disposeBrowserContext
public Task<DisposeBrowserContextCommandResponse?> DisposeBrowserContext(DisposeBrowserContextCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
DisposeBrowserContextCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
ExposeDevToolsProtocol(ExposeDevToolsProtocolCommandSettings, CancellationToken, int?, bool)
exposeDevToolsProtocol
public Task<ExposeDevToolsProtocolCommandResponse?> ExposeDevToolsProtocol(ExposeDevToolsProtocolCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
ExposeDevToolsProtocolCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetBrowserContexts(GetBrowserContextsCommandSettings?, CancellationToken, int?, bool)
getBrowserContexts
public Task<GetBrowserContextsCommandResponse> GetBrowserContexts(GetBrowserContextsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetBrowserContextsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetTargetInfo(GetTargetInfoCommandSettings, CancellationToken, int?, bool)
getTargetInfo
public Task<GetTargetInfoCommandResponse> GetTargetInfo(GetTargetInfoCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetTargetInfoCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
GetTargets(GetTargetsCommandSettings, CancellationToken, int?, bool)
getTargets
public Task<GetTargetsCommandResponse> GetTargets(GetTargetsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
GetTargetsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SendMessageToTarget(SendMessageToTargetCommandSettings, CancellationToken, int?, bool)
sendMessageToTarget
public Task<SendMessageToTargetCommandResponse?> SendMessageToTarget(SendMessageToTargetCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SendMessageToTargetCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetAutoAttach(SetAutoAttachCommandSettings, CancellationToken, int?, bool)
setAutoAttach
public Task<SetAutoAttachCommandResponse?> SetAutoAttach(SetAutoAttachCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetAutoAttachCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetDiscoverTargets(SetDiscoverTargetsCommandSettings, CancellationToken, int?, bool)
setDiscoverTargets
public Task<SetDiscoverTargetsCommandResponse?> SetDiscoverTargets(SetDiscoverTargetsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetDiscoverTargetsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
SetRemoteLocations(SetRemoteLocationsCommandSettings, CancellationToken, int?, bool)
setRemoteLocations
public Task<SetRemoteLocationsCommandResponse?> SetRemoteLocations(SetRemoteLocationsCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
command
SetRemoteLocationsCommandSettingscancellationToken
CancellationTokenmillisecondsTimeout
int?throwExceptionIfResponseNotReceived
bool
Returns
Events
AttachedToTarget
attachedToTarget
public event EventHandler<AttachedToTargetEventArgs>? AttachedToTarget
Event Type
DetachedFromTarget
detachedFromTarget
public event EventHandler<DetachedFromTargetEventArgs>? DetachedFromTarget
Event Type
ReceivedMessageFromTarget
receivedMessageFromTarget
public event EventHandler<ReceivedMessageFromTargetEventArgs>? ReceivedMessageFromTarget
Event Type
TargetCrashed
targetCrashed
public event EventHandler<TargetCrashedEventArgs>? TargetCrashed
Event Type
TargetCreated
targetCreated
public event EventHandler<TargetCreatedEventArgs>? TargetCreated
Event Type
TargetDestroyed
targetDestroyed
public event EventHandler<TargetDestroyedEventArgs>? TargetDestroyed
Event Type
TargetInfoChanged
targetInfoChanged
public event EventHandler<TargetInfoChangedEventArgs>? TargetInfoChanged