예제 #1
0
        protected virtual IAttributeValueMvoStateCreated Map(ICreateAttributeValueMvo c)
        {
            var stateEventId = new AttributeValueMvoEventId(c.AttributeValueId, c.AttributeVersion);
            IAttributeValueMvoStateCreated e = NewAttributeValueMvoStateCreated(stateEventId);

            e.AttributeValueName            = c.AttributeValueName;
            e.Description                   = c.Description;
            e.ReferenceId                   = c.ReferenceId;
            e.Version                       = c.Version;
            e.Active                        = c.Active;
            e.AttributeAttributeName        = c.AttributeAttributeName;
            e.AttributeOrganizationId       = c.AttributeOrganizationId;
            e.AttributeDescription          = c.AttributeDescription;
            e.AttributeIsMandatory          = c.AttributeIsMandatory;
            e.AttributeAttributeValueType   = c.AttributeAttributeValueType;
            e.AttributeAttributeValueLength = c.AttributeAttributeValueLength;
            e.AttributeIsList               = c.AttributeIsList;
            e.AttributeFieldName            = c.AttributeFieldName;
            e.AttributeReferenceId          = c.AttributeReferenceId;
            e.AttributeCreatedBy            = c.AttributeCreatedBy;
            e.AttributeCreatedAt            = c.AttributeCreatedAt;
            e.AttributeUpdatedBy            = c.AttributeUpdatedBy;
            e.AttributeUpdatedAt            = c.AttributeUpdatedAt;
            e.AttributeActive               = c.AttributeActive;
            e.AttributeDeleted              = c.AttributeDeleted;
            e.CommandId                     = c.CommandId;


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


            return(e);
        }
예제 #2
0
        protected AttributeValueMvoStateDeleted NewAttributeValueMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new AttributeValueMvoEventId(_state.AttributeValueId, version);
            var e            = NewAttributeValueMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
예제 #3
0
        protected virtual IAttributeValueMvoStateDeleted Map(IDeleteAttributeValueMvo c)
        {
            var stateEventId = new AttributeValueMvoEventId(c.AttributeValueId, c.AttributeVersion);
            IAttributeValueMvoStateDeleted e = NewAttributeValueMvoStateDeleted(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);
            }

            AttributeValueMvoEventId other = obj as AttributeValueMvoEventId;

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

            return(true &&
                   Object.Equals(this.AttributeValueId, other.AttributeValueId) &&
                   Object.Equals(this.AttributeVersion, other.AttributeVersion)
                   );
        }
예제 #5
0
 protected AttributeValueMvoEventBase(AttributeValueMvoEventId stateEventId)
 {
     this.AttributeValueMvoEventId = stateEventId;
 }
예제 #6
0
 public AttributeValueMvoStateDeleted(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
예제 #7
0
 public AttributeValueMvoStateMergePatched(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
예제 #8
0
 protected AttributeValueMvoStateEventBase(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
예제 #9
0
 private AttributeValueMvoStateDeleted NewAttributeValueMvoStateDeleted(AttributeValueMvoEventId stateEventId)
 {
     return(new AttributeValueMvoStateDeleted(stateEventId));
 }
예제 #10
0
 private AttributeValueMvoStateMergePatched NewAttributeValueMvoStateMergePatched(AttributeValueMvoEventId stateEventId)
 {
     return(new AttributeValueMvoStateMergePatched(stateEventId));
 }