Sfoglia il codice sorgente

Kill the MOONLIGHT define in System.ServiceModel.Web.

Rodrigo Kumpera 13 anni fa
parent
commit
de71901cf8

+ 0 - 4
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs

@@ -91,7 +91,6 @@ namespace System.Runtime.Serialization.Json
 			always_emit_type = alwaysEmitTypeInformation;
 		}
 
-#if !MOONLIGHT
 		public DataContractJsonSerializer (Type type, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, IDataContractSurrogate dataContractSurrogate, bool alwaysEmitTypeInformation)
             : this (type, default_root_name, knownTypes, maxItemsInObjectGraph, ignoreExtensionDataObject, alwaysEmitTypeInformation)
 		{
@@ -107,7 +106,6 @@ namespace System.Runtime.Serialization.Json
 			: this (type, rootName != null ? rootName.Value : default_root_name, knownTypes, maxItemsInObjectGraph, ignoreExtensionDataObject, dataContractSurrogate, alwaysEmitTypeInformation)
 		{
 		}
-#endif
 
         #endregion
 
@@ -117,14 +115,12 @@ namespace System.Runtime.Serialization.Json
 		int max_items;
 		bool ignore_extension;
 		bool always_emit_type;
-#if !MOONLIGHT
 		IDataContractSurrogate surrogate;
 
 		[MonoTODO]
 		public IDataContractSurrogate DataContractSurrogate {
 			get { return surrogate; }
 		}
-#endif
 
 		[MonoTODO]
 		public bool IgnoreExtensionDataObject {

+ 0 - 8
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JsonWriter.cs

@@ -71,11 +71,7 @@ namespace System.Runtime.Serialization.Json
 			output = stream;
 			this.encoding = encoding;
 			close_output = ownsStream;
-#if MOONLIGHT
-			is_ascii_single = encoding is UTF8Encoding;
-#else
 			is_ascii_single = encoding is UTF8Encoding || encoding.IsSingleByte;
-#endif
 		}
 
 		void CheckState ()
@@ -474,11 +470,7 @@ namespace System.Runtime.Serialization.Json
 
 		public override void WriteRaw (string text)
 		{
-#if MOONLIGHT
-			OutputString (text);
-#else
 			WriteString (text);
-#endif
 		}
 
 		public override void WriteRaw (char [] chars, int start, int length)

+ 0 - 4
mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/TypeMap.cs

@@ -66,10 +66,6 @@ namespace System.Runtime.Serialization.Json
 			if (IsPrimitiveType (type))
 				return null;
 
-#if MOONLIGHT
-			if (ExternalTypeMap.HasType (type))
-				return new ExternalTypeMap (type);
-#endif
 			return CreateDefaultTypeMap (type);
 		}
 

+ 0 - 4
mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs

@@ -213,11 +213,7 @@ namespace System.ServiceModel.Dispatcher
 			case WebContentFormat.Json:
 				// FIXME: after name argument they are hack
 				if (json_serializer == null)
-#if MOONLIGHT
-					json_serializer = new DataContractJsonSerializer (part.Type);
-#else
 					json_serializer = isWrapped ? new DataContractJsonSerializer (part.Type, BodyName ?? part.Name, null, 0x100000, false, null, true) : new DataContractJsonSerializer (part.Type);
-#endif
 				return json_serializer;
 			default:
 				throw new NotImplementedException (msgfmt.ToString ());

+ 0 - 2
mcs/class/System.ServiceModel.Web/System/UriTemplate.cs

@@ -108,7 +108,6 @@ namespace System
 
 		// Bind
 
-#if !MOONLIGHT
 		public Uri BindByName (Uri baseAddress, NameValueCollection parameters)
 		{
 			return BindByName (baseAddress, parameters, false);
@@ -118,7 +117,6 @@ namespace System
 		{
 			return BindByNameCommon (baseAddress, parameters, null, omitDefaults);
 		}
-#endif
 
 		public Uri BindByName (Uri baseAddress, IDictionary<string,string> parameters)
 		{

+ 0 - 4
mcs/class/System.ServiceModel.Web/System/UriTemplateMatchException.cs

@@ -31,17 +31,13 @@ using System.Runtime.Serialization;
 
 namespace System
 {
-#if !MOONLIGHT
 	[Serializable]
-#endif
 	public class UriTemplateMatchException : SystemException
 	{
 		public UriTemplateMatchException () : base () {}
 		public UriTemplateMatchException (string msg) : base (msg) {}
 		public UriTemplateMatchException (string msg, Exception inner) : base (msg, inner) {}
-#if !MOONLIGHT
 		protected UriTemplateMatchException (SerializationInfo info, StreamingContext context) :
 			base (info, context) {}
-#endif
 	}
 }