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,65 @@
//
// AssemblyInfo.cs
//
// Authors:
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004 Novell, Inc (http://www.novell.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.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
// General Information about the System.Transactions assembly
[assembly: AssemblyTitle ("System.Transactions.dll")]
[assembly: AssemblyDescription ("System.Transactions.dll")]
[assembly: AssemblyDefaultAlias ("System.Transactions.dll")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: AllowPartiallyTrustedCallers]
#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: BestFitMapping (false)]

View File

@@ -0,0 +1,17 @@
2008-04-23 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* AssemblyInfo.cs: Added missing attributes
2006-10-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* AssemblyInfo.cs: use the ecma key for this assembly. Patch by Patrick
Earl.
2005-11-05 Kornél Pál <kornelpal@hotmail.com>
* AssemblyInfo.cs: Use Consts.FxVersion as AssemblyVersion and
SatelliteContractVersion.
2005-09-22 Atsushi Enomoto <atsushi@ximian.com>
* AssemblyInfo.cs : new file.

View File

@@ -0,0 +1,13 @@
2009-10-14 Jonathan Pryor <jpryor@novell.com>
* Makefile (VALID_PROFILE): Add monotouch.
2006-03-03 Ankit Jain <jankit@novell.com>
* System.Transactions_test.dll.sources: New.
* Test: New directory.
2005-09-22 Atsushi Enomoto <atsushi@ximian.com>
* Makefile, System.Transactions.dll.sources : new files.

View File

@@ -0,0 +1,16 @@
thisdir = class/System.Transactions
SUBDIRS =
include ../../build/rules.make
MOBILE_PROFILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
LIBRARY = System.Transactions.dll
ifdef MOBILE_PROFILE
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /define:MOBILE
else
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Configuration.dll
endif
TEST_MCS_FLAGS = /nowarn:1595 $(LIB_MCS_FLAGS)
include ../../build/library.make

View File

@@ -0,0 +1,38 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
../../build/common/MonoTODOAttribute.cs
System.Transactions/CommittableTransaction.cs
System.Transactions/Delegates.cs
System.Transactions/DependentCloneOption.cs
System.Transactions/DependentTransaction.cs
System.Transactions/Enlistment.cs
System.Transactions/EnlistmentOptions.cs
System.Transactions/EnterpriseServicesInteropOption.cs
System.Transactions/IDtcTransaction.cs
System.Transactions/IEnlistmentNotification.cs
System.Transactions/IPromotableSinglePhaseNotification.cs
System.Transactions/ISimpleTransactionSuperior.cs
System.Transactions/ISinglePhaseNotification.cs
System.Transactions/ITransactionPromoter.cs
System.Transactions/IsolationLevel.cs
System.Transactions/PreparingEnlistment.cs
System.Transactions/SinglePhaseEnlistment.cs
System.Transactions/SubordinateTransaction.cs
System.Transactions/Transaction.cs
System.Transactions/TransactionAbortedException.cs
System.Transactions/TransactionEventArgs.cs
System.Transactions/TransactionException.cs
System.Transactions/TransactionInDoubtException.cs
System.Transactions/TransactionInformation.cs
System.Transactions/TransactionInterop.cs
System.Transactions/TransactionManager.cs
System.Transactions/TransactionManagerCommunicationException.cs
System.Transactions/TransactionOptions.cs
System.Transactions/TransactionPromotionException.cs
System.Transactions/TransactionScope.cs
System.Transactions/TransactionScopeOption.cs
System.Transactions/TransactionStatus.cs
System.Transactions/Configuration/DefaultSettingsSection.cs
System.Transactions/Configuration/MachineSettingsSection.cs
System.Transactions/Configuration/TransactionsSectionGroup.cs

View File

@@ -0,0 +1,74 @@
2010-01-03 Zoltan Varga <vargaz@gmail.com>
* TransactionAbortedException.cs: Make the default ctor public. Fixes #567872.
2009-02-02 Raja R Harinath <harinath@hurrynot.org>
Fix #463999
* CommittableTransaction.cs (CommitCallback): Handle the case
where the callback is invoked before BeginCommit ends due to the
async call ending synchronously.
2007-08-13 Miguel de Icaza <miguel@novell.com>
* Transaction.cs: Remove the exception throwing on Dispose, from
bug report #82423.
2007-02-12 Robert Jordan <robertj@gmx.net>
* Transaction.cs: Transaction.Current must be thread-local.
Fixes bug #80343.
2006-11-29 Ankit Jain <jankit@novell.com>
* DependentTransaction.cs:
* TransactionScope.cs:
* Enlist.cs:
* TransactionManager.cs:
* Transaction.cs:
* SinglePhaseEnlistment.cs:
* CommittableTransaction.cs:
Remove bogus MonoTODOs. Add meaninful messages to MonoTODOs.
2006-11-20 Raja R Harinath <rharinath@novell.com>
* Transaction.cs (operator==, operator!=): Implement.
Reported by "Matthijs ter Woord" <matthijsterwoord@gmail.com>.
2006-08-09 Duncan Mak <duncan@novell.com>
* IPromotableSinglePhaseNotification.cs (Promote): Removed because
it now extends from ITransactionPromoter. Fixes #79037.
2006-04-07 Mike Kestner <mkestner@novell.com>
* IdcTransaction.cs: comment out the ComVisible attr to fix build.
2006-03-03 Ankit Jain <jankit@novell.com>
* Initial implementation.
Implements support for a LTM (Lightweight Transaction Manager).
Distributed transactions are not supported with this.
Following are known as not implemented yet:
DependentTransaction, IsolationLevels and
EnlistmentOption.EnlistDuringPrepareRequired.
2005-09-22 Atsushi Enomoto <atsushi@ximian.com>
* CommittableTransaction.cs, Delegates.cs, DependentCloneOption.cs,
DependentTransaction.cs, Enlistment.cs, EnlistmentOptions.cs,
EnterpriseServicesInteropOption.cs, IDtcTransaction.cs,
IEnlistmentNotification.cs, IPromotableSinglePhaseNotification.cs,
ISimpleTransactionSuperior.cs, ISinglePhaseNotification.cs,
ITransactionPromoter.cs, IsolationLevel.cs, PreparingEnlistment.cs,
SinglePhaseEnlistment.cs, SubordinateTransaction.cs,
Transaction.cs, TransactionAbortedException.cs,
TransactionEventArgs.cs, TransactionException.cs,
TransactionInDoubtException.cs, TransactionInformation.cs,
TransactionInterop.cs, TransactionManager.cs,
TransactionManagerCommunicationException.cs,
TransactionOptions.cs, TransactionPromotionException.cs,
TransactionScope.cs, TransactionScopeOption.cs,
TransactionStatus.cs :
new files (almost all files are stub).

View File

@@ -0,0 +1,106 @@
//
// CommittableTransaction.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
// Ankit Jain <JAnkit@novell.com>
//
// (C)2005 Novell Inc,
// (C)2006 Novell Inc,
//
#if NET_2_0
using System.Runtime.Serialization;
using System.Threading;
namespace System.Transactions
{
[Serializable]
public sealed class CommittableTransaction : Transaction,
ISerializable, IDisposable, System.IAsyncResult
{
TransactionOptions options;
AsyncCallback callback;
object user_defined_state;
IAsyncResult asyncResult;
public CommittableTransaction ()
: this (new TransactionOptions ())
{
}
public CommittableTransaction (TimeSpan timeout)
{
options = new TransactionOptions ();
options.Timeout = timeout;
}
public CommittableTransaction (TransactionOptions options)
{
this.options = options;
}
public IAsyncResult BeginCommit (AsyncCallback callback,
object user_defined_state)
{
this.callback = callback;
this.user_defined_state = user_defined_state;
AsyncCallback cb = null;
if (callback != null)
cb = new AsyncCallback (CommitCallback);
asyncResult = BeginCommitInternal (cb);
return this;
}
public void EndCommit (IAsyncResult ar)
{
if (ar != this)
throw new ArgumentException ("The IAsyncResult parameter must be the same parameter as returned by BeginCommit.", "asyncResult");
EndCommitInternal (asyncResult);
}
private void CommitCallback (IAsyncResult ar)
{
if (asyncResult == null && ar.CompletedSynchronously)
asyncResult = ar;
callback (this);
}
public void Commit ()
{
CommitInternal ();
}
[MonoTODO ("Not implemented")]
void ISerializable.GetObjectData (SerializationInfo info,
StreamingContext context)
{
throw new NotImplementedException ();
}
object IAsyncResult.AsyncState {
get { return user_defined_state; }
}
WaitHandle IAsyncResult.AsyncWaitHandle {
get { return asyncResult.AsyncWaitHandle; }
}
bool IAsyncResult.CompletedSynchronously {
get { return asyncResult.CompletedSynchronously; }
}
bool IAsyncResult.IsCompleted {
get { return asyncResult.IsCompleted; }
}
}
}
#endif

View File

@@ -0,0 +1,40 @@
//
// DefaultSettingsSection.cs
//
// Author:
// Pablo Ruiz <pruiz@netway.org>
//
// (C) 2010 Pablo Ruiz.
//
#if NET_2_0 && !MOBILE
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
namespace System.Transactions.Configuration
{
public class DefaultSettingsSection : ConfigurationSection
{
// http://msdn.microsoft.com/en-us/library/system.transactions.configuration.defaultsettingssection.timeout.aspx
[ConfigurationProperty ("timeout", DefaultValue = "00:01:00")]
[TimeSpanValidator (MinValueString = "00:00:00", MaxValueString = "10675199.02:48:05.4775807")]
public TimeSpan Timeout {
get { return (TimeSpan)base["timeout"]; }
set {
// FIXME: Validate timespan value
base["timeout"] = value;
}
}
// http://msdn.microsoft.com/en-us/library/system.transactions.configuration.defaultsettingssection.distributedtransactionmanagername(v=VS.90).aspx
[ConfigurationProperty ("distributedTransactionManagerName", DefaultValue = "")]
public string DistributedTransactionManagerName {
get { return base["distributedTransactionManagerName"] as string; }
set { base["distributedTransactionManagerName"] = value; }
}
}
}
#endif

View File

@@ -0,0 +1,33 @@
//
// MachineSettingsSection.cs
//
// Author:
// Pablo Ruiz <pruiz@netway.org>
//
// (C) 2010 Pablo Ruiz.
//
#if NET_2_0 && !MOBILE
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
namespace System.Transactions.Configuration
{
public class MachineSettingsSection : ConfigurationSection
{
// http://msdn.microsoft.com/en-us/library/system.transactions.configuration.machinesettingssection.maxtimeout.aspx
[ConfigurationProperty("maxTimeout", DefaultValue = "00:10:00")]
[TimeSpanValidator(MinValueString = "00:00:00", MaxValueString = "10675199.02:48:05.4775807")]
public TimeSpan MaxTimeout {
get { return (TimeSpan)base["maxTimeout"]; }
set {
// FIXME: Validate timespan value..
base["maxTimeout"] = value;
}
}
}
}
#endif

View File

@@ -0,0 +1,43 @@
//
// TransactionSectionGroup.cs
//
// Author:
// Pablo Ruiz <pruiz@netway.org>
//
// (C) 2010 Pablo Ruiz.
//
#if NET_2_0 && !MOBILE
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
namespace System.Transactions.Configuration
{
// http://msdn.microsoft.com/en-us/library/system.transactions.configuration.transactionssectiongroup.aspx
public class TransactionsSectionGroup : ConfigurationSectionGroup
{
public static TransactionsSectionGroup GetSectionGroup(System.Configuration.Configuration config)
{
if (config == null)
throw new ArgumentNullException("config");
return config.GetSectionGroup("system.transactions") as TransactionsSectionGroup;
}
[ConfigurationProperty("defaultSettings")]
public DefaultSettingsSection DefaultSettings
{
get { return (DefaultSettingsSection)base.Sections["defaultSettings"]; }
}
[ConfigurationProperty("machineSettings")]
public MachineSettingsSection MachineSettings
{
get { return (MachineSettingsSection)base.Sections["machineSettings"]; }
}
}
}
#endif

View File

@@ -0,0 +1,21 @@
//
// Delegates.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public delegate Transaction HostCurrentTransactionCallback ();
public delegate void TransactionCompletedEventHandler (object o,
TransactionEventArgs e);
public delegate void TransactionStartedEventHandler (object o,
TransactionEventArgs e);
}
#endif

View File

@@ -0,0 +1,20 @@
//
// DependentCloneOption.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public enum DependentCloneOption {
BlockCommitUntilComplete,
RollbackIfNotComplete
}
}
#endif

View File

@@ -0,0 +1,51 @@
//
// DependentTransaction.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
using System.Runtime.Serialization;
namespace System.Transactions
{
[MonoTODO ("Not supported yet")]
[Serializable]
public sealed class DependentTransaction : Transaction, ISerializable
{
// Transaction parent;
// DependentCloneOption option;
bool completed;
internal DependentTransaction (Transaction parent,
DependentCloneOption option)
{
// this.parent = parent;
// this.option = option;
}
internal bool Completed {
get { return completed; }
}
[MonoTODO]
public void Complete ()
{
throw new NotImplementedException ();
}
void ISerializable.GetObjectData (SerializationInfo info,
StreamingContext context)
{
// parent = (Transaction) info.GetValue ("parent", typeof (Transaction));
// option = (DependentCloneOption) info.GetValue (
// "option", typeof (DependentCloneOption));
completed = info.GetBoolean ("completed");
}
}
}
#endif

View File

@@ -0,0 +1,38 @@
//
// Enlistment.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
// Ankit Jain <JAnkit@novell.com>
//
// (C)2005 Novell Inc,
// (C)2006 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public class Enlistment
{
internal bool done;
internal Enlistment ()
{
done = false;
}
public void Done ()
{
done = true;
InternalOnDone();
}
internal virtual void InternalOnDone ()
{
}
}
}
#endif

View File

@@ -0,0 +1,21 @@
//
// EnlistmentOptions.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
[Flags]
public enum EnlistmentOptions {
None,
EnlistDuringPrepareRequired,
}
}
#endif

View File

@@ -0,0 +1,23 @@
//
// EnterpriseServicesInteropOption.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
// OK, I have to say, am not interested in implementing COM dependent stuff.
namespace System.Transactions
{
public enum EnterpriseServicesInteropOption {
None,
Automatic,
Full
}
}
#endif

View File

@@ -0,0 +1,31 @@
//
// IDtcTransaction.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
// Well, am not interested in implementing DTC support...
using System;
using System.Runtime.InteropServices;
namespace System.Transactions
{
//[ComImport]
// [Guid (whatever)]
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IDtcTransaction
{
void Abort (IntPtr manager, int whatever, int whatever2);
void Commit (int whatever, int whatever2, int whatever3);
void GetTransactionInfo (IntPtr whatever);
}
}
#endif

View File

@@ -0,0 +1,26 @@
//
// IEnlistmentNotification.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public interface IEnlistmentNotification
{
void Commit (Enlistment enlistment);
void InDoubt (Enlistment enlistment);
void Prepare (PreparingEnlistment preparingEnlistment);
void Rollback (Enlistment enlistment);
}
}
#endif

View File

@@ -0,0 +1,24 @@
//
// IPromotableSinglePhaseNotification.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public interface IPromotableSinglePhaseNotification : ITransactionPromoter
{
void Initialize ();
void Rollback (SinglePhaseEnlistment enlistment);
void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
}
}
#endif

View File

@@ -0,0 +1,20 @@
//
// ISimpleTransactionSuperior.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// (C)2005 Novell Inc,
//
#if NET_2_0
namespace System.Transactions
{
public interface ISimpleTransactionSuperior : ITransactionPromoter
{
void Rollback ();
}
}
#endif

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