Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -5,6 +5,9 @@ using System.ServiceModel.Channels;
using System.ServiceModel.Security;
using System.ServiceModel.Security.Tokens;
using System.Text;
using System.IO;
using System.Xml;
using System.Net.Sockets;
namespace System.ServiceModel.Dispatcher
{
@@ -24,8 +27,34 @@ namespace System.ServiceModel.Dispatcher
using (new OperationContextScope (mrc.OperationContext)) {
try {
process_handlers_chain.ProcessRequestChain (mrc);
}
catch (Exception e) {
} catch (IOException e) {
// FIXME?: On dropped connection do not
// dump a stacktrace, but should be safe
// to dump a console message as in
// default exception handler and
// call error_handlers_chain
Console.WriteLine ("I/O Error (Dropped Connection?): " + e.Message);
mrc.ProcessingException = e;
error_handlers_chain.ProcessRequestChain (mrc);
} catch (SocketException e) {
// FIXME?: On dropped connection do not
// dump a stacktrace, but should be safe
// to dump a console message as in
// default exception handler and
// call error_handlers_chain
Console.WriteLine ("SocketExcpetion (Dropped Connection?): " + e.Message);
mrc.ProcessingException = e;
error_handlers_chain.ProcessRequestChain (mrc);
} catch (XmlException e) {
// FIXME?: On dropped connection do not
// dump a stacktrace, but should be safe
// to dump a console message as in
// default exception handler and
// call error_handlers_chain
Console.WriteLine ("XmlException (Dropped Connection?): " + e.Message);
mrc.ProcessingException = e;
error_handlers_chain.ProcessRequestChain (mrc);
} catch (Exception e) {
// FIXME: this is not really expected use of ChannelDispatcher.ErrorHandlers.
// They are now correctly used in process_handler_chain (namely OperationInvokerHandler).
// For this kind of "outsider" exceptions are actually left thrown

View File

@@ -35,6 +35,9 @@ using System.Threading;
using System.Transactions;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Net.Sockets;
using System.Xml;
using System.IO;
namespace System.ServiceModel.Dispatcher
{
@@ -598,7 +601,10 @@ namespace System.ServiceModel.Dispatcher
if (ProcessErrorWithHandlers (reply, ex, out res))
return;
rc.Reply (res);
if ((!(ex is SocketException)) &&
(!(ex is XmlException)) &&
(!(ex is IOException)))
rc.Reply (res);
reply.Close (owner.DefaultCloseTimeout); // close the channel
} finally {

View File

@@ -186,7 +186,6 @@ namespace System.ServiceModel.Dispatcher
throw new InvalidOperationException ("Cannot change this property after the service host is opened");
}
#if NET_4_5
[MonoTODO]
public ICollection<IParameterInspector> ClientParameterInspectors {
get { throw new NotImplementedException (); }
@@ -203,7 +202,6 @@ namespace System.ServiceModel.Dispatcher
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
#endif
}
}

View File

@@ -98,7 +98,6 @@ namespace System.ServiceModel.Dispatcher
}
#endif
#if NET_4_5
[MonoTODO]
public ICollection<ClientOperation> ClientOperations {
get { throw new NotImplementedException (); }
@@ -108,7 +107,6 @@ namespace System.ServiceModel.Dispatcher
public ICollection<IClientMessageInspector> ClientMessageInspectors {
get { throw new NotImplementedException (); }
}
#endif
public bool ManualAddressing {
get { return manual_addressing; }

View File

@@ -114,15 +114,11 @@ namespace System.ServiceModel.Dispatcher
set { filter_priority = value; }
}
#if NET_4_0
public bool IsSystemEndpoint { get; private set; }
#endif
internal void InitializeServiceEndpoint (bool isCallback, Type serviceType, ServiceEndpoint se)
{
#if NET_4_0
IsSystemEndpoint = se.IsSystemEndpoint;
#endif
this.ContractFilter = GetContractFilter (se.Contract, isCallback);