public virtual IInOutLineMvoStateEvent GetStateEvent(InOutLineId inOutLineId, long version)
        {
            var e = (IInOutLineMvoStateEvent)EventStore.GetStateEvent(ToEventStoreAggregateId(inOutLineId), version);

            if (e != null)
            {
                e.ReadOnly = true;
            }
            return(e);
        }
        public virtual IInOutLineMvoState Get(InOutLineId inOutLineId)
        {
            var state = StateRepository.Get(inOutLineId);

            if (state != null && state.IsUnsaved)
            {
                state = null;
            }

            return(state);
        }
Ejemplo n.º 3
0
        public virtual IInOutLineState Get(SkuId skuId)
        {
            InOutLineId globalId = new InOutLineId(_inOutState.DocumentNumber, skuId);

            if (_loadedInOutLineStates.ContainsKey(globalId))
            {
                return(_loadedInOutLineStates[globalId]);
            }
            var state = InOutLineStateDao.Get(globalId);

            _loadedInOutLineStates.Add(globalId, state);
            return(state);
        }
Ejemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            InOutLineId other = obj as InOutLineId;

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

            return(true &&
                   Object.Equals(this.InOutDocumentNumber, other.InOutDocumentNumber) &&
                   Object.Equals(this.SkuId, other.SkuId)
                   );
        }
Ejemplo n.º 5
0
 public InOutLineMvoStateEventId(InOutLineId inOutLineId, long inOutVersion)
 {
     this._inOutLineId  = inOutLineId;
     this._inOutVersion = inOutVersion;
 }
Ejemplo n.º 6
0
 public InOutLineIdFlattenedDto(InOutLineId val)
 {
     this._value = val;
 }
Ejemplo n.º 7
0
 public InOutLineIdDto(InOutLineId val)
 {
     this._value = val;
 }
 public abstract IEventStoreAggregateId ToEventStoreAggregateId(InOutLineId aggregateId);