| 12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace friaLabbar.Models
- {
- public class PositionalPasswordCharacter : HashSet<char>
- {
- 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;
- }
- }
- }
|