Ver código fonte

Misc .NET 4.5 / PCL APIs.

Martin Baulig 12 anos atrás
pai
commit
77df2f0865

+ 2 - 0
mcs/class/System.ServiceModel/mobile_System.ServiceModel.dll.sources

@@ -169,9 +169,11 @@ System.ServiceModel.Dispatcher/IClientOperationSelector.cs
 System.ServiceModel.Dispatcher/IDispatchMessageFormatter.cs
 System.ServiceModel.Dispatcher/IInteractiveChannelInitializer.cs
 System.ServiceModel.Dispatcher/IParameterInspector.cs
+System.ServiceModel.Security/HttpDigestClientCredential.cs
 System.ServiceModel.Security/MessageSecurityException.cs
 System.ServiceModel.Security/SecurityAccessDeniedException.cs
 System.ServiceModel.Security/UserNamePasswordClientCredential.cs
+System.ServiceModel.Security/WindowsClientCredential.cs
 System.ServiceModel/ActionNotSupportedException.cs
 System.ServiceModel/AllEnums.cs
 System.ServiceModel/HttpBindingBase.cs

+ 1 - 1
mcs/class/System/System.Windows.Input/ICommand.cs

@@ -27,7 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_5
+#if NET_4_0
 
 namespace System.Windows.Input {
 	

+ 4 - 0
mcs/class/System/mobile_System.dll.sources

@@ -84,6 +84,7 @@ System.ComponentModel/ComponentCollection.cs
 System.ComponentModel/ComponentConverter.cs
 System.ComponentModel/CultureInfoConverter.cs
 System.ComponentModel/CustomTypeDescriptor.cs
+System.ComponentModel/DataErrorsChangedEventArgs.cs
 System.ComponentModel/DateTimeConverter.cs
 System.ComponentModel/DecimalConverter.cs
 System.ComponentModel/DefaultEventAttribute.cs
@@ -123,6 +124,7 @@ System.ComponentModel/IDataErrorInfo.cs
 System.ComponentModel/IEditableObject.cs
 System.ComponentModel/IExtenderProvider.cs
 System.ComponentModel/IListSource.cs
+System.ComponentModel/INotifyDataErrorInfo.cs
 System.ComponentModel/INotifyPropertyChanged.cs
 System.ComponentModel/INotifyPropertyChanging.cs
 System.ComponentModel/IRaiseItemChangedEvents.cs
@@ -219,6 +221,7 @@ System.Diagnostics/ThreadWaitReason.cs
 System.IO.Compression/CompressionMode.cs
 System.IO.Compression/DeflateStream.cs
 System.IO.Compression/GZipStream.cs
+System.IO/InvalidDataException.cs
 System.IO/MonoSyncFileStream.cs
 System.Net.Cache/HttpCacheAgeControl.cs
 System.Net.Cache/HttpRequestCacheLevel.cs
@@ -452,6 +455,7 @@ System.Net/WebProxy.cs
 System.Net/WebRequest.cs
 System.Net/WebRequestMethods.cs
 System.Net/WebResponse.cs
+System.Net/WebUtility.cs
 System.Runtime.InteropServices/DefaultParameterValueAttribute.cs
 System.Security.AccessControl/SemaphoreAccessRule.cs
 System.Security.AccessControl/SemaphoreAuditRule.cs

+ 40 - 0
mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs

@@ -0,0 +1,40 @@
+// 
+// EnumerablePartitionOptions.cs
+//  
+// Authors:
+//      Martin Baulig ([email protected])
+//
+// Copyright 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_5
+using System;
+
+namespace System.Collections.Concurrent {
+	[Flags]
+	[Serializable]
+	public enum EnumerablePartitionerOptions {
+		None,
+		NoBuffering
+	}
+}
+#endif

+ 9 - 0
mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs

@@ -98,6 +98,15 @@ namespace System.Collections.Concurrent
 
 			return new UserLongRangePartitioner (fromInclusive, toExclusive, rangeSize);
 		}
+		
+#if NET_4_5
+		[MonoTODO]
+		public static OrderablePartitioner<TSource> Create<TSource> (IEnumerable<TSource> source,
+									     EnumerablePartitionerOptions partitionerOptions)
+		{
+			throw new NotImplementedException ();
+		}
+#endif
 	}
 	
 	public abstract class Partitioner<TSource>

+ 69 - 0
mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs

@@ -0,0 +1,69 @@
+// Authors:
+//      Martin Baulig ([email protected])
+//
+// Copyright 2012 Xamarin Inc. (http://www.xamarin.com)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if NET_4_5
+namespace System.Diagnostics.Contracts {
+
+	[AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
+	[ConditionalAttribute("CONTRACTS_FULL")]
+	public class ContractOptionAttribute : Attribute {
+		public ContractOptionAttribute (string category, string setting, bool enabled)
+		{
+			Category = category;
+			Setting = setting;
+			Enabled = enabled;
+		}
+		
+		public ContractOptionAttribute (string category, string setting, string value)
+		{
+			Category = category;
+			Setting = setting;
+			Value = value;
+			Enabled = true;
+		}
+				
+		public string Category {
+			get;
+			private set;
+		}
+
+		public bool Enabled {
+			get;
+			private set;
+		}
+
+		public string Setting {
+			get;
+			private set;
+		}
+
+		public string Value {
+			get;
+			private set;
+		}
+	}
+
+}
+#endif

+ 22 - 0
mcs/class/corlib/System.Globalization/CultureInfo.cs

@@ -1000,5 +1000,27 @@ namespace System.Globalization
 				throw new NotSupportedException ("Calendar not found, if the linker is enabled make sure to preserve this type: " + name);
 			return (Calendar) Activator.CreateInstance (type);
 		}
+		
+#if NET_4_5
+		[MonoTODO]
+		public static CultureInfo DefaultThreadCurrentCulture {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+		
+		[MonoTODO]
+		public static CultureInfo DefaultThreadCurrentUICulture {
+			get {
+				throw new NotImplementedException ();
+			}
+			set {
+				throw new NotImplementedException ();
+			}
+		}
+#endif
 	}
 }

+ 2 - 0
mcs/class/corlib/corlib.dll.sources

@@ -344,6 +344,7 @@ System.Diagnostics.Contracts/ContractException.cs
 System.Diagnostics.Contracts/ContractFailedEventArgs.cs
 System.Diagnostics.Contracts/ContractFailureKind.cs
 System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs
+System.Diagnostics.Contracts/ContractOptionAttribute.cs
 System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs
 System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs
 System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs
@@ -1598,6 +1599,7 @@ System.Collections.Concurrent/OrderablePartitioner.cs
 System.Collections.Concurrent/ConcurrentDictionary.cs
 System.Collections.Concurrent/Partitioner.cs
 System.Collections.Concurrent/ConcurrentQueue.cs
+System.Collections.Concurrent/EnumerablePartitionerOptions.cs
 System.Collections.Concurrent.Partitioners/ListPartitioner.cs
 System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs
 System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs