Esempio n. 1
0
        protected virtual IContactMechStateCreated Map(ICreateContactMech c)
        {
            var stateEventId           = new ContactMechEventId(c.ContactMechId, c.Version);
            IContactMechStateCreated e = NewContactMechStateCreated(stateEventId);

            e.ContactMechTypeId = c.ContactMechTypeId;
            e.InfoString        = c.InfoString;
            e.ToName            = c.ToName;
            e.AttnName          = c.AttnName;
            e.Address1          = c.Address1;
            e.Address2          = c.Address2;
            e.Directions        = c.Directions;
            e.City               = c.City;
            e.PostalCode         = c.PostalCode;
            e.PostalCodeExt      = c.PostalCodeExt;
            e.CountryGeoId       = c.CountryGeoId;
            e.StateProvinceGeoId = c.StateProvinceGeoId;
            e.CountyGeoId        = c.CountyGeoId;
            e.PostalCodeGeoId    = c.PostalCodeGeoId;
            e.GeoPointId         = c.GeoPointId;
            e.CountryCode        = c.CountryCode;
            e.AreaCode           = c.AreaCode;
            e.ContactNumber      = c.ContactNumber;
            e.AskForName         = c.AskForName;
            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);
        }
Esempio n. 2
0
        protected ContactMechStateDeleted NewContactMechStateDeleted(long version, string commandId, string requesterId)
        {
            var stateEventId = new ContactMechEventId(_state.ContactMechId, version);
            var e            = NewContactMechStateDeleted(stateEventId);

            e.CommandId = commandId;

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

            return(e);
        }
Esempio n. 3
0
        protected virtual IContactMechStateDeleted Map(IDeleteContactMech c)
        {
            var stateEventId           = new ContactMechEventId(c.ContactMechId, c.Version);
            IContactMechStateDeleted e = NewContactMechStateDeleted(stateEventId);

            e.CommandId = c.CommandId;


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


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

            ContactMechEventId other = obj as ContactMechEventId;

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

            return(true &&
                   Object.Equals(this.ContactMechId, other.ContactMechId) &&
                   Object.Equals(this.Version, other.Version)
                   );
        }
Esempio n. 5
0
 protected ContactMechEventBase(ContactMechEventId stateEventId)
 {
     this.ContactMechEventId = stateEventId;
 }
Esempio n. 6
0
 public ContactMechStateDeleted(ContactMechEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 7
0
 public ContactMechStateMergePatched(ContactMechEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 8
0
 protected ContactMechStateEventBase(ContactMechEventId stateEventId) : base(stateEventId)
 {
 }
Esempio n. 9
0
 private ContactMechStateDeleted NewContactMechStateDeleted(ContactMechEventId stateEventId)
 {
     return(new ContactMechStateDeleted(stateEventId));
 }
Esempio n. 10
0
 private ContactMechStateMergePatched NewContactMechStateMergePatched(ContactMechEventId stateEventId)
 {
     return(new ContactMechStateMergePatched(stateEventId));
 }