PollOption Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

An individual option in a poll.

public class PollOption : ICloneable
Inheritance:
System.Object → PollOption

Constructors

PollOption() Initializes a new instance of the PollOption class.

Properties

CreatedAt Gets or sets the time (UTC) the option was initially created.
CreatedById Gets or sets the id of the User that posted the Post.
HasVoted Gets a value indicating if the current user has voted for this option.
Html Gets or sets the option text as html.
Id Gets the option id.
Poll Gets the poll that the option is attached to.
Text Gets or sets the option text.
VoteCount Get the total number of votes for this option.
VoterIds Gets the ids of all users that voted for this option.
Voters Gets the voters, i.e. the people that voted for this option.

Methods

Clone() Creates a new object that is a copy of the current instance.
ToString()

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.