DomainObjectExtensionsGetAttributeTObject, TResult Method |
Gets the backing data attribute of the member, specified in the expression. The expression should be in the format 's => s.Member'.
Namespace:
Aloe.SystemFrameworks.Domain.Extensions
Assembly:
Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntaxpublic static IDataAttribute GetAttribute<TObject, TResult>(
this TObject obj,
Expression<Func<TObject, TResult>> memberExpression
)
where TObject : DomainObject
<ExtensionAttribute>
Public Shared Function GetAttribute(Of TObject As DomainObject, TResult) (
obj As TObject,
memberExpression As Expression(Of Func(Of TObject, TResult))
) As IDataAttribute
public:
[ExtensionAttribute]
generic<typename TObject, typename TResult>
where TObject : DomainObject
static IDataAttribute^ GetAttribute(
TObject obj,
Expression<Func<TObject, TResult>^>^ memberExpression
)
[<ExtensionAttribute>]
static member GetAttribute :
obj : 'TObject *
memberExpression : Expression<Func<'TObject, 'TResult>> -> IDataAttribute when 'TObject : DomainObject
Parameters
- obj
- Type: TObject
The object. - memberExpression
- Type: System.Linq.ExpressionsExpressionFuncTObject, TResult
The member expression. It should contain only a single member reference.
Type Parameters
- TObject
- The type of the object.
- TResult
- The type of the result.
Return Value
Type:
IDataAttributeThe backing data attribute of the member, specified in the expression.
Returns null if the data attribute was not found or the expression was not properly formatted.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also