Пример #1
0
        public override void Install(ParticleDefinitionContext feature)
        {
            // This is the main feature for In Memory Storage
            // It sets things up and then other features can add their own implementations as needed
            // In theory, this could expose a Startable service if it needed to perform startup init

            feature.RegisterStoreType("In Memory")
            .For <InMemoryStorage>(builder => new InMemoryStorage());
        }
Пример #2
0
        public override void Install(ParticleDefinitionContext feature)
        {
            // A basic round-robin audit store
            // Register a single writer that can be configured with a number of different stores
            //   And round-robin writes to them all.
            // No need to implement the query interface as all of the sub-stores will be queried anyway

            feature.RegisterStoreType("Round Robin")
            .For <AuditWriter>(builder => new Writer(builder.Get <Core.Particle>(), builder.Get <RoundRobinStorageSettings>()));
        }
Пример #3
0
        public override void Install(ParticleDefinitionContext feature)
        {
            // This provides the audit services over the top of the the in-memory storage
            // By doing it this way, this assembly only contains the details specifically
            // Required for this exact cross-section of features

            feature.RegisterStoreType("In Memory")
            .For <InMemoryAuditor>(builder => new InMemoryAuditor(builder.Get <InMemoryStorage>()))
            .For <MessagesQuery>(builder => builder.Get <InMemoryAuditor>())
            .For <AuditWriter>(builder => builder.Get <InMemoryAuditor>());
        }
Пример #4
0
 public override void Install(ParticleDefinitionContext feature)
 {
     feature.RegisterStoreType("Remote")
     .For <MessagesQuery>(builder => new RemoteAuditor(builder.Get <RemoteStoreConnectionSettings>()));
 }