Class SecurityExtensions
This extension class defines methods for security checks in combination with the attribute class 'SecurityLevelAttribute'.
Inheritance
System.Object
SecurityExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Dynamic.ExpandoObject
Assembly: Sin.Net.Domain.dll
Syntax
public static class SecurityExtensions
Methods
SecureAccess(Object, SecurityLevels, String)
Extension method for security checks. First the method extracts the attributes of the member and then checks the values with the current level.
Declaration
public static bool SecureAccess(this object obj, SecurityLevels currentLevel, string memberName = "")
Parameters
System.Object
obj
The calling object |
SecurityLevels
currentLevel
the current level as enum of the application or user. |
System.String
memberName
the calling member (method or property). |
Returns
System.Boolean
True if successfull, False if not. |
SecureAccess(Object, Int32, String)
Extension method for security checks. First the method extracts the attributes of the member and then checks the values with the current level.
Declaration
public static bool SecureAccess(this object obj, int currentLevel, string memberName = "")
Parameters
System.Object
obj
The calling object |
System.Int32
currentLevel
the current level as integer of the application or user. |
System.String
memberName
the calling member (method or property). |
Returns
System.Boolean
True if successfull, False if not. |