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>()); }
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>()); }