Esempio n. 1
0
        private T GetEncryptionJournal <T>()
        {
            ServiceRegistry registry = JournalRegistryContainer.GetServiceRegistry();

            registry.For <IJournalEntryValueFlusher>().Use <EncryptedJournalEntryValueFlusher>();
            registry.For <IJournalEntryValueLoader>().Use <EncryptedJournalEntryValueLoader>();
            registry.For <Journal>().Use <Journal>();
            return(registry.Get <T>());
        }
Esempio n. 2
0
        private IEnumerable <Journal> GetTestJournals()
        {
            ServiceRegistry registry = JournalRegistryContainer.GetServiceRegistry();

            yield return(registry.Get <Journal>());

            registry = JournalRegistryContainer.GetServiceRegistry();
            registry.For <IJournalEntryValueFlusher>().Use <CompressedJournalEntryValueFlusher>();
            registry.For <IJournalEntryValueLoader>().Use <CompressedJournalEntryValueLoader>();
            registry.For <Journal>().Use <Journal>();
            yield return(registry.Get <Journal>());

            registry = JournalRegistryContainer.GetServiceRegistry();
            registry.For <IJournalEntryValueFlusher>().Use <EncryptedJournalEntryValueFlusher>();
            registry.For <IJournalEntryValueLoader>().Use <EncryptedJournalEntryValueLoader>();
            registry.For <Journal>().Use <Journal>();
            yield return(registry.Get <Journal>());
        }