blob: b6fda36d9bbcb98c1803f78dfed8e6f3dd5f68b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
//
// System.Runtime.Remoting.Contexts.SynchronizationAttribute..cs
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Activation;
namespace System.Runtime.Remoting.Contexts {
public class SynchronizationAttribute : ContextAttribute
{
public const int NOT_SUPPORTED = 1;
public const int SUPPORTED = 2;
public const int REQUIRED = 4;
public const int REQUIRES_NEW = 8;
private bool _fReentrant = false;
private int _nBehavior = REQUIRED;
private bool _fLocked = false;
public SynchronizationAttribute ()
{
}
public SynchronizationAttribute (bool fReentrant)
{
_fReentrant = fReentrant;
}
public SynchronizationAttribute (int nBehavior)
{
if (nBehavior != NOT_SUPPORTED &&
nBehavior != SUPPORTED &&
nBehavior != REQUIRED &&
nBehavior != REQUIRES_NEW)
{
throw new ArgumentException ("Invalid Flag");
}
_nBehavior = nBehavior;
}
public SynchronizationAttribute (int nBehavior, bool fReentrant)
{
if (nBehavior != NOT_SUPPORTED &&
nBehavior != SUPPORTED &&
nBehavior != REQUIRED &&
nBehavior != REQUIRES_NEW)
{
throw new ArgumentException ("Invalid Flag");
}
_nBehavior = nBehavior;
_fReentrant = fReentrant;
}
public virtual bool IsReEntrant
{
get { return _fReentrant; }
}
public virtual bool Locked
{
get { return _fLocked; }
set { _fLocked = value; }
}
[MonoTODO]
public virtual IMessageSink GetClientContextSink (IMessageSink nextSink)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override void GetPropertiesForNewContext (IConstructionCallMessage ctorMsg)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual IMessageSink GetServerContextSink (IMessageSink nextSink)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsContextOK (Context ctx, IConstructionCallMessage msg)
{
throw new NotImplementedException ();
}
}
}
|