C# Class Rock.Model.EntityTypeService

EntityType POCO Service class
Mostrar archivo Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
Get ( Type type, bool createIfNotFound, PersonAlias personAlias ) : EntityType

Gets the specified Rock.Model.EntityType by the object type. If a match is not found, it can optionally create a new Rock.Model.EntityType for the object.

Get ( string entityName ) : EntityType

Gets an Rock.Model.EntityType by its name / type name.

Get ( string name, bool createIfNotFound ) : EntityType

Gets an Rock.Model.EntityType by its name. If a match is not found, a new Rock.Model.EntityType can optionally be created.

GetEntities ( ) : IEnumerable

Gets an enumerable collection of EntityTypes where the IsEntity flag is set to true.

GetEntityListItems ( ) : List

Returns the EntityTypes as a grouped collection of ListItems with the "Common" flag set to true.

GetGuid ( int id ) : Guid?

Gets the Guid for the EntityType that has the specified Id

GetReportableEntities ( Person currentPerson ) : IEnumerable

Gets an enumerable collection of EntityTypes where the IsEntity flag is set to true, person is Authorized to View, and EntityType isn't HideFromReporting

RegisterEntityTypes ( string physWebAppPath ) : void

Gets a list of ISecured and IEntity entities (all models) that have not yet been registered and adds them as an Rock.Model.EntityType.

Method Details

Get() public method

Gets the specified Rock.Model.EntityType by the object type. If a match is not found, it can optionally create a new Rock.Model.EntityType for the object.
public Get ( Type type, bool createIfNotFound, PersonAlias personAlias ) : EntityType
type System.Type The to search for.
createIfNotFound bool A value that indicates if a new should be created if a match is not found. This value /// will be true if a new should be created if there is not a match; otherwise false/
personAlias PersonAlias A representing the alias of the who is searching for and possibly creating a new EntityType. This value can be /// null if the logged in person is not known (i.e. an anonymous user).
return EntityType

Get() public method

Gets an Rock.Model.EntityType by its name / type name.
public Get ( string entityName ) : EntityType
entityName string A representing the name of the EntityType to search for.
return EntityType

Get() public method

Gets an Rock.Model.EntityType by its name. If a match is not found, a new Rock.Model.EntityType can optionally be created.
public Get ( string name, bool createIfNotFound ) : EntityType
name string A representing the name of the object/entity type to search for.
createIfNotFound bool A value that indicates if a new should be created if a match is not found. This value /// will be true if a new should be created if there is not a match; otherwise false/
return EntityType

GetEntities() public method

Gets an enumerable collection of EntityTypes where the IsEntity flag is set to true.
public GetEntities ( ) : IEnumerable
return IEnumerable

GetEntityListItems() public method

Returns the EntityTypes as a grouped collection of ListItems with the "Common" flag set to true.
public GetEntityListItems ( ) : List
return List

GetGuid() public method

Gets the Guid for the EntityType that has the specified Id
public GetGuid ( int id ) : Guid?
id int The identifier.
return Guid?

GetReportableEntities() public method

Gets an enumerable collection of EntityTypes where the IsEntity flag is set to true, person is Authorized to View, and EntityType isn't HideFromReporting
public GetReportableEntities ( Person currentPerson ) : IEnumerable
currentPerson Person The current person.
return IEnumerable

RegisterEntityTypes() public static method

Gets a list of ISecured and IEntity entities (all models) that have not yet been registered and adds them as an Rock.Model.EntityType.
public static RegisterEntityTypes ( string physWebAppPath ) : void
physWebAppPath string A that represents the physical path of the web application
return void