ServiceDescriptionImporter.GenerateWebReferences Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compiles a collection of Web references to produce a client proxy or a server stub.
public:
static System::Collections::Specialized::StringCollection ^ GenerateWebReferences(System::Web::Services::Description::WebReferenceCollection ^ webReferences, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, System::CodeDom::CodeCompileUnit ^ codeCompileUnit, System::Web::Services::Description::WebReferenceOptions ^ options);
public static System.Collections.Specialized.StringCollection GenerateWebReferences (System.Web.Services.Description.WebReferenceCollection webReferences, System.CodeDom.Compiler.CodeDomProvider codeProvider, System.CodeDom.CodeCompileUnit codeCompileUnit, System.Web.Services.Description.WebReferenceOptions options);
static member GenerateWebReferences : System.Web.Services.Description.WebReferenceCollection * System.CodeDom.Compiler.CodeDomProvider * System.CodeDom.CodeCompileUnit * System.Web.Services.Description.WebReferenceOptions -> System.Collections.Specialized.StringCollection
Public Shared Function GenerateWebReferences (webReferences As WebReferenceCollection, codeProvider As CodeDomProvider, codeCompileUnit As CodeCompileUnit, options As WebReferenceOptions) As StringCollection
Parameters
- webReferences
- WebReferenceCollection
A WebReferenceCollection of Web references to compile.
- codeProvider
- CodeDomProvider
A CodeDomProvider that specifies the code provider.
- codeCompileUnit
- CodeCompileUnit
A CodeCompileUnit that specifies the unit into which code is compiled.
- options
- WebReferenceOptions
A WebReferenceOptions that specifies code generation options.
Returns
A StringCollection of compiler warnings.
Remarks
The services description document collection in each WebReference member of the webReferences
collection should contain only ServiceDescription and XmlSchema objects. This method is unable to interpret DiscoveryDocument objects.
If any of the XML Web service methods in the webReferences
collection share custom parameter or return types, those types are also shared among the proxy methods generated. This is an important advantage over the situation in which each proxy is compiled separately, because in that case such types do not interoperate.