Exemplo n.º 1
0
        private string SerializeConnectionsData(ConnectionInfo serializationTarget)
        {
            var xml = "";

            try
            {
                var documentCompiler = new XmlConnectionsDocumentCompiler(_cryptographyProvider);
                var xmlDocument      = documentCompiler.CompileDocument(serializationTarget, UseFullEncryption, Export);
                xml = WriteXmlToString(xmlDocument);
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddExceptionStackTrace("SaveToXml failed", ex);
            }
            return(xml);
        }
 public void Setup()
 {
     _cryptographyProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
     _documentCompiler = new XmlConnectionsDocumentCompiler(_cryptographyProvider);
     _connectionTreeModel = SetupConnectionTreeModel();
 }