public void Execute()
        {
            var service = ServiceManager.GetProxy();
            var query   = CreateQuery();

            var contactsToUpdate = new List <Entity>();

            EntityCollection results;

            do
            {
                results = service.RetrieveMultiple(query);

                foreach (Entity contact in results.Entities)
                {
                    var resolver = new LayeredEntityAttributeResolver(contact);
                    var fullName = FullNameCalculator.Calculate(resolver);
                    if (fullName != resolver.GetAttributeValue <string>("mspfe_full_name"))
                    {
                        var toUpdate = new Entity("contact", contact.Id);
                        toUpdate["mspfe_full_name"] = fullName;
                        contactsToUpdate.Add(toUpdate);
                    }
                }

                query.PageInfo.PagingCookie = results.PagingCookie;
                query.PageInfo.PageNumber++;
            } while (results.MoreRecords);

            ServiceManager.ParallelProxy.Update(contactsToUpdate);
        }
        public void Execute(IServiceProvider serviceProvider)
        {
            var context = ResolveFromServiceProvider <IPluginExecutionContext>(serviceProvider);

            var person = ResolveAttributeResolver(context);

            var target   = (Entity)context.InputParameters["Target"];
            var fullName = FullNameCalculator.Calculate(person);

            if (person.GetAttributeValue <string>("mspfe_full_name") != fullName)
            {
                target["mspfe_full_name"] = fullName;
            }
        }