C# Class ServiceStack.RestrictExtensions

ファイルを表示 Open project: ServiceStack/ServiceStack

Public Methods

Method Description
HasAnyRestrictionsOf ( RequestAttributes allRestrictions, RequestAttributes restrictions ) : bool
ToAllowedFlagsSet ( this restrictTo ) : 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

Method Details

HasAnyRestrictionsOf() public static method

public static HasAnyRestrictionsOf ( RequestAttributes allRestrictions, RequestAttributes restrictions ) : bool
allRestrictions RequestAttributes
restrictions RequestAttributes
return bool

ToAllowedFlagsSet() public static method

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
public static ToAllowedFlagsSet ( this restrictTo ) : RequestAttributes
restrictTo this
return RequestAttributes