示例#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);
        }
示例#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);
        }
示例#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)
                   );
        }
示例#4
0
 protected StatusItemEventBase(StatusItemEventId stateEventId)
 {
     this.StatusItemEventId = stateEventId;
 }
示例#5
0
 public StatusItemStateMergePatched(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
示例#6
0
 public StatusItemStateCreated(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
示例#7
0
 protected StatusItemStateEventBase(StatusItemEventId stateEventId) : base(stateEventId)
 {
 }
示例#8
0
 private StatusItemStateMergePatched NewStatusItemStateMergePatched(StatusItemEventId stateEventId)
 {
     return(new StatusItemStateMergePatched(stateEventId));
 }
示例#9
0
////////////////////////

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