Share via


DataServiceContext.TryGetAnnotation Method

Definition

Overloads

TryGetAnnotation<TFunc,TResult>(Expression<TFunc>, String, String, TResult)

Try to get instance annotations or metadata annotation for property or navigation property. Or try to get metadata annotation for property, navigation property, entitySet, singleton, operation or operation import.

TryGetAnnotation<TFunc,TResult>(Expression<TFunc>, String, TResult)

Try to get instance annotations or metadata annotation for property or navigation property. Or try to get metadata annotation for property, navigation property, entitySet, singleton, operation or operation import.

TryGetAnnotation<TResult>(Object, String, TResult)

Try to get instance annotations or metadata annotation associated with the specified object.

TryGetAnnotation<TResult>(Object, String, String, TResult)

Try to get instance annotations or metadata annotation associated with the specified object.

TryGetAnnotation<TFunc,TResult>(Expression<TFunc>, String, String, TResult)

Try to get instance annotations or metadata annotation for property or navigation property. Or try to get metadata annotation for property, navigation property, entitySet, singleton, operation or operation import.

public virtual bool TryGetAnnotation<TFunc,TResult> (System.Linq.Expressions.Expression<TFunc> expression, string term, string qualifier, out TResult annotation);
abstract member TryGetAnnotation : System.Linq.Expressions.Expression<'Func> * string * string * 'Result -> bool
override this.TryGetAnnotation : System.Linq.Expressions.Expression<'Func> * string * string * 'Result -> bool
Public Overridable Function TryGetAnnotation(Of TFunc, TResult) (expression As Expression(Of TFunc), term As String, qualifier As String, ByRef annotation As TResult) As Boolean

Type Parameters

TFunc

Type of the action or function the expression represents

TResult

CLR Type of annotation

Parameters

expression
Expression<TFunc>

The closure expression to access following items: property navigation property entitySet singleton function action function import action import

term
String

The term name of the annotation

qualifier
String

Qualifier to apply

annotation
TResult

When this method returns, contains the annotation associated with the specified expression and term, if the annotation is found; otherwise, the default value for the type of the annotation parameter.

Returns

true if the annotation is found

Applies to

TryGetAnnotation<TFunc,TResult>(Expression<TFunc>, String, TResult)

Try to get instance annotations or metadata annotation for property or navigation property. Or try to get metadata annotation for property, navigation property, entitySet, singleton, operation or operation import.

public virtual bool TryGetAnnotation<TFunc,TResult> (System.Linq.Expressions.Expression<TFunc> expression, string term, out TResult annotation);
abstract member TryGetAnnotation : System.Linq.Expressions.Expression<'Func> * string * 'Result -> bool
override this.TryGetAnnotation : System.Linq.Expressions.Expression<'Func> * string * 'Result -> bool
Public Overridable Function TryGetAnnotation(Of TFunc, TResult) (expression As Expression(Of TFunc), term As String, ByRef annotation As TResult) As Boolean

Type Parameters

TFunc

Type of the action or function the expression represents

TResult

Type of annotation

Parameters

expression
Expression<TFunc>

The closure expression to access following items: property navigation property entitySet singleton function action function import action import

term
String

The term name of an annotation

annotation
TResult

When this method returns, contains the annotation associated with the specified expression and term, if the annotation is found; otherwise, the default value for the type of the annotation parameter.

Returns

true if the annotation is found

Applies to

TryGetAnnotation<TResult>(Object, String, TResult)

Try to get instance annotations or metadata annotation associated with the specified object.

public virtual bool TryGetAnnotation<TResult> (object source, string term, out TResult annotation);
abstract member TryGetAnnotation : obj * string * 'Result -> bool
override this.TryGetAnnotation : obj * string * 'Result -> bool
Public Overridable Function TryGetAnnotation(Of TResult) (source As Object, term As String, ByRef annotation As TResult) As Boolean

Type Parameters

TResult

CLR type of the annotation

Parameters

source
Object

The annotated object

term
String

The term name of an annotation

annotation
TResult

When this method returns, contains the annotation associated with the specified object and term, if the annotation is found; otherwise, the default value for the type of the annotation parameter.

Returns

true if the annotation is found

Applies to

TryGetAnnotation<TResult>(Object, String, String, TResult)

Try to get instance annotations or metadata annotation associated with the specified object.

public virtual bool TryGetAnnotation<TResult> (object source, string term, string qualifier, out TResult annotation);
abstract member TryGetAnnotation : obj * string * string * 'Result -> bool
override this.TryGetAnnotation : obj * string * string * 'Result -> bool
Public Overridable Function TryGetAnnotation(Of TResult) (source As Object, term As String, qualifier As String, ByRef annotation As TResult) As Boolean

Type Parameters

TResult

CLR type of the annotation

Parameters

source
Object

The annotated object

term
String

The term name of an annotation

qualifier
String

Qualifier to apply

annotation
TResult

When this method returns, contains the annotation associated with the specified object and term, if the annotation is found; otherwise, the default value for the type of the annotation parameter.

Returns

true if the annotation is found

Applies to