Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities.DurableInstancing / System / Activities / DurableInstancing / SqlWorkflowInstanceStore.cs / 1305376 / SqlWorkflowInstanceStore.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.Activities.DurableInstancing
{
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Runtime;
using System.Runtime.DurableInstancing;
using System.Transactions;
using System.Xml.Linq;
[Fx.Tag.XamlVisible(false)]
public sealed class SqlWorkflowInstanceStore : InstanceStore
{
internal const string CommonConnectionPoolName = "System.Activities.DurableInstancing.SqlWorkflowInstanceStore";
static readonly TimeSpan defaultConnectionOpenTime = TimeSpan.FromSeconds(15);
static readonly TimeSpan defaultInstancePersistenceEventDetectionPeriod = TimeSpan.FromSeconds(5);
static readonly TimeSpan defaultLockRenewalPeriod = TimeSpan.FromSeconds(30);
static readonly TimeSpan minimumTimeSpanAllowed = TimeSpan.FromSeconds(1);
const string DefaultPromotionName = "System.Activities.InstanceMetadata";
TimeSpan bufferedHostLockRenewalPeriod;
string cachedConnectionString;
string connectionString;
Dictionary, List>> definedPromotions;
bool enqueueRunCommands;
TimeSpan hostLockRenewalPeriod;
InstanceCompletionAction instanceCompletionAction;
InstanceEncodingOption instanceEncodingOption;
InstanceLockedExceptionAction instanceLockedExceptionAction;
TimeSpan instancePersistenceEventDetectionPeriod;
bool isReadOnly;
Action