public CipherLoginModel(CipherLoginData data) { Uris = data.Uris?.Select(u => new CipherLoginUriModel(u))?.ToList(); if (!Uris?.Any() ?? true) { Uri = data.Uri; } Username = data.Username; Password = data.Password; Totp = data.Totp; }
public CipherLoginModel(CipherLoginData data) { Uris = data.Uris?.Select(u => new CipherLoginUriModel(u))?.ToList(); if (!Uris?.Any() ?? true) { Uri = data.Uri; } Username = data.Username; Password = data.Password; PasswordRevisionDate = data.PasswordRevisionDate; Totp = data.Totp; AutofillOnPageLoad = data.AutofillOnPageLoad; }
public LoginData ToLoginData() { var l = new LoginData(); l.PasswordRevisionDate = PasswordRevisionDate; BuildDataModel(this, l, new HashSet <string> { "Username", "Password", "Totp" }); if (Uris?.Any() ?? false) { l.Uris = Uris.Select(u => u.ToLoginUriData()).ToList(); } return(l); }
protected override void PrepareParam() { if (Uris == null || !Uris.Any()) { throw new Exception(); } AddParam(Uris); if (Options != null) { AddParam(Options); if (Position.HasValue) { AddParam(Position); } } }