Example #1
0
        protected LocatorTypeStateDeleted NewLocatorTypeStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new LocatorTypeEventId(_state.LocatorTypeId, version);
            var e            = NewLocatorTypeStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Example #2
0
        protected virtual ILocatorTypeStateDeleted Map(IDeleteLocatorType c)
        {
            var stateEventId           = new LocatorTypeEventId(c.LocatorTypeId, c.Version);
            ILocatorTypeStateDeleted e = NewLocatorTypeStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            LocatorTypeEventId other = obj as LocatorTypeEventId;

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

            return(true &&
                   Object.Equals(this.LocatorTypeId, other.LocatorTypeId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Example #4
0
        protected virtual ILocatorTypeStateMergePatched Map(IMergePatchLocatorType c)
        {
            var stateEventId = new LocatorTypeEventId(c.LocatorTypeId, c.Version);
            ILocatorTypeStateMergePatched e = NewLocatorTypeStateMergePatched(stateEventId);

            e.Description = c.Description;
            e.Active      = c.Active;
            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);
        }
Example #5
0
 protected LocatorTypeEventBase(LocatorTypeEventId stateEventId)
 {
     this.LocatorTypeEventId = stateEventId;
 }
Example #6
0
 public LocatorTypeStateDeleted(LocatorTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #7
0
 public LocatorTypeStateMergePatched(LocatorTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #8
0
 protected LocatorTypeStateEventBase(LocatorTypeEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 private LocatorTypeStateDeleted NewLocatorTypeStateDeleted(LocatorTypeEventId stateEventId)
 {
     return(new LocatorTypeStateDeleted(stateEventId));
 }
Example #10
0
 private LocatorTypeStateMergePatched NewLocatorTypeStateMergePatched(LocatorTypeEventId stateEventId)
 {
     return(new LocatorTypeStateMergePatched(stateEventId));
 }