Class BehaviorResult
Namespace: Cephalon.Abstractions.Behaviors
Assembly: Cephalon.Abstractions.dll
Provides legacy factory helpers for creating transport-neutral behavior results.
public static class BehaviorResultInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”Prefer
Methods
Section titled “Methods”Accepted<T>(T, string?, string?)
Section titled “ Accepted<T>(T, string?, string?)”Creates an accepted result with an optional payload value.
public static BehaviorResult<T> Accepted<T>(T value, string? message = null, string? code = null)Parameters
Section titled “Parameters”value T
message string?
code string?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Conflict(string, string, BehaviorFault?)
Section titled “ Conflict(string, string, BehaviorFault?)”Creates a conflict result.
public static BehaviorResultDescriptor Conflict(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Conflict<T>(string, string, BehaviorFault?)
Section titled “ Conflict<T>(string, string, BehaviorFault?)”Creates a conflict result for the specified payload type.
public static BehaviorResult<T> Conflict<T>(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Created<T>(T, string?, string?)
Section titled “ Created<T>(T, string?, string?)”Creates a created result with a payload value.
public static BehaviorResult<T> Created<T>(T value, string? message = null, string? code = null)Parameters
Section titled “Parameters”value T
message string?
code string?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Forbidden(string, string, BehaviorFault?)
Section titled “ Forbidden(string, string, BehaviorFault?)”Creates a forbidden result.
public static BehaviorResultDescriptor Forbidden(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Forbidden<T>(string, string, BehaviorFault?)
Section titled “ Forbidden<T>(string, string, BehaviorFault?)”Creates a forbidden result for the specified payload type.
public static BehaviorResult<T> Forbidden<T>(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Invalid(string, string, BehaviorFault?)
Section titled “ Invalid(string, string, BehaviorFault?)”Creates an invalid-request result.
public static BehaviorResultDescriptor Invalid(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Invalid<T>(string, string, BehaviorFault?)
Section titled “ Invalid<T>(string, string, BehaviorFault?)”Creates an invalid-request result for the specified payload type.
public static BehaviorResult<T> Invalid<T>(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
NoContent(string?, string?)
Section titled “ NoContent(string?, string?)”Creates a no-content result.
public static BehaviorResultDescriptor NoContent(string? message = null, string? code = null)Parameters
Section titled “Parameters”message string?
code string?
Returns
Section titled “Returns”NoContent<T>(string?, string?)
Section titled “ NoContent<T>(string?, string?)”Creates a no-content result for the specified payload type.
public static BehaviorResult<T> NoContent<T>(string? message = null, string? code = null)Parameters
Section titled “Parameters”message string?
code string?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
NotFound(string, string, BehaviorFault?)
Section titled “ NotFound(string, string, BehaviorFault?)”Creates a not-found result.
public static BehaviorResultDescriptor NotFound(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”NotFound<T>(string, string, BehaviorFault?)
Section titled “ NotFound<T>(string, string, BehaviorFault?)”Creates a not-found result for the specified payload type.
public static BehaviorResult<T> NotFound<T>(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Ok<T>(T, string?, string?)
Section titled “ Ok<T>(T, string?, string?)”Creates a successful result with a payload value.
public static BehaviorResult<T> Ok<T>(T value, string? message = null, string? code = null)Parameters
Section titled “Parameters”value T
message string?
code string?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T
Unauthorized(string, string, BehaviorFault?)
Section titled “ Unauthorized(string, string, BehaviorFault?)”Creates an unauthorized result.
public static BehaviorResultDescriptor Unauthorized(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Unauthorized<T>(string, string, BehaviorFault?)
Section titled “ Unauthorized<T>(string, string, BehaviorFault?)”Creates an unauthorized result for the specified payload type.
public static BehaviorResult<T> Unauthorized<T>(string code, string message, BehaviorFault? fault = null)Parameters
Section titled “Parameters”code string
message string
fault BehaviorFault?
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”T