public IReadOnlyList <Enum> GetRequiredMethodPermissions(Type type, IMethodInformation methodInformation) { ArgumentUtility.CheckNotNull("type", type); ArgumentUtility.CheckNotNull("methodInformation", methodInformation); if (methodInformation.IsNull) { return(s_emptyPermissions); } var permissionAttribute = methodInformation.GetCustomAttribute <DemandPermissionAttribute> (true); if (permissionAttribute == null) { return(s_emptyPermissions); } return(permissionAttribute.GetAccessTypes().Distinct().ToArray()); }
public T GetCustomAttribute <T> (bool inherited) where T : class { return(_implementationMethodInfo.GetCustomAttribute <T>(inherited)); }