C# Class DefaultNamespace.BaseGenerator

显示文件 Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Public Properties

Property Type Description
allowAbbreviations bool
beQuiet bool
defaultAbbreviation TypeNames
lineSeparator string
showAdvancedness bool
showFullNames bool
showInherited bool
showModule bool
showPackage bool
showPrivate bool
showProtected bool
showPublic bool

Public Methods

Method Description
AbbreviateName ( String name, String search, String replace ) : String
AppendClassSignature ( StringBuilder sb, Type c ) : void
AppendClassTrailer ( StringBuilder sb, Type c ) : void
AppendConstructorFooter ( StringBuilder sb ) : void
AppendConstructorHeader ( StringBuilder sb ) : void
AppendConstructorSignature ( StringBuilder sb, ConstructorInfo mi ) : void
AppendFieldFooter ( StringBuilder sb ) : void
AppendFieldHeader ( StringBuilder sb ) : void
AppendFieldSignature ( StringBuilder sb, FieldInfo fi ) : void
AppendMethodFooter ( StringBuilder sb ) : void
AppendMethodHeader ( StringBuilder sb ) : void
AppendMethodSignature ( StringBuilder sb, MethodInfo mi ) : void
AppendPropertyFooter ( StringBuilder sb ) : void
AppendPropertyHeader ( StringBuilder sb ) : void
AppendPropertySignature ( StringBuilder sb, PropertyInfo pi ) : void
GetClassCode ( Type cls ) : String
Show ( FieldInfo field ) : bool
Show ( MemberInfo member ) : bool
Show ( Type type ) : bool

Protected Methods

Method Description
AppendArrayBrackets ( StringBuilder sb, Type cls ) : void
AppendClassModifiers ( StringBuilder sb, Type cls ) : void

Get the modifiers for the class (public, final, abstract).

AppendFieldModifiers ( StringBuilder sb, FieldInfo f ) : void

Retrieves the modifiers on the field (final, static).

AppendFieldType ( StringBuilder sb, FieldInfo f, TypeNames options ) : void

Retrieves the type of the field, checking for an array type

AppendFieldVisibility ( StringBuilder sb, FieldInfo f ) : void

GetVisibility retrieves the visibility of the field (public, etc.).

AppendMethodModifiers ( StringBuilder sb, MethodInfo mi ) : void

GetModifiers returns a string representing the modifiers on a method. The method only applies to an actual method, not a constructor. It

AppendMethodReturnType ( StringBuilder sb, MethodInfo mi, TypeNames options ) : void

Retrieve the return type of the method. note that we can only do so on a normal method, not on a ctor. to detect the difference, we check

AppendMethodVisibility ( StringBuilder sb, MethodBase mtd ) : void
AppendTypeName ( StringBuilder sb, Type cls, TypeNames options ) : void
IsPropertyAccessor ( MemberInfo member ) : bool
IsPropertyAccessor ( MethodBase method ) : bool
IsPropertyGet ( MethodBase method ) : bool
IsPropertySet ( MethodBase method ) : bool
IsVirtual ( MethodBase method ) : bool

Private Methods

Method Description
GetUnderlyingType ( Type cls ) : Type
PrimitiveName ( Type cls ) : String
SortMemberInfo ( MemberInfo members ) : IList

Method Details

AbbreviateName() public static method

public static AbbreviateName ( String name, String search, String replace ) : String
name String
search String
replace String
return String

AppendArrayBrackets() protected method

protected AppendArrayBrackets ( StringBuilder sb, Type cls ) : void
sb StringBuilder
cls System.Type
return void

AppendClassModifiers() protected method

Get the modifiers for the class (public, final, abstract).
protected AppendClassModifiers ( StringBuilder sb, Type cls ) : void
sb StringBuilder
cls System.Type
return void

AppendClassSignature() public abstract method

public abstract AppendClassSignature ( StringBuilder sb, Type c ) : void
sb StringBuilder
c System.Type
return void

AppendClassTrailer() public abstract method

public abstract AppendClassTrailer ( StringBuilder sb, Type c ) : void
sb StringBuilder
c System.Type
return void

AppendConstructorFooter() public abstract method

public abstract AppendConstructorFooter ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendConstructorHeader() public abstract method

public abstract AppendConstructorHeader ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendConstructorSignature() public abstract method

public abstract AppendConstructorSignature ( StringBuilder sb, ConstructorInfo mi ) : void
sb StringBuilder
mi System.Reflection.ConstructorInfo
return void

AppendFieldFooter() public abstract method

public abstract AppendFieldFooter ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendFieldHeader() public abstract method

public abstract AppendFieldHeader ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendFieldModifiers() protected method

Retrieves the modifiers on the field (final, static).
protected AppendFieldModifiers ( StringBuilder sb, FieldInfo f ) : void
sb StringBuilder
f System.Reflection.FieldInfo
return void

AppendFieldSignature() public abstract method

public abstract AppendFieldSignature ( StringBuilder sb, FieldInfo fi ) : void
sb StringBuilder
fi System.Reflection.FieldInfo
return void

AppendFieldType() protected method

Retrieves the type of the field, checking for an array type
protected AppendFieldType ( StringBuilder sb, FieldInfo f, TypeNames options ) : void
sb StringBuilder
f System.Reflection.FieldInfo
options TypeNames
return void

AppendFieldVisibility() protected method

GetVisibility retrieves the visibility of the field (public, etc.).
protected AppendFieldVisibility ( StringBuilder sb, FieldInfo f ) : void
sb StringBuilder
f System.Reflection.FieldInfo
return void

AppendMethodFooter() public abstract method

public abstract AppendMethodFooter ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendMethodHeader() public abstract method

public abstract AppendMethodHeader ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendMethodModifiers() protected method

GetModifiers returns a string representing the modifiers on a method. The method only applies to an actual method, not a constructor. It
protected AppendMethodModifiers ( StringBuilder sb, MethodInfo mi ) : void
sb StringBuilder
mi System.Reflection.MethodInfo
return void

AppendMethodReturnType() protected method

Retrieve the return type of the method. note that we can only do so on a normal method, not on a ctor. to detect the difference, we check
protected AppendMethodReturnType ( StringBuilder sb, MethodInfo mi, TypeNames options ) : void
sb StringBuilder
mi System.Reflection.MethodInfo
options TypeNames
return void

AppendMethodSignature() public abstract method

public abstract AppendMethodSignature ( StringBuilder sb, MethodInfo mi ) : void
sb StringBuilder
mi System.Reflection.MethodInfo
return void

AppendMethodVisibility() protected method

protected AppendMethodVisibility ( StringBuilder sb, MethodBase mtd ) : void
sb StringBuilder
mtd System.Reflection.MethodBase
return void

AppendPropertyFooter() public abstract method

public abstract AppendPropertyFooter ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendPropertyHeader() public abstract method

public abstract AppendPropertyHeader ( StringBuilder sb ) : void
sb StringBuilder
return void

AppendPropertySignature() public abstract method

public abstract AppendPropertySignature ( StringBuilder sb, PropertyInfo pi ) : void
sb StringBuilder
pi System.Reflection.PropertyInfo
return void

AppendTypeName() protected method

protected AppendTypeName ( StringBuilder sb, Type cls, TypeNames options ) : void
sb StringBuilder
cls System.Type
options TypeNames
return void

GetClassCode() public method

public GetClassCode ( Type cls ) : String
cls System.Type
return String

IsPropertyAccessor() protected static method

protected static IsPropertyAccessor ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

IsPropertyAccessor() protected static method

protected static IsPropertyAccessor ( MethodBase method ) : bool
method System.Reflection.MethodBase
return bool

IsPropertyGet() protected static method

protected static IsPropertyGet ( MethodBase method ) : bool
method System.Reflection.MethodBase
return bool

IsPropertySet() protected static method

protected static IsPropertySet ( MethodBase method ) : bool
method System.Reflection.MethodBase
return bool

IsVirtual() protected static method

protected static IsVirtual ( MethodBase method ) : bool
method System.Reflection.MethodBase
return bool

Show() public static method

public static Show ( FieldInfo field ) : bool
field System.Reflection.FieldInfo
return bool

Show() public static method

public static Show ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

Show() public static method

public static Show ( Type type ) : bool
type System.Type
return bool

Property Details

allowAbbreviations public_oe static_oe property

public static bool allowAbbreviations
return bool

beQuiet public_oe static_oe property

public static bool beQuiet
return bool

defaultAbbreviation public_oe static_oe property

public static TypeNames defaultAbbreviation
return TypeNames

lineSeparator public_oe static_oe property

public static string lineSeparator
return string

showAdvancedness public_oe static_oe property

public static bool showAdvancedness
return bool

showFullNames public_oe static_oe property

public static bool showFullNames
return bool

showInherited public_oe static_oe property

public static bool showInherited
return bool

showModule public_oe static_oe property

public static bool showModule
return bool

showPackage public_oe static_oe property

public static bool showPackage
return bool

showPrivate public_oe static_oe property

public static bool showPrivate
return bool

showProtected public_oe static_oe property

public static bool showProtected
return bool

showPublic public_oe static_oe property

public static bool showPublic
return bool