Beispiel #1
0
        protected AudienceStateDeleted NewAudienceStateDeleted(string commandId, string requesterId)
        {
            var stateEventId = new AudienceStateEventId(_state.ClientId, ((IAudienceStateProperties)_state).Version);
            var e            = NewAudienceStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Beispiel #2
0
        protected virtual IAudienceStateDeleted Map(IDeleteAudience c)
        {
            var stateEventId        = new AudienceStateEventId(c.ClientId, c.Version);
            IAudienceStateDeleted e = NewAudienceStateDeleted(stateEventId);

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


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


            return(e);
        }
Beispiel #3
0
        protected virtual IAudienceStateCreated Map(ICreateAudience c)
        {
            var stateEventId        = new AudienceStateEventId(c.ClientId, c.Version);
            IAudienceStateCreated e = NewAudienceStateCreated(stateEventId);

            e.Name         = c.Name;
            e.Base64Secret = c.Base64Secret;
            e.Active       = c.Active;
            ReflectUtils.CopyPropertyValue("CommandId", c, e);


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


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

            AudienceStateEventId other = obj as AudienceStateEventId;

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

            return(true &&
                   Object.Equals(this.ClientId, other.ClientId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Beispiel #5
0
 public AudienceStateEventIdDto(AudienceStateEventId val)
 {
     this._value = val;
 }
Beispiel #6
0
 protected AudienceStateEventBase(AudienceStateEventId stateEventId)
 {
     this.StateEventId = stateEventId;
 }
Beispiel #7
0
 public AudienceStateDeleted(AudienceStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #8
0
 public AudienceStateMergePatched(AudienceStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #9
0
 public AudienceStateCreated(AudienceStateEventId stateEventId) : base(stateEventId)
 {
 }
Beispiel #10
0
 private AudienceStateDeleted NewAudienceStateDeleted(AudienceStateEventId stateEventId)
 {
     return(new AudienceStateDeleted(stateEventId));
 }
Beispiel #11
0
 private AudienceStateMergePatched NewAudienceStateMergePatched(AudienceStateEventId stateEventId)
 {
     return(new AudienceStateMergePatched(stateEventId));
 }