Beispiel #1
0
        public UserControls.uc_Wm GetWebMethod(string wsKey, string wmKey)
        {
            ContainerItemWebSvc wsItem = _webServiceItems
                                         .Where(x => x.Name == wsKey)
                                         .Single();

            UserControls.uc_Wm wmItem = wsItem.uc_webMethods
                                        .Where(x => x.Key == wmKey)
                                        .Select(x => x.Value)
                                        .Single();

            return(wmItem);
        }
Beispiel #2
0
        public void Populate(drexProcess.WebSvcAsync.Result.RetrieveAsyncResult item)
        {
            UserControls.uc_SourceBrowser ucWebService = new UserControls.uc_SourceBrowser();
            ucWebService.PopulateForm(item.WebSvcResult.WSDL);

            Dictionary<string, UserControls.uc_Wm> ucWebMethods = new Dictionary<string, UserControls.uc_Wm>();
            foreach (var v in item.WebSvcResult.WebSvcMethods) {
                UserControls.uc_Wm ucWebMethod = new UserControls.uc_Wm();
                ucWebMethod.PopulateForm(item.WebSvcResult.SourceURI, v);
                ucWebMethods[v.Name] = ucWebMethod;
            }

            ContainerItemWebSvc wsItem = new ContainerItemWebSvc(item.WebSvcResult.SourceURI, ucWebService, ucWebMethods);

            _webServiceItems.Add(wsItem);
        }
Beispiel #3
0
        public void Populate(drexProcess.WebSvcAsync.Result.RetrieveAsyncResult item)
        {
            UserControls.uc_SourceBrowser ucWebService = new UserControls.uc_SourceBrowser();
            ucWebService.PopulateForm(item.WebSvcResult.WSDL);

            Dictionary <string, UserControls.uc_Wm> ucWebMethods = new Dictionary <string, UserControls.uc_Wm>();

            foreach (var v in item.WebSvcResult.WebSvcMethods)
            {
                UserControls.uc_Wm ucWebMethod = new UserControls.uc_Wm();
                ucWebMethod.PopulateForm(item.WebSvcResult.SourceURI, v);
                ucWebMethods[v.Name] = ucWebMethod;
            }

            ContainerItemWebSvc wsItem = new ContainerItemWebSvc(item.WebSvcResult.SourceURI, ucWebService, ucWebMethods);

            _webServiceItems.Add(wsItem);
        }
Beispiel #4
0
        //returns the previous web service in the list for display reasons
        //returns null if no webservices left
        public UserControls.uc_SourceBrowser RemoveWebService(string key)
        {
            //find the item
            ContainerItemWebSvc wsItem = _webServiceItems
                                         .Where(x => x.Name == key)
                                         .Single();

            int currentIndex = _webServiceItems.IndexOf(wsItem);

            //remove the item
            _webServiceItems.RemoveAt(currentIndex);

            if (currentIndex == 0)
            {
                return(null);
            }

            //return the previous item in the list
            currentIndex = currentIndex - 1;
            return(_webServiceItems[currentIndex].wsControl);
        }