Skip to main content

RestrictExtensions

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public static class RestrictExtensions

Methods

ToAllowedFlagsSet(RequestAttributes)

Converts from a User intended restriction to a flag with all the allowed attribute flags set, e.g:

If No Network restrictions were specified all Network access types are allowed, e.g: restrict EndpointAttributes.None => ... 111

If a Network restriction was specified, only it will be allowed, e.g: restrict EndpointAttributes.LocalSubnet => ... 010

The returned Enum will have a flag with all the allowed attributes set

View Source
Declaration
public static RequestAttributes ToAllowedFlagsSet(this RequestAttributes restrictTo)
Returns

ServiceStack.RequestAttributes

Parameters
TypeName
ServiceStack.RequestAttributesrestrictTo

HasAnyRestrictionsOf(RequestAttributes, RequestAttributes)

View Source
Declaration
public static bool HasAnyRestrictionsOf(RequestAttributes allRestrictions, RequestAttributes restrictions)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.RequestAttributesallRestrictions
ServiceStack.RequestAttributesrestrictions