public void DbCredentialsetValidationTest() { var credentailSet = new DbCredentialSet(); credentailSet.Name = longText; var results = Validations.Validate(credentailSet); Assert.AreEqual(2, results.Count(), "CredentailSet validation failed"); }
internal DbCredentialSet Copy() { var copy = new DbCredentialSet { Name = this.Name }; CopyTo(copy); return copy; }
private void SetCredentialByStoreId(Guid value) { DbCredentialSet credentialToAssign = this.storedCredentials[value]; if (credentialToAssign != null) { this.credentialId = credentialToAssign.Id; } }
private static void DeleteFromDatabase(DbCredentialSet credentailToRemove) { using (var database = DatabaseConnections.CreateInstance()) { database.CredentialBase.Attach(credentailToRemove); database.CredentialBase.Remove(credentailToRemove); database.SaveImmediatelyIfRequested(); } }
private static void AddToDatabase(DbCredentialSet credentialToAdd) { using (var database = DatabaseConnections.CreateInstance()) { database.CredentialBase.Add(credentialToAdd); database.SaveImmediatelyIfRequested(); database.Cache.Detach(credentialToAdd); } }
internal DbCredentialSet Copy() { var copy = new DbCredentialSet { Name = this.Name }; CopyTo(copy); return(copy); }
private void AttachCredentialSet(DbSecurityOptions security) { DbCredentialSet credentialSet = security.ResolveCredentailFromStore(); if (credentialSet == null) { return; } this.database.CredentialBase.Attach(credentialSet); }
private Guid GetCredential() { DbCredentialSet resolved = this.ResolveCredentailFromStore(); if (resolved != null) { return(resolved.Guid); } return(Guid.Empty); }
private static void DeleteFromDatabase(DbCredentialSet credentailToRemove) { using (Database database = DatabaseConnections.CreateInstance()) { database.CredentialBase.Attach(credentailToRemove); database.CredentialBase.Remove(credentailToRemove); database.SaveImmediatelyIfRequested(); } }
private static void AddToDatabase(DbCredentialSet credentialToAdd) { using (Database database = DatabaseConnections.CreateInstance()) { database.CredentialBase.Add(credentialToAdd); database.SaveImmediatelyIfRequested(); database.Cache.Detach(credentialToAdd); } }