Class CsTypeExtensions
Extensions class that provides common automation tasks rolled up under standard extension methods that support the CsType model.
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public static class CsTypeExtensions
Methods
| Improve this Doc View SourceInheritsBaseClass(CsType, string, string)
Flag that determines if the type has a base class that is inherited by the type.
Declaration
public static bool InheritsBaseClass(this CsType source, string baseClassName, string baseClassNamespace = null)
Parameters
Type | Name | Description |
---|---|---|
CsType | source | The target type to check for base class implementation. |
string | baseClassName | The name of the base class that is inherited. |
string | baseClassNamespace | Optional parameter for the namespace of the base class. |
Returns
Type | Description |
---|---|
bool | True if inherited or false if not found. |
InheritsInterface(CsType, string, string)
Checks a type definition to see if it inherits a target interface.
Declaration
public static bool InheritsInterface(this CsType source, string interfaceName, string interfaceNamespace = null)
Parameters
Type | Name | Description |
---|---|---|
CsType | source | Type to check for inheritance |
string | interfaceName | The name of the interface |
string | interfaceNamespace | Optional parameter that contains the target namespace for the interface. |
Returns
Type | Description |
---|---|
bool | True if inherited or false if not. |