CollectionSynchronizationCallback 委托

定义

表示方法,其可同步跨线程访问的集合。Represent the method that synchronizes a collection for cross-thread access.

public delegate void CollectionSynchronizationCallback(IEnumerable ^ collection, System::Object ^ context, Action ^ accessMethod, bool writeAccess);
public delegate void CollectionSynchronizationCallback(IEnumerable collection, object context, Action accessMethod, bool writeAccess);
type CollectionSynchronizationCallback = delegate of IEnumerable * obj * Action * bool -> unit
Public Delegate Sub CollectionSynchronizationCallback(collection As IEnumerable, context As Object, accessMethod As Action, writeAccess As Boolean)

参数

collection
IEnumerable

要在某线程而不是创建该线程的那个上访问的集合。The collection to access on a thread other than the one that created it.

context
Object

用于同步集合的对象。An object used to synchronize the collection.

accessMethod
Action

执行集合的操作方法的委托。A delegate to the method that performs the operation on the collection.

writeAccess
Boolean

如果 accessMethod 将写入收集,则为true;否则,为 falsetrue if accessMethod writes to the collection; otherwise, false.

继承
CollectionSynchronizationCallback

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于