Imported Upstream version 5.16.0.100

Former-commit-id: 38faa55fb9669e35e7d8448b15c25dc447f25767
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-08-07 15:19:03 +00:00
parent 0a9828183b
commit 7d7f676260
4419 changed files with 170950 additions and 90273 deletions

View File

@ -356,9 +356,12 @@ namespace System.ServiceModel.Dispatcher
owner.Listener.Open (openTimeout);
// It is tested at Open(), but strangely it is not instantiated at this point.
foreach (var ed in owner.Endpoints)
if (ed.DispatchRuntime.InstanceContextProvider == null && (ed.DispatchRuntime.Type == null || ed.DispatchRuntime.Type.GetConstructor (Type.EmptyTypes) == null))
foreach (var ed in owner.Endpoints) {
if ((ed.DispatchRuntime.InstanceProvider == null && ed.DispatchRuntime.InstanceContextProvider == null)
&& (ed.DispatchRuntime.Type == null || ed.DispatchRuntime.Type.GetConstructor (Type.EmptyTypes) == null)) {
throw new InvalidOperationException ("There is no default constructor for the service Type in the DispatchRuntime");
}
}
SetupChannelAcceptor ();
}
@ -623,9 +626,8 @@ namespace System.ServiceModel.Dispatcher
} finally {
if (rc != null)
rc.Close ();
// unless it is closed by session/call manager, move it back to the loop to receive the next message.
if (loop && reply.State != CommunicationState.Closed)
ProcessRequestOrInput (reply);
reply.Close (owner.DefaultCloseTimeout); // close the channel
}
}