当前位置: 首页>>代码示例>>C#>>正文


C# Description.Binding类代码示例

本文整理汇总了C#中System.Web.Services.Description.Binding的典型用法代码示例。如果您正苦于以下问题:C# Binding类的具体用法?C# Binding怎么用?C# Binding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Binding类属于System.Web.Services.Description命名空间,在下文中一共展示了Binding类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WsdlEndpointConversionContext

		internal WsdlEndpointConversionContext (WsdlContractConversionContext context, ServiceEndpoint endpoint, Port port, WSBinding wsdlBinding)
		{
			this.context = context;
			this.endpoint = endpoint;
			this.port = port;
			this.wsdl_binding = wsdlBinding;
		}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:WsdlEndpointConversionContext.cs

示例2: GetServiceType

        static Type GetServiceType(Binding soapBinding, Assembly assembly)
        {
            foreach (var type in assembly.GetTypes())
            {
                var bindingAttribute = type.GetCustomAttributes(typeof (WebServiceBindingAttribute), false)
                    .Cast<WebServiceBindingAttribute>().SingleOrDefault();
                if (bindingAttribute != null && bindingAttribute.Name == soapBinding.Name)
                    return type;
            }

            return null;

            //var serviceTypes = new List<Type>();

            //// FIXME: Best way to match the service/binding to the implementing type
            ////

            //foreach (var type in assembly.GetTypes())
            //{
            //    var bindingAttributes = type.GetCustomAttributes(typeof (WebServiceBindingAttribute), false);
            //    if (bindingAttributes.Length != 0) serviceTypes.Add(type);
            //}

            //var name = soapBinding.Type.Name;
            //return string.IsNullOrEmpty(name)
            //    ? new Type[0]
            //    : serviceTypes.Where(t => t.Name == name || t.Name.EndsWith(name));
        }
开发者ID:phaufe,项目名称:SoapContextDriver,代码行数:28,代码来源:SchemaBuilder.cs

示例3: CustomPolicyConversionContext

		public CustomPolicyConversionContext (WS.Binding binding, ServiceEndpoint endpoint)
			: base (endpoint)
		{
			this.binding = binding;
			assertions = new PolicyAssertionCollection ();
			binding_elements = ((CustomBinding)endpoint.Binding).Elements;
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:CustomPolicyConversionContext.cs

示例4: GetListOfOperations

        //DONE
        //This method generates a list of operations from a web service description. Returns a list of the
        //webservice's operations on success, and null on failure.
        public string[] GetListOfOperations(string webServiceURL)
        {
            List<string> ListOfOperations = new List<string>();
            WebClient webServiceClient = new WebClient();
            Binding binding = new Binding();

            try
            {
                Stream serviceStream = webServiceClient.OpenRead(webServiceURL + "?wsdl");
                //This gets the WSDL file...
                ServiceDescription webServiceDescription = ServiceDescription.Read(serviceStream);

                //Get a list of operations from the web service description...
                binding = webServiceDescription.Bindings[0];
                OperationBindingCollection operationCollection = binding.Operations;

                foreach (OperationBinding operation in operationCollection)
                {
                    ListOfOperations.Add(operation.Name);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return ListOfOperations.ToArray();
        }
开发者ID:anthony-salutari,项目名称:SOA-Assignment-2,代码行数:31,代码来源:WebServiceCaller.cs

示例5: BuildEntities

        static List<ExplorerItem> BuildEntities(Type serviceType, Binding soapBinding)
        {
            var list = new List<ExplorerItem>();
            foreach (var operation in GetSoapOperations(soapBinding))
                list.Add(CreateExplorerOperation(serviceType, operation));

            return list;
        }
开发者ID:phaufe,项目名称:SoapContextDriver,代码行数:8,代码来源:SchemaBuilder.cs

示例6: TestAddBinding

		public void TestAddBinding ()
		{
			const string bindingName = "testBinding";
			
			Binding b = new Binding ();
			b.Name = bindingName;
			
			bc.Add (b);

			Assert.AreEqual (1, bc.Count);
			Assert.AreEqual (b, bc[bindingName]);
		}
开发者ID:nobled,项目名称:mono,代码行数:12,代码来源:BindingCollectionTest.cs

示例7: FindOperation

        OperationBinding FindOperation(Binding binding, string name)
        {
            foreach (OperationBinding oper in binding.Operations) {
                if (oper.Input.Name != null) {
                    if (oper.Input.Name == name) return oper;
                }
                else
                    if (oper.Name == name) return oper;
            }

            return null;
        }
开发者ID:umabiel,项目名称:WsdlUI,代码行数:12,代码来源:SampleGeneratorWebSvc.cs

示例8: GetServiceType

        private static Type GetServiceType(Binding soapBinding, Assembly assembly)
        {
            foreach (var type in assembly.GetTypes())
            {
                var bindingAttribute = type.GetCustomAttributes(typeof (WebServiceBindingAttribute), false)
                    .Cast<WebServiceBindingAttribute>().SingleOrDefault();
                if (bindingAttribute != null && bindingAttribute.Name == soapBinding.Name)
                    return type;
            }

            return null;
        }
开发者ID:flex87,项目名称:linqpad-soap-driver,代码行数:12,代码来源:SchemaBuilder.cs

示例9: WsdlEndpointConversionContext

 internal WsdlEndpointConversionContext(WsdlContractConversionContext contractContext, ServiceEndpoint endpoint, Binding wsdlBinding, Port wsdlport)
 {
     this.endpoint = endpoint;
     this.wsdlBinding = wsdlBinding;
     this.wsdlPort = wsdlport;
     this.contractContext = contractContext;
     this.wsdlOperationBindings = new Dictionary<OperationDescription, OperationBinding>();
     this.operationDescriptionBindings = new Dictionary<OperationBinding, OperationDescription>();
     this.wsdlMessageBindings = new Dictionary<MessageDescription, MessageBinding>();
     this.messageDescriptionBindings = new Dictionary<MessageBinding, MessageDescription>();
     this.wsdlFaultBindings = new Dictionary<FaultDescription, FaultBinding>();
     this.faultDescriptionBindings = new Dictionary<FaultBinding, FaultDescription>();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:WsdlEndpointConversionContext.cs

示例10: Check

		internal static void Check (ConformanceCheckContext ctx, ConformanceChecker checker, Binding b)
		{
			checker.Check (ctx, b);
			CheckExtensions (ctx, checker, b.Extensions);

			foreach (OperationBinding oper in b.Operations) {
				CheckExtensions (ctx, checker, oper.Extensions);

				foreach (MessageBinding mb in oper.Faults) {
					checker.Check (ctx, mb);
					CheckExtensions (ctx, checker, mb.Extensions);
				}

				checker.Check (ctx, oper.Input);
				CheckExtensions (ctx, checker, oper.Input.Extensions);

				checker.Check (ctx, oper.Output);
				CheckExtensions (ctx, checker, oper.Output.Extensions);
			}
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:20,代码来源:WebServicesInteroperability.cs

示例11: Remove

 /// <include file='doc\ServiceDescription.uex' path='docs/doc[@for="BindingCollection.Remove"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Remove(Binding binding) {
     List.Remove(binding);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ServiceDescription.cs

示例12: Contains

 /// <include file='doc\ServiceDescription.uex' path='docs/doc[@for="BindingCollection.Contains"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public bool Contains(Binding binding) {
     return List.Contains(binding);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ServiceDescription.cs

示例13: IndexOf

 /// <include file='doc\ServiceDescription.uex' path='docs/doc[@for="BindingCollection.IndexOf"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public int IndexOf(Binding binding) {
     return List.IndexOf(binding);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ServiceDescription.cs

示例14: Insert

 /// <include file='doc\ServiceDescription.uex' path='docs/doc[@for="BindingCollection.Insert"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Insert(int index, Binding binding) {
     List.Insert(index, binding);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:ServiceDescription.cs

示例15: MoveToBinding

 void MoveToBinding(Service service, Port port, Binding binding, PortType portType) {
     this.service = service;
     this.port = port;
     this.portType = portType;
     this.binding = binding;
     this.encodedBinding = false;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:7,代码来源:ProtocolImporter.cs


注:本文中的System.Web.Services.Description.Binding类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。