protected virtual IAttributeValueMvoStateMergePatched Map(IMergePatchAttributeValueMvo c)
        {
            var stateEventId = new AttributeValueMvoStateEventId(c.AttributeValueId, c.AttributeVersion);
            IAttributeValueMvoStateMergePatched e = NewAttributeValueMvoStateMergePatched(stateEventId);

            e.Name                                           = c.Name;
            e.Description                                    = c.Description;
            e.ReferenceId                                    = c.ReferenceId;
            e.Version                                        = c.Version;
            e.Active                                         = c.Active;
            e.AttributeName                                  = c.AttributeName;
            e.AttributeOrganizationId                        = c.AttributeOrganizationId;
            e.AttributeDescription                           = c.AttributeDescription;
            e.AttributeIsMandatory                           = c.AttributeIsMandatory;
            e.AttributeIsInstanceAttribute                   = c.AttributeIsInstanceAttribute;
            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.IsPropertyNameRemoved                          = c.IsPropertyNameRemoved;
            e.IsPropertyDescriptionRemoved                   = c.IsPropertyDescriptionRemoved;
            e.IsPropertyReferenceIdRemoved                   = c.IsPropertyReferenceIdRemoved;
            e.IsPropertyVersionRemoved                       = c.IsPropertyVersionRemoved;
            e.IsPropertyActiveRemoved                        = c.IsPropertyActiveRemoved;
            e.IsPropertyAttributeNameRemoved                 = c.IsPropertyAttributeNameRemoved;
            e.IsPropertyAttributeOrganizationIdRemoved       = c.IsPropertyAttributeOrganizationIdRemoved;
            e.IsPropertyAttributeDescriptionRemoved          = c.IsPropertyAttributeDescriptionRemoved;
            e.IsPropertyAttributeIsMandatoryRemoved          = c.IsPropertyAttributeIsMandatoryRemoved;
            e.IsPropertyAttributeIsInstanceAttributeRemoved  = c.IsPropertyAttributeIsInstanceAttributeRemoved;
            e.IsPropertyAttributeAttributeValueTypeRemoved   = c.IsPropertyAttributeAttributeValueTypeRemoved;
            e.IsPropertyAttributeAttributeValueLengthRemoved = c.IsPropertyAttributeAttributeValueLengthRemoved;
            e.IsPropertyAttributeIsListRemoved               = c.IsPropertyAttributeIsListRemoved;
            e.IsPropertyAttributeFieldNameRemoved            = c.IsPropertyAttributeFieldNameRemoved;
            e.IsPropertyAttributeReferenceIdRemoved          = c.IsPropertyAttributeReferenceIdRemoved;
            e.IsPropertyAttributeCreatedByRemoved            = c.IsPropertyAttributeCreatedByRemoved;
            e.IsPropertyAttributeCreatedAtRemoved            = c.IsPropertyAttributeCreatedAtRemoved;
            e.IsPropertyAttributeUpdatedByRemoved            = c.IsPropertyAttributeUpdatedByRemoved;
            e.IsPropertyAttributeUpdatedAtRemoved            = c.IsPropertyAttributeUpdatedAtRemoved;
            e.IsPropertyAttributeActiveRemoved               = c.IsPropertyAttributeActiveRemoved;
            e.IsPropertyAttributeDeletedRemoved              = c.IsPropertyAttributeDeletedRemoved;

            ReflectUtils.CopyPropertyValue("CommandId", c, e);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;

            var attributeVersion = c.AttributeVersion;


            return(e);
        }
        protected AttributeValueMvoStateDeleted NewAttributeValueMvoStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new AttributeValueMvoStateEventId(_state.AttributeValueId, ((IAttributeValueMvoStateProperties)_state).AttributeVersion);
            var e            = NewAttributeValueMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

            e.CreatedBy = (string)requesterId;
            e.CreatedAt = DateTime.Now;

            return(e);
        }
        protected virtual IAttributeValueMvoStateDeleted Map(IDeleteAttributeValueMvo c)
        {
            var stateEventId = new AttributeValueMvoStateEventId(c.AttributeValueId, c.AttributeVersion);
            IAttributeValueMvoStateDeleted e = NewAttributeValueMvoStateDeleted(stateEventId);

            ReflectUtils.CopyPropertyValue("CommandId", c, e);


            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = DateTime.Now;


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

            AttributeValueMvoStateEventId other = obj as AttributeValueMvoStateEventId;

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

            return(true &&
                   Object.Equals(this.AttributeValueId, other.AttributeValueId) &&
                   Object.Equals(this.AttributeVersion, other.AttributeVersion)
                   );
        }
 public AttributeValueMvoStateDeleted(AttributeValueMvoStateEventId stateEventId) : base(stateEventId)
 {
 }
 public AttributeValueMvoStateMergePatched(AttributeValueMvoStateEventId stateEventId) : base(stateEventId)
 {
 }
 protected AttributeValueMvoStateEventBase(AttributeValueMvoStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
 private AttributeValueMvoStateDeleted NewAttributeValueMvoStateDeleted(AttributeValueMvoStateEventId stateEventId)
 {
     return(new AttributeValueMvoStateDeleted(stateEventId));
 }
 private AttributeValueMvoStateMergePatched NewAttributeValueMvoStateMergePatched(AttributeValueMvoStateEventId stateEventId)
 {
     return(new AttributeValueMvoStateMergePatched(stateEventId));
 }
示例#10
0
 public AttributeValueMvoStateEventIdFlattenedDto(AttributeValueMvoStateEventId val)
 {
     this._value = val;
 }