示例#1
0
        /// <summary>
        /// Determines whether the specified status is considered a binary "authorized" vs. "unauthorized" state without
        /// the details of the type of authorization.
        /// </summary>
        /// <param name="status">The status.</param>
        /// <returns><c>true</c> if the specified status is authorized; otherwise, <c>false</c>.</returns>
        public static bool IsAuthorized(this FieldAuthorizationStatus status)
        {
            switch (status)
            {
            case FieldAuthorizationStatus.Authorized:
            case FieldAuthorizationStatus.Skipped:
                return(true);

            default:
                return(false);
            }
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FieldAuthorizationResult" /> class.
 /// </summary>
 private FieldAuthorizationResult(FieldAuthorizationStatus status, string message = null)
 {
     this.LogMessage = message;
     this.Status     = status;
 }