Class CsContainerExtensions
Extension management class that manages dot net models that implement the ICsContainer interface.
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public static class CsContainerExtensions
Methods
| Improve this Doc View SourceFormatCSharpComparisonMembers(CsContainer, MemberComparisonType)
Loads all members from a target model that implements CsContainer and returns all members and the comparison hash code for each member.
Declaration
public static IReadOnlyList<KeyValuePair<int, CsMember>> FormatCSharpComparisonMembers(this CsContainer source, MemberComparisonType comparisonType = MemberComparisonType.Base)
Parameters
Type | Name | Description |
---|---|---|
CsContainer | source | The target container to load members from. |
MemberComparisonType | comparisonType | The type of hash code to build for comparision. Default comparison type is set to the base comparison. |
Returns
Type | Description |
---|---|
IReadOnlyList<KeyValuePair<int, CsMember>> | List of all the hash codes and the members for each hashcode. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if the source container is null. |
MissingInterfaceMembers(CsClass)
Creates a list of the interface members that are not implemented in the ICsClass model.
Declaration
public static IReadOnlyList<CsMember> MissingInterfaceMembers(this CsClass source)
Parameters
Type | Name | Description |
---|---|---|
CsClass | source | The source model to check. |
Returns
Type | Description |
---|---|
IReadOnlyList<CsMember> | List of models that are missing or an empty list if there are no missing members. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Throws an argument null exception if the model does not exist. |
MissingInterfaceMembers(CsStructure)
Creates a list of the interface members that are not implemented in the ICsStructure model.
Declaration
public static IReadOnlyList<CsMember> MissingInterfaceMembers(this CsStructure source)
Parameters
Type | Name | Description |
---|---|---|
CsStructure | source | The source model to check. |
Returns
Type | Description |
---|---|
IReadOnlyList<CsMember> | List of models that are missing or an empty list if there are no missing members. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Throws an argument null exception if the model does not exist. |