Class UnreadCountResult
Represents the result of fetching the unread count for messages, encapsulating both success and failure information.
public class UnreadCountResult : ZendeskResult<UnreadCountError>
- Inheritance
-
UnreadCountResult
- Inherited Members
Properties
UnreadCount
Gets the number of unread messages. Valid only if the operation was successful.
public int UnreadCount { get; }
Property Value
Methods
Failure(UnreadCountError)
Creates a failure result for the operation of fetching unread messages count with the specified error.
public static UnreadCountResult Failure(UnreadCountError error)
Parameters
error
UnreadCountErrorThe specific UnreadCountError that caused the failure.
Returns
- UnreadCountResult
An UnreadCountResult indicating a failed operation along with the error.
Success(int)
Creates a success result for the operation of fetching unread messages count.
public static UnreadCountResult Success(int unreadCount)
Parameters
unreadCount
intThe number of unread messages.
Returns
- UnreadCountResult
An UnreadCountResult indicating a successful operation with the amount of unread messages.
Operators
implicit operator UnreadCountResult(UnreadCountError)
Implicitly converts an UnreadCountError to a failed UnreadCountResult with the corresponding error.
public static implicit operator UnreadCountResult(UnreadCountError error)
Parameters
error
UnreadCountErrorThe error to convert to a failed UnreadCountResult.