C# Class CsDebugScript.CodeGen.UserTypes.TemplateUserType

User type that represents template user type. For example: MyType<T>
Inheritance: UserType
Show file Open project: southpolenator/WinDbgCs Class Usage Examples

Private Properties

Property Type Description
CreateFactory UserTypeFactory
ExtractAllBaseClasses List
GetCommonBaseTypesForAllSpecializations string[]
GetGenericTypeConstraintsDictionary string>.Dictionary
GetSymbolTypeTree CsDebugScript.CodeGen.TypeTrees.TypeTree
ParseTemplateArguments IEnumerable

Public Methods

Method Description
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).

Protected Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

GetBaseClassTypeTree() protected method

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.
return CsDebugScript.CodeGen.TypeTrees.TypeTree

GetFieldTypeTree() protected method

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.
return CsDebugScript.CodeGen.TypeTrees.TypeTree

GetGenericTypeConstraints() protected method

Gets the list of generic type constraints.
protected GetGenericTypeConstraints ( UserTypeFactory factory ) : IEnumerable
factory UserTypeFactory The user type factory.
return IEnumerable

GetSpecializedStringVersion() public method

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.
return string

GetSpecializedStringVersion() public method

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.
return string

TemplateUserType() public method

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.
return System

TryGetTemplateArgument() public method

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.
return bool

UpdateTemplateArguments() public method

Updates the template arguments (symbols and user types).
public UpdateTemplateArguments ( UserTypeFactory factory ) : bool
factory UserTypeFactory The user type factory.
return bool

WriteClassComment() protected method

Writes the class comment on the specified output.
protected WriteClassComment ( IndentedWriter output, int indentation ) : void
output IndentedWriter The output.
indentation int The current indentation.
return void