File: System\Activities\DurableInstancing\LockRenewalTask.cs
Project: ndp\cdf\src\NetFx40\System.Activities.DurableInstancing\System.Activities.DurableInstancing.csproj (System.Activities.DurableInstancing)
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//----------------------------------------------------------------
 
namespace System.Activities.DurableInstancing
{
    using System;
 
    class LockRenewalTask : PersistenceTask
    {
        public LockRenewalTask(SqlWorkflowInstanceStore store, SqlWorkflowInstanceStoreLock storeLock, TimeSpan taskInterval, TimeSpan taskTimeout)
            : base(store, storeLock, new ExtendLockCommand(), taskInterval, taskTimeout, true)
        {
        }
 
        protected override void HandleError(Exception exception)
        {
            if (TD.RenewLockSystemErrorIsEnabled())
            {
                TD.RenewLockSystemError();
            }
 
            base.StoreLock.MarkInstanceOwnerLost(base.SurrogateLockOwnerId, false);
        }
    }
}