using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace friaLabbar.Models { public class PositionalPasswordCharacter : HashSet { private uint expectedLength; private string _letterString; public uint Position { get; private set; } public string Text { get { return _letterString; } set { _letterString = value; this.Clear(); this.UnionWith(value); } } public bool IsComplete { get { return Count >= expectedLength; } } public bool IsValid { get { return Count <= expectedLength; } } public PositionalPasswordCharacter(uint expectedLength, uint position) : base() { this.expectedLength = expectedLength; Text = string.Empty; Position = position; } } }