Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Henry <ludovic@xamarin.com>2016-08-17 18:40:30 +0300
committerLudovic Henry <ludovic@xamarin.com>2016-08-18 17:34:36 +0300
commit249daf43de9c64fefe9f103fc15bb462665b0167 (patch)
tree9c18ba262b604ee5b6d153444ffdee94eb4ec8c3 /mcs/class/System.ServiceModel.Web
parent86e6221becd662c7e4f8f5e1284146c66da5c4a1 (diff)
[mcs] Replace NET_2_1 by MOBILE
NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.
Diffstat (limited to 'mcs/class/System.ServiceModel.Web')
-rw-r--r--mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs4
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs6
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs6
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs12
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs18
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs4
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs12
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs6
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs2
9 files changed, 35 insertions, 35 deletions
diff --git a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
index a974b19de94..2e2baf595ce 100644
--- a/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.ServiceModel.Web/Assembly/AssemblyInfo.cs
@@ -53,7 +53,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
[assembly: AssemblyDelaySign (true)]
-#if NET_2_1
+#if MOBILE
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyKeyFile ("../silverlight.pub")]
#else
@@ -61,7 +61,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyKeyFile("../winfx.pub")]
#endif
-#if NET_2_1
+#if MOBILE
[assembly: InternalsVisibleTo ("System.Json, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo ("System.ServiceModel.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs
index b438b109684..0cf2bc5778b 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncoder.cs
@@ -47,7 +47,7 @@ namespace System.ServiceModel.Channels
}
public override string ContentType {
-#if NET_2_1
+#if MOBILE
get { return MediaType; }
#else
get { return MediaType + "; charset=" + source.WriteEncoding.HeaderName; }
@@ -114,7 +114,7 @@ namespace System.ServiceModel.Channels
break;
case WebContentFormat.Json:
// FIXME: is it safe/unsafe/required to keep XmlReader open?
-#if NET_2_1
+#if MOBILE
msg = Message.CreateMessage (MessageVersion.None, null, JsonReaderWriterFactory.CreateJsonReader (stream, source.ReaderQuotas));
#else
msg = Message.CreateMessage (MessageVersion.None, null, JsonReaderWriterFactory.CreateJsonReader (stream, enc, source.ReaderQuotas, null));
@@ -174,7 +174,7 @@ namespace System.ServiceModel.Channels
switch (GetContentFormat (message)) {
case WebContentFormat.Xml:
-#if NET_2_1
+#if MOBILE
using (XmlWriter w = XmlDictionaryWriter.CreateDictionaryWriter (XmlWriter.Create (new StreamWriter (stream, source.WriteEncoding))))
message.WriteMessage (w);
#else
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
index 3049f2901e3..c6a0b107553 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Channels/WebMessageEncodingBindingElement.cs
@@ -34,7 +34,7 @@ using System.Xml;
namespace System.ServiceModel.Channels
{
public sealed class WebMessageEncodingBindingElement
-#if NET_2_1
+#if MOBILE
: MessageEncodingBindingElement
#else
: MessageEncodingBindingElement, IWsdlExportExtension
@@ -109,7 +109,7 @@ namespace System.ServiceModel.Channels
return base.BuildChannelFactory<TChannel> (context);
}
-#if !NET_2_1
+#if !MOBILE
[MonoTODO ("Why is it overriden?")]
public override bool CanBuildChannelListener<TChannel> (BindingContext context)
{
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Channels
return context.GetInnerProperty<T> ();
}
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
[MonoTODO]
void IWsdlExportExtension.ExportContract (WsdlExporter exporter, WsdlContractConversionContext context)
{
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
index d207385c97e..dc8915ff76d 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
@@ -84,7 +84,7 @@ namespace System.ServiceModel.Description
// clientRuntime.MessageInspectors.Add (something);
}
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
protected virtual void AddServerErrorHandlers (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
{
endpointDispatcher.ChannelDispatcher.ErrorHandlers.Add (new WebHttpErrorHandler ());
@@ -103,7 +103,7 @@ namespace System.ServiceModel.Description
public virtual void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher)
{
-#if NET_2_1 || XAMMAC_4_5
+#if MOBILE || XAMMAC_4_5
throw new NotImplementedException ();
#else
endpointDispatcher.DispatchRuntime.OperationSelector = GetOperationSelector (endpoint);
@@ -146,7 +146,7 @@ namespace System.ServiceModel.Description
}
}
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
internal class DispatchPairFormatter : IDispatchMessageFormatter
{
public DispatchPairFormatter (IDispatchMessageFormatter request, IDispatchMessageFormatter reply)
@@ -185,7 +185,7 @@ namespace System.ServiceModel.Description
return new WebMessageFormatter.ReplyClientFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
}
-#if !NET_2_1
+#if !MOBILE
protected virtual IDispatchMessageFormatter GetReplyDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
{
return new WebMessageFormatter.ReplyDispatchFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
@@ -197,7 +197,7 @@ namespace System.ServiceModel.Description
return new WebMessageFormatter.RequestClientFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
}
-#if !NET_2_1
+#if !MOBILE
protected virtual IDispatchMessageFormatter GetRequestDispatchFormatter (OperationDescription operationDescription, ServiceEndpoint endpoint)
{
return new WebMessageFormatter.RequestDispatchFormatter (operationDescription, endpoint, GetQueryStringConverter (operationDescription), this);
@@ -287,7 +287,7 @@ namespace System.ServiceModel.Description
throw new InvalidOperationException ("ManualAddressing in the transport binding element in the binding must be true for WebHttpBehavior");
}
-#if !NET_2_1
+#if !MOBILE
internal class WebHttpErrorHandler : IErrorHandler
{
public void ProvideFault (Exception error, MessageVersion version, ref Message fault)
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
index 6fb3b865903..aa159075998 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
@@ -41,7 +41,7 @@ using System.ServiceModel.Web;
using System.Text;
using System.Xml;
-#if NET_2_1
+#if MOBILE
using XmlObjectSerializer = System.Object;
#endif
@@ -81,7 +81,7 @@ namespace System.ServiceModel.Dispatcher
this.converter = converter;
this.behavior = behavior;
ApplyWebAttribute ();
-#if !NET_2_1
+#if !MOBILE
// This is a hack for WebScriptEnablingBehavior
var jqc = converter as JsonQueryStringConverter;
if (jqc != null)
@@ -248,7 +248,7 @@ namespace System.ServiceModel.Dispatcher
protected object ReadObjectBody (XmlObjectSerializer serializer, XmlReader reader)
{
-#if NET_2_1
+#if MOBILE
return (serializer is DataContractJsonSerializer) ?
((DataContractJsonSerializer) serializer).ReadObject (reader) :
((DataContractSerializer) serializer).ReadObject (reader, true);
@@ -283,7 +283,7 @@ namespace System.ServiceModel.Dispatcher
}
}
-#if !NET_2_1
+#if !MOBILE
internal class RequestDispatchFormatter : WebDispatchMessageFormatter
{
public RequestDispatchFormatter (OperationDescription operation, ServiceEndpoint endpoint, QueryStringConverter converter, WebHttpBehavior behavior)
@@ -363,7 +363,7 @@ namespace System.ServiceModel.Dispatcher
// FIXME: get encoding from somewhere
hp.Headers ["Content-Type"] = mediaType + "; charset=utf-8";
-#if !NET_2_1
+#if !MOBILE
if (WebOperationContext.Current != null)
WebOperationContext.Current.OutgoingRequest.Apply (hp);
#endif
@@ -382,7 +382,7 @@ namespace System.ServiceModel.Dispatcher
throw new ArgumentNullException ("parameters");
CheckMessageVersion (message.Version);
-#if !NET_2_1
+#if !MOBILE
if (OperationContext.Current != null) {
// Set response in the context
OperationContext.Current.IncomingMessage = message;
@@ -423,7 +423,7 @@ namespace System.ServiceModel.Dispatcher
object value;
XmlObjectSerializer serializer;
-#if !NET_2_1
+#if !MOBILE
protected override BodyWriter OnCreateBufferedCopy (int maxBufferSize)
{
return new WrappedBodyWriter (value, serializer, name, ns, fmt);
@@ -473,7 +473,7 @@ namespace System.ServiceModel.Dispatcher
void WriteObject (XmlObjectSerializer serializer, XmlDictionaryWriter writer, object value)
{
if (serializer != null){
-#if NET_2_1
+#if MOBILE
if (serializer is DataContractJsonSerializer)
((DataContractJsonSerializer) serializer).WriteObject (writer, value);
else
@@ -485,7 +485,7 @@ namespace System.ServiceModel.Dispatcher
}
}
-#if !NET_2_1
+#if !MOBILE
internal abstract class WebDispatchMessageFormatter : WebMessageFormatter, IDispatchMessageFormatter
{
protected WebDispatchMessageFormatter (OperationDescription operation, ServiceEndpoint endpoint, QueryStringConverter converter, WebHttpBehavior behavior)
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs
index bee02209a1a..4a5289dd51f 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs
@@ -39,7 +39,7 @@ namespace System.ServiceModel.Web
{
public class WebChannelFactory<TChannel> : ChannelFactory<TChannel>
{
-#if !NET_2_1
+#if !MOBILE
public WebChannelFactory ()
: base ()
{
@@ -84,7 +84,7 @@ namespace System.ServiceModel.Web
protected override void OnOpening ()
{
-#if !NET_2_1
+#if !MOBILE
if (Endpoint.Behaviors.Find<WebHttpBehavior> () == null)
Endpoint.Behaviors.Add (new WebHttpBehavior ());
#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs
index dfec47afe0e..a372b24c6b6 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs
@@ -31,7 +31,7 @@ using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
-#if NET_2_1 // Note that moonlight System.ServiceModel.Web.dll does not contain this class.
+#if MOBILE // Note that moonlight System.ServiceModel.Web.dll does not contain this class.
using IncomingWebRequestContext = System.Object;
using OutgoingWebResponseContext = System.Object;
#else
@@ -44,11 +44,11 @@ using System.Xml.Serialization;
namespace System.ServiceModel.Web
{
public class WebOperationContext
-#if !NET_2_1
+#if !MOBILE
: IExtension<OperationContext>
#endif
{
-#if !NET_2_1
+#if !MOBILE
public static WebOperationContext Current {
get {
if (OperationContext.Current == null)
@@ -75,13 +75,13 @@ namespace System.ServiceModel.Web
outgoing_request = new OutgoingWebRequestContext ();
incoming_response = new IncomingWebResponseContext (operation);
-#if !NET_2_1
+#if !MOBILE
incoming_request = new IncomingWebRequestContext (operation);
outgoing_response = new OutgoingWebResponseContext ();
#endif
}
-#if !NET_2_1
+#if !MOBILE
public IncomingWebRequestContext IncomingRequest {
get { return incoming_request; }
}
@@ -95,7 +95,7 @@ namespace System.ServiceModel.Web
get { return outgoing_request; }
}
-#if !NET_2_1
+#if !MOBILE
public OutgoingWebResponseContext OutgoingResponse {
get { return outgoing_response; }
}
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
index 8eee88bb876..a182f4f5192 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
@@ -31,7 +31,7 @@ using System.Linq;
using System.ServiceModel.Channels;
using System.Text;
using System.Xml;
-#if !NET_2_1
+#if !MOBILE
using System.Configuration;
using System.ServiceModel.Configuration;
#endif
@@ -52,7 +52,7 @@ namespace System.ServiceModel
public WebHttpBinding (string configurationName)
{
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
BindingsSection bindingsSection = ConfigUtil.BindingsSection;
WebHttpBindingElement el = (WebHttpBindingElement) bindingsSection ["webHttpBinding"].ConfiguredBindings.FirstOrDefault (c => c.Name == configurationName);
if (el != null) {
@@ -88,7 +88,7 @@ namespace System.ServiceModel
get { return EnvelopeVersion.None; }
}
-#if !NET_2_1 && !XAMMAC_4_5
+#if !MOBILE && !XAMMAC_4_5
[DefaultValue (false)]
public bool AllowCookies {
get { return t.AllowCookies; }
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
index 4effb2e71a7..b7aefe52dfd 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
@@ -34,7 +34,7 @@ namespace System.ServiceModel
public WebHttpSecurity ()
{
// there is no public constructor for transport ...
-#if !NET_2_1
+#if !MOBILE
Transport = new BasicHttpBinding ().Security.Transport;
#endif
}