C# Класс Thinktecture.Tools.Web.Services.CodeGeneration.ExtendedCodeDomTree

This class represents the generated code tree.
This is a customized data structure that is optimized for WSCF code generation purposes. It provides faster access to service contracts, service types, client types, message contracts and data contracts. Furthermore this class provides the common operations for adding new types and substituting one type with another. An instance of this class is handed over to each ICodeDecorator.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
SubstituteType ( string oldType, CodeTypeDeclaration newType ) : void

Substitutes one type by another.

UnwrapCodeDomTree ( ) : CodeNamespace

Gets the modified CodeDom CodeNamespace instance without additional wrappers. This instance can be used with standard code generation APIs to emit the final code.

Приватные методы

Метод Описание
ExtendTypeMembers ( CodeTypeExtension typeExtension ) : void

This methods adds CodeTypeMemberExtension to all CodeTypeMembers in a given type.

ExtendedCodeDomTree ( CodeNamespace codeNamespace, CodeLanguage codeLanguage, Configuration configuration ) : System

Creates a new instance of GeneratedCode class.

This class can only be initialized by CodeFactory. Therefore this constructor is marked as internal.

ParseAndFilterCodeNamespace ( ) : void

This method contains the core implementation for generating the GeneratedCode instance.

This method decorates every type found in codeNamespace with a CodeTypeMemberExtension. And then it sends each type through series of ITypeFilters to figure out whether the type is a service contract, service type, client type, message contract or data contract.

Описание методов

SubstituteType() публичный Метод

Substitutes one type by another.
public SubstituteType ( string oldType, CodeTypeDeclaration newType ) : void
oldType string Name of the type to substitute.
newType System.CodeDom.CodeTypeDeclaration CodeTypeDeclaration of the new type.
Результат void

UnwrapCodeDomTree() публичный Метод

Gets the modified CodeDom CodeNamespace instance without additional wrappers. This instance can be used with standard code generation APIs to emit the final code.
public UnwrapCodeDomTree ( ) : CodeNamespace
Результат System.CodeDom.CodeNamespace