IdentityResult Class

Summary

Represents the result of an identity operation.

Syntax

public class IdentityResult

GitHub

View on GitHub

class Microsoft.AspNet.Identity.IdentityResult

Properties

Errors()

An System.Collections.Generic.IEnumerable`1 of :dn:ref:`Microsoft.AspNet.Identity.IdentityError`s containing an errors that occurred during the identity operation.

Return type:System.Collections.Generic.IEnumerable{Microsoft.AspNet.Identity.IdentityError}
public IEnumerable<IdentityError> Errors { get; }
Succeeded()

Flag indicating whether if the operation succeeded or not.

Return type:System.Boolean
public bool Succeeded { get; protected set; }
Success()

Returns an Microsoft.AspNet.Identity.IdentityResult indicating a successful identity operation.

Return type:Microsoft.AspNet.Identity.IdentityResult
Returns:An <see cref=”T:Microsoft.AspNet.Identity.IdentityResult” /> indicating a successful operation.
public static IdentityResult Success { get; }

Methods

Failed(Microsoft.AspNet.Identity.IdentityError[])

Creates an Microsoft.AspNet.Identity.IdentityResult indicating a failed identity operation, with a list of errors if applicable.

Arguments:
  • errors (Microsoft.AspNet.Identity.IdentityError[]) – An optional array of :dn:ref:`Microsoft.AspNet.Identity.IdentityError`s which caused the operation to fail.
Return type:

Microsoft.AspNet.Identity.IdentityResult

Returns:

An <see cref=”T:Microsoft.AspNet.Identity.IdentityResult” /> indicating a failed identity operation, with a list of <paramref name=”errors” /> if applicable.

public static IdentityResult Failed(params IdentityError[] errors)
ToString()

Converts the value of the current Microsoft.AspNet.Identity.IdentityResult object to its equivalent string representation.

Return type:System.String
Returns:A string representation of the current <see cref=”T:Microsoft.AspNet.Identity.IdentityResult” /> object.
public override string ToString()