e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
75 lines
2.2 KiB
C#
75 lines
2.2 KiB
C#
//------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------
|
|
namespace System.ServiceModel.Persistence
|
|
{
|
|
using System;
|
|
using System.Runtime.Serialization;
|
|
using System.Security.Permissions;
|
|
|
|
[Serializable]
|
|
[Obsolete("The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*")]
|
|
public class InstanceLockException : PersistenceException
|
|
{
|
|
Guid id;
|
|
|
|
public InstanceLockException()
|
|
: this(SR2.GetString(SR2.CannotAcquireLockDefault), null)
|
|
{
|
|
}
|
|
|
|
public InstanceLockException(string message)
|
|
: this(message, null)
|
|
{
|
|
}
|
|
|
|
public InstanceLockException(string message, Exception innerException)
|
|
: base(message, innerException)
|
|
{
|
|
}
|
|
|
|
public InstanceLockException(Guid id)
|
|
: this(SR2.GetString(SR2.CannotAcquireLockSpecific, id))
|
|
{
|
|
this.id = id;
|
|
}
|
|
|
|
public InstanceLockException(Guid id, string message)
|
|
: this(message, null)
|
|
{
|
|
this.id = id;
|
|
}
|
|
|
|
public InstanceLockException(Guid id, string message, Exception innerException)
|
|
: base(message, innerException)
|
|
{
|
|
this.id = id;
|
|
}
|
|
|
|
public InstanceLockException(Guid id, Exception innerException)
|
|
: this(SR2.GetString(SR2.CannotAcquireLockSpecific, id), innerException)
|
|
{
|
|
this.id = id;
|
|
}
|
|
|
|
protected InstanceLockException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
this.id = (Guid) info.GetValue("id", typeof(Guid));
|
|
}
|
|
|
|
public Guid InstanceId
|
|
{
|
|
get { return this.id; }
|
|
}
|
|
|
|
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
|
|
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
|
{
|
|
base.GetObjectData(info, context);
|
|
|
|
info.AddValue("id", id);
|
|
}
|
|
}
|
|
}
|