Exemplo n.º 1
0
        /// <summary>
        /// Converts the value of the specified <see cref="ContactOrder"/> to its equivalent <see cref="String"/> representation.
        /// </summary>
        /// <param name="order">A contact order.</param>
        /// <returns>The <see cref="String"/> equivalent of the value of <paramref name="order"/>.</returns>
        public static string ToString(ContactOrder order)
        {
            switch (order)
            {
            case ContactOrder.First: return("First");

            case ContactOrder.Second: return("Second");

            case ContactOrder.Third: return("Third");

            case ContactOrder.Fourth: return("Fourth");

            default: return(string.Empty);
            }
        }
Exemplo n.º 2
0
        public static Task <IEnumerable <Contact> > GetContactsPageAsync(this FreeAgentClient client, ContactFilter filterBy = ContactFilter.All, ContactOrder orderBy = ContactOrder.Name, int page = 1)
        {
            var view = filterBy.GetMemberValue();
            var sort = orderBy.GetMemberValue();

            return(client.GetOrCreateAsync(c => c.ContactPageList(client.Configuration.CurrentHeader, view, sort, page), r => r.Contacts));
        }