private static Password ParsePassword <TPassword>(string line) where TPassword : Password { string[] parts = line.Split(' '); string occurrences = parts[0]; string characterWithColon = parts[1]; string password = parts[2]; PasswordPolicySchema policySchema = ParsePasswordPolicy(occurrences, characterWithColon); return((Password)Activator.CreateInstance(typeof(TPassword), password, policySchema)); }
public PasswordPart2(string value, PasswordPolicySchema policySchema) : base(value, policySchema) { }
protected Password(string value, PasswordPolicySchema policySchema) { Value = value; PolicySchema = policySchema; }