Exemplo n.º 1
0
        protected virtual IDamageTypeStateMergePatched Map(IMergePatchDamageType c)
        {
            var stateEventId = new DamageTypeEventId(c.DamageTypeId, c.Version);
            IDamageTypeStateMergePatched e = NewDamageTypeStateMergePatched(stateEventId);

            e.Description             = c.Description;
            e.SequenceId              = c.SequenceId;
            e.DefaultHandlingMethodId = c.DefaultHandlingMethodId;
            e.Active = c.Active;
            e.IsPropertyDescriptionRemoved             = c.IsPropertyDescriptionRemoved;
            e.IsPropertySequenceIdRemoved              = c.IsPropertySequenceIdRemoved;
            e.IsPropertyDefaultHandlingMethodIdRemoved = c.IsPropertyDefaultHandlingMethodIdRemoved;
            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);
        }
Exemplo n.º 2
0
        protected DamageTypeStateDeleted NewDamageTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new DamageTypeEventId(_state.DamageTypeId, version);
            var e            = NewDamageTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Exemplo n.º 3
0
        protected virtual IDamageTypeStateDeleted Map(IDeleteDamageType c)
        {
            var stateEventId          = new DamageTypeEventId(c.DamageTypeId, c.Version);
            IDamageTypeStateDeleted e = NewDamageTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            DamageTypeEventId other = obj as DamageTypeEventId;

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

            return(true &&
                   Object.Equals(this.DamageTypeId, other.DamageTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemplo n.º 5
0
 protected DamageTypeStateEventDtoBase(DamageTypeEventId stateEventId)
 {
     this.DamageTypeEventId = stateEventId;
 }
Exemplo n.º 6
0
 public DamageTypeStateDeleted(DamageTypeEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 7
0
 public DamageTypeStateMergePatched(DamageTypeEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 8
0
 protected DamageTypeStateEventBase(DamageTypeEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 9
0
 private DamageTypeStateDeleted NewDamageTypeStateDeleted(DamageTypeEventId stateEventId)
 {
     return(new DamageTypeStateDeleted(stateEventId));
 }
Exemplo n.º 10
0
 private DamageTypeStateMergePatched NewDamageTypeStateMergePatched(DamageTypeEventId stateEventId)
 {
     return(new DamageTypeStateMergePatched(stateEventId));
 }