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); }
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); }
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); }
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) ); }
protected DamageReasonEventBase(DamageReasonEventId stateEventId) { this.DamageReasonEventId = stateEventId; }
public DamageReasonStateDeleted(DamageReasonEventId stateEventId) : base(stateEventId) { }
public DamageReasonStateMergePatched(DamageReasonEventId stateEventId) : base(stateEventId) { }
protected DamageReasonStateEventBase(DamageReasonEventId stateEventId) : base(stateEventId) { }
private DamageReasonStateDeleted NewDamageReasonStateDeleted(DamageReasonEventId stateEventId) { return(new DamageReasonStateDeleted(stateEventId)); }
private DamageReasonStateMergePatched NewDamageReasonStateMergePatched(DamageReasonEventId stateEventId) { return(new DamageReasonStateMergePatched(stateEventId)); }