예제 #1
0
        private AttributeValueEventId NewAttributeValueEventId(string value)
        {
            var eId = new AttributeValueEventId();

            eId.AttributeId      = this.AttributeEventId.AttributeId;
            eId.Value            = value;
            eId.AttributeVersion = this.AttributeEventId.Version;
            return(eId);
        }
예제 #2
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IAttributeValueStateRemoved MapRemove(IRemoveAttributeValue c, IAttributeCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeValueEventId(c.AttributeId, c.Value, version);
            IAttributeValueStateRemoved e = NewAttributeValueStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
예제 #3
0
        protected virtual IAttributeValueStateCreated MapCreate(ICreateAttributeValue c, IAttributeCommand outerCommand, long version, IAttributeState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeValueEventId(c.AttributeId, c.Value, version);
            IAttributeValueStateCreated e = NewAttributeValueStateCreated(stateEventId);
            var s = outerState.AttributeValues.Get(c.Value, true);

            e.AttributeValueName = c.AttributeValueName;
            e.Description        = c.Description;
            e.ReferenceId        = c.ReferenceId;
            e.Active             = c.Active;

            e.CreatedBy = (string)c.RequesterId;
            e.CreatedAt = ApplicationContext.Current.TimestampService.Now <DateTime>();
            return(e);
        }// END Map(ICreate... ////////////////////////////
예제 #4
0
        public override bool Equals(object obj)
        {
            if (Object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            AttributeValueEventId other = obj as AttributeValueEventId;

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

            return(true &&
                   Object.Equals(this.AttributeId, other.AttributeId) &&
                   Object.Equals(this.Value, other.Value) &&
                   Object.Equals(this.AttributeVersion, other.AttributeVersion)
                   );
        }
예제 #5
0
 protected AttributeValueEventBase(AttributeValueEventId stateEventId)
 {
     this.AttributeValueEventId = stateEventId;
 }
예제 #6
0
 public AttributeValueStateRemoved(AttributeValueEventId stateEventId) : base(stateEventId)
 {
 }
예제 #7
0
 public AttributeValueStateMergePatched(AttributeValueEventId stateEventId) : base(stateEventId)
 {
 }
예제 #8
0
 public AttributeValueStateCreated(AttributeValueEventId stateEventId) : base(stateEventId)
 {
 }
예제 #9
0
 protected AttributeValueStateEventBase(AttributeValueEventId stateEventId) : base(stateEventId)
 {
 }
예제 #10
0
        protected AttributeValueEventId NewAttributeValueEventId(string value)
        {
            var stateEventId = new AttributeValueEventId(this.AttributeEventId.AttributeId, value, this.AttributeEventId.Version);

            return(stateEventId);
        }
예제 #11
0
 private AttributeValueStateRemoved NewAttributeValueStateRemoved(AttributeValueEventId stateEventId)
 {
     return(new AttributeValueStateRemoved(stateEventId));
 }
예제 #12
0
 private AttributeValueStateMergePatched NewAttributeValueStateMergePatched(AttributeValueEventId stateEventId)
 {
     return(new AttributeValueStateMergePatched(stateEventId));
 }