Exemple #1
0
        internal void ApplyTransactionBehavior(BehaviorBuilder <T> builder)
        {
            var behavior = builder.Build();

            TransactionBehavior = behavior;
            _apply(this);
        }
Exemple #2
0
        internal void ApplyCollectionBehavior(BehaviorBuilder <T> builder)
        {
            var behavior = builder.Build();

            CollectionBehavior = behavior;
            _apply(this);
        }
Exemple #3
0
        internal void ApplyDatabaseBehavior(BehaviorBuilder <T> builder)
        {
            var behavior = builder.Build();

            DatabaseBehavior = behavior;
            _apply(this);
        }
Exemple #4
0
        public DocumentTypeBuilder <T> WithTransactionBehavior(Action <BehaviorBuilder <T> > behavior)
        {
            var builder = new BehaviorBuilder <T>(c => ApplyTransactionBehavior(c));

            behavior.Invoke(builder);
            TransactionBehavior           = builder.Build();
            _isDefaultTransactionBehavior = false;
            _apply(this);
            return(this);
        }
Exemple #5
0
        public DocumentTypeBuilder <T> WithCollectionBehavior(Action <BehaviorBuilder <T> > behavior)
        {
            var builder = new BehaviorBuilder <T>(ApplyCollectionBehavior);

            behavior.Invoke(builder);
            CollectionBehavior           = builder.Build();
            _isDefaultCollectionBehavior = false;
            _apply(this);
            return(this);
        }