コード例 #1
0
        protected virtual IProductCategoryMemberStateMergePatched Map(IMergePatchProductCategoryMember c)
        {
            var stateEventId = new ProductCategoryMemberEventId(c.ProductCategoryMemberId, c.Version);
            IProductCategoryMemberStateMergePatched e = NewProductCategoryMemberStateMergePatched(stateEventId);

            e.ThruDate    = c.ThruDate;
            e.Comments    = c.Comments;
            e.SequenceNum = c.SequenceNum;
            e.Quantity    = c.Quantity;
            e.Active      = c.Active;
            e.IsPropertyThruDateRemoved    = c.IsPropertyThruDateRemoved;
            e.IsPropertyCommentsRemoved    = c.IsPropertyCommentsRemoved;
            e.IsPropertySequenceNumRemoved = c.IsPropertySequenceNumRemoved;
            e.IsPropertyQuantityRemoved    = c.IsPropertyQuantityRemoved;
            e.IsPropertyActiveRemoved      = c.IsPropertyActiveRemoved;

            e.CommandId = c.CommandId;


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            var version = c.Version;


            return(e);
        }
コード例 #2
0
        protected ProductCategoryMemberStateMergePatched NewProductCategoryMemberStateMergePatched(long version, string commandId, string requesterId)
        {
            var stateEventId = new ProductCategoryMemberEventId(_state.ProductCategoryMemberId, version);
            var e            = NewProductCategoryMemberStateMergePatched(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();

            return(e);
        }
コード例 #3
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            ProductCategoryMemberEventId other = obj as ProductCategoryMemberEventId;

            if (other == null)
            {
                return(false);
            }

            return(true &&
                   Object.Equals(this.ProductCategoryMemberId, other.ProductCategoryMemberId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
コード例 #4
0
 protected ProductCategoryMemberEventBase(ProductCategoryMemberEventId stateEventId)
 {
     this.ProductCategoryMemberEventId = stateEventId;
 }
コード例 #5
0
 public ProductCategoryMemberStateMergePatched(ProductCategoryMemberEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #6
0
 public ProductCategoryMemberStateCreated(ProductCategoryMemberEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #7
0
 protected ProductCategoryMemberStateEventBase(ProductCategoryMemberEventId stateEventId) : base(stateEventId)
 {
 }
コード例 #8
0
 private ProductCategoryMemberStateMergePatched NewProductCategoryMemberStateMergePatched(ProductCategoryMemberEventId stateEventId)
 {
     return(new ProductCategoryMemberStateMergePatched(stateEventId));
 }
コード例 #9
0
////////////////////////

        private ProductCategoryMemberStateCreated NewProductCategoryMemberStateCreated(ProductCategoryMemberEventId stateEventId)
        {
            return(new ProductCategoryMemberStateCreated(stateEventId));
        }