Class ClassExtensions
Denotes extension methods for Class instances
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.dll
Syntax
public static class ClassExtensions
Methods
| Edit this page View SourceIsAssignableFrom(IClass, IClass)
Determines whether an instance of the provided class can be assigned to this class
Declaration
public static bool IsAssignableFrom(this IClass @class, IClass specificType)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the more abstract class |
IClass | specificType | the more concrete class |
Returns
Type | Description |
---|---|
bool | True, if the provided class is a derived class, otherwise False |
IsContainerReference(IReference)
Determines whethe the given reference is a reference to the container
Declaration
public static bool IsContainerReference(this IReference reference)
Parameters
Type | Name | Description |
---|---|---|
IReference | reference | the reference |
Returns
Type | Description |
---|---|
bool | True, if the reference has an opposite containment reference, otherwise False |
IsRefined(IClass, IAttribute)
Determines whether the given attribute is refined in the scope of this class
Declaration
public static bool IsRefined(this IClass @class, IAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the context class |
IAttribute | attribute | the attribute |
Returns
Type | Description |
---|---|
bool | True, if the attribute is refined, otherwise False |
IsRefined(IClass, IReference)
Determines whether the given reference is refined in the scope of this class
Declaration
public static bool IsRefined(this IClass @class, IReference reference)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the context class |
IReference | reference | the reference |
Returns
Type | Description |
---|---|
bool | True, if the reference is refined otherwise False |
LookupAttribute(IClass, string)
Looks up the attribute with the given name
Declaration
public static IAttribute LookupAttribute(this IClass @class, string name)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the context class |
string | name | the name of the attribute |
Returns
Type | Description |
---|---|
IAttribute | The attribute or null, if no such attribute could be found |
LookupOperation(IClass, string)
Looks up the operation with the given name
Declaration
public static IOperation LookupOperation(this IClass @class, string name)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the context class |
string | name | the name of the operation |
Returns
Type | Description |
---|---|
IOperation | The operation or null, if no such operation was found |
LookupReference(IClass, string)
Looks up the reference with the given name
Declaration
public static IReference LookupReference(this IClass @class, string name)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the context class |
string | name | the name of the reference |
Returns
Type | Description |
---|---|
IReference | The reference or null, if no such reference could be found |
RetrieveIdentifier(IClass)
Retrieves the identifier of the class
Declaration
public static ScopedIdentifier RetrieveIdentifier(this IClass @class)
Parameters
Type | Name | Description |
---|---|---|
IClass | class | the class |
Returns
Type | Description |
---|---|
ScopedIdentifier | A scoped identifier |