summaryrefslogtreecommitdiff
path: root/docs/Xamarin.Forms.Core/Xamarin.Forms/CollectionSynchronizationCallback.xml
blob: 57857076b8957b6b5bae485ab91cc0f67343e0d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<Type Name="CollectionSynchronizationCallback" FullName="Xamarin.Forms.CollectionSynchronizationCallback">
  <TypeSignature Language="C#" Value="public delegate void CollectionSynchronizationCallback(IEnumerable collection, object context, Action accessMethod, bool writeAccess);" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed CollectionSynchronizationCallback extends System.MulticastDelegate" />
  <AssemblyInfo>
    <AssemblyName>Xamarin.Forms.Core</AssemblyName>
    <AssemblyVersion>1.0.0.0</AssemblyVersion>
    <AssemblyVersion>1.1.0.0</AssemblyVersion>
    <AssemblyVersion>1.2.0.0</AssemblyVersion>
    <AssemblyVersion>1.3.0.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>1.5.0.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Delegate</BaseTypeName>
  </Base>
  <Parameters>
    <Parameter Name="collection" Type="System.Collections.IEnumerable" />
    <Parameter Name="context" Type="System.Object" />
    <Parameter Name="accessMethod" Type="System.Action" />
    <Parameter Name="writeAccess" Type="System.Boolean" />
  </Parameters>
  <ReturnValue>
    <ReturnType>System.Void</ReturnType>
  </ReturnValue>
  <Docs>
    <param name="collection">The collection that was passed to <see cref="M:Xamarin.Forms.BindingBase.EnableCollectionSynchronization" />.</param>
    <param name="context">The context or lock object that was passed to <see cref="M:Xamarin.Forms.BindingBase.EnableCollectionSynchronization" />.</param>
    <param name="accessMethod">An action that reads or modifies <paramref name="collection" />.</param>
    <param name="writeAccess">A value that tells whether write access is required by <paramref name="accessMethod" />.</param>
    <summary>Delegate for callback in <see cref="M:Xamarin.Forms.BindingBase.EnableCollectionSynchronization" />.</summary>
    <remarks>Application developers implement a <see cref="M:Xamarin.Forms.CollectionSynchronizationCallback" /> method and pass it to the <see cref="M:Xamarin.Forms.BindingBase.EnableCollectionSynchronization" /> method to enable correct multithreaded access to <paramref name="collection" />. After synchronization is enabled, the Xamarin.Forms framework passes <paramref name="accessMethod" /> to the application developer's implementation of <see cref="M:Xamarin.Forms.CollectionSynchronizationCallback" /> each time that the framework needs to modify the collection in a multithreaded environment. The application developer's implementation should decide, based on the <paramref name="context" /> object (which may be merely a locking object or the object on which the collection lives) and the value of the <paramref name="writeAccess" /> parameter, whether or not to <c>lock</c> while calling <paramref name="accessMethod" />.</remarks>
  </Docs>
</Type>