Click or drag to resize

SavedFilterRegisterReqFilter Method (IAppContext, String, FilterAttributes, String, String, String, NullableDateTime, String)

Register a filter clause for use in a URL's flt parameter. Registration will cause a SavedFilter to be created and written to the database. The method returns a filter spec that can be included in a URL without risk of a SQL injection attack. You can use one of the ExtractFilterFromReq(IAppContext, HttpRequest, String, SavedFilter) overloads to extract the filter.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static string RegisterReqFilter(
	IAppContext cxt,
	string filter,
	FilterAttributes attrs,
	string name,
	string description,
	string mop,
	Nullable<DateTime> expiration,
	string owner
)

Parameters

cxt
Type: NetQuarryIAppContext
The application context.
filter
Type: SystemString
The filter clause.
attrs
Type: NetQuarryFilterAttributes
The filter attributes. In addition, the filter will always be marked as Registered and Hidden.
name
Type: SystemString
The name of the filter, optional.
description
Type: SystemString
The description of the filter, optional.
mop
Type: SystemString
The MOP to which this filter applies, optional, but recommended for enhanced security.
expiration
Type: SystemNullableDateTime
The filter expiration date/time in UTC. If specified, the filter will be marked as Temp. If not specified, but the Temp attribute is specified, the expiration will be set to set to one day from time of creation.
owner
Type: SystemString
The filter owner's user ID, optional, but recommended for enhanced security.

Return Value

Type: String
The filter spec suitable for use in a URL flt parameter once escaped.
Remarks

Though you should never need to generate or parse this yourself, note that the filter spec is of the form:

.<ver>.<flags>.<id>[.<expiration>] where <ver> is the id version (currently 1), <flags> are flag characters (currently e=expires, i=identifiedById), <id> is the ID, and <expiration> is the optional expiration date.
See Also