IDomainServiceClientCodeGenerator.GenerateCode Method
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Generates the source code for the client classes for the specified domainServiceDescriptions.
Namespace: Microsoft.ServiceModel.DomainServices.Tools
Assembly: Microsoft.ServiceModel.DomainServices.Tools (in Microsoft.ServiceModel.DomainServices.Tools.dll)
Syntax
'Declaration
Function GenerateCode ( _
codeGenerationHost As ICodeGenerationHost, _
domainServiceDescriptions As IEnumerable(Of DomainServiceDescription), _
options As ClientCodeGenerationOptions _
) As String
'Usage
Dim instance As IDomainServiceClientCodeGenerator
Dim codeGenerationHost As ICodeGenerationHost
Dim domainServiceDescriptions As IEnumerable(Of DomainServiceDescription)
Dim options As ClientCodeGenerationOptions
Dim returnValue As String
returnValue = instance.GenerateCode(codeGenerationHost, _
domainServiceDescriptions, options)
string GenerateCode(
ICodeGenerationHost codeGenerationHost,
IEnumerable<DomainServiceDescription> domainServiceDescriptions,
ClientCodeGenerationOptions options
)
String^ GenerateCode(
ICodeGenerationHost^ codeGenerationHost,
IEnumerable<DomainServiceDescription^>^ domainServiceDescriptions,
ClientCodeGenerationOptions^ options
)
abstract GenerateCode :
codeGenerationHost:ICodeGenerationHost *
domainServiceDescriptions:IEnumerable<DomainServiceDescription> *
options:ClientCodeGenerationOptions -> string
function GenerateCode(
codeGenerationHost : ICodeGenerationHost,
domainServiceDescriptions : IEnumerable<DomainServiceDescription>,
options : ClientCodeGenerationOptions
) : String
Parameters
- codeGenerationHost
Type: Microsoft.ServiceModel.DomainServices.Tools.ICodeGenerationHost
The ICodeGenerationHost object hosting code generation.
- domainServiceDescriptions
Type: System.Collections.Generic.IEnumerable<DomainServiceDescription>
The collection of DomainServiceDescription instances for which code generation is required.
- options
Type: Microsoft.ServiceModel.DomainServices.Tools.ClientCodeGenerationOptions
The [Microsoft.ServiceModel.DomainServices.Tools.ClientCodeGenerationOptions] used for the code generation.
Return Value
Type: System.String
The generated code. This value may be empty or nulla null reference (Nothing in Visual Basic) if errors occurred or there was no work to do.
Remarks
Errors and warnings should be reported using the codeGenerationHost.