Skip to main content

Class RequestFactory<T>

An abstract base class that implements IRequestFactory for creating requests of type T.

public abstract class RequestFactory<T> : IRequestFactory where T : IRequest, new()

Type Parameters​

NameTypeDescription
TThe type of request to create. Must implement IRequest and have a parameterless constructor.

Inheritance​

Implements​

IRequestFactory

Methods​

CreateRequest()​

Creates a new instance of type T.

public virtual IRequest CreateRequest()

Returns​

IRequest — A new instance of T.

CreateRequest(string, string)​

Creates a new instance of type T using the provided name and data.

public abstract IRequest CreateRequest(string name, string data)

Parameters​

NameTypeDescription
namestringThe name to associate with the request.
datastringThe data payload for the request.

Returns​

IRequest — A new instance of T initialized with the given parameters.

  • Methods
    • CreateRequest()
    • CreateRequest(string, string)