Table of Contents

Class PluginEndPoint

Namespace
Artemis.Core.Services
Assembly
Artemis.Core.dll

Represents a base type for plugin end points to be targeted by the PluginsHandler

public abstract class PluginEndPoint
Inheritance
object
PluginEndPoint
Derived

Properties

Accepts

public FlexibleContentType Accepts { get; protected set; }

Property Value

FlexibleContentType

Name

Gets the name of the end point

public string Name { get; }

Property Value

string

PluginFeature

Gets the plugin the end point is associated with

[JsonIgnore]
public PluginFeature PluginFeature { get; }

Property Value

PluginFeature

PluginInfo

Gets the plugin info of the plugin the end point is associated with

public PluginInfo PluginInfo { get; }

Property Value

PluginInfo

Returns

Gets the mime type of the output this end point returns

public FlexibleContentType Returns { get; protected set; }

Property Value

FlexibleContentType

Url

Gets the full URL of the end point

public string Url { get; }

Property Value

string

Methods

OnProcessedRequest(IRequest)

Invokes the ProcessedRequest event

protected virtual void OnProcessedRequest(IRequest request)

Parameters

request IRequest

OnProcessingRequest(IRequest)

Invokes the ProcessingRequest event

protected virtual void OnProcessingRequest(IRequest request)

Parameters

request IRequest

OnRequestException(Exception)

Invokes the RequestException event

protected virtual void OnRequestException(Exception e)

Parameters

e Exception

The exception that occurred during the request

ProcessRequest(IRequest)

Called whenever the end point has to process a request

protected abstract Task<IResponse> ProcessRequest(IRequest request)

Parameters

request IRequest

The HTTP context of the request

Returns

Task<IResponse>

Events

ProcessedRequest

Occurs whenever a request was processed

public event EventHandler<EndpointRequestEventArgs>? ProcessedRequest

Event Type

EventHandler<EndpointRequestEventArgs>

ProcessingRequest

Occurs whenever a request is about to be processed

public event EventHandler<EndpointRequestEventArgs>? ProcessingRequest

Event Type

EventHandler<EndpointRequestEventArgs>

RequestException

Occurs whenever a request threw an Unhandled error

public event EventHandler<EndpointExceptionEventArgs>? RequestException

Event Type

EventHandler<EndpointExceptionEventArgs>