Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PersistenceProvider::Load Method (TimeSpan)

 

When implemented in a derived class, loads service state information from the persistence store.

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

public:
virtual Object^ Load(
	TimeSpan timeout
) abstract

Parameters

timeout
Type: System::TimeSpan

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

Return Value

Type: System::Object^

The loaded instance state.

Changes made to the security token in the Load method, if not reverted, stay in effect for the remainder of that message's processing. This means that the service operation's user code, the response message path through the dispatcher, as well as any error paths, run in the changed security context.

The following code demonstrates how to implement the Load method. This code example is part of the DurableServiceFactory SDK sample from the FilePersistenceProviderFactory.cs file. For more information, seethe DurableServiceFactory SDK sample.

public override object Load(TimeSpan timeout)
{
    base.ThrowIfDisposedOrNotOpen();
    return this.factory.Load(this.Id, timeout);
}

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft