Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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)
                   );
        }
Esempio n. 5
0
 protected AttributeValueMvoEventBase(AttributeValueMvoEventId stateEventId)
 {
     this.AttributeValueMvoEventId = stateEventId;
 }
Esempio n. 6
0
 public AttributeValueMvoStateDeleted(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 7
0
 public AttributeValueMvoStateMergePatched(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 8
0
 protected AttributeValueMvoStateEventBase(AttributeValueMvoEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 9
0
 private AttributeValueMvoStateDeleted NewAttributeValueMvoStateDeleted(AttributeValueMvoEventId stateEventId)
 {
     return(new AttributeValueMvoStateDeleted(stateEventId));
 }
Esempio n. 10
0
 private AttributeValueMvoStateMergePatched NewAttributeValueMvoStateMergePatched(AttributeValueMvoEventId stateEventId)
 {
     return(new AttributeValueMvoStateMergePatched(stateEventId));
 }