IT Portal Contacts Get

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ServiceModel;

using DemoItPortal.ItPortalService;

namespace DemoItPortal
{
    class ContactsGet
    {
        public static void Main()
        {
            Console.WriteLine("ContactsGet: Start");

            ItPortalClient client = new ItPortalClient();
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue;
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue;
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).ReceiveTimeout = new TimeSpan(0, 10, 0);

            ContactsGetRequestQuery requestQuery = new ContactsGetRequestQuery();

            ContactsGetResponseBody responseBody = client.ContactsGet(requestQuery);

            foreach (ContactsGetResponseBody_result result in responseBody.data.results)
            {
                Console.WriteLine(string.Join(" ", result.firstName, result.lastName));
            }

            Console.WriteLine("ContactsGet: Finished");
            Console.ReadKey();
        }
    }
}