コード例 #1
0
        static MongoDbSagaPersister()
        {
            ElementNameConventions = new SagaDataElementNameConvention();

            var conventionProfile = new ConventionProfile()
                                    .SetElementNameConvention(ElementNameConventions);

            BsonClassMap.RegisterConventions(conventionProfile, t => typeof(ISagaData).IsAssignableFrom(t));
        }
コード例 #2
0
ファイル: MongoDbSagaPersister.cs プロジェクト: karmerk/Rebus
        public MongoDbSagaPersister(string connectionString, string collectionName)
        {
            this.collectionName = collectionName;

            database = MongoDatabase.Create(connectionString);

            elementNameConventions = new SagaDataElementNameConvention();
            var conventionProfile = new ConventionProfile()
                .SetElementNameConvention(elementNameConventions);

            BsonClassMap.RegisterConventions(conventionProfile, t => typeof(ISagaData).IsAssignableFrom(t));
        }
コード例 #3
0
        static MongoDbSagaPersister()
        {
            RebusLoggerFactory.Changed += f => log = f.GetCurrentClassLogger();
            var namingConvention = new SagaDataElementNameConvention();

            RevisionMemberName     = namingConvention.RevisionMemberName;
            ElementNameConventions = namingConvention;
            var conventionProfile = new ConventionProfile()
                                    .SetElementNameConvention(ElementNameConventions);

            BsonClassMap.RegisterConventions(conventionProfile, t => typeof(ISagaData).IsAssignableFrom(t));
        }