ObjectTransactionGetOrCreateExtendedPropertyTProperty Method |
Gets the or creates an object, which is cached for the duration of the transaction.
Namespace:
Aloe.SystemFrameworks.Domain
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic TProperty GetOrCreateExtendedProperty<TProperty>(
string key,
Func<string, TProperty> createFunction
)
Public Function GetOrCreateExtendedProperty(Of TProperty) (
key As String,
createFunction As Func(Of String, TProperty)
) As TProperty
public:
generic<typename TProperty>
TProperty GetOrCreateExtendedProperty(
String^ key,
Func<String^, TProperty>^ createFunction
)
member GetOrCreateExtendedProperty :
key : string *
createFunction : Func<string, 'TProperty> -> 'TProperty
Parameters
- key
- Type: SystemString
The object key. - createFunction
- Type: SystemFuncString, TProperty
The create function, which creates the object, based on its key.
Type Parameters
- TProperty
Return Value
Type:
TPropertyThe found or created object.
Remarks
The function uses
ExtendedProperties to store the objects data.
If the key is not found in the extended properties, the create function is called to create new object.
The new object is cached in the extended properties for further queries.
See Also