コード例 #1
0
 /// <summary>
 /// Gets a collection of <see cref="Rock.Model.Attribute">Attributes</see> by <see cref="Rock.Model.EntityType"/>, EntityQualifierColumn and EntityQualifierValue.
 /// </summary>
 /// <param name="entityTypeId">The entity type identifier.</param>
 /// <param name="entityQualifierColumn">The entity qualifier column.</param>
 /// <param name="entityQualifierValue">The entity qualifier value.</param>
 /// <param name="includeInactive">if set to <c>true</c> [include inactive].</param>
 /// <returns></returns>
 public static List <AttributeCache> GetByEntityTypeQualifier(int?entityTypeId, string entityQualifierColumn, string entityQualifierValue, bool includeInactive)
 {
     return(EntityTypeAttributesCache.GetByEntityTypeQualifier(entityTypeId, entityQualifierColumn, entityQualifierValue, includeInactive).ToList());
 }
コード例 #2
0
        /// <summary>
        /// Gets all <seealso cref="AttributeCache">Attributes</seealso> for a specific entityTypeId.
        /// </summary>
        /// <param name="entityTypeId">The entity type identifier.</param>
        /// <returns></returns>
        internal static AttributeCache[] GetByEntityType(int?entityTypeId)
        {
            var attributeIds = EntityTypeAttributesCache.Get(entityTypeId).AttributeIds;

            return(attributeIds.Select(a => AttributeCache.Get(a)).Where(a => a != null).ToArray());
        }