Exemplo n.º 1
0
        private AttributeAliasEventId NewAttributeAliasEventId(string code)
        {
            var eId = new AttributeAliasEventId();

            eId.AttributeId      = this.AttributeEventId.AttributeId;
            eId.Code             = code;
            eId.AttributeVersion = this.AttributeEventId.Version;
            return(eId);
        }
Exemplo n.º 2
0
        }// END Map(IMergePatch... ////////////////////////////

        protected virtual IAttributeAliasStateRemoved MapRemove(IRemoveAttributeAlias c, IAttributeCommand outerCommand, long version)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeAliasEventId(c.AttributeId, c.Code, version);
            IAttributeAliasStateRemoved e = NewAttributeAliasStateRemoved(stateEventId);


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

            return(e);
        }// END Map(IRemove... ////////////////////////////
Exemplo n.º 3
0
        protected virtual IAttributeAliasStateCreated MapCreate(ICreateAttributeAlias c, IAttributeCommand outerCommand, long version, IAttributeState outerState)
        {
            c.RequesterId = outerCommand.RequesterId;
            var stateEventId = new AttributeAliasEventId(c.AttributeId, c.Code, version);
            IAttributeAliasStateCreated e = NewAttributeAliasStateCreated(stateEventId);
            var s = outerState.Aliases.Get(c.Code, true);

            e.Name   = c.Name;
            e.Active = c.Active;

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

            AttributeAliasEventId other = obj as AttributeAliasEventId;

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

            return(true &&
                   Object.Equals(this.AttributeId, other.AttributeId) &&
                   Object.Equals(this.Code, other.Code) &&
                   Object.Equals(this.AttributeVersion, other.AttributeVersion)
                   );
        }
Exemplo n.º 5
0
 protected AttributeAliasEventBase(AttributeAliasEventId stateEventId)
 {
     this.AttributeAliasEventId = stateEventId;
 }
Exemplo n.º 6
0
 public AttributeAliasStateRemoved(AttributeAliasEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 7
0
 public AttributeAliasStateMergePatched(AttributeAliasEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 8
0
 public AttributeAliasStateCreated(AttributeAliasEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 9
0
 protected AttributeAliasStateEventBase(AttributeAliasEventId stateEventId) : base(stateEventId)
 {
 }
Exemplo n.º 10
0
        protected AttributeAliasEventId NewAttributeAliasEventId(string code)
        {
            var stateEventId = new AttributeAliasEventId(this.AttributeEventId.AttributeId, code, this.AttributeEventId.Version);

            return(stateEventId);
        }
Exemplo n.º 11
0
 private AttributeAliasStateRemoved NewAttributeAliasStateRemoved(AttributeAliasEventId stateEventId)
 {
     return(new AttributeAliasStateRemoved(stateEventId));
 }
Exemplo n.º 12
0
 private AttributeAliasStateMergePatched NewAttributeAliasStateMergePatched(AttributeAliasEventId stateEventId)
 {
     return(new AttributeAliasStateMergePatched(stateEventId));
 }