2009-07-14 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 14 Jul 2009 08:04:26 +0000 (08:04 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 14 Jul 2009 08:04:26 +0000 (08:04 -0000)
* ServiceBehaviorAttribute.cs : fix default values and simplify code.

svn path=/trunk/mcs/; revision=137839

mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/ServiceBehaviorAttribute.cs

index b33e73a348b2f1c1df77259ce7c786fdb4fd616c..2afa58120ddff67f694872cbfeeb56cadaec3dfd 100755 (executable)
@@ -1,3 +1,7 @@
+2009-07-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ServiceBehaviorAttribute.cs : fix default values and simplify code.
+
 2009-07-10  Atsushi Enomoto  <atsushi@ximian.com>
 
        * DuplexClientBase.cs : oops, fix build.
index f366bff8d1d7e2fb2c257a6296e7ce1de8ac09a7..bb5d325fc874575a588bd5a175157bf1c4cc70e5 100644 (file)
@@ -42,70 +42,48 @@ namespace System.ServiceModel
        {
                public ServiceBehaviorAttribute ()
                {
-                       // FIXME: it should be PerSession as documented.
+                       AutomaticSessionShutdown = true;
+                       ConcurrencyMode = ConcurrencyMode.Single;
                        InstanceContextMode = InstanceContextMode.PerSession;
-
+                       MaxItemsInObjectGraph = 0x10000;
                        SessionMode = SessionMode.Allowed;
+                       ReleaseServiceInstanceOnTransactionComplete = true;
+                       UseSynchronizationContext = true;
+                       ValidateMustUnderstand = true;
                }
 
-               bool auto_session_shutdown, ignore_ext_data,
-                       release, inc_fault_details,
-                       use_sync_ctx = true, tx_close, validate_must_understand;
-               ConcurrencyMode concurrency;
-               IsolationLevel tx_level;
                string tx_timeout;
                object singleton;
 
                [MonoTODO]
-               public bool AutomaticSessionShutdown {
-                       get { return auto_session_shutdown; }
-                       set { auto_session_shutdown = value; }
-               }
+               public bool AutomaticSessionShutdown { get; set; }
 
                [MonoTODO]
-               public ConcurrencyMode ConcurrencyMode {
-                       get { return concurrency; }
-                       set { concurrency = value; }
-               }
+               public ConcurrencyMode ConcurrencyMode { get; set; }
 
                [MonoTODO]
-               public bool IgnoreExtensionDataObject {
-                       get { return ignore_ext_data; }
-                       set { ignore_ext_data = value; }
-               }
+               public bool IgnoreExtensionDataObject { get; set; }
 
                public InstanceContextMode InstanceContextMode { get; set; }
 
-               public bool ReleaseServiceInstanceOnTransactionComplete {
-                       get { return release; }
-                       set { release = value; }
-               }
+               public bool IncludeExceptionDetailInFaults { get; set; }
 
                [MonoTODO]
-               public bool IncludeExceptionDetailInFaults {
-                       get { return inc_fault_details; }
-                       set { inc_fault_details = value; }
-               }
+               public int MaxItemsInObjectGraph { get; set; }
+
+               [MonoTODO]
+               public bool ReleaseServiceInstanceOnTransactionComplete { get; set; }
 
                [MonoTODO]
                public SessionMode SessionMode { get; set; }
 
-               public bool UseSynchronizationContext {
-                       get { return use_sync_ctx; }
-                       set { use_sync_ctx = value; }
-               }
+               public bool UseSynchronizationContext { get; set; }
 
                [MonoTODO]
-               public bool TransactionAutoCompleteOnSessionClose {
-                       get { return tx_close; }
-                       set { tx_close = value; }
-               }
+               public IsolationLevel TransactionIsolationLevel { get; set; }
 
                [MonoTODO]
-               public IsolationLevel TransactionIsolationLevel {
-                       get { return tx_level; }
-                       set { tx_level = value; }
-               }
+               public bool TransactionAutoCompleteOnSessionClose { get; set; }
 
                [MonoTODO]
                public string TransactionTimeout {
@@ -118,10 +96,7 @@ namespace System.ServiceModel
                }
 
                [MonoTODO]
-               public bool ValidateMustUnderstand {
-                       get { return validate_must_understand; }
-                       set { validate_must_understand = value; }
-               }
+               public bool ValidateMustUnderstand { get; set; }
 
                public object GetWellKnownSingleton ()
                {