C# Class OpenQA.Selenium.Remote.Server.CommandHandlerFactory

Creates instances of CommandHandler objects for the desired DriverCommand.
显示文件 Open project: jimevans/strontium Class Usage Examples

Public Methods

Method Description
CanCreateHandler ( string commandName ) : bool

Gets a value indicating whether the factory can create a handler for the given command.

CreateHandler ( string commandName, string>.Dictionary locatorParameters, object>.Dictionary parameters ) : CommandHandler

Creates a new CommandHandler given the DriverCommand, locator parameters, and body parameters.

Protected Methods

Method Description
AddHandlers ( ) : void

Adds handler constructors to the dictionary of handler creators.

CommandHandlerFactory ( ) : System

Initializes a new instance of the CommandHandlerFactory class.

MapCommandHandler ( string command, Type handlerType ) : void

Maps a DriverCommand value to a CommandHandler object.

Private Methods

Method Description
GetConstructorInfo ( Type handlerType ) : ConstructorInfo
GetHandlerConstructor ( string commandName ) : ConstructorInfo

Method Details

AddHandlers() protected abstract method

Adds handler constructors to the dictionary of handler creators.
protected abstract AddHandlers ( ) : void
return void

CanCreateHandler() public method

Gets a value indicating whether the factory can create a handler for the given command.
public CanCreateHandler ( string commandName ) : bool
commandName string The value to create a handler for.
return bool

CommandHandlerFactory() protected method

Initializes a new instance of the CommandHandlerFactory class.
protected CommandHandlerFactory ( ) : System
return System

CreateHandler() public method

Creates a new CommandHandler given the DriverCommand, locator parameters, and body parameters.
public CreateHandler ( string commandName, string>.Dictionary locatorParameters, object>.Dictionary parameters ) : CommandHandler
commandName string The value to create a handler for.
locatorParameters string>.Dictionary The parameters in the URL used to locate the resource.
parameters object>.Dictionary The parameters in the body of the request used to act on the resource.
return CommandHandler

MapCommandHandler() protected method

Maps a DriverCommand value to a CommandHandler object.
If is not a subclass of .
protected MapCommandHandler ( string command, Type handlerType ) : void
command string The value to map the handler for.
handlerType System.Type The used to handle the command.
return void