Επεξεργασία

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


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(System::Object ^ instance, TimeSpan timeout, AsyncCallback ^ callback, System::Object ^ state);
public override IAsyncResult BeginCreate (object instance, TimeSpan timeout, AsyncCallback callback, object state);
override this.BeginCreate : obj * TimeSpan * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginCreate (instance As Object, timeout As TimeSpan, callback As AsyncCallback, state As Object) As IAsyncResult

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

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(System::Object ^ instance, TimeSpan timeout, bool unlockInstance, AsyncCallback ^ callback, System::Object ^ state);
public abstract IAsyncResult BeginCreate (object instance, TimeSpan timeout, bool unlockInstance, AsyncCallback callback, object state);
override this.BeginCreate : obj * TimeSpan * bool * AsyncCallback * obj -> IAsyncResult
Public MustOverride Function BeginCreate (instance As Object, timeout As TimeSpan, unlockInstance As Boolean, callback As AsyncCallback, state As Object) As IAsyncResult

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