C# Класс CsDebugScript.CodeGen.UserTypes.TemplateUserType

User type that represents template user type. For example: MyType<T>
Наследование: UserType
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CreateFactory UserTypeFactory
ExtractAllBaseClasses List
GetCommonBaseTypesForAllSpecializations string[]
GetGenericTypeConstraintsDictionary string>.Dictionary
GetSymbolTypeTree CsDebugScript.CodeGen.TypeTrees.TypeTree
ParseTemplateArguments IEnumerable

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

Метод Описание
GetSpecializedStringVersion ( bool useFullClassName = true ) : string

Gets the specialized string version of this template user type.

GetSpecializedStringVersion ( string types ) : string

Gets the specialized string version of this template user type based on the specified types.

TemplateUserType ( Symbol symbol, XmlType xmlType, string nameSpace, UserTypeFactory factory ) : System

Initializes a new instance of the TemplateUserType class.

TryGetTemplateArgument ( string typeName, string &argumentName ) : bool

Tries to match the specified type name against template arguments.

UpdateTemplateArguments ( UserTypeFactory factory ) : bool

Updates the template arguments (symbols and user types).

Защищенные методы

Метод Описание
GetBaseClassTypeTree ( TextWriter error, Symbol type, UserTypeFactory factory, int &baseClassOffset ) : TypeTree

Gets the type tree for the base class. If class has multi inheritance, it can return MultiClassInheritanceTypeTree or SingleClassInheritanceWithInterfacesTypeTree.

GetFieldTypeTree ( SymbolField field, UserTypeFactory factory, bool extractingBaseClass, int bitLength ) : TypeTree

Gets the type tree for the specified field.

GetGenericTypeConstraints ( UserTypeFactory factory ) : IEnumerable

Gets the list of generic type constraints.

WriteClassComment ( IndentedWriter output, int indentation ) : void

Writes the class comment on the specified output.

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

Метод Описание
CreateFactory ( UserTypeFactory factory ) : UserTypeFactory

Creates the user type factory based on this template user type.

ExtractAllBaseClasses ( UserType userType ) : List

Extracts all base classes for the specified user type.

GetCommonBaseTypesForAllSpecializations ( UserTypeFactory factory ) : string[]

Gets the common base types for all specializations.

GetGenericTypeConstraintsDictionary ( UserTypeFactory factory ) : string>.Dictionary

Gets the dictionary of generic type constraints per template argument (that has constraint).

GetSymbolTypeTree ( Symbol type, UserTypeFactory factory, int bitLength ) : TypeTree

Gets the type tree for the specified type (symbol).

ParseTemplateArguments ( UserTypeFactory factory, Module module, string symbolName ) : IEnumerable

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

GetBaseClassTypeTree() защищенный Метод

Gets the type tree for the base class. If class has multi inheritance, it can return MultiClassInheritanceTypeTree or SingleClassInheritanceWithInterfacesTypeTree.
protected GetBaseClassTypeTree ( TextWriter error, Symbol type, UserTypeFactory factory, int &baseClassOffset ) : TypeTree
error System.IO.TextWriter The error text writer.
type Symbol The type for which we are getting base class.
factory UserTypeFactory The user type factory.
baseClassOffset int The base class offset.
Результат CsDebugScript.CodeGen.TypeTrees.TypeTree

GetFieldTypeTree() защищенный Метод

Gets the type tree for the specified field.
protected GetFieldTypeTree ( SymbolField field, UserTypeFactory factory, bool extractingBaseClass, int bitLength ) : TypeTree
field SymbolField The field.
factory UserTypeFactory The user type factory.
extractingBaseClass bool if set to true user type field is being generated for getting base class.
bitLength int Number of bits used for this symbol.
Результат CsDebugScript.CodeGen.TypeTrees.TypeTree

GetGenericTypeConstraints() защищенный Метод

Gets the list of generic type constraints.
protected GetGenericTypeConstraints ( UserTypeFactory factory ) : IEnumerable
factory UserTypeFactory The user type factory.
Результат IEnumerable

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

Gets the specialized string version of this template user type.
public GetSpecializedStringVersion ( bool useFullClassName = true ) : string
useFullClassName bool if set to true FullClassName will be used when generating specialized string version. If set to false, ClassName will be used.
Результат string

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

Gets the specialized string version of this template user type based on the specified types.
public GetSpecializedStringVersion ( string types ) : string
types string The types to be used as template arguments.
Результат string

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

Initializes a new instance of the TemplateUserType class.
public TemplateUserType ( Symbol symbol, XmlType xmlType, string nameSpace, UserTypeFactory factory ) : System
symbol Symbol The symbol we are generating this user type from.
xmlType XmlType The XML description of the type.
nameSpace string The namespace it belongs to.
factory UserTypeFactory The user type factory.
Результат System

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

Tries to match the specified type name against template arguments.
public TryGetTemplateArgument ( string typeName, string &argumentName ) : bool
typeName string The type name.
argumentName string The found argument name.
Результат bool

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

Updates the template arguments (symbols and user types).
public UpdateTemplateArguments ( UserTypeFactory factory ) : bool
factory UserTypeFactory The user type factory.
Результат bool

WriteClassComment() защищенный Метод

Writes the class comment on the specified output.
protected WriteClassComment ( IndentedWriter output, int indentation ) : void
output IndentedWriter The output.
indentation int The current indentation.
Результат void