Beispiel #1
0
        protected AudienceStateDeleted NewAudienceStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new AudienceEventId(_state.ClientId, version);
            var e            = NewAudienceStateDeleted(stateEventId);

            e.CommandId = commandId;

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

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

            e.CommandId = c.CommandId;


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


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

            e.Name         = c.Name;
            e.Base64Secret = c.Base64Secret;
            e.Active       = c.Active;
            e.CommandId    = c.CommandId;


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


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

            AudienceEventId other = obj as AudienceEventId;

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

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