예제 #1
0
        protected virtual IUomConversionStateMergePatched Map(IMergePatchUomConversion c)
        {
            var stateEventId = new UomConversionEventId(c.UomConversionId, c.Version);
            IUomConversionStateMergePatched e = NewUomConversionStateMergePatched(stateEventId);

            e.ConversionFactor = c.ConversionFactor;
            e.CustomMethodId   = c.CustomMethodId;
            e.DecimalScale     = c.DecimalScale;
            e.RoundingMode     = c.RoundingMode;
            e.Active           = c.Active;
            e.IsPropertyConversionFactorRemoved = c.IsPropertyConversionFactorRemoved;
            e.IsPropertyCustomMethodIdRemoved   = c.IsPropertyCustomMethodIdRemoved;
            e.IsPropertyDecimalScaleRemoved     = c.IsPropertyDecimalScaleRemoved;
            e.IsPropertyRoundingModeRemoved     = c.IsPropertyRoundingModeRemoved;
            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 UomConversionStateDeleted NewUomConversionStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new UomConversionEventId(_state.UomConversionId, version);
            var e            = NewUomConversionStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
예제 #3
0
        protected virtual IUomConversionStateDeleted Map(IDeleteUomConversion c)
        {
            var stateEventId             = new UomConversionEventId(c.UomConversionId, c.Version);
            IUomConversionStateDeleted e = NewUomConversionStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            UomConversionEventId other = obj as UomConversionEventId;

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

            return(true &&
                   Object.Equals(this.UomConversionId, other.UomConversionId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
예제 #5
0
 protected UomConversionEventBase(UomConversionEventId stateEventId)
 {
     this.UomConversionEventId = stateEventId;
 }
예제 #6
0
 public UomConversionStateDeleted(UomConversionEventId stateEventId) : base(stateEventId)
 {
 }
예제 #7
0
 public UomConversionStateMergePatched(UomConversionEventId stateEventId) : base(stateEventId)
 {
 }
예제 #8
0
 protected UomConversionStateEventBase(UomConversionEventId stateEventId) : base(stateEventId)
 {
 }
예제 #9
0
 private UomConversionStateDeleted NewUomConversionStateDeleted(UomConversionEventId stateEventId)
 {
     return(new UomConversionStateDeleted(stateEventId));
 }
예제 #10
0
 private UomConversionStateMergePatched NewUomConversionStateMergePatched(UomConversionEventId stateEventId)
 {
     return(new UomConversionStateMergePatched(stateEventId));
 }