Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -243,7 +243,7 @@ namespace System.ServiceModel.Dispatcher
var headers = MessageToHeaderObjects (md, message);
object [] parts = MessageToParts (md, message);
if (md.MessageType != null) {
#if NET_2_1
#if MOBILE
parameters [0] = Activator.CreateInstance (md.MessageType);
#else
parameters [0] = Activator.CreateInstance (md.MessageType, true);
@@ -271,7 +271,7 @@ namespace System.ServiceModel.Dispatcher
var headers = MessageToHeaderObjects (md, message);
object [] parts = MessageToParts (md, message);
if (md.MessageType != null) {
#if NET_2_1
#if MOBILE
object msgObject = Activator.CreateInstance (md.MessageType);
#else
object msgObject = Activator.CreateInstance (md.MessageType, true);
@@ -355,14 +355,14 @@ namespace System.ServiceModel.Dispatcher
class DataContractMessagesFormatter : BaseMessagesFormatter
{
DataContractFormatAttribute attr;
#if !NET_2_1
#if !MOBILE
DataContractSerializerOperationBehavior serializerBehavior;
#endif
public DataContractMessagesFormatter (OperationDescription desc, DataContractFormatAttribute attr)
: base (desc)
{
#if !NET_2_1
#if !MOBILE
this.serializerBehavior = desc.Behaviors.Find<DataContractSerializerOperationBehavior>();
#endif
this.attr = attr;
@@ -442,7 +442,7 @@ namespace System.ServiceModel.Dispatcher
XmlObjectSerializer GetSerializer (MessagePartDescription partDesc)
{
if (!serializers.ContainsKey (partDesc))
#if !NET_2_1
#if !MOBILE
if (serializerBehavior != null)
serializers [partDesc] = serializerBehavior.CreateSerializer(
partDesc.Type, partDesc.Name, partDesc.Namespace, OperationKnownTypes as IList<Type>);

View File

@@ -39,7 +39,7 @@ namespace System.ServiceModel.Dispatcher
public sealed class ClientOperation
{
internal class ClientOperationCollection :
#if NET_2_1
#if MOBILE
KeyedCollection<string, ClientOperation>
#else
SynchronizedKeyedCollection<string, ClientOperation>

View File

@@ -54,7 +54,7 @@ namespace System.ServiceModel.Dispatcher
{
contract_name = name;
contract_ns = ns;
#if !NET_2_1
#if !MOBILE
CallbackDispatchRuntime = (DispatchRuntime) callbackDispatchRuntime ?? new DispatchRuntime (null, this);
#endif
}
@@ -80,7 +80,7 @@ namespace System.ServiceModel.Dispatcher
public Type ContractClientType { get; set; }
#if !NET_2_1
#if !MOBILE
public DispatchRuntime CallbackDispatchRuntime { get; internal set; }
#endif
@@ -88,7 +88,7 @@ namespace System.ServiceModel.Dispatcher
get { return inspectors; }
}
#if NET_2_1
#if MOBILE
public KeyedCollection<string,ClientOperation> Operations {
get { return operations; }
}

View File

@@ -54,7 +54,7 @@ namespace System.ServiceModel.Dispatcher
tx_auto_complete, tx_required,
auto_dispose_params = true;
IDispatchMessageFormatter formatter;
#if !NET_2_1
#if !MOBILE
ImpersonationOption impersonation;
IOperationInvoker invoker;
SynchronizedCollection<IParameterInspector> inspectors
@@ -93,7 +93,7 @@ namespace System.ServiceModel.Dispatcher
get { return action; }
}
#if !NET_2_1
#if !MOBILE
public SynchronizedCollection<ICallContextInitializer> CallContextInitializers {
get { return ctx_initializers; }
}
@@ -214,7 +214,7 @@ namespace System.ServiceModel.Dispatcher
void ThrowIfOpened ()
{
#if !NET_2_1 && !XAMMAC_4_5
#if !MOBILE && !XAMMAC_4_5
// FIXME: get callback client runtime status when ChannelDispatcher is not available.
var state = Parent.ChannelDispatcher != null ? Parent.ChannelDispatcher.State : CommunicationState.Created; // Parent.CallbackClientRuntime.ChannelFactory.State;
switch (state) {

View File

@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Reflection;
#if !NET_2_1
#if !MOBILE
using System.IdentityModel.Policy;
#if !XAMMAC_4_5
using System.Web.Security;
@@ -45,7 +45,7 @@ namespace System.ServiceModel.Dispatcher
{
public sealed class DispatchRuntime
{
#if NET_2_1 || XAMMAC_4_5
#if MOBILE || XAMMAC_4_5
internal DispatchRuntime (EndpointDispatcher dispatcher, ClientRuntime callbackClientRuntime)
{
UnhandledDispatchOperation = new DispatchOperation (