コード例 #1
0
        protected AggregateRoot(AggregateRootIdentity identity, TAggregateRootState state)
            : base(identity, state)
        {
            Contract.Requires(identity != null);
            Contract.Requires(state != null);

            State = state;
        }
コード例 #2
0
        protected AggregateRoot(AggregateRootIdentity identity,
                                IAggregateRootState state)
        {
            Contract.Requires(identity != null);
            Contract.Requires(state != null);

            Identity = identity;
            State    = state;
        }
コード例 #3
0
        public TAggregateRoot Build(AggregateRootIdentity identity, TAggregateRootState state)
        {
            ConstructorInfo ctor = GetConstructor();

            TAggregateRoot aggregateRoot = ctor.Invoke(new object[] { identity, state }) as TAggregateRoot;

            Contract.Assume(aggregateRoot != null);

            return(aggregateRoot);
        }
        public AggregateRootSynchronizationContext(AggregateRootIdentity identity)
        {
            Contract.Requires(identity != null);

            _identity = identity;
        }