C# Class NStub.Core.Utility

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

Public Methods

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

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

GetUnqualifiedTypeName() public static method

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

ScrubPathOfIllegalCharacters() public static method

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