LockingPersistenceProvider.BeginCreate Method

Definition

Begins an asynchronous operation to create instance state information in the persistence store.

Overloads

BeginCreate(Object, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to create instance state information in the persistence store using the parameters. This method does not unlock the instance after saving the state information.

BeginCreate(Object, TimeSpan, Boolean, AsyncCallback, Object)

Begins an asynchronous operation to create instance state information in the persistence store using the parameters. This method unlocks the instance after saving the instance state if the value of the unlockInstance parameter is true.

BeginCreate(Object, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to create instance state information in the persistence store using the parameters. This method does not unlock the instance after saving the state information.

public override IAsyncResult BeginCreate (object instance, TimeSpan timeout, AsyncCallback callback, object state);

Parameters

instance
Object

The instance whose state information is saved into the persistence store.

timeout
TimeSpan

The interval in which the operation must be completed without timing out.

callback
AsyncCallback

The delegate that receives the notification when the operation completes.

state
Object

The state information associated with the asynchronous operation.

Returns

The status of an asynchronous operation.

Remarks

This method calls into the BeginCreate method, which takes an additional parameter to determine whether the instance is unlocked. This method passes false as a value for this parameter to the calling method.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

BeginCreate(Object, TimeSpan, Boolean, AsyncCallback, Object)

Begins an asynchronous operation to create instance state information in the persistence store using the parameters. This method unlocks the instance after saving the instance state if the value of the unlockInstance parameter is true.

public abstract IAsyncResult BeginCreate (object instance, TimeSpan timeout, bool unlockInstance, AsyncCallback callback, object state);

Parameters

instance
Object

The instance whose state information is saved into the persistence store.

timeout
TimeSpan

The interval in which the operation must be completed without timing out.

unlockInstance
Boolean

true if the instance must be unlocked in the persistence store; otherwise false.

callback
AsyncCallback

The delegate that receives the notification when the operation completes.

state
Object

The state information associated with the asynchronous operation.

Returns

The status of an asynchronous operation.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1