C# Class Rhetos.Dsl.ConceptInfoHelper

ファイルを表示 Open project: Rhetos/Rhetos Class Usage Examples

Public Methods

Method Description
GetAllDependencies ( this conceptInfo ) : IEnumerable

Returns a list of concepts that this concept depends on directly or indirectly.

GetDirectDependencies ( this conceptInfo ) : IEnumerable

Returns a list of concepts that this concept directly depends on.

GetErrorDescription ( this ci ) : string

Use only for generating an error details. Returns the concept's description ignoring possible null reference errors.

GetFullDescription ( this ci ) : string

Returns a string that fully describes the concept instance. The string contains concept's type name and all concept's properties.

GetFullDescriptionAsBaseConcept ( this ci, Type baseConceptType ) : string

Returns a string that describes the concept instance cast as a base concept. The string contains base concept's type name and the base concept's properties.

GetKey ( this ci ) : string

Returns a string that uniquely describes the concept instance. The string contains concept's base class type and a list of concept's key properties.

If the concept inherits another concept, the base class type will be used instead of actual concept's type to achieve normalized form. That way, the resulting string can be used in scenarios such as resolving references to other concepts where a reference can be of the base class type, but referencing inherited type.

GetKeyProperties ( this ci ) : string

Returns a string with a dot-separated list of concept's key properties.

GetKeyword ( Type conceptInfoType ) : string

Return value is null if IConceptInfo implementations does not have ConceptKeyword attribute. Such classes are usually used as a base class for other concepts.

GetKeyword ( this ci ) : string

Return value is null if IConceptInfo implementations does not have ConceptKeyword attribute. Such classes are usually used as a base class for other concepts.

GetKeywordOrTypeName ( Type conceptInfoType ) : string
GetKeywordOrTypeName ( this ci ) : string
GetShortDescription ( this ci ) : string
GetUserDescription ( this ci ) : string

Returns a string that describes the concept instance in a user-friendly manner. The string contains concept's keyword and a list of concept's key properties.

This description in not unique because different concepts might have same keyword.

Private Methods

Method Description
AddAllDependencies ( IConceptInfo conceptInfo, ICollection dependencies ) : void
AppendMember ( StringBuilder text, IConceptInfo ci, Rhetos.Dsl.ConceptMember member, bool exceptionOnNullMember ) : void
AppendMembers ( StringBuilder text, IConceptInfo ci, SerializationOptions serializationOptions, bool exceptionOnNullMember = false, Type asBaseConceptType = null ) : void
BaseConceptInfoType ( IConceptInfo ci ) : Type
CreateKey ( IConceptInfo ci ) : string
SafeDelimit ( string text ) : string

Method Details

GetAllDependencies() public static method

Returns a list of concepts that this concept depends on directly or indirectly.
public static GetAllDependencies ( this conceptInfo ) : IEnumerable
conceptInfo this
return IEnumerable

GetDirectDependencies() public static method

Returns a list of concepts that this concept directly depends on.
public static GetDirectDependencies ( this conceptInfo ) : IEnumerable
conceptInfo this
return IEnumerable

GetErrorDescription() public static method

Use only for generating an error details. Returns the concept's description ignoring possible null reference errors.
public static GetErrorDescription ( this ci ) : string
ci this
return string

GetFullDescription() public static method

Returns a string that fully describes the concept instance. The string contains concept's type name and all concept's properties.
public static GetFullDescription ( this ci ) : string
ci this
return string

GetFullDescriptionAsBaseConcept() public static method

Returns a string that describes the concept instance cast as a base concept. The string contains base concept's type name and the base concept's properties.
public static GetFullDescriptionAsBaseConcept ( this ci, Type baseConceptType ) : string
ci this
baseConceptType System.Type
return string

GetKey() public static method

Returns a string that uniquely describes the concept instance. The string contains concept's base class type and a list of concept's key properties.
If the concept inherits another concept, the base class type will be used instead of actual concept's type to achieve normalized form. That way, the resulting string can be used in scenarios such as resolving references to other concepts where a reference can be of the base class type, but referencing inherited type.
public static GetKey ( this ci ) : string
ci this
return string

GetKeyProperties() public static method

Returns a string with a dot-separated list of concept's key properties.
public static GetKeyProperties ( this ci ) : string
ci this
return string

GetKeyword() public static method

Return value is null if IConceptInfo implementations does not have ConceptKeyword attribute. Such classes are usually used as a base class for other concepts.
public static GetKeyword ( Type conceptInfoType ) : string
conceptInfoType System.Type
return string

GetKeyword() public static method

Return value is null if IConceptInfo implementations does not have ConceptKeyword attribute. Such classes are usually used as a base class for other concepts.
public static GetKeyword ( this ci ) : string
ci this
return string

GetKeywordOrTypeName() public static method

public static GetKeywordOrTypeName ( Type conceptInfoType ) : string
conceptInfoType System.Type
return string

GetKeywordOrTypeName() public static method

public static GetKeywordOrTypeName ( this ci ) : string
ci this
return string

GetShortDescription() public static method

public static GetShortDescription ( this ci ) : string
ci this
return string

GetUserDescription() public static method

Returns a string that describes the concept instance in a user-friendly manner. The string contains concept's keyword and a list of concept's key properties.
This description in not unique because different concepts might have same keyword.
public static GetUserDescription ( this ci ) : string
ci this
return string