Author: spouliot
Date: 2005-12-08 20:31:36 -0500 (Thu, 08 Dec 2005)
New Revision: 54146
Modified:
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/ChangeLog
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/CrossContextDelegate.cs
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
Log:
2005-12-08 Sebastien Pouliot <[EMAIL PROTECTED]>
* Context.cs: ContextProperties property is virtual.
* CrossContextDelegate.cs: Removed [Serializable] from 2.0 build.
* SynchronizationAttribute.cs: Fixed serialization to be compatible
with MS FX. Removed old TODO.
Modified: trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/ChangeLog
2005-12-09 01:27:46 UTC (rev 54145)
+++ trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/ChangeLog
2005-12-09 01:31:36 UTC (rev 54146)
@@ -1,3 +1,10 @@
+2005-12-08 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * Context.cs: ContextProperties property is virtual.
+ * CrossContextDelegate.cs: Removed [Serializable] from 2.0 build.
+ * SynchronizationAttribute.cs: Fixed serialization to be compatible
+ with MS FX. Removed old TODO.
+
2005-05-09 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* SynchronizationAttribute.cs: Make it serializable. Fixes bug #60228.
Modified: trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
===================================================================
--- trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
2005-12-09 01:27:46 UTC (rev 54145)
+++ trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/Context.cs
2005-12-09 01:31:36 UTC (rev 54146)
@@ -92,7 +92,7 @@
}
}
- public IContextProperty[] ContextProperties
+ public virtual IContextProperty[] ContextProperties
{
get
{
Modified:
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/CrossContextDelegate.cs
===================================================================
---
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/CrossContextDelegate.cs
2005-12-09 01:27:46 UTC (rev 54145)
+++
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/CrossContextDelegate.cs
2005-12-09 01:31:36 UTC (rev 54146)
@@ -4,11 +4,8 @@
// Author: Duncan Mak ([EMAIL PROTECTED])
//
// 2002 (C) Copyright, Ximian, Inc.
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.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
@@ -31,6 +28,8 @@
namespace System.Runtime.Remoting.Contexts {
+#if ONLY_1_1
[Serializable]
+#endif
public delegate void CrossContextDelegate ();
}
Modified:
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
===================================================================
---
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
2005-12-09 01:27:46 UTC (rev 54145)
+++
trunk/mcs/class/corlib/System.Runtime.Remoting.Contexts/SynchronizationAttribute.cs
2005-12-09 01:31:36 UTC (rev 54146)
@@ -5,11 +5,8 @@
// Lluis Sanchez Gual ([EMAIL PROTECTED])
//
// (C) Novell, Inc. http://www.ximian.com
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.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
@@ -38,7 +35,6 @@
{
[AttributeUsage(AttributeTargets.Class)]
[Serializable]
- [MonoTODO ("Fix serialization compatibility with MS.NET")]
public class SynchronizationAttribute: ContextAttribute,
IContributeClientContextSink, IContributeServerContextSink
{
public const int NOT_SUPPORTED = 1;
@@ -46,9 +42,12 @@
public const int REQUIRED = 4;
public const int REQUIRES_NEW = 8;
- bool _isReentrant;
+ bool _bReEntrant;
+ int _flavor;
+
+ [NonSerialized]
bool _locked;
- int _flag;
+ [NonSerialized]
int _lockCount = 0;
[NonSerialized]
@@ -77,13 +76,13 @@
if (flag != NOT_SUPPORTED && flag != REQUIRED && flag
!= REQUIRES_NEW && flag != SUPPORTED)
throw new ArgumentException ("flag");
- _isReentrant = reEntrant;
- _flag = flag;
+ _bReEntrant = reEntrant;
+ _flavor = flag;
}
public virtual bool IsReEntrant
{
- get { return _isReentrant; }
+ get { return _bReEntrant; }
}
public virtual bool Locked
@@ -147,7 +146,7 @@
public override void GetPropertiesForNewContext
(IConstructionCallMessage ctorMsg)
{
- if (_flag != NOT_SUPPORTED) {
+ if (_flavor != NOT_SUPPORTED) {
ctorMsg.ContextProperties.Add (this);
}
}
@@ -165,7 +164,7 @@
public override bool IsContextOK (Context ctx,
IConstructionCallMessage msg)
{
SynchronizationAttribute prop = ctx.GetProperty
("Synchronization") as SynchronizationAttribute;
- switch (_flag)
+ switch (_flavor)
{
case NOT_SUPPORTED: return (prop == null);
case REQUIRED: return (prop != null);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches