Skip to main content

RestrictAttribute

Restrict the accessibility of a service and its visibility in Metadata services

Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class RestrictAttribute : AttributeBase, _Attribute

Properties

VisibleInternalOnly

Allow access but hide from metadata to requests from Localhost only

View Source
Declaration
public bool VisibleInternalOnly { get; set; }

VisibleLocalhostOnly

Allow access but hide from metadata to requests from Localhost and Local Intranet only

View Source
Declaration
public bool VisibleLocalhostOnly { get; set; }

LocalhostOnly

Restrict access and hide from metadata to requests from Localhost only

View Source
Declaration
public bool LocalhostOnly { get; set; }

InternalOnly

Restrict access and hide from metadata to requests from Localhost and Local Intranet only

View Source
Declaration
public bool InternalOnly { get; set; }

ExternalOnly

Restrict access and hide from metadata to requests from External only

View Source
Declaration
public bool ExternalOnly { get; set; }

AccessTo

Sets a single access restriction

View Source
Declaration
public RequestAttributes AccessTo { get; set; }

AccessibleToAny

Restrict access to any of the specified access scenarios

View Source
Declaration
public RequestAttributes[] AccessibleToAny { get; }

VisibilityTo

Sets a single metadata Visibility restriction

View Source
Declaration
public RequestAttributes VisibilityTo { get; set; }

Hide

View Source
Declaration
public bool Hide { set; }

VisibleToAny

Restrict metadata visibility to any of the specified access scenarios

View Source
Declaration
public RequestAttributes[] VisibleToAny { get; }

HasNoAccessRestrictions

View Source
Declaration
public bool HasNoAccessRestrictions { get; }

HasNoVisibilityRestrictions

View Source
Declaration
public bool HasNoVisibilityRestrictions { get; }

Methods

CanShowTo(RequestAttributes)

View Source
Declaration
public bool CanShowTo(RequestAttributes restrictions)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.RequestAttributesrestrictions

HasAccessTo(RequestAttributes)

View Source
Declaration
public bool HasAccessTo(RequestAttributes restrictions)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.RequestAttributesrestrictions

Implements

  • System.Runtime.InteropServices._Attribute