다음을 통해 공유


Collection<T>.ApplyOnFirstAccess<C> 메서드

Applies the specified action on each element of the specified collection the first time the element is accessed.

네임스페이스:  Microsoft.SqlServer.Management.SqlParser.MetadataProvider
어셈블리:  Microsoft.SqlServer.Management.SqlParser(Microsoft.SqlServer.Management.SqlParser.dll)

구문

‘선언
Public Shared Function ApplyOnFirstAccess(Of C As {Class, T}) ( _
    collection As IMutableMetadataCollection(Of C), _
    action As Action(Of C), _
    actionCompleted As Predicate(Of C) _
) As IMetadataCollection(Of T)
‘사용 방법
Dim collection As IMutableMetadataCollection(Of C)
Dim action As Action(Of C)
Dim actionCompleted As Predicate(Of C)
Dim returnValue As IMetadataCollection(Of T)

returnValue = Collection.ApplyOnFirstAccess(collection, _
    action, actionCompleted)
public static IMetadataCollection<T> ApplyOnFirstAccess<C>(
    IMutableMetadataCollection<C> collection,
    Action<C> action,
    Predicate<C> actionCompleted
)
where C : class, T
public:
generic<typename C>
where C : ref class, T
static IMetadataCollection<T>^ ApplyOnFirstAccess(
    IMutableMetadataCollection<C>^ collection, 
    Action<C>^ action, 
    Predicate<C>^ actionCompleted
)
static member ApplyOnFirstAccess : 
        collection:IMutableMetadataCollection<'C> * 
        action:Action<'C> * 
        actionCompleted:Predicate<'C> -> IMetadataCollection<'T>  when 'C : not struct and 'T
JScript는 제네릭 형식 및 메서드를 지원하지 않습니다.

유형 매개 변수

  • C
    The type of the action.

매개 변수

  • action
    유형: System.Action<C>
    The action to perform on each element in the collection.
  • actionCompleted
    유형: System.Predicate<C>
    A predicate that indicates whether the performed action is completed.

반환 값

유형: Microsoft.SqlServer.Management.SqlParser.Metadata.IMetadataCollection<T>
A wrapper collection that applies an action on each element when it is accessed for the first time.

참고 항목

참조

Collection<T> 클래스

Microsoft.SqlServer.Management.SqlParser.MetadataProvider 네임스페이스