/// <remarks/> public void CreateCircleAsync(CreateCircleRequestType CreateCircle1, object userState) { if ((this.CreateCircleOperationCompleted == null)) { this.CreateCircleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateCircleOperationCompleted); } this.InvokeAsync("CreateCircle", new object[] { CreateCircle1}, this.CreateCircleOperationCompleted, userState); }
private void CreateCircleAsync(string circleName, CreateCircleCompletedEventHandler callback) { //This is M$ style, you will never guess out the meaning of these numbers. ContentInfoType properties = new ContentInfoType(); properties.Domain = 1; properties.HostedDomain = Contact.DefaultHostDomain; properties.Type = 2; properties.MembershipAccess = 0; properties.IsPresenceEnabled = true; properties.RequestMembershipOption = 2; properties.DisplayName = circleName; CreateCircleRequestType request = new CreateCircleRequestType(); request.properties = properties; request.callerInfo = new callerInfoType(); request.callerInfo.PublicDisplayName = NSMessageHandler.Owner.Name == string.Empty ? NSMessageHandler.Owner.Account : NSMessageHandler.Owner.Name; MsnServiceState createCircleObject = new MsnServiceState(PartnerScenario.CircleSave, "CreateCircle", true); SharingServiceBinding sharingService = (SharingServiceBinding)CreateService(MsnServiceType.Sharing, createCircleObject); sharingService.CreateCircleCompleted += delegate(object sender, CreateCircleCompletedEventArgs e) { OnAfterCompleted(new ServiceOperationEventArgs(sharingService, MsnServiceType.Sharing, e)); if (e.Cancelled || NSMessageHandler.MSNTicket == MSNTicket.Empty) return; if (callback != null) { callback(sender, e); } }; RunAsyncMethod(new BeforeRunAsyncMethodEventArgs(sharingService, MsnServiceType.Sharing, createCircleObject, request)); }
/// <remarks/> public void CreateCircleAsync(CreateCircleRequestType CreateCircle1) { this.CreateCircleAsync(CreateCircle1, null); }