private void AddXmlCommentsToDataContracts(ServiceContractGenerationContext context) { Dictionary <string, CodeTypeMember> codeMembers = CodeDomUtils.EnumerareCodeMembers(context.ServiceContractGenerator.TargetCompileUnit); Dictionary <string, string> documentedItems = new Dictionary <string, string>(); WsdlUtils.EnumerateDocumentedItems(importer.wsdlDocuments, documentedItems); WsdlUtils.EnumerateDocumentedItems(importer.xmlSchemas, documentedItems); foreach (KeyValuePair <string, string> documentedItem in documentedItems) { CodeTypeMember codeMember; if (codeMembers.TryGetValue(documentedItem.Key, out codeMember)) { XmlCommentsImporter.AddXmlComment(codeMember, documentedItem.Value, XmlCommentsImporter.options); } } PostProcessCodeMembers(context, codeMembers.Values); }
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); } }