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);
        }
Ejemplo n.º 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)
                   );
        }
Ejemplo n.º 5
0
 protected GoodIdentificationTypeEventBase(GoodIdentificationTypeEventId stateEventId)
 {
     this.GoodIdentificationTypeEventId = stateEventId;
 }
Ejemplo n.º 6
0
 public GoodIdentificationTypeStateDeleted(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 7
0
 public GoodIdentificationTypeStateMergePatched(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
Ejemplo n.º 8
0
 protected GoodIdentificationTypeStateEventBase(GoodIdentificationTypeEventId stateEventId) : base(stateEventId)
 {
 }
 private GoodIdentificationTypeStateDeleted NewGoodIdentificationTypeStateDeleted(GoodIdentificationTypeEventId stateEventId)
 {
     return(new GoodIdentificationTypeStateDeleted(stateEventId));
 }
Ejemplo n.º 10
0
 private GoodIdentificationTypeStateMergePatched NewGoodIdentificationTypeStateMergePatched(GoodIdentificationTypeEventId stateEventId)
 {
     return(new GoodIdentificationTypeStateMergePatched(stateEventId));
 }