Επεξεργασία

Κοινή χρήση μέσω


MetadataWorkspace.TryGetItem Method

Definition

Returns an item by using the specified identity and the data model.

Overloads

TryGetItem<T>(String, DataSpace, T)

Returns an item by using the specified identity and the data model.

TryGetItem<T>(String, Boolean, DataSpace, T)

Returns an item by using the specified identity and the data model.

TryGetItem<T>(String, DataSpace, T)

Returns an item by using the specified identity and the data model.

public:
generic <typename T>
 where T : System::Data::Metadata::Edm::GlobalItem bool TryGetItem(System::String ^ identity, System::Data::Metadata::Edm::DataSpace space, [Runtime::InteropServices::Out] T % item);
public bool TryGetItem<T> (string identity, System.Data.Metadata.Edm.DataSpace space, out T item) where T : System.Data.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * System.Data.Metadata.Edm.DataSpace * 'T -> bool (requires 'T :> System.Data.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, space As DataSpace, ByRef item As T) As Boolean

Type Parameters

T

The type returned by the method.

Parameters

identity
String

The conceptual model on which the item is searched.

space
DataSpace

The conceptual model on which the item is searched.

item
T

When this method returns, contains a GlobalItem object. This parameter is passed uninitialized.

Returns

true if there is an item that matches the search criteria; otherwise, false.

Applies to

TryGetItem<T>(String, Boolean, DataSpace, T)

Returns an item by using the specified identity and the data model.

public:
generic <typename T>
 where T : System::Data::Metadata::Edm::GlobalItem bool TryGetItem(System::String ^ identity, bool ignoreCase, System::Data::Metadata::Edm::DataSpace dataSpace, [Runtime::InteropServices::Out] T % item);
public bool TryGetItem<T> (string identity, bool ignoreCase, System.Data.Metadata.Edm.DataSpace dataSpace, out T item) where T : System.Data.Metadata.Edm.GlobalItem;
member this.TryGetItem : string * bool * System.Data.Metadata.Edm.DataSpace * 'T -> bool (requires 'T :> System.Data.Metadata.Edm.GlobalItem)
Public Function TryGetItem(Of T As GlobalItem) (identity As String, ignoreCase As Boolean, dataSpace As DataSpace, ByRef item As T) As Boolean

Type Parameters

T

The type returned by the method.

Parameters

identity
String

The conceptual model on which the item is searched.

ignoreCase
Boolean

true to perform the case-insensitive search; otherwise, false.

dataSpace
DataSpace

The conceptual model on which the item is searched.

item
T

When this method returns, contains a GlobalItem object. This parameter is passed uninitialized.

Returns

true if there is an item that matches the search criteria; otherwise, false.

Applies to