protected virtual IGoodIdentificationTypeStateMergePatched Map(IMergePatchGoodIdentificationType c)
        {
            var stateEventId = new GoodIdentificationTypeEventId(c.GoodIdentificationTypeId, c.Version);
            IGoodIdentificationTypeStateMergePatched e = NewGoodIdentificationTypeStateMergePatched(stateEventId);

            e.ParentTypeId = c.ParentTypeId;
            e.HasTable     = c.HasTable;
            e.Description  = c.Description;
            e.Active       = c.Active;
            e.IsPropertyParentTypeIdRemoved = c.IsPropertyParentTypeIdRemoved;
            e.IsPropertyHasTableRemoved     = c.IsPropertyHasTableRemoved;
            e.IsPropertyDescriptionRemoved  = c.IsPropertyDescriptionRemoved;
            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);
        }
        protected GoodIdentificationTypeStateDeleted NewGoodIdentificationTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new GoodIdentificationTypeEventId(_state.GoodIdentificationTypeId, version);
            var e            = NewGoodIdentificationTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
        protected virtual IGoodIdentificationTypeStateDeleted Map(IDeleteGoodIdentificationType c)
        {
            var stateEventId = new GoodIdentificationTypeEventId(c.GoodIdentificationTypeId, c.Version);
            IGoodIdentificationTypeStateDeleted e = NewGoodIdentificationTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Пример #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            GoodIdentificationTypeEventId other = obj as GoodIdentificationTypeEventId;

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

            return(true &&
                   Object.Equals(this.GoodIdentificationTypeId, other.GoodIdentificationTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Пример #5
0
 protected GoodIdentificationTypeEventBase(GoodIdentificationTypeEventId stateEventId)
 {
     this.GoodIdentificationTypeEventId = stateEventId;
 }
Пример #6
0
 public GoodIdentificationTypeStateDeleted(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #7
0
 public GoodIdentificationTypeStateMergePatched(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
Пример #8
0
 protected GoodIdentificationTypeStateEventBase(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
 private GoodIdentificationTypeStateDeleted NewGoodIdentificationTypeStateDeleted(GoodIdentificationTypeEventId stateEventId)
 {
     return(new GoodIdentificationTypeStateDeleted(stateEventId));
 }
 private GoodIdentificationTypeStateMergePatched NewGoodIdentificationTypeStateMergePatched(GoodIdentificationTypeEventId stateEventId)
 {
     return(new GoodIdentificationTypeStateMergePatched(stateEventId));
 }