You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,74 @@
|
||||
//------------------------------------------------------------
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
//------------------------------------------------------------
|
||||
// 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 InstanceNotFoundException : PersistenceException
|
||||
{
|
||||
Guid id;
|
||||
|
||||
public InstanceNotFoundException()
|
||||
: this(SR2.GetString(SR2.InstanceNotFoundDefault), null)
|
||||
{
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(string message)
|
||||
: this(message, null)
|
||||
{
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(Guid id)
|
||||
: this(SR2.GetString(SR2.InstanceNotFoundSpecific, id))
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(Guid id, string message)
|
||||
: this(message, null)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(Guid id, string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public InstanceNotFoundException(Guid id, Exception innerException)
|
||||
: this(SR2.GetString(SR2.InstanceNotFoundSpecific, id), innerException)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
protected InstanceNotFoundException(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
//------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------
|
||||
namespace System.ServiceModel.Persistence
|
||||
{
|
||||
using System;
|
||||
|
||||
[Obsolete("The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*")]
|
||||
public abstract class LockingPersistenceProvider : PersistenceProvider
|
||||
{
|
||||
protected LockingPersistenceProvider(Guid id)
|
||||
: base(id)
|
||||
{
|
||||
}
|
||||
|
||||
public override IAsyncResult BeginCreate(object instance, TimeSpan timeout, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginCreate(instance, timeout, false, callback, state);
|
||||
}
|
||||
|
||||
public abstract IAsyncResult BeginCreate(object instance, TimeSpan timeout, bool unlockInstance, AsyncCallback callback, object state);
|
||||
|
||||
public override IAsyncResult BeginLoad(TimeSpan timeout, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginLoad(timeout, false, callback, state);
|
||||
}
|
||||
|
||||
public abstract IAsyncResult BeginLoad(TimeSpan timeout, bool lockInstance, AsyncCallback callback, object state);
|
||||
|
||||
public override IAsyncResult BeginLoadIfChanged(TimeSpan timeout, object instanceToken, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginLoadIfChanged(timeout, instanceToken, false, callback, state);
|
||||
}
|
||||
|
||||
public virtual IAsyncResult BeginLoadIfChanged(TimeSpan timeout, object instanceToken, bool lockInstance, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginLoad(timeout, lockInstance, callback, state);
|
||||
}
|
||||
|
||||
public abstract IAsyncResult BeginUnlock(TimeSpan timeout, AsyncCallback callback, object state);
|
||||
|
||||
public override IAsyncResult BeginUpdate(object instance, TimeSpan timeout, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginUpdate(instance, timeout, false, callback, state);
|
||||
}
|
||||
public abstract IAsyncResult BeginUpdate(object instance, TimeSpan timeout, bool unlockInstance, AsyncCallback callback, object state);
|
||||
|
||||
public override object Create(object instance, TimeSpan timeout)
|
||||
{
|
||||
return this.Create(instance, timeout, false);
|
||||
}
|
||||
|
||||
public abstract object Create(object instance, TimeSpan timeout, bool unlockInstance);
|
||||
public abstract void EndUnlock(IAsyncResult result);
|
||||
|
||||
public override object Load(TimeSpan timeout)
|
||||
{
|
||||
return Load(timeout, false);
|
||||
}
|
||||
|
||||
public abstract object Load(TimeSpan timeout, bool lockInstance);
|
||||
|
||||
public override bool LoadIfChanged(TimeSpan timeout, object instanceToken, out object instance)
|
||||
{
|
||||
return this.LoadIfChanged(timeout, instanceToken, false, out instance);
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021")]
|
||||
public virtual bool LoadIfChanged(TimeSpan timeout, object instanceToken, bool lockInstance, out object instance)
|
||||
{
|
||||
instance = this.Load(timeout, lockInstance);
|
||||
return true;
|
||||
}
|
||||
public abstract void Unlock(TimeSpan timeout);
|
||||
|
||||
public override object Update(object instance, TimeSpan timeout)
|
||||
{
|
||||
return this.Update(instance, timeout, false);
|
||||
}
|
||||
public abstract object Update(object instance, TimeSpan timeout, bool unlockInstance);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
//------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------
|
||||
namespace System.ServiceModel.Persistence
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
[Serializable]
|
||||
[Obsolete("The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*")]
|
||||
public class PersistenceException : CommunicationException
|
||||
{
|
||||
public PersistenceException()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public PersistenceException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public PersistenceException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected PersistenceException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
//------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------
|
||||
namespace System.ServiceModel.Persistence
|
||||
{
|
||||
using System;
|
||||
using System.ServiceModel.Channels;
|
||||
|
||||
[Obsolete("The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*")]
|
||||
public abstract class PersistenceProvider : CommunicationObject
|
||||
{
|
||||
internal static readonly TimeSpan DefaultOpenClosePersistenceTimout = TimeSpan.FromSeconds(15);
|
||||
Guid id;
|
||||
|
||||
protected PersistenceProvider(Guid id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Guid Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
public abstract IAsyncResult BeginCreate(object instance, TimeSpan timeout, AsyncCallback callback, object state);
|
||||
|
||||
public abstract IAsyncResult BeginDelete(object instance, TimeSpan timeout, AsyncCallback callback, object state);
|
||||
public abstract IAsyncResult BeginLoad(TimeSpan timeout, AsyncCallback callback, object state);
|
||||
|
||||
public virtual IAsyncResult BeginLoadIfChanged(TimeSpan timeout, object instanceToken, AsyncCallback callback, object state)
|
||||
{
|
||||
return this.BeginLoad(timeout, callback, state);
|
||||
}
|
||||
public abstract IAsyncResult BeginUpdate(object instance, TimeSpan timeout, AsyncCallback callback, object state);
|
||||
|
||||
public abstract object Create(object instance, TimeSpan timeout);
|
||||
|
||||
public abstract void Delete(object instance, TimeSpan timeout);
|
||||
public abstract object EndCreate(IAsyncResult result);
|
||||
public abstract void EndDelete(IAsyncResult result);
|
||||
public abstract object EndLoad(IAsyncResult result);
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021")]
|
||||
public virtual bool EndLoadIfChanged(IAsyncResult result, out object instance)
|
||||
{
|
||||
instance = this.EndLoad(result);
|
||||
return true;
|
||||
}
|
||||
public abstract object EndUpdate(IAsyncResult result);
|
||||
|
||||
public abstract object Load(TimeSpan timeout);
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021")]
|
||||
public virtual bool LoadIfChanged(TimeSpan timeout, object instanceToken, out object instance)
|
||||
{
|
||||
instance = this.Load(timeout);
|
||||
return true;
|
||||
}
|
||||
|
||||
public abstract object Update(object instance, TimeSpan timeout);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------
|
||||
namespace System.ServiceModel.Persistence
|
||||
{
|
||||
using System;
|
||||
using System.ServiceModel.Channels;
|
||||
|
||||
[Obsolete("The WF3 types are deprecated. Instead, please use the new WF4 types from System.Activities.*")]
|
||||
public abstract class PersistenceProviderFactory : CommunicationObject
|
||||
{
|
||||
protected PersistenceProviderFactory()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract PersistenceProvider CreateProvider(Guid id);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user