Show / Hide Table of Contents

Interface ICondition<TModel, TUser>

A condition that ensures a request context meets a specific requirement

Namespace: Seltzr.Conditions
Assembly: Seltzr.dll
Syntax
C#
public interface ICondition<TModel, in TUser>
    where TModel : class where TUser : class
Type Parameters
TModel

The type of model in the dataset

TUser

The type of authenticated user

Properties

| Improve this Doc View Source

FailureMessage

Gets a message indicating why the condition might have failed

C#
string FailureMessage { get; }
Property Value
String

Methods

| Improve this Doc View Source

VerifyAsync(IApiContext<TModel, TUser>, IQueryable<TModel>)

Verifies that the current request meets a condition

C#
Task<bool> VerifyAsync(IApiContext<TModel, TUser> context, IQueryable<TModel> dataset)
Parameters
contextIApiContext<TModel, TUser>

The current API context

datasetIQueryable<TModel>

The current dataset to be filtered

Returns

Task<Boolean>

true if the request should continue, false otherwise

  • Improve this Doc
  • View Source
Back to top Generated by DocFX