Show / Hide Table of Contents

Class WorkFilter

Represents a base for all work filters. Unlike handlers, filters do not necessarily handle work rather augment the work context

Inheritance
System.Object
DisposableObject
ApplicationComponent
WorkFilter
BeforeAfterFilterBase
EffectiveCallerIPEndPointFilter
ErrorFilter
GeoLookupFilter
PortalFilter
RedirectFilter
SecurityFilter
SessionFilter
Implements
IApplicationComponent
System.IDisposable
INamed
IOrdered
Inherited Members
ApplicationComponent.Destructor()
ApplicationComponent.AllComponents
ApplicationComponent.GetAppComponentBySID(UInt64)
ApplicationComponent.GetAppComponentByCommonName(String)
ApplicationComponent.ComponentSID
ApplicationComponent.ComponentStartTime
ApplicationComponent.ComponentCommonName
ApplicationComponent.ComponentDirector
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: NFX.Wave
Assembly: NFX.Wave.dll
Syntax
public abstract class WorkFilter : ApplicationComponent, IApplicationComponent, IDisposable, INamed, IOrdered

Constructors

WorkFilter(WorkDispatcher, IConfigSectionNode)

Declaration
protected WorkFilter(WorkDispatcher dispatcher, IConfigSectionNode confNode)
Parameters
Type Name Description
WorkDispatcher dispatcher
IConfigSectionNode confNode

WorkFilter(WorkDispatcher, String, Int32)

Declaration
protected WorkFilter(WorkDispatcher dispatcher, string name, int order)
Parameters
Type Name Description
WorkDispatcher dispatcher
System.String name
System.Int32 order

WorkFilter(WorkHandler, IConfigSectionNode)

Declaration
protected WorkFilter(WorkHandler handler, IConfigSectionNode confNode)
Parameters
Type Name Description
WorkHandler handler
IConfigSectionNode confNode

WorkFilter(WorkHandler, String, Int32)

Declaration
protected WorkFilter(WorkHandler handler, string name, int order)
Parameters
Type Name Description
WorkHandler handler
System.String name
System.Int32 order

Fields

CONFIG_FILTER_SECTION

Declaration
public const string CONFIG_FILTER_SECTION = "filter"
Field Value
Type Description
System.String

Properties

Dispatcher

Returns the dispatcher that this filter works under

Declaration
public WorkDispatcher Dispatcher { get; }
Property Value
Type Description
WorkDispatcher

Handler

Returns the handler that this filter works under. May be null if the filter works under dispatcher

Declaration
public WorkHandler Handler { get; }
Property Value
Type Description
WorkHandler

Name

Returns the filter instance name

Declaration
public string Name { get; }
Property Value
Type Description
System.String

NetGate

Returns network gate that filter implementation may use to set business variables or null

Declaration
public INetGate NetGate { get; }
Property Value
Type Description
INetGate

Order

Returns the filter order in filter registry. Order is used for URI pattern matching

Declaration
public int Order { get; }
Property Value
Type Description
System.Int32

Server

Returns the server that this filter works under

Declaration
public WaveServer Server { get; }
Property Value
Type Description
WaveServer

Methods

DoFilterWork(WorkContext, IList<WorkFilter>, Int32)

Override to filter the work - i.e. extract some security name from cookies and check access, turn exception in error page etc. Note: This method is re-entrant by multiple threads. Do not forget to call InvokeNextWorker() to continue request processing, otherwise the work will not be handled (which may be a desired behavior)

Declaration
protected abstract void DoFilterWork(WorkContext work, IList<WorkFilter> filters, int thisFilterIndex)
Parameters
Type Name Description
WorkContext work

Work context

System.Collections.Generic.IList<WorkFilter> filters

The filters that participated in a call. Note the Dipatcher.Filters may yield different results as it may change with time, whereas this parameter captures all filters during the call start

System.Int32 thisFilterIndex

The index of THIS filter in filters

FilterWork(WorkContext, IList<WorkFilter>, Int32)

Override to filter the work - i.e. extract some security name from cookies and check access, turn exception in error page etc. Note: This method is re-entrant by multiple threads

Declaration
public void FilterWork(WorkContext work, IList<WorkFilter> filters, int thisFilterIndex)
Parameters
Type Name Description
WorkContext work

Work context

System.Collections.Generic.IList<WorkFilter> filters

The filters that participated in a call. Note the Dipatcher.Filters may yield different results as it may change with time, whereas this parameter captures all filters during the call start

System.Int32 thisFilterIndex

The index of THIS filter in filters

InvokeNextWorker(WorkContext, IList<WorkFilter>, Int32)

Invokes next processing body be it the next filter or handler (when all filters are iterated through). The filter implementors must call this method to pass WorkContext processing along the line. Does nothing if work is Aborted or Handled

Declaration
protected void InvokeNextWorker(WorkContext work, IList<WorkFilter> filters, int thisFilterIndex)
Parameters
Type Name Description
WorkContext work
System.Collections.Generic.IList<WorkFilter> filters
System.Int32 thisFilterIndex

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Implements

IApplicationComponent
System.IDisposable
INamed
IOrdered

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX