Skip to content

ICommentSubmissionFormVm

Namespace: SlottyMedia.Backend.ViewModel.Partial.PostPage

This ViewModel represents the state of the CommentSubmissionForm component.

public interface ICommentSubmissionFormVm

Properties

Text

The post's textual content

public abstract string Text { get; set; }

Property Value

String

TextErrorMessage

An optional error message related to the post's textual content

public abstract string TextErrorMessage { get; }

Property Value

String

ServerErrorMessage

An optional error message that is caused by some internal server error

public abstract string ServerErrorMessage { get; }

Property Value

String

UserInformation

The user information data transfer object to be rendered.

public abstract UserInformationDto UserInformation { get; set; }

Property Value

UserInformationDto

IsLoading

Gets a value indicating whether the data is still loading.

public abstract bool IsLoading { get; set; }

Property Value

Boolean

Methods

SubmitForm(Guid)

Attempts to submit the form. If successful, the post was created. Otherwise, displays an appropriate error message regarding the submission's failure.

Task SubmitForm(Guid postId)

Parameters

postId Guid
The ID of the post to submit the comment for

Returns

Task

Initialize(Nullable<Guid>)

Initializes the ViewModel with the specified user ID.

Task Initialize(Nullable<Guid> userId)

Parameters

userId Nullable<Guid>
The ID of the user to load information for.

Returns

Task
A task representing the asynchronous operation.