C# Class NetFx.StringlyTyped.StringlyScopeExtensions

Afficher le fichier Open project: netfx/extensions

Méthodes publiques

Méthode Description
AddType ( this scope, Type type ) : void

Adds the given type to the scope of used types.

AddTypes ( this scope, Assembly assembly ) : void

Adds all the exported (public) types in the given assembly to the scope of used types.

AddTypes ( this scope, IEnumerable types ) : void

Adds the given types to the scope of used types.

GetTypeName ( this scope, Type type ) : string

Gets the safe shortened name of a type that can be used in a given context, considering the already determined IStringlyScope.SafeImports, such as in code generation.

Private Methods

Méthode Description
SafeGenericTypeName ( Type type ) : string

If the type is a generic type, renders all the T's with the generic type definition name. Otherwise, returns just the type full name.

Method Details

AddType() public static méthode

Adds the given type to the scope of used types.
public static AddType ( this scope, Type type ) : void
scope this
type System.Type
Résultat void

AddTypes() public static méthode

Adds all the exported (public) types in the given assembly to the scope of used types.
public static AddTypes ( this scope, Assembly assembly ) : void
scope this
assembly System.Reflection.Assembly
Résultat void

AddTypes() public static méthode

Adds the given types to the scope of used types.
public static AddTypes ( this scope, IEnumerable types ) : void
scope this
types IEnumerable
Résultat void

GetTypeName() public static méthode

Gets the safe shortened name of a type that can be used in a given context, considering the already determined IStringlyScope.SafeImports, such as in code generation.
public static GetTypeName ( this scope, Type type ) : string
scope this
type System.Type
Résultat string