Esempio n. 1
0
        private GoodIdentificationEventId NewGoodIdentificationEventId(string goodIdentificationTypeId)
        {
            var eId = new GoodIdentificationEventId();

            eId.ProductId = this.ProductEventId.ProductId;
            eId.GoodIdentificationTypeId = goodIdentificationTypeId;
            eId.ProductVersion           = this.ProductEventId.Version;
            return(eId);
        }
Esempio n. 2
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IGoodIdentificationStateRemoved MapRemove(IRemoveGoodIdentification c, IProductCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new GoodIdentificationEventId(c.ProductId, c.GoodIdentificationTypeId, version);
            IGoodIdentificationStateRemoved e = NewGoodIdentificationStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
Esempio n. 3
0
        protected virtual IGoodIdentificationStateCreated MapCreate(ICreateGoodIdentification c, IProductCommand outerCommand, long version, IProductState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new GoodIdentificationEventId(c.ProductId, c.GoodIdentificationTypeId, version);
            IGoodIdentificationStateCreated e = NewGoodIdentificationStateCreated(stateEventId);
            var s = outerState.GoodIdentifications.Get(c.GoodIdentificationTypeId, true);

            e.IdValue = c.IdValue;
            e.Active  = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
Esempio n. 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            GoodIdentificationEventId other = obj as GoodIdentificationEventId;

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

            return(true &&
                   Object.Equals(this.ProductId, other.ProductId) &&
                   Object.Equals(this.GoodIdentificationTypeId, other.GoodIdentificationTypeId) &&
                   Object.Equals(this.ProductVersion, other.ProductVersion)
                   );
        }
Esempio n. 5
0
        protected GoodIdentificationEventId NewGoodIdentificationEventId(string goodIdentificationTypeId)
        {
            var stateEventId = new GoodIdentificationEventId(this.ProductEventId.ProductId, goodIdentificationTypeId, this.ProductEventId.Version);

            return(stateEventId);
        }
Esempio n. 6
0
 private GoodIdentificationStateRemoved NewGoodIdentificationStateRemoved(GoodIdentificationEventId stateEventId)
 {
     return(new GoodIdentificationStateRemoved(stateEventId));
 }
Esempio n. 7
0
 private GoodIdentificationStateMergePatched NewGoodIdentificationStateMergePatched(GoodIdentificationEventId stateEventId)
 {
     return(new GoodIdentificationStateMergePatched(stateEventId));
 }
Esempio n. 8
0
 protected GoodIdentificationEventBase(GoodIdentificationEventId stateEventId)
 {
     this.GoodIdentificationEventId = stateEventId;
 }
Esempio n. 9
0
 public GoodIdentificationStateRemoved(GoodIdentificationEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 10
0
 public GoodIdentificationStateMergePatched(GoodIdentificationEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 11
0
 protected GoodIdentificationStateEventBase(GoodIdentificationEventId stateEventId) : base(stateEventId)
 {
 }