public General() { using (var store = new DocumentStore()) { #region register_listener store.RegisterListener(new SampleDocumentStoreListener()); #endregion #region set_listeners store.SetListeners(new DocumentSessionListeners() { StoreListeners = new IDocumentStoreListener[] { new SampleDocumentStoreListener() }, DeleteListeners = new IDocumentDeleteListener[] { new SampleDocumentDeleteListener() } }); #endregion } }