/// <summary>
 /// Initializes a new instance of the <see cref="UnauthorizedOperationException" /> class.
 /// </summary>
 /// <param name="destinationMethod">The destination method.</param>
 /// <param name="permissionIdentifier">The permission identifier.</param>
 /// <param name="permission">The permission.</param>
 /// <param name="scene">The scene.</param>
 internal UnauthorizedOperationException(string destinationMethod, string permissionIdentifier, ApiPermission permission, ExceptionScene scene = null)
     : base(string.Format(permission == ApiPermission.Required ? "Access denied to {0} by requirement of permission identifier: {1}" : "Access denied to {0} by owning permission identifier: {1}", destinationMethod, permissionIdentifier),
                new ExceptionCode { Major = ExceptionCode.MajorCode.UnauthorizedOperation, Minor = ("PermissionIssue") }, scene: scene)
 {
     this.Hint = new FriendlyHint
     {
         CauseObjects = permissionIdentifier.AsArray(),
         Message = this.Message,
         HintCode = "401.Permission"
     };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiPermissionAttribute" /> class.
 /// </summary>
 /// <param name="permissionIdentifier">The permission identifier.</param>
 /// <param name="permission">The permission.</param>
 public ApiPermissionAttribute(string permissionIdentifier, ApiPermission permission = ApiPermission.Required)
 {
     PermissionIdentifier = permissionIdentifier;
     Permission           = permission;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiPermissionAttribute"/> class.
 /// </summary>
 /// <param name="permissionIdentifier">The permission identifier.</param>
 /// <param name="exceptionBehavior">The exception behavior.</param>
 /// <param name="permission">The permission.</param>
 public ApiPermissionAttribute(string permissionIdentifier, ExceptionCode exceptionBehavior, ApiPermission permission = ApiPermission.Required)
     : this(permissionIdentifier, permission)
 {
     ExceptionBehavior = exceptionBehavior;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiPermissionAttribute" /> class.
 /// </summary>
 /// <param name="permissionIdentifier">The permission identifier.</param>
 /// <param name="permission">The permission.</param>
 public ApiPermissionAttribute(string permissionIdentifier, ApiPermission permission = ApiPermission.Required)
 {
     this.PermissionIdentifier = permissionIdentifier;
     this.Permission = permission;
 }