Example #1
0
        protected virtual IAttributeUseMvoStateCreated Map(ICreateAttributeUseMvo c)
        {
            var stateEventId = new AttributeUseMvoEventId(c.AttributeSetAttributeUseId, c.AttributeSetVersion);
            IAttributeUseMvoStateCreated e = NewAttributeUseMvoStateCreated(stateEventId);

            e.SequenceNumber = c.SequenceNumber;
            e.Version        = c.Version;
            e.Active         = c.Active;
            e.AttributeSetAttributeSetName       = c.AttributeSetAttributeSetName;
            e.AttributeSetOrganizationId         = c.AttributeSetOrganizationId;
            e.AttributeSetDescription            = c.AttributeSetDescription;
            e.AttributeSetReferenceId            = c.AttributeSetReferenceId;
            e.AttributeSetIsInstanceAttributeSet = c.AttributeSetIsInstanceAttributeSet;
            e.AttributeSetIsMandatory            = c.AttributeSetIsMandatory;
            e.AttributeSetCreatedBy = c.AttributeSetCreatedBy;
            e.AttributeSetCreatedAt = c.AttributeSetCreatedAt;
            e.AttributeSetUpdatedBy = c.AttributeSetUpdatedBy;
            e.AttributeSetUpdatedAt = c.AttributeSetUpdatedAt;
            e.AttributeSetActive    = c.AttributeSetActive;
            e.AttributeSetDeleted   = c.AttributeSetDeleted;
            e.CommandId             = c.CommandId;


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


            return(e);
        }
Example #2
0
        protected AttributeUseMvoStateDeleted NewAttributeUseMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new AttributeUseMvoEventId(_state.AttributeSetAttributeUseId, version);
            var e            = NewAttributeUseMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Example #3
0
        protected virtual IAttributeUseMvoStateDeleted Map(IDeleteAttributeUseMvo c)
        {
            var stateEventId = new AttributeUseMvoEventId(c.AttributeSetAttributeUseId, c.AttributeSetVersion);
            IAttributeUseMvoStateDeleted e = NewAttributeUseMvoStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            AttributeUseMvoEventId other = obj as AttributeUseMvoEventId;

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

            return(true &&
                   Object.Equals(this.AttributeSetAttributeUseId, other.AttributeSetAttributeUseId) &&
                   Object.Equals(this.AttributeSetVersion, other.AttributeSetVersion)
                   );
        }
Example #5
0
 protected AttributeUseMvoStateEventDtoBase(AttributeUseMvoEventId stateEventId)
 {
     this.AttributeUseMvoEventId = stateEventId;
 }
Example #6
0
 private AttributeUseMvoStateDeleted NewAttributeUseMvoStateDeleted(AttributeUseMvoEventId stateEventId)
 {
     return(new AttributeUseMvoStateDeleted(stateEventId));
 }
Example #7
0
 private AttributeUseMvoStateMergePatched NewAttributeUseMvoStateMergePatched(AttributeUseMvoEventId stateEventId)
 {
     return(new AttributeUseMvoStateMergePatched(stateEventId));
 }
Example #8
0
 public AttributeUseMvoStateDeleted(AttributeUseMvoEventId stateEventId) : base(stateEventId)
 {
 }
Example #9
0
 public AttributeUseMvoStateMergePatched(AttributeUseMvoEventId stateEventId) : base(stateEventId)
 {
 }
Example #10
0
 protected AttributeUseMvoStateEventBase(AttributeUseMvoEventId stateEventId) : base(stateEventId)
 {
 }