/// <remarks/> public void ManageWLConnectionAsync(ManageWLConnectionRequestType ManageWLConnection1, object userState) { if ((this.ManageWLConnectionOperationCompleted == null)) { this.ManageWLConnectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnManageWLConnectionOperationCompleted); } this.InvokeAsync("ManageWLConnection", new object[] { ManageWLConnection1}, this.ManageWLConnectionOperationCompleted, userState); }
private void ManageWLConnectionAsync(Guid contactGuid, Guid abID, string inviteMessage, bool connection, bool presence, int action, int relType, int relRole, ManageWLConnectionCompletedEventHandler callback) { ManageWLConnectionRequestType wlconnectionRequest = new ManageWLConnectionRequestType(); wlconnectionRequest.contactId = contactGuid.ToString("D"); wlconnectionRequest.connection = connection; wlconnectionRequest.presence = presence; wlconnectionRequest.action = action; wlconnectionRequest.relationshipType = relType; wlconnectionRequest.relationshipRole = relRole; if (!String.IsNullOrEmpty(inviteMessage)) { Annotation anno = new Annotation(); anno.Name = AnnotationNames.MSN_IM_InviteMessage; anno.Value = inviteMessage; wlconnectionRequest.annotations = new Annotation[] { anno }; } if (abID != Guid.Empty) { abHandleType abHandle = new abHandleType(); abHandle.ABId = abID.ToString("D").ToLowerInvariant(); abHandle.Puid = 0; abHandle.Cid = 0; wlconnectionRequest.abHandle = abHandle; } MsnServiceState manageWLConnectionObject = new MsnServiceState(abID == Guid.Empty ? PartnerScenario.ContactSave : PartnerScenario.CircleInvite, "ManageWLConnection", true); ABServiceBinding abServiceBinding = (ABServiceBinding)CreateService(MsnServiceType.AB, manageWLConnectionObject); abServiceBinding.ManageWLConnectionCompleted += delegate(object wlcSender, ManageWLConnectionCompletedEventArgs e) { OnAfterCompleted(new ServiceOperationEventArgs(abServiceBinding, MsnServiceType.AB, e)); if (e.Cancelled || NSMessageHandler.MSNTicket == MSNTicket.Empty) return; if (callback != null) { callback(wlcSender, e); } }; RunAsyncMethod(new BeforeRunAsyncMethodEventArgs(abServiceBinding, MsnServiceType.AB, manageWLConnectionObject, wlconnectionRequest)); }
/// <remarks/> public void ManageWLConnectionAsync(ManageWLConnectionRequestType ManageWLConnection1) { this.ManageWLConnectionAsync(ManageWLConnection1, null); }