Share via


ICodeGenerationHost Interface

[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.]

Defines the host object interface for code generation.

Namespace:  Microsoft.ServiceModel.DomainServices.Tools
Assembly:  Microsoft.ServiceModel.DomainServices.Tools (in Microsoft.ServiceModel.DomainServices.Tools.dll)

Syntax

'Declaration
Public Interface ICodeGenerationHost _
    Inherits ILogger
'Usage
Dim instance As ICodeGenerationHost
public interface ICodeGenerationHost : ILogger
public interface class ICodeGenerationHost : ILogger
type ICodeGenerationHost =  
    interface
        interface ILogger
    end
public interface ICodeGenerationHost extends ILogger

The ICodeGenerationHost type exposes the following members.

Properties

  Name Description
Public property HasLoggedErrors Gets a value indicating whether any errors were logged. (Inherited from ILogger.)

Top

Methods

  Name Description
Public method GetMethodShareKind Returns a value that indicates whether a method named methodName exposed by the type specified by typeName from the source project is also visible to the target project.
Public method GetPropertyShareKind Returns a value indicating whether the a property named propertyName exposed by the type specified by typeName from the source project is also visible to the target project.
Public method GetTypeShareKind Returns a value indicating whether the type specified by typeName from the source project is also visible to the target project.
Public method LogError(String) Logs the specified message as an error. (Inherited from ILogger.)
Public method LogError(String, String, String, String, String, Int32, Int32, Int32, Int32) Logs the given message as an error, together with information about the source location.
Public method LogMessage Logs the specified message as information. (Inherited from ILogger.)
Public method LogWarning(String) Logs the specified message as a warning. (Inherited from ILogger.)
Public method LogWarning(String, String, String, String, String, Int32, Int32, Int32, Int32) Logs the given message as a warning, together with information about the source location.

Top

Remarks

Code generators are provided with an object instance that implements this interface. They use this host instance to log errors, warnings and messages back to the environment.

The generators can also use this host instance to determine which types or members are shared by both the source and the target projects. In this context, the "source" project contains the types from which code needs to be generated. The "target" project is the one into which the generated code will be inserted.

This service to determine shared code members is intended to be used by the code generators so they can know which member references or declarations are safe to make from the generated code.

See Also

Reference

Microsoft.ServiceModel.DomainServices.Tools Namespace