Exemplo n.º 1
0
        internal BirthdayEventCommandResult OnContactModified(IBirthdayContact birthdayContact, IBirthdaysContainer birthdaysContainer)
        {
            IBirthdayContactInternal birthdayContactInternal = birthdayContact as IBirthdayContactInternal;

            if (birthdayContactInternal == null)
            {
                throw new ArgumentException("Argument must implement IBirthdayContactInternal", "birthdayContact");
            }
            IEnumerable <IBirthdayContact> linkedContacts = birthdaysContainer.Contacts.GetLinkedContacts(birthdayContactInternal.PersonId);

            return(birthdaysContainer.Events.UpdateBirthdaysForLinkedContacts(linkedContacts));
        }
Exemplo n.º 2
0
 internal BirthdayEventCommandResult OnContactAdded(IBirthdayContact birthdayContact, IBirthdaysContainer birthdaysContainer)
 {
     return(birthdaysContainer.Events.CreateBirthdayEventForContact(birthdayContact));
 }
Exemplo n.º 3
0
 internal BirthdayEventCommandResult OnContactDeleted(StoreObjectId birthdayContactStoreObjectId, IBirthdaysContainer birthdaysContainer)
 {
     return(birthdaysContainer.Events.DeleteBirthdayEventForContactId(birthdayContactStoreObjectId));
 }
Exemplo n.º 4
0
 public BirthdayCalendars(IBirthdaysContainer parentScope, IEntityCommandFactory <IBirthdayCalendars, IBirthdayCalendar> commandFactory = null) : base(parentScope, "BirthdayCalendars", commandFactory)
 {
     this.ParentScope = parentScope;
 }