PersistenceProvider::BeginCreate Method (Object^, TimeSpan, AsyncCallback^, Object^)

 

When implemented in a derived class, represents the beginning of the Create phase. The Create phase occurs when service instance records are first created in the persistence store.

Namespace:   System.ServiceModel.Persistence
Assembly:  System.WorkflowServices (in System.WorkflowServices.dll)

public:
virtual IAsyncResult^ BeginCreate(
	Object^ instance,
	TimeSpan timeout,
	AsyncCallback^ callback,
	Object^ state
) abstract

Parameters

instance
Type: System::Object^

The actual instance state.

timeout
Type: System::TimeSpan

The time period after which the persistence provider aborts this attempt.

callback
Type: System::AsyncCallback^

The method to be called when the operation is completed.

state
Type: System::Object^

A user-provided object that distinguishes this particular asynchronous operation from other operations.

Return Value

Type: System::IAsyncResult^

The state of the BeginCreate asynchronous method call.

The following code demonstrates how to implement the BeginCreate method.

public override IAsyncResult BeginCreate(object instance, TimeSpan timeout, AsyncCallback callback, object state)
{
    base.ThrowIfDisposedOrNotOpen();
    return this.factory.BeginCreate(this.Id, instance, timeout, callback, state);
}

.NET Framework
Available since 3.5
Return to top
Show: