public void InheritanceNotSerialiedWhenFiltered(string attributeName, ConnectionInfo connectionInfo)
 {
     var saveFilter = new SaveFilter(true);
     var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
     _connectionNodeSerializer = new XmlConnectionNodeSerializer(cryptoProvider, "myPassword1".ConvertToSecureString(), saveFilter);
     var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(connectionInfo);
     var targetAttribute = returnVal.Attribute(XName.Get(attributeName));
     Assert.That(targetAttribute?.Value, Is.EqualTo(false.ToString()));
 }
 public void Setup()
 {
     var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(
         BlockCipherEngines.AES, BlockCipherModes.GCM);
     _connectionNodeSerializer = new XmlConnectionNodeSerializer(cryptoProvider, "myPassword1".ConvertToSecureString());
 }
        private XElement CompileConnectionInfoNode(ConnectionInfo connectionInfo)
        {
            var connectionSerializer = new XmlConnectionNodeSerializer(_cryptographyProvider, _encryptionKey);

            return(connectionSerializer.SerializeConnectionInfo(connectionInfo));
        }
 private XElement CompileConnectionInfoNode(ConnectionInfo connectionInfo)
 {
     var connectionSerializer = new XmlConnectionNodeSerializer(_cryptographyProvider, _encryptionKey);
     return connectionSerializer.SerializeConnectionInfo(connectionInfo);
 }