Exemplo n.º 1
0
        protected virtual IStatusItemStateMergePatched Map(IMergePatchStatusItem c)
        {
            var stateEventId = new StatusItemEventId(c.StatusId, c.Version);
            IStatusItemStateMergePatched e = NewStatusItemStateMergePatched(stateEventId);

            e.StatusTypeId = c.StatusTypeId;
            e.StatusCode   = c.StatusCode;
            e.SequenceId   = c.SequenceId;
            e.Description  = c.Description;
            e.Active       = c.Active;
            e.IsPropertyStatusTypeIdRemoved = c.IsPropertyStatusTypeIdRemoved;
            e.IsPropertyStatusCodeRemoved   = c.IsPropertyStatusCodeRemoved;
            e.IsPropertySequenceIdRemoved   = c.IsPropertySequenceIdRemoved;
            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);
        }
Exemplo n.º 2
0
        protected StatusItemStateMergePatched NewStatusItemStateMergePatched(long version, string commandId, string requesterId)
        {
            var stateEventId = new StatusItemEventId(_state.StatusId, version);
            var e            = NewStatusItemStateMergePatched(stateEventId);

            e.CommandId = commandId;

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

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

            StatusItemEventId other = obj as StatusItemEventId;

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

            return(true &&
                   Object.Equals(this.StatusId, other.StatusId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Exemplo n.º 4
0
 protected StatusItemEventBase(StatusItemEventId stateEventId)
 {
     this.StatusItemEventId = stateEventId;
 }
Exemplo n.º 5
0
 public StatusItemStateMergePatched(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 6
0
 public StatusItemStateCreated(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 7
0
 protected StatusItemStateEventBase(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 8
0
 private StatusItemStateMergePatched NewStatusItemStateMergePatched(StatusItemEventId stateEventId)
 {
     return(new StatusItemStateMergePatched(stateEventId));
 }
Exemplo n.º 9
0
////////////////////////

        private StatusItemStateCreated NewStatusItemStateCreated(StatusItemEventId stateEventId)
        {
            return(new StatusItemStateCreated(stateEventId));
        }