Beispiel #1
0
 /// <remarks/>
 public void ABContactUpdateAsync(ABContactUpdateRequestType ABContactUpdate1, object userState) {
     if ((this.ABContactUpdateOperationCompleted == null)) {
         this.ABContactUpdateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnABContactUpdateOperationCompleted);
     }
     this.InvokeAsync("ABContactUpdate", new object[] {
                 ABContactUpdate1}, this.ABContactUpdateOperationCompleted, userState);
 }
        private void UpdateContactAsync(ContactType contact, string abId, ABContactUpdateCompletedEventHandler callback)
        {
            ABContactUpdateRequestType request = new ABContactUpdateRequestType();
            request.abId = abId;
            request.contacts = new ContactType[] { contact };
            request.options = new ABContactUpdateRequestTypeOptions();
            request.options.EnableAllowListManagementSpecified = true;
            request.options.EnableAllowListManagement = true;

            MsnServiceState ABContactUpdateObject = new MsnServiceState(contact.contactInfo.isMessengerUser ? PartnerScenario.ContactSave : PartnerScenario.Timer, "ABContactUpdate", true);
            ABServiceBinding abService = (ABServiceBinding)CreateService(MsnServiceType.AB, ABContactUpdateObject);
            abService.ABContactUpdateCompleted += delegate(object service, ABContactUpdateCompletedEventArgs e)
            {
                OnAfterCompleted(new ServiceOperationEventArgs(abService, MsnServiceType.AB, e));

                if (e.Cancelled || NSMessageHandler.MSNTicket == MSNTicket.Empty)
                    return;

                if (callback != null)
                {
                    callback(service, e);
                }
            };

            RunAsyncMethod(new BeforeRunAsyncMethodEventArgs(abService, MsnServiceType.AB, ABContactUpdateObject, request));
        }
Beispiel #3
0
 /// <remarks/>
 public void ABContactUpdateAsync(ABContactUpdateRequestType ABContactUpdate1) {
     this.ABContactUpdateAsync(ABContactUpdate1, null);
 }