Beispiel #1
0
        protected DamageReasonStateDeleted NewDamageReasonStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new DamageReasonEventId(_state.DamageReasonId, version);
            var e            = NewDamageReasonStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Beispiel #2
0
        protected virtual IDamageReasonStateDeleted Map(IDeleteDamageReason c)
        {
            var stateEventId            = new DamageReasonEventId(c.DamageReasonId, c.Version);
            IDamageReasonStateDeleted e = NewDamageReasonStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


            return(e);
        }
Beispiel #3
0
        protected virtual IDamageReasonStateCreated Map(ICreateDamageReason c)
        {
            var stateEventId            = new DamageReasonEventId(c.DamageReasonId, c.Version);
            IDamageReasonStateCreated e = NewDamageReasonStateCreated(stateEventId);

            e.Description = c.Description;
            e.SequenceId  = c.SequenceId;
            e.Active      = c.Active;
            e.CommandId   = c.CommandId;


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


            return(e);
        }
Beispiel #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            DamageReasonEventId other = obj as DamageReasonEventId;

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

            return(true &&
                   Object.Equals(this.DamageReasonId, other.DamageReasonId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Beispiel #5
0
 protected DamageReasonEventBase(DamageReasonEventId stateEventId)
 {
     this.DamageReasonEventId = stateEventId;
 }
Beispiel #6
0
 public DamageReasonStateDeleted(DamageReasonEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #7
0
 public DamageReasonStateMergePatched(DamageReasonEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #8
0
 protected DamageReasonStateEventBase(DamageReasonEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #9
0
 private DamageReasonStateDeleted NewDamageReasonStateDeleted(DamageReasonEventId stateEventId)
 {
     return(new DamageReasonStateDeleted(stateEventId));
 }
Beispiel #10
0
 private DamageReasonStateMergePatched NewDamageReasonStateMergePatched(DamageReasonEventId stateEventId)
 {
     return(new DamageReasonStateMergePatched(stateEventId));
 }