INNER CODE UNIT · C#
ExposedMongoEventStore
Chinchilla-Software-Com/CQRS · Diagnostics/Cqrs.Diagnostics.EventStoreToEventBusReplay/Program.cs:536
public class ExposedMongoEventStore
{
public ExposedMongoEventStore(MongoDbEventStore<TAuthenticationToken> mongoDbEventStore)
{
PropertyInfo propertyInfo = mongoDbEventStore.GetType().GetProperty("MongoCollection", BindingFlags.Instance | BindingFlags.NonPublic);
MongoCollection = (IMongoCollection<MongoDbEventData>)propertyInfo.GetValue(mongoDbEventStore);
}
internal IMongoCollection<MongoDbEventData> MongoCollection { get; set; }
}
public class ExposedSqlEventStore
{
public ExposedSqlEventStore(SqlEventStore<TAuthenticationToken> sqlEventStore)
{
MethodInfo methodInfo = sqlEventStore.GetType().GetMethod("CreateDbDataContext", BindingFlags.Instance | BindingFlags.NonPublic);
DataContext dbDataContext = (DataContext)methodInfo.Invoke(sqlEventStore, new object[] { null });