OpResult

Namespace: ASPSecurityKit
Assembly: ASPSecurityKit.dll

Summary

Enumerates various possible values to represent as a result of executing an operation.

Members

Unknown

Summary

Defines an unknown OpResult value which has Code as null.

SomeError

Summary

Indicates that the operation resulted in an error.

Failed

Summary

Indicates that the operation couldn’t be completed but there’s no error as well.

Success

Summary

Indicates that the operation was completed successfully.

Unauthenticated

Summary

Indicates that the operation requires a known identity and there isn’t one. It may also mean that the authentication attempt has failed.

NotVerified

Summary

Indicates that the current identity has yet not been verified (email/mobile/etc.).

Unauthorized

Summary

Indicates that the current identity is not authorized to perform this operation.

Suspended

Summary

Indicates that an entity (user or otherwise) related to the operation is suspended.

NotMultiFactored

Summary

Indicates that the identity is authenticated (logged in) but second factor is required for security.

IpDenied

Summary

Indicates that the caller’s IP is denied by the firewall check.

InvalidOrigin

Summary

Indicates that the request’s origin is denied by the origin white-list check, it could also indicate that the request’s origin is empty but it is needed.

InvalidSiteKeyUse

Summary

Indicates that the use of site-to-site key is invalid; the error message would provide more details as to exactly why is that so.

Disabled

Summary

Indicates that the action is disabled.

MustEnableMFA

Summary

Indicates that the action requires that user must enable Multi-Factor Authentication (MFA) as it’s enforced by the system as per business policies.

DoNotExist

Summary

Indicates that the specified resource does not exist.

InvalidPassword

Summary

Indicates that the password supplied does not match with password stored.

DBError

Summary

Indicates that the operation resulted in a database exception.

DBDeletionDenied

Summary

Indicates that the operation resulted in a database exception while deleting likely due to referential integrity constraints.

InvalidInput

Summary

Indicates that the input data violates one or more validation rules.

AlreadyExists

Summary

Indicates that a similar resource already exists.

OutOfAllowableRange

Summary

Indicates that the input does not fall within the valid range required.

Redirect

Summary

Indicates that the operation requires redirection to a different page.

PasswordBlocked

Summary

Indicates that the user being validated/logged in is blocked and require to reset password.

PasswordExpired

Summary

Indicates that the password has expired for the user and user must change it before proceeding.

Constructors

#ctor(code)

Summary

Initializes a new instance of the OpResult struct.

Parameters
Name Type Description
code System.String The result.
Exceptions
Type Description
System.ArgumentNullException When result is null or whitespace.

Properties

Succeeded

Summary

Determines whether this instance represents a successful operation execution.

Code

Summary

Gets a code representing the result of an operation execution.

Value

A code representing the result of an operation execution.

Methods

Equals(obj)

Summary

Indicates whether this instance and a specified object are equal.

Returns

true if obj and this instance are the same type and represent the same code (case-insensitive); otherwise, false.

Parameters
Name Type Description
obj System.Object The obj to compare with.

Equals(that)

Summary

Indicates whether this instance and the specified result are equal.

Returns

true if both instances represent the same code (case-insensitive); otherwise, false.

Parameters
Name Type Description
that ASPSecurityKit.OpResult The result to compare with.

GetHashCode()

Summary

Gets the hash code for this instance.

Returns

The hash code for this instance.

Parameters

This method has no parameters.

ToString()

Summary

Gets a string representation for this instance (just returns the Code value).

Returns

A String representing this instance.

Parameters

This method has no parameters.

op_Implicit(result)

Summary

Performs an implicit conversion fromOpResult to String.

Returns

The code represented by the specified result.

Parameters
Name Type Description
result ASPSecurityKit.OpResult)~System.String~system/string ‘ASPSecurityKit.OpResult)~System.String’) The result to convert.

op_Implicit(code)

Summary

Performs an implicit conversion fromString to OpResult.

Returns

The code converted to OpResult.

Parameters
Name Type Description
code System.String)~ASPSecurityKit.OpResult;k(DevLang-csharp)&rd=true ‘System.String)~ASPSecurityKit.OpResult’) The code to convert.

op_Equality(left,right)

Summary

Performs an equal operation on the specified instances.

Returns

true if both instances represent the same code (case-insensitive); otherwise, false.

Parameters
Name Type Description
left ASPSecurityKit.OpResult The first instance.
right ASPSecurityKit.OpResult The second instance to compare with.

op_Inequality(left,right)

Summary

Performs a not equal operation on the specified instances.

Returns

true if both instances represent different code (case-insensitive); otherwise, false.

Parameters
Name Type Description
left ASPSecurityKit.OpResult The first instance.
right ASPSecurityKit.OpResult The second instance to compare with.