C# Class NStub.Core.Utility

This class provides basic utility methods to assist in the code generation perfomed by NStub.
Afficher le fichier Open project: Jedzia/NStub

Méthodes publiques

Méthode Description
GetNamespaceFromFullyQualifiedTypeName ( string name ) : string

Gets the name of the namespace from fully the given qualified type. For example, if System.IO.Stream is provided, System.IO is returned.

GetUnqualifiedTypeName ( string name ) : string

Gets the unqualified name of the given type. For example, if System.IO.Stream is provided, Stream is returned.

ScrubPathOfIllegalCharacters ( string path ) : string

Removes any illegal characters from the given path and replaces them with _.

Method Details

GetNamespaceFromFullyQualifiedTypeName() public static méthode

Gets the name of the namespace from fully the given qualified type. For example, if System.IO.Stream is provided, System.IO is returned.
name is null. name is an empty string.
public static GetNamespaceFromFullyQualifiedTypeName ( string name ) : string
name string The fully qualified name.
Résultat string

GetUnqualifiedTypeName() public static méthode

Gets the unqualified name of the given type. For example, if System.IO.Stream is provided, Stream is returned.
name is null. name is an empty string.
public static GetUnqualifiedTypeName ( string name ) : string
name string The fully qualified name.
Résultat string

ScrubPathOfIllegalCharacters() public static méthode

Removes any illegal characters from the given path and replaces them with _.
path is null. path is an empty string.
public static ScrubPathOfIllegalCharacters ( string path ) : string
path string The path containing illegal characters.
Résultat string