コード例 #1
0
 public MethodProperty(ProxyProperty proxyProperty, MethodInfo method)
     : base(new Type[] {method.ReturnType}, method.Name)
 {
     this.proxyProperty = proxyProperty;
     this.method = method;
     isIn = true;
 }
コード例 #2
0
 public MethodProperty(ProxyProperty proxyProperty, MethodInfo method, object result, object[] paramValues) : base(new System.Type[] { method.ReturnType }, method.Name)
 {
     this.proxyProperty = proxyProperty;
     this.method = method;
     this.isIn = false;
     this.result = result;
     this.paramValues = paramValues;
 }
コード例 #3
0
 public MethodProperty(ProxyProperty proxyProperty, MethodInfo method, object result, object[] paramValues) : base(new System.Type[] { method.ReturnType }, method.Name)
 {
     this.proxyProperty = proxyProperty;
     this.method        = method;
     this.isIn          = false;
     this.result        = result;
     this.paramValues   = paramValues;
 }
コード例 #4
0
        private void FillInvokeTab()
        {
            Assembly assembly1 = wsdl.ProxyAssembly;
            if (assembly1 != null)
            {
                treeMethods.Nodes.Clear();

                foreach (Type type1 in assembly1.GetTypes())
                {
                    if (TreeNodeProperty.IsWebService(type1))
                    {
                        TreeNode node1 = treeMethods.Nodes.Add(type1.Name);
                        HttpWebClientProtocol protocol1 = (HttpWebClientProtocol)Activator.CreateInstance(type1);
                        ProxyProperty property1 = new ProxyProperty(protocol1);
                        property1.RecreateSubtree(null);
                        node1.Tag = property1.TreeNode;
                        protocol1.Credentials = CredentialCache.DefaultCredentials;
                        SoapHttpClientProtocol protocol2 = protocol1 as SoapHttpClientProtocol;
                        if (protocol2 != null)
                        {
                            protocol2.CookieContainer = new CookieContainer();
                            protocol2.AllowAutoRedirect = true;
                        }

                        List<MethodInfo> methods = new List<MethodInfo>(type1.GetMethods());
                        methods.Sort(new Comparison<MethodInfo>(delegate(MethodInfo a, MethodInfo b)
                            {
                                return a.Name.CompareTo(b.Name);
                            }
                        ));

                        foreach (MethodInfo info1 in methods)  //type1.GetMethods())
                        {
                            if (TreeNodeProperty.IsWebMethod(info1))
                            {
                                TreeNode node2 = node1.Nodes.Add(info1.Name);
                                node2.Tag = info1;
                            }
                        }
                    }
                }
                treeMethods.ExpandAll();

                if (treeMethods.Nodes.Count > 0)
                {
                    this.AddIconRecursively(treeMethods.Nodes[0]);
                }
            }
        }
コード例 #5
0
 public MethodProperty(ProxyProperty proxyProperty, MethodInfo method) : base(new System.Type[] { method.ReturnType }, method.Name)
 {
     this.proxyProperty = proxyProperty;
     this.method        = method;
     this.isIn          = true;
 }
コード例 #6
0
 private void FillInvokeTab()
 {
     Assembly proxyAssembly = this.wsdl.ProxyAssembly;
     if (proxyAssembly != null)
     {
         this.treeMethods.Nodes.Clear();
         foreach (System.Type type in proxyAssembly.GetTypes())
         {
             if (TreeNodeProperty.IsWebService(type))
             {
                 TreeNode node = this.treeMethods.Nodes.Add(type.Name);
                 HttpWebClientProtocol proxy = (HttpWebClientProtocol) Activator.CreateInstance(type);
                 ProxyProperty property = new ProxyProperty(proxy);
                 property.RecreateSubtree(null);
                 node.Tag = property.TreeNode;
                 proxy.Credentials = CredentialCache.DefaultCredentials;
                 SoapHttpClientProtocol protocol2 = proxy as SoapHttpClientProtocol;
                 if (protocol2 != null)
                 {
                     protocol2.CookieContainer = new CookieContainer();
                     protocol2.AllowAutoRedirect = true;
                 }
                 foreach (MethodInfo info in type.GetMethods())
                 {
                     if (TreeNodeProperty.IsWebMethod(info))
                     {
                         node.Nodes.Add(info.Name).Tag = info;
                     }
                 }
             }
         }
         this.treeMethods.ExpandAll();
     }
 }