C# Класс Rock.Web.Cache.GlobalAttributesCache

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CacheKey string
GetLegacyMergeFields object>.Dictionary
GetMergeFields object>.Dictionary
GetValue string
GlobalAttributesCache System
Load GlobalAttributesCache
Load2 GlobalAttributesCache
ResolveConfigValue string

Открытые методы

Метод Описание
Flush ( ) : void

Removes Global Attributes from cache

GetOrAddExisting ( string key, Func valueFactory ) : GlobalAttributesCache

Gets the existing or a new item from cache

GetValue ( string key, RockContext rockContext = null ) : string

Gets the Global Attribute values for the specified key.

GetValueFormatted ( string key, RockContext rockContext = null ) : string

Gets the value formatted.

Read ( ) : GlobalAttributesCache

Returns Global Attributes from cache. If they are not already in cache, they will be read and added to cache

Read ( RockContext rockContext ) : GlobalAttributesCache

Reads the specified rock context.

SetValue ( string key, string value, bool saveValue ) : void

Sets the value.

SetValue ( string key, string value, bool saveValue, RockContext rockContext ) : void

Sets the value.

Value ( string key ) : string

Returns the global attribute value for the given key.

Приватные методы

Метод Описание
CacheKey ( ) : string
GetLegacyMergeFields ( Person currentPerson ) : object>.Dictionary

Gets the legacy global attribute values as merge fields for dotLiquid merging. Note: You should use LavaHelper.GetCommonMergeFields instead of this

GetMergeFields ( Person currentPerson ) : object>.Dictionary
GetValue ( string key, Rock.Web.Cache.AttributeCache attributeCache, RockContext rockContext ) : string
GlobalAttributesCache ( ) : System

Use Static Read() method to instantiate a new Global Attributes object

Load ( RockContext rockContext ) : GlobalAttributesCache
Load2 ( RockContext rockContext ) : GlobalAttributesCache
ResolveConfigValue ( string value, object>.Dictionary configValues, Person currentPerson ) : string

Resolves the config value.

Описание методов

Flush() публичный статический Метод

Removes Global Attributes from cache
public static Flush ( ) : void
Результат void

GetOrAddExisting() публичный статический Метод

Gets the existing or a new item from cache
public static GetOrAddExisting ( string key, Func valueFactory ) : GlobalAttributesCache
key string The key.
valueFactory Func The value factory.
Результат GlobalAttributesCache

GetValue() публичный Метод

Gets the Global Attribute values for the specified key.
public GetValue ( string key, RockContext rockContext = null ) : string
key string The key.
rockContext Rock.Data.RockContext The rock context.
Результат string

GetValueFormatted() публичный Метод

Gets the value formatted.
public GetValueFormatted ( string key, RockContext rockContext = null ) : string
key string The key.
rockContext Rock.Data.RockContext The rock context.
Результат string

Read() публичный статический Метод

Returns Global Attributes from cache. If they are not already in cache, they will be read and added to cache
public static Read ( ) : GlobalAttributesCache
Результат GlobalAttributesCache

Read() публичный статический Метод

Reads the specified rock context.
public static Read ( RockContext rockContext ) : GlobalAttributesCache
rockContext Rock.Data.RockContext The rock context.
Результат GlobalAttributesCache

SetValue() публичный Метод

Sets the value.
public SetValue ( string key, string value, bool saveValue ) : void
key string The key.
value string The value.
saveValue bool if set to true [save value].
Результат void

SetValue() публичный Метод

Sets the value.
public SetValue ( string key, string value, bool saveValue, RockContext rockContext ) : void
key string The key.
value string The value.
saveValue bool if set to true [save value].
rockContext Rock.Data.RockContext The rock context.
Результат void

Value() публичный статический Метод

Returns the global attribute value for the given key.
public static Value ( string key ) : string
key string
Результат string