Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
//
// AssemblyInfo.cs
//
// Author:
// Joel W. Reed (joelwreed@gmail.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the System.ServiceModel assembly
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyTitle ("System.Runtime.DurableInstancing.dll")]
[assembly: AssemblyDescription ("System.Runtime.DurableInstancing.dll")]
[assembly: AssemblyConfiguration ("Development version")]
[assembly: AssemblyCompany ("MONO development team")]
[assembly: AssemblyProduct ("MONO CLI")]
[assembly: AssemblyCopyright ("(c) 2003 Various Authors")]
[assembly: AssemblyTrademark ("")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDefaultAlias ("System.Runtime.DurableInstancing.dll")]
[assembly: AssemblyInformationalVersion ("3.5.594.0")]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: AssemblyDelaySign (true)]
#if NET_2_1
[assembly: AssemblyKeyFile ("../silverlight.pub")]
#else
[assembly: AssemblyKeyFile("../winfx.pub")]
#endif

View File

@@ -0,0 +1,3 @@
2010-05-12 Atsushi Enomoto <atsushi@ximian.com>
* AssemblyInfo.cs : initial checkin.

View File

@@ -0,0 +1,9 @@
2010-06-30 Atsushi Enomoto <atsushi@ximian.com>
* System.Runtime.DurableInstancing_test.dll.sources : test sources.
2010-05-12 Atsushi Enomoto <atsushi@ximian.com>
* Makefile, System.Runtime.DurableInstancing.dll.sources:
initial checkin.

View File

@@ -0,0 +1,19 @@
thisdir = class/System.Runtime.DurableInstancing
SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Runtime.DurableInstancing.dll
LIB_MCS_FLAGS = -r:System.dll -r:System.Xml.dll -r:System.Runtime.Serialization.dll -r:System.Core.dll -r:System.Xml.Linq.dll
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = $(RESOURCE_FILES)
VALID_PROFILE := $(filter 2.0 4.0 4.5, $(FRAMEWORK_VERSION))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.Runtime.DurableInstancing.dll
NO_INSTALL = yes
NO_SIGN_ASSEMBLY = yes
endif
include ../../build/library.make

View File

@@ -0,0 +1,19 @@
../../build/common/Consts.cs
../../build/common/Locale.cs
../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
System.Runtime.DurableInstancing/AllEnums.cs
System.Runtime.DurableInstancing/AllExceptions.cs
System.Runtime.DurableInstancing/InstanceHandle.cs
System.Runtime.DurableInstancing/InstanceKey.cs
System.Runtime.DurableInstancing/InstanceKeyView.cs
System.Runtime.DurableInstancing/InstanceLockQueryResult.cs
System.Runtime.DurableInstancing/InstanceOwner.cs
System.Runtime.DurableInstancing/InstanceOwnerQueryResult.cs
System.Runtime.DurableInstancing/InstancePersistenceCommand.cs
System.Runtime.DurableInstancing/InstancePersistenceContext.cs
System.Runtime.DurableInstancing/InstancePersistenceEvent.cs
System.Runtime.DurableInstancing/InstanceStore.cs
System.Runtime.DurableInstancing/InstanceStoreQueryResult.cs
System.Runtime.DurableInstancing/InstanceValue.cs
System.Runtime.DurableInstancing/InstanceView.cs

View File

@@ -0,0 +1,35 @@
using System;
namespace System.Runtime.DurableInstancing
{
public enum InstanceKeyState
{
Unknown,
Associated,
Completed,
}
public enum InstanceState
{
Unknown,
Uninitialized,
Initialized,
Completed,
}
[Flags]
public enum InstanceValueConsistency
{
None = 0,
InDoubt = 1,
Partial = 2
}
[Flags]
public enum InstanceValueOptions
{
None = 0,
Optional = 1,
WriteOnly = 2
}
}

View File

@@ -0,0 +1,125 @@
using System;
using System.Runtime.Serialization;
namespace System.Runtime.DurableInstancing
{
[Serializable]
public class InstanceCollisionException : InstancePersistenceCommandException
{
public InstanceCollisionException () : this ("Instance collision") {}
public InstanceCollisionException (string msg) : base (msg) {}
public InstanceCollisionException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceCollisionException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceCompleteException : InstancePersistenceCommandException
{
public InstanceCompleteException () : this ("Instance has completed") {}
public InstanceCompleteException (string msg) : base (msg) {}
public InstanceCompleteException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceCompleteException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceHandleConflictException : InstancePersistenceCommandException
{
public InstanceHandleConflictException () : this ("Instance handle conflict") {}
public InstanceHandleConflictException (string msg) : base (msg) {}
public InstanceHandleConflictException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceHandleConflictException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceKeyCompleteException : InstancePersistenceCommandException
{
public InstanceKeyCompleteException () : this ("Instance key completed") {}
public InstanceKeyCompleteException (string msg) : base (msg) {}
public InstanceKeyCompleteException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceKeyCompleteException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceKeyNotReadyException : InstancePersistenceCommandException
{
public InstanceKeyNotReadyException () : this ("Instance key is not ready") {}
public InstanceKeyNotReadyException (string msg) : base (msg) {}
public InstanceKeyNotReadyException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceKeyNotReadyException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceLockedException : InstancePersistenceCommandException
{
public InstanceLockedException () : this ("Instance is locked") {}
public InstanceLockedException (string msg) : base (msg) {}
public InstanceLockedException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceLockedException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceLockLostException : InstancePersistenceCommandException
{
public InstanceLockLostException () : this ("Instance lock is lost") {}
public InstanceLockLostException (string msg) : base (msg) {}
public InstanceLockLostException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceLockLostException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceNotReadyException : InstancePersistenceCommandException
{
public InstanceNotReadyException () : this ("Instance key is not ready") {}
public InstanceNotReadyException (string msg) : base (msg) {}
public InstanceNotReadyException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceNotReadyException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceKeyCollisionException : InstancePersistenceCommandException
{
public InstanceKeyCollisionException () : this ("Instance key collision") {}
public InstanceKeyCollisionException (string msg) : base (msg) {}
public InstanceKeyCollisionException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceKeyCollisionException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstanceOwnerException : InstancePersistenceException
{
public InstanceOwnerException () : this ("Instance owner error") {}
public InstanceOwnerException (string msg) : base (msg) {}
public InstanceOwnerException (string msg, Exception inner) : base (msg, inner) {}
protected InstanceOwnerException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstancePersistenceCommandException : InstancePersistenceException
{
public InstancePersistenceCommandException () : this ("Instance persistence command error") {}
public InstancePersistenceCommandException (string msg) : base (msg) {}
public InstancePersistenceCommandException (string msg, Exception inner) : base (msg, inner) {}
protected InstancePersistenceCommandException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
[Serializable]
public class InstancePersistenceException : Exception
{
public InstancePersistenceException () : this ("Instance persistence error") {}
public InstancePersistenceException (string msg) : base (msg) {}
public InstancePersistenceException (string msg, Exception inner) : base (msg, inner) {}
protected InstancePersistenceException (SerializationInfo info, StreamingContext context) :
base (info, context) {}
}
}

View File

@@ -0,0 +1,15 @@
2010-06-30 Atsushi Enomoto <atsushi@ximian.com>
* InstancePersistenceEvent.cs, InstancePersistenceContext.cs,
InstanceStore.cs, InstanceView.cs, InstanceValue.cs : some hack.
2010-05-12 Atsushi Enomoto <atsushi@ximian.com>
* AllEnums.cs InstanceLockQueryResult.cs InstanceStore.cs
AllExceptions.cs InstanceOwner.cs InstanceStoreQueryResult.cs
InstanceOwnerQueryResult.cs InstanceValue.cs
InstanceHandle.cs InstancePersistenceCommand.cs InstanceView.cs
InstanceKey.cs InstancePersistenceContext.cs
InstanceKeyView.cs InstancePersistenceEvent.cs :
initial checkin (stubs).

View File

@@ -0,0 +1,19 @@
using System;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceHandle
{
internal InstanceHandle (bool isValid)
{
IsValid = isValid;
}
public bool IsValid { get; private set; }
public void Free ()
{
throw new NotImplementedException ();
}
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public class InstanceKey
{
static InstanceKey ()
{
InvalidKey = new InstanceKey ();
}
public static InstanceKey InvalidKey { get; private set; }
InstanceKey ()
{
}
public InstanceKey (Guid value)
: this (value, new Dictionary<XName, InstanceValue> ())
{
}
public InstanceKey (Guid value, IDictionary<XName, InstanceValue> metadata)
{
}
public bool IsValid {
get { return this == InvalidKey; }
}
public IDictionary<XName, InstanceValue> Metadata { get; private set; }
public Guid Value { get; private set; }
public override bool Equals (object obj)
{
var o = obj as InstanceKey;
return o != null && Value == o.Value;
}
public override int GetHashCode ()
{
return Value.GetHashCode ();
}
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceKeyView
{
internal InstanceKeyView (Guid instanceKey)
{
InstanceKey = instanceKey;
}
public Guid InstanceKey { get; private set; }
public IDictionary<XName, InstanceValue> InstanceKeyMetadata { get; internal set; }
public InstanceValueConsistency InstanceKeyMetadataConsistency { get; internal set; }
public InstanceKeyState InstanceKeyState { get; internal set; }
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceLockQueryResult : InstanceStoreQueryResult
{
public InstanceLockQueryResult ()
: this (new Dictionary<Guid, Guid> ())
{
}
public InstanceLockQueryResult (IDictionary<Guid, Guid> instanceOwnerIds)
{
if (instanceOwnerIds == null)
throw new ArgumentNullException ("instanceOwnerIds");
InstanceOwnerIds = instanceOwnerIds;
}
public InstanceLockQueryResult (Guid instanceId, Guid instanceOwnerId)
: this ()
{
InstanceOwnerIds [instanceId] = instanceOwnerId;
}
public IDictionary<Guid, Guid> InstanceOwnerIds { get; private set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceOwner
{
internal InstanceOwner (Guid ownerId)
{
InstanceOwnerId = ownerId;
}
public Guid InstanceOwnerId { get; private set; }
}
}

View File

@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceOwnerQueryResult : InstanceStoreQueryResult
{
public InstanceOwnerQueryResult ()
: this (new Dictionary<Guid, IDictionary<XName, InstanceValue>> ())
{
}
public InstanceOwnerQueryResult (IDictionary<Guid, IDictionary<XName, InstanceValue>> instanceOwners)
{
if (instanceOwners == null)
throw new ArgumentNullException ("instanceOwners");
InstanceOwners = instanceOwners;
}
public InstanceOwnerQueryResult (Guid instanceOwnerId, IDictionary<XName, InstanceValue> metadata)
: this ()
{
InstanceOwners [instanceOwnerId] = metadata;
}
public IDictionary<Guid, IDictionary<XName, InstanceValue>> InstanceOwners { get; private set; }
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public abstract class InstancePersistenceCommand
{
protected InstancePersistenceCommand (XName name)
{
if (name == null)
throw new ArgumentNullException ("name");
Name = name;
}
protected internal virtual bool AutomaticallyAcquiringLock {
get { return false; }
}
protected internal virtual bool IsTransactionEnlistmentOptional {
get { return false; }
}
public XName Name { get; private set; }
protected internal virtual void Validate (InstanceView view)
{
throw new NotImplementedException ();
}
}
}

View File

@@ -0,0 +1,146 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public sealed class InstancePersistenceContext
{
internal InstancePersistenceContext (InstanceHandle handle, InstanceView view)
{
if (handle == null)
throw new ArgumentNullException ("handle");
if (view == null)
throw new ArgumentNullException ("view");
InstanceHandle = handle;
InstanceView = view;
}
public InstanceHandle InstanceHandle { get; private set; }
public long InstanceVersion { get { throw new NotImplementedException (); } }
public InstanceView InstanceView { get; private set; }
public Guid LockToken { get { throw new NotImplementedException (); } }
public object UserContext { get { throw new NotImplementedException (); } }
public void AssociatedInstanceKey (Guid key)
{
throw new NotImplementedException ();
}
public void BindAcquiredLock (long instanceVersion)
{
throw new NotImplementedException ();
}
public void BindEvent (InstancePersistenceEvent persistenceEvent)
{
throw new NotImplementedException ();
}
public void BindInstance (Guid instanceId)
{
throw new NotImplementedException ();
}
public void BindInstanceOwner (Guid instanceOwnerId, Guid lockToken)
{
throw new NotImplementedException ();
}
public void BindReclaimedLock (long instanceVersion, TimeSpan timeout)
{
throw new NotImplementedException ();
}
public void CompletedInstance ()
{
throw new NotImplementedException ();
}
public void CompletedInstanceKey (Guid key)
{
throw new NotImplementedException ();
}
public Exception CreateBindReclaimedLockException (long instanceVersion)
{
throw new NotImplementedException ();
}
public void Execute (InstancePersistenceCommand command, TimeSpan timeout)
{
throw new NotImplementedException ();
}
public void LoadedInstance (InstanceState state, IDictionary<XName, InstanceValue> instanceData, IDictionary<XName, InstanceValue> instanceMetadata, IDictionary<Guid, IDictionary<XName, InstanceValue>> associatedInstanceKeyMetadata, IDictionary<Guid, IDictionary<XName, InstanceValue>> completedInstanceKeyMetadata)
{
throw new NotImplementedException ();
}
public void PersistedInstance (IDictionary<XName, InstanceValue> data)
{
throw new NotImplementedException ();
}
public void QueriedInstanceStore (InstanceStoreQueryResult queryResult)
{
throw new NotImplementedException ();
}
public void ReadInstanceKeyMetadata (Guid key, IDictionary<XName, InstanceValue> metadata, bool complete)
{
throw new NotImplementedException ();
}
public void SetCancellationHandler (Action<InstancePersistenceContext> cancellationHandler)
{
throw new NotImplementedException ();
}
public void UnassociatedInstanceKey (Guid key)
{
throw new NotImplementedException ();
}
public void WroteInstanceKeyMetadataValue (Guid key, XName name, InstanceValue value)
{
throw new NotImplementedException ();
}
public void WroteInstanceMetadataValue (XName name, InstanceValue value)
{
throw new NotImplementedException ();
}
public void WroteInstanceOwnerMetadataValue (XName name, InstanceValue value)
{
throw new NotImplementedException ();
}
// async operations
Action<long, TimeSpan> bind_reclaimed_lock_delegate;
public IAsyncResult BeginBindReclaimedLock (long instanceVersion, TimeSpan timeout, AsyncCallback callback, object state)
{
if (bind_reclaimed_lock_delegate == null)
bind_reclaimed_lock_delegate = new Action<long, TimeSpan> (BindReclaimedLock);
return bind_reclaimed_lock_delegate.BeginInvoke (instanceVersion, timeout, callback, state);
}
public void EndBindReclaimedLock (IAsyncResult result)
{
if (bind_reclaimed_lock_delegate == null)
throw new InvalidOperationException ("Async BindReclaimedLock operation has not started");
bind_reclaimed_lock_delegate.EndInvoke (result);
}
Action<InstancePersistenceCommand, TimeSpan> execute_delegate;
public IAsyncResult BeginExecute (InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state)
{
if (execute_delegate == null)
execute_delegate = new Action<InstancePersistenceCommand, TimeSpan> (Execute);
return execute_delegate.BeginInvoke (command, timeout, callback, state);
}
public void EndExecute (IAsyncResult result)
{
if (execute_delegate == null)
throw new InvalidOperationException ("Async Execute operation has not started");
execute_delegate.EndInvoke (result);
}
}
}

View File

@@ -0,0 +1,75 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public abstract class InstancePersistenceEvent : IEquatable<InstancePersistenceEvent>
{
internal InstancePersistenceEvent (XName name)
{
if (name == null)
throw new ArgumentNullException ("name");
Name = name;
}
public XName Name { get; private set; }
public static bool operator == (InstancePersistenceEvent left, InstancePersistenceEvent right)
{
if (Object.ReferenceEquals (left, null))
return Object.ReferenceEquals (right, null);
if (Object.ReferenceEquals (right, null))
return false;
return left.Name == right.Name;
}
public static bool operator != (InstancePersistenceEvent left, InstancePersistenceEvent right)
{
if (Object.ReferenceEquals (left, null))
return !Object.ReferenceEquals (right, null);
if (Object.ReferenceEquals (right, null))
return true;
return left.Name != right.Name;
}
public bool Equals (InstancePersistenceEvent persistenceEvent)
{
var p = persistenceEvent;
return p != null && p.Name == Name;
}
public override bool Equals (object obj)
{
return Equals (obj as InstancePersistenceEvent);
}
public override int GetHashCode ()
{
return Name.GetHashCode ();
}
}
public abstract class InstancePersistenceEvent<T> : InstancePersistenceEvent
where T : InstancePersistenceEvent<T>, new()
{
static InstancePersistenceEvent ()
{
Value = (T) Activator.CreateInstance (typeof (T), new object [0]);
}
public static T Value { get; private set; }
protected InstancePersistenceEvent (XName name)
: base (name)
{
}
}
}

View File

@@ -0,0 +1,131 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public abstract class InstanceStore
{
public InstanceOwner DefaultInstanceOwner { get; set; }
Func<InstanceHandle, InstancePersistenceCommand, TimeSpan, InstanceView> execute_delegate;
public IAsyncResult BeginExecute (InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state)
{
if (execute_delegate == null)
execute_delegate = new Func<InstanceHandle, InstancePersistenceCommand, TimeSpan, InstanceView> (Execute);
return execute_delegate.BeginInvoke (handle, command, timeout, callback, state);
}
Func<InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, bool> try_command_delegate;
protected internal virtual IAsyncResult BeginTryCommand (InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout, AsyncCallback callback, object state)
{
if (try_command_delegate == null)
try_command_delegate = new Func<InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, bool> (TryCommand);
return try_command_delegate.BeginInvoke (context, command, timeout, callback, state);
}
Func<InstanceHandle, TimeSpan, List<InstancePersistenceEvent>> wait_for_events_delegate;
public IAsyncResult BeginWaitForEvents (InstanceHandle handle, TimeSpan timeout, AsyncCallback callback, object state)
{
if (wait_for_events_delegate == null)
wait_for_events_delegate = new Func<InstanceHandle, TimeSpan, List<InstancePersistenceEvent>> (WaitForEvents);
return wait_for_events_delegate.BeginInvoke (handle, timeout, callback, state);
}
public InstanceHandle CreateInstanceHandle ()
{
throw new NotImplementedException ();
}
public InstanceHandle CreateInstanceHandle (Guid instanceId)
{
throw new NotImplementedException ();
}
public InstanceHandle CreateInstanceHandle (InstanceOwner owner)
{
throw new NotImplementedException ();
}
public InstanceHandle CreateInstanceHandle (InstanceOwner owner, Guid instanceId)
{
throw new NotImplementedException ();
}
public InstanceView EndExecute (IAsyncResult result)
{
if (execute_delegate == null)
throw new InvalidOperationException ("Async operation has not started");
return execute_delegate.EndInvoke (result);
}
public bool EndTryCommand (IAsyncResult result)
{
if (try_command_delegate == null)
throw new InvalidOperationException ("Async operation has not started");
return try_command_delegate.EndInvoke (result);
}
public List<InstancePersistenceEvent> EndWaitForEvents (IAsyncResult result)
{
if (wait_for_events_delegate == null)
throw new InvalidOperationException ("Async operation has not started");
return wait_for_events_delegate.EndInvoke (result);
}
public InstanceView Execute (InstanceHandle handle, InstancePersistenceCommand command, TimeSpan timeout)
{
throw new NotImplementedException ();
}
protected InstancePersistenceEvent [] GetEvents (InstanceOwner owner)
{
throw new NotImplementedException ();
}
protected InstanceOwner [] GetInstanceOwners ()
{
throw new NotImplementedException ();
}
protected virtual void OnFreeInstanceHandle (InstanceHandle instanceHandle, object userContext)
{
throw new NotImplementedException ();
}
protected virtual object OnNewInstanceHandle (InstanceHandle instanceHandle)
{
throw new NotImplementedException ();
}
protected void ResetEvent (InstancePersistenceEvent persistenceEvent, InstanceOwner owner)
{
throw new NotImplementedException ();
}
protected void SignalEvent (InstancePersistenceEvent persistenceEvent, InstanceOwner owner)
{
throw new NotImplementedException ();
}
protected internal virtual bool TryCommand (InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout)
{
throw new NotImplementedException ();
}
public List<InstancePersistenceEvent> WaitForEvents (InstanceHandle handle, TimeSpan timeout)
{
throw new NotImplementedException ();
}
}
}

View File

@@ -0,0 +1,6 @@
namespace System.Runtime.DurableInstancing
{
public abstract class InstanceStoreQueryResult
{
}
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml;
using System.Xml.Linq;
namespace System.Runtime.DurableInstancing
{
public sealed class InstanceValue
{
static InstanceValue ()
{
DeletedValue = new InstanceValue (null);
DeletedValue.Value = DeletedValue; // recursion!
}
public static InstanceValue DeletedValue { get; private set; }
public InstanceValue (object value)
: this (value, InstanceValueOptions.None)
{
}
public InstanceValue (object value, InstanceValueOptions options)
{
Value = value;
Options = options;
}
public bool IsDeletedValue {
get { return this == DeletedValue; }
}
public InstanceValueOptions Options { get; private set; }
public object Value { get; private set; }
}
}

Some files were not shown because too many files have changed in this diff Show More