| 1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace friaLabbar.Models
- {
- public class PossiblePassword
- {
- public List<PossiblePasswordCharacter> Characters { get; set; }
- public bool IsPossible
- {
- get
- {
- return !Characters.Any(i => i.State == CharacterState.Impossible);
- }
- }
- public string Text
- {
- get
- {
- return String.Concat(Characters.Select(i => i.Character));
- }
- }
- public PossiblePassword(string password, PositionalPasswordCharacter[] characters)
- {
- Characters = new List<PossiblePasswordCharacter>();
- for (int i = 0; i < password.Length; i++)
- {
- Characters.Add(new PossiblePasswordCharacter(password[i], characters[i]));
- }
- }
- }
- }
|