2009-07-14 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 14 Jul 2009 11:31:10 +0000 (11:31 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 14 Jul 2009 11:31:10 +0000 (11:31 -0000)
* OperationBehaviorAttribute.cs :
  add AutoDisposeParameters, and apply it.
* CallbackBehaviorAttribute.cs : added couple of missing members.

* DispatchRuntime.cs : add ValidateMustUnderstand.
* DispatchOperation.cs : add AutoDisposeParameters.

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

mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchOperation.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DispatchRuntime.cs
mcs/class/System.ServiceModel/System.ServiceModel/CallbackBehaviorAttribute.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel/OperationBehaviorAttribute.cs

index 567f2f60a4d6c99933d5f3d4a2509c42d42d2d42..bcded539cc046b7679a57e5f62c032cfad23e5d3 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * DispatchRuntime.cs : add ValidateMustUnderstand.
+       * DispatchOperation.cs : add AutoDisposeParameters.
+
 2009-07-02  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ChannelDispatcher.cs : when service instance is provided to the
index f4b0d953307e14de6e02d8c83a901c74924aa051..7597b90ba86e843e6c46d9664c419c534cdb2842 100644 (file)
@@ -52,7 +52,8 @@ namespace System.ServiceModel.Dispatcher
                bool serialize_reply = true, deserialize_request = true,
                        is_oneway, is_terminating,
                        release_after_call, release_before_call,
-                       tx_auto_complete, tx_required;
+                       tx_auto_complete, tx_required,
+                       auto_dispose_params = true;
                ImpersonationOption impersonation;
                IDispatchMessageFormatter formatter, actual_formatter;
                IOperationInvoker invoker;
@@ -95,6 +96,11 @@ namespace System.ServiceModel.Dispatcher
                        get { return ctx_initializers; }
                }
 
+               public bool AutoDisposeParameters {
+                       get { return auto_dispose_params; }
+                       set { auto_dispose_params = value; }
+               }
+
                public bool DeserializeRequest {
                        get { return deserialize_request; }
                        set { deserialize_request = value; }
index ed338b86d7e8f1075f2a68f3fbb09a4c4a6b46c6..ba048c250fbae2b1ba870fbaa6c780f636951cb9 100644 (file)
@@ -48,6 +48,7 @@ namespace System.ServiceModel.Dispatcher
                bool suppress_audio_failure = true;
                bool completes_tx_on_close, ignore_tx_msg_props, inpersonate;
                bool release_tx_complete;
+               bool validate_must_understand = true;
                ClientRuntime callback_client_runtime;
                ConcurrencyMode concurrency_mode;
                InstanceContext instance_context;
@@ -220,5 +221,10 @@ namespace System.ServiceModel.Dispatcher
                        get { return unhandled_dispatch_oper; }
                        set { unhandled_dispatch_oper = value; }
                }
+
+               public bool ValidateMustUnderstand {
+                       get { return validate_must_understand; }
+                       set { validate_must_understand = value; }
+               }
        }
 }
index 629bce8c2ade51e28d07ea68eee970007c1b2401..c1519f541083eeee35aab6d25b17e69cf14b58e0 100644 (file)
@@ -4,7 +4,7 @@
 // Author:
 //     Atsushi Enomoto <atsushi@ximian.com>
 //
-// Copyright (C) 2006 Novell, Inc.  http://www.novell.com
+// Copyright (C) 2006,2009 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
@@ -29,55 +29,58 @@ using System;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Description;
 using System.ServiceModel.Dispatcher;
+using System.Transactions;
 
 namespace System.ServiceModel
 {
-       [MonoTODO]
        [AttributeUsage (AttributeTargets.Class)]
        public sealed class CallbackBehaviorAttribute : Attribute,
                IEndpointBehavior
        {
-               bool shutdown, ignore_ext, return_unknown_as_faults,
-                       use_sync_context, validate_must_understand;
-               ConcurrencyMode concurrency;
-
-               public bool AutomaticSessionShutdown {
-                       get { return shutdown; }
-                       set { shutdown = value; }
+               public CallbackBehaviorAttribute ()
+               {
+                       AutomaticSessionShutdown = true;
+                       ConcurrencyMode = ConcurrencyMode.Single;
+                       // LAMESPEC: it is documented as int.MaxValue, but wrong.
+                       MaxItemsInObjectGraph = 0x10000;
+                       UseSynchronizationContext = true;
+                       ValidateMustUnderstand = true;
                }
 
-               public ConcurrencyMode ConcurrencyMode {
-                       get { return concurrency; }
-                       set { concurrency = value; }
-               }
+               [MonoTODO]
+               public bool AutomaticSessionShutdown { get; set; }
 
-               public bool IgnoreExtensionDataObject {
-                       get { return ignore_ext; }
-                       set { ignore_ext = value; }
-               }
+               [MonoTODO]
+               public ConcurrencyMode ConcurrencyMode { get; set; }
 
-               public bool ReturnUnknownExceptionsAsFaults {
-                       get { return return_unknown_as_faults; }
-                       set { return_unknown_as_faults = value; }
-               }
+               [MonoTODO]
+               public bool IgnoreExtensionDataObject { get; set; }
 
-               public bool UseSynchronizationContext {
-                       get { return use_sync_context; }
-                       set { use_sync_context = value; }
-               }
+               [MonoTODO]
+               public bool IncludeExceptionDetailInFaults { get; set; }
 
-               public bool ValidateMustUnderstand {
-                       get { return validate_must_understand; }
-                       set { validate_must_understand = value; }
-               }
+               [MonoTODO]
+               public int MaxItemsInObjectGraph { get; set; }
+
+               [MonoTODO]
+               public IsolationLevel TransactionIsolationLevel { get; set; }
+
+               [MonoTODO]
+               public string TransactionTimeout { get; set; }
+
+               [MonoTODO]
+               public bool UseSynchronizationContext { get; set; }
+
+               [MonoTODO]
+               public bool ValidateMustUnderstand { get; set; }
 
                void IEndpointBehavior.AddBindingParameters (
                        ServiceEndpoint endpoint,
                        BindingParameterCollection parameters)
                {
-                       throw new NotImplementedException ();
                }
 
+               [MonoTODO]
                void IEndpointBehavior.ApplyDispatchBehavior (
                        ServiceEndpoint serviceEndpoint,
                        EndpointDispatcher dispatcher)
@@ -85,6 +88,7 @@ namespace System.ServiceModel
                        throw new NotImplementedException ();
                }
 
+               [MonoTODO]
                void IEndpointBehavior.ApplyClientBehavior (
                        ServiceEndpoint serviceEndpoint,
                        ClientRuntime behavior)
@@ -92,6 +96,7 @@ namespace System.ServiceModel
                        throw new NotImplementedException ();
                }
 
+               [MonoTODO]
                void IEndpointBehavior.Validate (
                        ServiceEndpoint serviceEndpoint)
                {
index 2afa58120ddff67f694872cbfeeb56cadaec3dfd..8288e30f5eda23d3d5637a5437659463b2590640 100755 (executable)
@@ -1,3 +1,9 @@
+2009-07-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * OperationBehaviorAttribute.cs :
+         add AutoDisposeParameters, and apply it.
+       * CallbackBehaviorAttribute.cs : added couple of missing members.
+
 2009-07-14  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ServiceBehaviorAttribute.cs : fix default values and simplify code.
index fd88fe998bc842e3e35a3b39e2ce0033f4975b4c..6bd035d389da7e6bbbe0c6019aa0026d94dd22e0 100644 (file)
@@ -38,9 +38,14 @@ namespace System.ServiceModel
                IOperationBehavior
        {
                ImpersonationOption impersonation;
-               bool tx_auto_complete, tx_scope_required;
+               bool tx_auto_complete, tx_scope_required, auto_dispose_params = true;
                ReleaseInstanceMode mode;
 
+               public bool AutoDisposeParameters {
+                       get { return auto_dispose_params; }
+                       set { auto_dispose_params = value; }
+               }
+
                public ImpersonationOption Impersonation {
                        get { return impersonation; }
                        set { impersonation = value; }
@@ -73,6 +78,7 @@ namespace System.ServiceModel
                        OperationDescription description,
                        DispatchOperation dispatch)
                {
+                       dispatch.AutoDisposeParameters = auto_dispose_params;
                        dispatch.Impersonation = impersonation;
                        dispatch.ReleaseInstanceBeforeCall =
                                mode == ReleaseInstanceMode.BeforeCall ||