Exemple #1
0
        public GetResponse Get([System.Xml.Serialization.XmlElementAttribute("Get", Namespace = "http://profile.live.com/")] GetRequestType Get1)
        {
            object[] results = this.Invoke("Get", new object[] {
                Get1
            });

            return((GetResponse)(results[0]));
        }
Exemple #2
0
 /// <remarks/>
 public void GetAsync(GetRequestType Get1, object userState)
 {
     if ((this.GetOperationCompleted == null))
     {
         this.GetOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOperationCompleted);
     }
     this.InvokeAsync("Get", new object[] {
         Get1
     }, this.GetOperationCompleted, userState);
 }
Exemple #3
0
 /// <remarks/>
 public void GetAsync(GetRequestType Get1)
 {
     this.GetAsync(Get1, null);
 }
Exemple #4
0
 /// <remarks/>
 public void GetAsync(GetRequestType Get1, object userState) {
     if ((this.GetOperationCompleted == null)) {
         this.GetOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOperationCompleted);
     }
     this.InvokeAsync("Get", new object[] {
                 Get1}, this.GetOperationCompleted, userState);
 }
Exemple #5
0
 /// <remarks/>
 public void GetAsync(GetRequestType Get1) {
     this.GetAsync(Get1, null);
 }
        public void Get(long cid, EventHandler<EventArgs> onSuccess, EventHandler<ExceptionEventArgs> onError)
        {
            if (NSMessageHandler.MSNTicket != MSNTicket.Empty)
            {
                MsnServiceState getObject = new MsnServiceState(PartnerScenario.Initial, "Get", true);
                DirectoryService dirService = (DirectoryService)CreateService(MsnServiceType.Directory, getObject);
                dirService.GetCompleted += delegate(object sender, GetCompletedEventArgs e)
                {
                    OnAfterCompleted(new ServiceOperationEventArgs(dirService, MsnServiceType.Directory, e));

                    if (NSMessageHandler.MSNTicket == MSNTicket.Empty)
                        return;

                    if (e.Cancelled)
                        return;

                    if (e.Error != null)
                    {
                        OnServiceOperationFailed(this, new ServiceOperationFailedEventArgs("Get", e.Error));

                        if (onError != null)
                            onError(sender, new ExceptionEventArgs(e.Error));
                        return;
                    }

                    if (e.Result.GetResult != null)
                    {
                        if (e.Result.GetResult.View != null)
                        {
                            FindContactByCidAndFireCoreProfileUpdated(cid, e.Result.GetResult.View);
                        }
                        else
                        {
                            //No profile yet.

                        }

                    }

                    if (onSuccess != null)
                    {
                        onSuccess(sender, e);
                    }
                };

                IdType id = new IdType();
                id.Ns1 = "Cid";
                id.V1 = cid;

                id.Ns2 = "Unspecified";
                id.V2 = null;

                GetRequestType request = new GetRequestType();
                request.request = new GetRequestTypeRequest();
                request.request.ViewName = "WLX.DC.CoreProfile";
                request.request.Id = id;

                RunAsyncMethod(new BeforeRunAsyncMethodEventArgs(dirService, MsnServiceType.Directory, getObject, request));
            }
        }