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


C# Description.ServiceDescriptionCollection类代码示例

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


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

示例1: AddSchemaImports

 private void AddSchemaImports(XmlSchemas schemas, string uri, ServiceDescriptionCollection descriptions)
 {
     int num = 0;
     foreach (XmlSchema schema in schemas)
     {
         if (schema != null)
         {
             if ((schema.Id == null) || (schema.Id.Length == 0))
             {
                 schema.Id = "schema" + ++num.ToString(CultureInfo.InvariantCulture);
             }
             string location = uri + "?schema=" + schema.Id;
             foreach (ServiceDescription description in descriptions)
             {
                 if (description.Types.Schemas.Count == 0)
                 {
                     XmlSchema schema2 = new XmlSchema {
                         TargetNamespace = description.TargetNamespace
                     };
                     schema.ElementFormDefault = XmlSchemaForm.Qualified;
                     this.AddExternal(schema2, schema.TargetNamespace, location);
                     description.Types.Schemas.Add(schema2);
                 }
                 else
                 {
                     this.AddExternal(description.Types.Schemas[0], schema.TargetNamespace, location);
                 }
             }
             this.schemaTable.Add(schema.Id, schema);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:DiscoveryServerType.cs

示例2: CheckConformance

		public static bool CheckConformance (WsiClaims claims, ServiceDescription service, BasicProfileViolationCollection violations)
		{
			ServiceDescriptionCollection col = new ServiceDescriptionCollection ();
			col.Add (service);
			ConformanceCheckContext ctx = new ConformanceCheckContext (col, violations);
			return Check (claims, ctx, col);
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:7,代码来源:WebServicesInteroperability.cs

示例3: NotImplementedException

		void IWsdlImportExtension.BeforeImport (
			ServiceDescriptionCollection wsdlDocuments,
			XmlSchemaSet xmlSchemas,
			ICollection<XmlElement> policy)
		{
			throw new NotImplementedException ();
		}
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:MessageEncodingBindingElementImporter.cs

示例4: ServiceDescriptionImporter

		public ServiceDescriptionImporter ()
		{
			protocolName = String.Empty;
			schemas = new XmlSchemas ();
			serviceDescriptions = new ServiceDescriptionCollection ();
			serviceDescriptions.SetImporter (this);
			style = ServiceDescriptionImportStyle.Client;
		}
开发者ID:nobled,项目名称:mono,代码行数:8,代码来源:ServiceDescriptionImporter.cs

示例5:

		void IWsdlImportExtension.BeforeImport (
			ServiceDescriptionCollection wsdlDocuments,
			XmlSchemaSet xmlSchemas,
			ICollection<XmlElement> policy)
		{
			if (!Enabled)
				return;

			impl.BeforeImport (wsdlDocuments, xmlSchemas, policy);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:10,代码来源:DataContractSerializerMessageContractImporter.cs

示例6: EnumerateDocumentedItems

 internal static void EnumerateDocumentedItems(ServiceDescriptionCollection wsdls, Dictionary<string, string> documentedItems)
 {
     foreach (ServiceDescription wsdl in wsdls)
     {
         foreach (XmlSchema schema in wsdl.Types.Schemas)
         {
             EnumerateDocumentedItems(schema.Items, documentedItems);
         }
     }
 }
开发者ID:anukat2015,项目名称:sones,代码行数:10,代码来源:WsdlUtils.cs

示例7: GetServiceDescriptions

		public static ServiceDescriptionCollection GetServiceDescriptions(DiscoveryClientProtocol protocol)
		{
			ServiceDescriptionCollection services = new ServiceDescriptionCollection();
			protocol.ResolveOneLevel();
		
			foreach (DictionaryEntry entry in protocol.References) {
				ContractReference contractRef = entry.Value as ContractReference;
				if (contractRef != null) {
					services.Add(contractRef.Contract);
				}
			}
			return services;
		}
开发者ID:AdamLStevenson,项目名称:SharpDevelop,代码行数:13,代码来源:ServiceReferenceHelper.cs

示例8: Add

		public void Add(ServiceDescriptionCollection serviceDescriptions)
		{
			if (serviceDescriptions.Count == 0) {
				return;
			}

			webServicesListView.BeginUpdate();
			try {
				foreach (ServiceDescription description in serviceDescriptions) {
					Add(description);
				}
			} finally {
				webServicesListView.EndUpdate();
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:15,代码来源:WebServicesView.cs

示例9: FindRootDescription

        public static ServiceDescription FindRootDescription(ServiceDescriptionCollection wsdls)
        {
            ServiceDescription rootDescription = null;

            //Find the "root" service description
            foreach (System.Web.Services.Description.ServiceDescription description in wsdls)
            {
                if (description.Services.Count > 0)
                {
                    rootDescription = description.Services[0].ServiceDescription;
                    break;
                }
            }
            return rootDescription;
        }
开发者ID:anukat2015,项目名称:sones,代码行数:15,代码来源:WsdlUtils.cs

示例10: AddDocument

 internal static void AddDocument(string path, object document, XmlSchemas schemas, ServiceDescriptionCollection descriptions, StringCollection warnings)
 {
     ServiceDescription serviceDescription = document as ServiceDescription;
     if (serviceDescription != null)
     {
         descriptions.Add(serviceDescription);
     }
     else
     {
         XmlSchema schema = document as XmlSchema;
         if (schema != null)
         {
             schemas.Add(schema);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:ServiceDescriptionImporter.cs

示例11: ServiceDescriptionImporter

 public ServiceDescriptionImporter()
 {
     this.serviceDescriptions = new ServiceDescriptionCollection();
     this.schemas = new XmlSchemas();
     this.allSchemas = new XmlSchemas();
     this.options = System.Xml.Serialization.CodeGenerationOptions.GenerateOldAsync;
     this.abstractSchemas = new XmlSchemas();
     this.concreteSchemas = new XmlSchemas();
     Type[] protocolImporterTypes = WebServicesSection.Current.ProtocolImporterTypes;
     this.importers = new ProtocolImporter[protocolImporterTypes.Length];
     for (int i = 0; i < this.importers.Length; i++)
     {
         this.importers[i] = (ProtocolImporter) Activator.CreateInstance(protocolImporterTypes[i]);
         this.importers[i].Initialize(this);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:ServiceDescriptionImporter.cs

示例12: EnumerateWsdlsAndSchemas

        private void EnumerateWsdlsAndSchemas(ServiceDescriptionCollection wsdls, XmlSchemaSet xsds)
        {
            ServiceDescription rootDescription = WsdlUtils.FindRootDescription(wsdls);

            int num = 0;
            foreach (ServiceDescription description2 in wsdls)
            {
                string key = "wsdl";
                if (description2 != rootDescription)
                {
                    key = key + "=wsdl" + num++;
                }
                queryFromDoc.Add(description2, key);
            }
            int num2 = 0;
            foreach (XmlSchema schema in xsds.Schemas())
            {
                string str2 = "xsd=xsd" + num2++;
                queryFromDoc.Add(schema, str2);
            }
        }
开发者ID:anukat2015,项目名称:sones,代码行数:21,代码来源:LocationOverrideExporter.cs

示例13: AddDocument

 private void AddDocument(string path, object document, XmlSchemas schemas, ServiceDescriptionCollection descriptions)
 {
     ServiceDescription serviceDescription = document as ServiceDescription;
     if (serviceDescription != null)
     {
         if (descriptions[serviceDescription.TargetNamespace] == null)
         {
             descriptions.Add(serviceDescription);
             StringWriter w = new StringWriter();
             XmlTextWriter writer = new XmlTextWriter(w);
             writer.Formatting = Formatting.Indented;
             serviceDescription.Write(writer);
             this.wsdls.Add(w.ToString());
         }
         else
         {
             this.CheckPoint(MessageType.Warning, string.Format(duplicateService, serviceDescription.TargetNamespace, path));
         }
     }
     else
     {
         XmlSchema schema = document as XmlSchema;
         if (schema != null)
         {
             if (schemas[schema.TargetNamespace] == null)
             {
                 schemas.Add(schema);
                 StringWriter writer3 = new StringWriter();
                 XmlTextWriter writer4 = new XmlTextWriter(writer3);
                 writer4.Formatting = Formatting.Indented;
                 schema.Write(writer4);
                 this.xsds.Add(writer3.ToString());
             }
             else
             {
                 this.CheckPoint(MessageType.Warning, string.Format(duplicateSchema, serviceDescription.TargetNamespace, path));
             }
         }
     }
 }
开发者ID:hdougie,项目名称:webservicestudio2,代码行数:40,代码来源:Wsdl.cs

示例14: Reflect

 public void Reflect(Type type, string url)
 {
     this.serviceType = type;
     this.serviceUrl = url;
     this.serviceAttr = WebServiceReflector.GetAttribute(type);
     this.methods = WebMethodReflector.GetMethods(type);
     this.CheckForDuplicateMethods(this.methods);
     this.descriptionsWithPost = this.descriptions;
     this.schemasWithPost = this.schemas;
     if (this.reflectorsWithPost != null)
     {
         this.ReflectInternal(this.reflectorsWithPost);
         this.descriptions = new ServiceDescriptionCollection();
         this.schemas = new XmlSchemas();
     }
     this.ReflectInternal(this.reflectors);
     if ((this.serviceAttr.Description != null) && (this.serviceAttr.Description.Length > 0))
     {
         this.ServiceDescription.Documentation = this.serviceAttr.Description;
     }
     this.ServiceDescription.Types.Schemas.Compile(null, false);
     if (this.ServiceDescriptions.Count > 1)
     {
         this.Schemas.Add(this.ServiceDescription.Types.Schemas);
         this.ServiceDescription.Types.Schemas.Clear();
     }
     else if (this.ServiceDescription.Types.Schemas.Count > 0)
     {
         XmlSchema[] array = new XmlSchema[this.ServiceDescription.Types.Schemas.Count];
         this.ServiceDescription.Types.Schemas.CopyTo(array, 0);
         foreach (XmlSchema schema in array)
         {
             if (XmlSchemas.IsDataSet(schema))
             {
                 this.ServiceDescription.Types.Schemas.Remove(schema);
                 this.Schemas.Add(schema);
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:40,代码来源:ServiceDescriptionReflector.cs

示例15: Generate

		public static void Generate (ArrayList services, ArrayList schemas, string binOper, string protocol)
		{
			ServiceDescriptionCollection descCol = new ServiceDescriptionCollection ();
			foreach (ServiceDescription sd in services)
				descCol.Add (sd);
				
			XmlSchemas schemaCol;

			if (schemas.Count > 0) {
				schemaCol = new XmlSchemas ();
				foreach (XmlSchema sc in schemas)
					schemaCol.Add (sc);
			}
			else
				schemaCol = descCol[0].Types.Schemas;
				
			string oper, bin = null; 
			
			int i = binOper.IndexOf ('/');
			if (i != -1) {
				oper = binOper.Substring (i+1);
				bin = binOper.Substring (0,i);
			}
			else
				oper = binOper;
			
			ConsoleSampleGenerator sg = new ConsoleSampleGenerator (descCol, schemaCol);
			
			string req, resp;
			sg.GenerateMessages (oper, bin, protocol, out req, out resp);
			
			Console.WriteLine ();
			Console.WriteLine ("Sample request message:");
			Console.WriteLine ();
			Console.WriteLine (req);
			Console.WriteLine ();
			Console.WriteLine ("Sample response message:");
			Console.WriteLine ();
			Console.WriteLine (resp);
		}
开发者ID:Zman0169,项目名称:mono,代码行数:40,代码来源:SampleGenerator.cs


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