示例#1
0
        protected virtual IAttributeAliasMvoStateCreated Map(ICreateAttributeAliasMvo c)
        {
            var stateEventId = new AttributeAliasMvoEventId(c.AttributeAliasId, c.AttributeVersion);
            IAttributeAliasMvoStateCreated e = NewAttributeAliasMvoStateCreated(stateEventId);

            e.Name    = c.Name;
            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 AttributeAliasMvoStateDeleted NewAttributeAliasMvoStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new AttributeAliasMvoEventId(_state.AttributeAliasId, version);
            var e            = NewAttributeAliasMvoStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
示例#3
0
        protected virtual IAttributeAliasMvoStateDeleted Map(IDeleteAttributeAliasMvo c)
        {
            var stateEventId = new AttributeAliasMvoEventId(c.AttributeAliasId, c.AttributeVersion);
            IAttributeAliasMvoStateDeleted e = NewAttributeAliasMvoStateDeleted(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);
            }

            AttributeAliasMvoEventId other = obj as AttributeAliasMvoEventId;

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

            return(true &&
                   Object.Equals(this.AttributeAliasId, other.AttributeAliasId) &&
                   Object.Equals(this.AttributeVersion, other.AttributeVersion)
                   );
        }
示例#5
0
 protected AttributeAliasMvoEventBase(AttributeAliasMvoEventId stateEventId)
 {
     this.AttributeAliasMvoEventId = stateEventId;
 }
示例#6
0
 public AttributeAliasMvoStateDeleted(AttributeAliasMvoEventId stateEventId) : base(stateEventId)
 {
 }
示例#7
0
 public AttributeAliasMvoStateMergePatched(AttributeAliasMvoEventId stateEventId) : base(stateEventId)
 {
 }
示例#8
0
 protected AttributeAliasMvoStateEventBase(AttributeAliasMvoEventId stateEventId) : base(stateEventId)
 {
 }
示例#9
0
 private AttributeAliasMvoStateDeleted NewAttributeAliasMvoStateDeleted(AttributeAliasMvoEventId stateEventId)
 {
     return(new AttributeAliasMvoStateDeleted(stateEventId));
 }
示例#10
0
 private AttributeAliasMvoStateMergePatched NewAttributeAliasMvoStateMergePatched(AttributeAliasMvoEventId stateEventId)
 {
     return(new AttributeAliasMvoStateMergePatched(stateEventId));
 }