Class Processor<T>
This class provides an abstract base supporting the implementation of individual handlers in a processing chain.
Implements
Inherited Members
Namespace: EPiServer.Social.Common
Assembly: EPiServer.Social.Common.dll
Version: 1.5.4Syntax
public abstract class Processor<T> : IProcessor<T>
Type Parameters
| Name | Description |
|---|---|
| T | Type of data to be processed |
Constructors
Processor()
Declaration
protected Processor()
Properties
HasSuccessor
Returns true if this node in the processing chain has a succeeding processor, false otherwise.
Declaration
public bool HasSuccessor { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Successor
Gets the succeeding processor in the chain. If there is no succeeding processor a NullProcessor will be returned, which effectively performs a no-op.
Declaration
public IProcessor<T> Successor { get; }
Property Value
| Type | Description |
|---|---|
| IProcessor<T> |
Methods
GetNext()
Returns the next processor in the processor chain.
Declaration
public IProcessor<T> GetNext()
Returns
| Type | Description |
|---|---|
| IProcessor<T> | Next processor in the chain |
Process(T)
Processes the specified data, returning a reference to it's post-processed form.
Declaration
public abstract T Process(T itemToProcess)
Parameters
| Type | Name | Description |
|---|---|---|
| T | itemToProcess | Data to be processed |
Returns
| Type | Description |
|---|---|
| T | The item in its post-processed form |
Process<TExtension>(Composite<T, TExtension>)
Processes the specified compsite data, returning a reference to it's post-processed form.
Declaration
public virtual Composite<T, TExtension> Process<TExtension>(Composite<T, TExtension> compositeToProcess)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Composite<T, TExtension> | compositeToProcess | Data to be processed |
Returns
| Type | Description |
|---|---|
| Composite<T, TExtension> | The data in its post-processed form |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
SetLast(IProcessor<T>)
Appends the specified processor to the end of the processing chain.
Declaration
public IProcessor<T> SetLast(IProcessor<T> processor)
Parameters
| Type | Name | Description |
|---|---|---|
| IProcessor<T> | processor | Processor to be added to the chain |
Returns
| Type | Description |
|---|---|
| IProcessor<T> | Reference to the processor that was appended |
SetNext(IProcessor<T>)
Sets the succeeding processor in the chain.
Declaration
public IProcessor<T> SetNext(IProcessor<T> processor)
Parameters
| Type | Name | Description |
|---|---|---|
| IProcessor<T> | processor | Processor to succeed this processor in the chain |
Returns
| Type | Description |
|---|---|
| IProcessor<T> | A reference to the succeeding processor |