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
path: root/mcs
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2015-01-14 00:34:23 +0300
committerZoltan Varga <vargaz@gmail.com>2015-01-14 00:34:23 +0300
commitc1b43669320f96e4a2a482d993b7b36bb5e59496 (patch)
treef618f341e716106fbffc86504696e8a02395e4a8 /mcs
parent2375c74a646b46877c5441f06f231529e5206425 (diff)
[bcl] Remove NET_4_5 defines from class libs.
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IBuildEngine4.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs2
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs6
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs2
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectElement.cs6
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs20
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOnErrorElement.cs2
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOutputElement.cs2
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTargetElement.cs12
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTaskElement.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/SubToolset.cs2
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Toolset.cs6
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs14
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskInstance.cs12
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskItemInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskMetadataInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectOnErrorInstance.cs14
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskInstance.cs12
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskPropertyInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstanceChild.cs8
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstance.cs12
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstanceChild.cs2
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputItemInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputPropertyInstance.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs8
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildTaskFactory.cs2
-rw-r--r--mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs4
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/DynamicExpressionVisitor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/Enumerable.cs4
-rw-r--r--mcs/class/System.Core/System.Runtime.CompilerServices/ExtensionAttribute.cs11
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbCommand.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbConnection.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbDataReader.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/TaskHelper.cs2
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs2
-rwxr-xr-xmcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs4
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DateTimeFormat.cs2
-rwxr-xr-xmcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs7
-rw-r--r--mcs/class/System.ServiceModel.Web/Assembly/TypeForwarders.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingParameterCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpResponseMessageProperty.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs12
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportUsage.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BasicHttpBindingElement.cs226
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs20
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs15
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs297
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ExceptionDetail.cs15
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs4
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs6
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs4
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs5
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MachineKey.cs2
-rwxr-xr-xmcs/class/System.Web/System.Web/HttpRequest.cs2
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponse.cs2
-rw-r--r--mcs/class/System.Web/System.Web/HttpRuntime.cs2
-rw-r--r--mcs/class/System.Web/System.Web/MimeMapping.cs2
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/TypeData.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReader.cs14
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReaderSettings.cs8
-rw-r--r--mcs/class/System.XML/System.Xml/XmlResolver.cs10
-rw-r--r--mcs/class/System.XML/System.Xml/XmlSecureResolver.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader2.cs5
-rw-r--r--mcs/class/System.XML/System.Xml/XmlUrlResolver.cs10
-rwxr-xr-xmcs/class/System.XML/System.Xml/XmlWriter.cs14
-rw-r--r--mcs/class/System.XML/System.Xml/XmlWriterSettings.cs6
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs4
-rw-r--r--mcs/class/System/System.IO.Compression/CompressionLevel.cs2
-rw-r--r--mcs/class/System/System.IO.Compression/DeflateStream.cs2
-rw-r--r--mcs/class/System/System.IO.Compression/GZipStream.cs2
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpClient.cs4
-rw-r--r--mcs/class/System/System.Net.NetworkInformation/Ping.cs15
-rw-r--r--mcs/class/System/System.Net.Security/SslStream.cs4
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket_2_1.cs2
-rw-r--r--mcs/class/System/System.Net.Sockets/TcpClient.cs4
-rw-r--r--mcs/class/System/System.Net.Sockets/TcpListener.cs4
-rw-r--r--mcs/class/System/System.Net.Sockets/UdpClient.cs4
-rw-r--r--mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocket.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketContext.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketError.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketException.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs2
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketState.cs2
-rw-r--r--mcs/class/System/System.Net/Dns.cs4
-rw-r--r--mcs/class/System/System.Net/HttpListener.cs4
-rw-r--r--mcs/class/System/System.Net/HttpListenerContext.cs4
-rw-r--r--mcs/class/System/System.Net/HttpListenerRequest.cs4
-rw-r--r--mcs/class/System/System.Net/HttpStatusCode.cs2
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs8
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.cs8
-rw-r--r--mcs/class/System/System.Net/WebClient.cs14
-rw-r--r--mcs/class/System/System.Net/WebRequest.cs4
-rw-r--r--mcs/class/System/System.Security.Authentication/SslProtocols.cs2
-rw-r--r--mcs/class/System/System.Windows.Input/ICommand.cs2
-rw-r--r--mcs/class/System/System/Uri.cs16
-rw-r--r--mcs/class/System/System/UriComponents.cs2
-rw-r--r--mcs/class/System/System/UriHelper.cs5
-rw-r--r--mcs/class/System/System/UriParseComponents.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Generic/Comparer.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/Dictionary.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IReadOnlyCollection.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IReadOnlyDictionary.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IReadOnlyList.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Generic/List.cs2
-rw-r--r--mcs/class/corlib/System.Collections.ObjectModel/Collection.cs2
-rw-r--r--mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyCollection.cs2
-rw-r--r--mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyDictionary.cs2
-rw-r--r--mcs/class/corlib/System.Configuration.Assemblies/AssemblyHashAlgorithm.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventCommand.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventCommandEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/EventSourceAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Tracing/NonEventAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics/StackTrace.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/Calendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/ChineseLunisolarCalendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/CultureInfo.cs4
-rw-r--r--mcs/class/corlib/System.Globalization/GregorianCalendar.cs7
-rw-r--r--mcs/class/corlib/System.Globalization/HijriCalendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/JapaneseLunisolarCalendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/KoreanLunisolarCalendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/SortVersion.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/TaiwanLunisolarCalendar.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/UmAlQuraCalendar.cs2
-rw-r--r--mcs/class/corlib/System.IO/BinaryReader.cs8
-rw-r--r--mcs/class/corlib/System.IO/BinaryWriter.cs8
-rw-r--r--mcs/class/corlib/System.IO/FileAttributes.cs2
-rw-r--r--mcs/class/corlib/System.IO/FileStream.cs4
-rw-r--r--mcs/class/corlib/System.IO/MemoryStream.cs6
-rw-r--r--mcs/class/corlib/System.IO/Stream.cs6
-rw-r--r--mcs/class/corlib/System.IO/StreamReader.cs16
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs18
-rw-r--r--mcs/class/corlib/System.IO/StringReader.cs4
-rw-r--r--mcs/class/corlib/System.IO/StringWriter.cs4
-rw-r--r--mcs/class/corlib/System.IO/TextReader.cs6
-rw-r--r--mcs/class/corlib/System.IO/TextWriter.cs6
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs10
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs6
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs7
-rw-r--r--mcs/class/corlib/System.Reflection/Assembly.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblyContentType.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblyMetadataAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblyName.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/AssemblySignatureKeyAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeData.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeExtensions.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/EventInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/IReflectableType.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/ImageFileMachine.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MemberInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MethodBase.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MethodImplAttributes.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MethodInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/Module.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MonoGenericClass.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/MonoParameterInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/ParameterInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/PropertyInfo.cs6
-rw-r--r--mcs/class/corlib/System.Reflection/ReflectionContext.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/TypeAttributes.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/TypeDelegator.cs6
-rw-r--r--mcs/class/corlib/System.Reflection/TypeInfo.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/AsyncStateMachineAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/CallerFilePathAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/CallerLineNumberAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/CallerMemberNameAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/IteratorStateMachineAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/MethodImplOptions.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/StateMachineAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs30
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs9
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs2
-rw-r--r--mcs/class/corlib/System.Runtime/GCLargeObjectHeapCompactionMode.cs2
-rw-r--r--mcs/class/corlib/System.Runtime/GCLatencyMode.cs2
-rw-r--r--mcs/class/corlib/System.Runtime/GCSettings.cs2
-rw-r--r--mcs/class/corlib/System.Security.Claims/Claim.cs2
-rw-r--r--mcs/class/corlib/System.Security.Claims/ClaimTypes.cs2
-rw-r--r--mcs/class/corlib/System.Security.Claims/ClaimValueTypes.cs2
-rw-r--r--mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs2
-rwxr-xr-xmcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs4
-rw-r--r--mcs/class/corlib/System.Security.Principal/GenericIdentity.cs24
-rw-r--r--mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs14
-rw-r--r--mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs14
-rw-r--r--mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs14
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/DecoupledTask.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task.cs22
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskConstants_T.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs7
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task_T.cs6
-rw-r--r--mcs/class/corlib/System.Threading/CancellationTokenSource.cs15
-rw-r--r--mcs/class/corlib/System.Threading/Interlocked.cs2
-rw-r--r--mcs/class/corlib/System.Threading/Monitor.cs4
-rw-r--r--mcs/class/corlib/System.Threading/SemaphoreSlim.cs4
-rw-r--r--mcs/class/corlib/System.Threading/ThreadLocal.cs4
-rw-r--r--mcs/class/corlib/System.Threading/Volatile.cs2
-rw-r--r--mcs/class/corlib/System/AppDomain.cs2
-rw-r--r--mcs/class/corlib/System/Array.cs2
-rw-r--r--mcs/class/corlib/System/ArraySegment.cs4
-rw-r--r--mcs/class/corlib/System/Console.cs2
-rw-r--r--mcs/class/corlib/System/Environment.cs2
-rw-r--r--mcs/class/corlib/System/EventHandler.cs3
-rw-r--r--mcs/class/corlib/System/Exception.cs7
-rw-r--r--mcs/class/corlib/System/GC.cs2
-rw-r--r--mcs/class/corlib/System/IProgress.cs2
-rw-r--r--mcs/class/corlib/System/MonoType.cs6
-rw-r--r--mcs/class/corlib/System/Progress.cs2
-rw-r--r--mcs/class/corlib/System/Type.cs4
-rw-r--r--mcs/class/corlib/System/WeakReference_T.cs2
321 files changed, 1 insertions, 1797 deletions
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IBuildEngine4.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IBuildEngine4.cs
index c2c16b45017..86ec44119bf 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IBuildEngine4.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IBuildEngine4.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
using System;
namespace Microsoft.Build.Framework
@@ -12,4 +11,3 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
index e8ecdaecf04..3a91704bce1 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
namespace Microsoft.Build.Framework
{
public enum RegisteredTaskObjectLifetime
@@ -7,5 +6,4 @@ namespace Microsoft.Build.Framework
AppDomain
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
index 699e33899b9..9135a392d8c 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
@@ -97,7 +97,6 @@ namespace Microsoft.Build.Tasks {
}
}
-#if NET_4_5
[Output]
public string FrameworkVersion45Path {
get {
@@ -105,6 +104,5 @@ namespace Microsoft.Build.Tasks {
TargetDotNetFrameworkVersion.Version45);
}
}
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
index 959647f9593..432473158ad 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
@@ -45,9 +45,7 @@ namespace Microsoft.Build.Utilities
Version35,
#endif
Version40,
-#if NET_4_5
Version45,
-#endif
#if XBUILD_12
Version451,
#endif
@@ -59,10 +57,8 @@ namespace Microsoft.Build.Utilities
VersionLatest = Version453
#elif XBUILD_12
VersionLatest = Version451
-#elif NET_4_5
- VersionLatest = Version45
#else
- VersionLatest = Version40
+ VersionLatest = Version45
#endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs
index 15fe431cec6..27102989721 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs
@@ -34,9 +34,7 @@ using System.Collections.Generic;
namespace Microsoft.Build.Construction
{
[Serializable]
-#if NET_4_5
public
-#endif
abstract class ElementLocation
{
public abstract int Column { get; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectElement.cs
index bd8be50d113..ef1b404ed8e 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectElement.cs
@@ -114,15 +114,9 @@ namespace Microsoft.Build.Construction
writer.WriteAttributeString (attributeName, attributeValue);
}
-#if NET_4_5
public ElementLocation Location { get; private set; }
public ElementLocation LabelLocation { get; private set; }
public ElementLocation ConditionLocation { get; private set; }
-#else
- internal ElementLocation Location { get; private set; }
- internal ElementLocation LabelLocation { get; private set; }
- internal ElementLocation ConditionLocation { get; private set; }
-#endif
string GetFilePath (string baseURI)
{
return string.IsNullOrEmpty (baseURI) ? string.Empty : new Uri (baseURI).LocalPath;
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
index 8791eee590f..118f5ee3e97 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
@@ -65,23 +65,11 @@ namespace Microsoft.Build.Construction
string keepDuplicates;
string keepMetadata;
string removeMetadata;
- #if NET_4_5
public
- #else
- internal
- #endif
string KeepDuplicates { get { return keepDuplicates ?? String.Empty; } set { keepDuplicates = value; } }
- #if NET_4_5
public
- #else
- internal
- #endif
string KeepMetadata { get { return keepMetadata ?? String.Empty; } set { keepMetadata = value; } }
- #if NET_4_5
public
- #else
- internal
- #endif
string RemoveMetadata { get { return removeMetadata ?? String.Empty; } set { removeMetadata = value; } }
public ProjectMetadataElement AddMetadata (string name, string unevaluatedValue)
@@ -142,18 +130,10 @@ namespace Microsoft.Build.Construction
AppendChild (metadata);
return metadata;
}
-#if NET_4_5
public ElementLocation ExcludeLocation { get; private set; }
public ElementLocation IncludeLocation { get; private set; }
public ElementLocation KeepDuplicatesLocation { get; private set; }
public ElementLocation RemoveLocation { get; private set; }
public ElementLocation RemoveMetadataLocation { get; private set; }
-#else
- ElementLocation ExcludeLocation { get; set; }
- ElementLocation IncludeLocation { get; set; }
- ElementLocation KeepDuplicatesLocation { get; set; }
- ElementLocation RemoveLocation { get; set; }
- ElementLocation RemoveMetadataLocation { get; set; }
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOnErrorElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOnErrorElement.cs
index 1590189e75a..39c37af8ab6 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOnErrorElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOnErrorElement.cs
@@ -62,9 +62,7 @@ namespace Microsoft.Build.Construction
}
}
- #if NET_4_5
public
- #endif
ElementLocation ExecuteTargetsAttributeLocation { get; set; }
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOutputElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOutputElement.cs
index 98d9cb849b9..013a09c0f8f 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOutputElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectOutputElement.cs
@@ -57,13 +57,11 @@ namespace Microsoft.Build.Construction
get { return taskParameter ?? String.Empty; }
set { taskParameter = value; }
}
- #if NET_4_5
ElementLocation taskParameterLocation;
public ElementLocation TaskParameterLocation {
get { return taskParameterLocation; }
set { taskParameterLocation = value; }
}
- #endif
internal override string XmlName {
get { return "Output"; }
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTargetElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTargetElement.cs
index cfaaa60c18c..8f0ac1d4a08 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTargetElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTargetElement.cs
@@ -112,7 +112,6 @@ namespace Microsoft.Build.Construction
get { return "Target"; }
}
-#if NET_4_5
public ElementLocation AfterTargetsLocation { get; private set; }
public ElementLocation BeforeTargetsLocation { get; private set; }
public ElementLocation DependsOnTargetsLocation { get; private set; }
@@ -121,17 +120,6 @@ namespace Microsoft.Build.Construction
public ElementLocation NameLocation { get; private set; }
public ElementLocation OutputsLocation { get; private set; }
public ElementLocation ReturnsLocation { get; private set; }
-#else
- internal ElementLocation AfterTargetsLocation { get; set; }
- internal ElementLocation BeforeTargetsLocation { get; set; }
- internal ElementLocation DependsOnTargetsLocation { get; set; }
- internal ElementLocation InputsLocation { get; set; }
- internal ElementLocation KeepDuplicateOutputsLocation { get; set; }
- internal ElementLocation LabelLocation { get; set; }
- internal ElementLocation NameLocation { get; set; }
- internal ElementLocation OutputsLocation { get; set; }
- internal ElementLocation ReturnsLocation { get; set; }
-#endif
internal override ProjectElement LoadChildElement (XmlReader reader)
{
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTaskElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTaskElement.cs
index fffe68eb1f3..253b5a6083c 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTaskElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectTaskElement.cs
@@ -127,7 +127,6 @@ namespace Microsoft.Build.Construction
case "ContinueOnError":
ContinueOnError = value;
break;
-#if NET_4_5
case "ExecuteTargets":
ExecuteTargets = value;
break;
@@ -137,7 +136,6 @@ namespace Microsoft.Build.Construction
case "MSBuildRuntime":
MSBuildRuntime = value;
break;
-#endif
case "xmlns":
break;
case "Label":
@@ -162,13 +160,11 @@ namespace Microsoft.Build.Construction
private Dictionary<string, string> parameters = new Dictionary<string, string> ();
public string ExecuteTargets { get; set; }
- #if NET_4_5
public ElementLocation ExecuteTargetsLocation { get; set; }
public ElementLocation ContinueOnErrorLocation { get; set; }
public string MSBuildArchitecture { get; set; }
public ElementLocation MSBuildArchitectureLocation { get; set; }
public string MSBuildRuntime { get; set; }
public ElementLocation MSBuildRuntimeLocation { get; set; }
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs
index d21deb7d9cf..4189bf8b2f1 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs
@@ -717,11 +717,7 @@ namespace Microsoft.Build.Evaluation
public bool SkipEvaluation { get; set; }
- #if NET_4_5
public
- #else
- internal
- #endif
IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
index d7d761f3a95..01a66207142 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
@@ -69,11 +69,7 @@ namespace Microsoft.Build.Evaluation
static ProjectCollection ()
{
- #if NET_4_5
global_project_collection = new ProjectCollection (new ReadOnlyDictionary<string, string> (new Dictionary<string, string> ()));
- #else
- global_project_collection = new ProjectCollection (new Dictionary<string, string> ());
- #endif
}
public static string Escape (string unescapedString)
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/SubToolset.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/SubToolset.cs
index 0b4ad39224f..72794d1f11d 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/SubToolset.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/SubToolset.cs
@@ -4,9 +4,7 @@ using Microsoft.Build.Execution;
namespace Microsoft.Build.Evaluation
{
- #if NET_4_5
public
- #endif
class SubToolset
{
internal SubToolset (IDictionary<string, ProjectPropertyInstance> properties, string subToolsetVersion)
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Toolset.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Toolset.cs
index b0182c53bb8..2d29f0db9e3 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Toolset.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Toolset.cs
@@ -48,9 +48,7 @@ namespace Microsoft.Build.Evaluation
{
}
-#if NET_4_5
public
-#endif
Toolset (string toolsVersion, string toolsPath, IDictionary<string, string> buildProperties,
ProjectCollection projectCollection, IDictionary<string, SubToolset> subToolsets,
string msbuildOverrideTasksPath)
@@ -61,15 +59,11 @@ namespace Microsoft.Build.Evaluation
buildProperties == null ?
new Dictionary<string, ProjectPropertyInstance> () :
buildProperties.Select (p => new ProjectPropertyInstance (p.Key, true, p.Value)).ToDictionary (e => e.Name);
-#if NET_4_5
SubToolsets = subToolsets ?? new Dictionary<string, SubToolset> ();
-#endif
}
-#if NET_4_5
public string DefaultSubToolsetVersion { get; private set; }
public IDictionary<string, SubToolset> SubToolsets { get; private set; }
-#endif
public IDictionary<string, ProjectPropertyInstance> Properties { get; private set; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs
index 00d9802134c..d4414a9b8a5 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs
@@ -99,9 +99,7 @@ namespace Microsoft.Build.Execution
IDictionary<string, string> global_properties;
string full_path, directory;
- #if NET_4_5
ElementLocation location;
- #endif
Dictionary<string, ProjectItemDefinitionInstance> item_definitions;
List<ResolvedImport> raw_imports; // maybe we don't need this...
@@ -146,9 +144,7 @@ namespace Microsoft.Build.Execution
void InitializeProperties (ProjectRootElement xml)
{
- #if NET_4_5
location = xml.Location;
- #endif
full_path = xml.FullPath;
directory = string.IsNullOrWhiteSpace (xml.DirectoryPath) ? System.IO.Directory.GetCurrentDirectory () : xml.DirectoryPath;
InitialTargets = xml.InitialTargets.Split (item_target_sep, StringSplitOptions.RemoveEmptyEntries).Select (s => s.Trim ()).ToList ();
@@ -334,11 +330,9 @@ namespace Microsoft.Build.Execution
public List<string> InitialTargets { get; private set; }
-#if NET_4_5
public bool IsImmutable {
get { throw new NotImplementedException (); }
}
-#endif
public IDictionary<string, ProjectItemDefinitionInstance> ItemDefinitions {
get { return item_definitions; }
@@ -352,21 +346,15 @@ namespace Microsoft.Build.Execution
get { return all_evaluated_items.Select (i => i.ItemType).Distinct ().ToArray (); }
}
-#if NET_4_5
public ElementLocation ProjectFileLocation {
get { return location; }
}
-#endif
public ICollection<ProjectPropertyInstance> Properties {
get { return properties.Values; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
IDictionary<string, ProjectTargetInstance> Targets {
get { return targets; }
}
@@ -521,12 +509,10 @@ namespace Microsoft.Build.Execution
throw new NotImplementedException ();
}
-#if NET_4_5
public void UpdateStateFrom (ProjectInstance projectState)
{
throw new NotImplementedException ();
}
-#endif
// static members
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskInstance.cs
index bf9d03f05f7..87bc32efcf5 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskInstance.cs
@@ -51,29 +51,17 @@ namespace Microsoft.Build.Execution
get { return condition; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation Location {
get { return location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
ElementLocation ExecuteTargetsLocation { get; private set; }
public ICollection<ProjectItemGroupTaskItemInstance> Items { get; private set; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskItemInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskItemInstance.cs
index 8d947b72ba5..8aca7e55c47 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskItemInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskItemInstance.cs
@@ -41,7 +41,6 @@ namespace Microsoft.Build.Execution
ItemType = xml.ItemType;
Metadata = xml.Metadata.Select (m => new ProjectItemGroupTaskMetadataInstance (m)).ToArray ();
Remove = xml.Remove;
- #if NET_4_5
KeepDuplicates = xml.KeepDuplicates;
KeepMetadata = xml.KeepMetadata;
RemoveMetadata = xml.RemoveMetadata;
@@ -53,7 +52,6 @@ namespace Microsoft.Build.Execution
KeepDuplicatesLocation = xml.KeepDuplicatesLocation;
RemoveLocation = xml.RemoveLocation;
RemoveMetadataLocation = xml.RemoveMetadataLocation;
- #endif
}
public string Condition { get; private set; }
@@ -73,7 +71,6 @@ namespace Microsoft.Build.Execution
public string Remove { get; private set; }
public string RemoveMetadata { get; private set; }
- #if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation ExcludeLocation { get; private set; }
@@ -89,7 +86,6 @@ namespace Microsoft.Build.Execution
public ElementLocation RemoveLocation { get; private set; }
public ElementLocation RemoveMetadataLocation { get; private set; }
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskMetadataInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskMetadataInstance.cs
index ad871731c56..1267636195e 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskMetadataInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectItemGroupTaskMetadataInstance.cs
@@ -38,21 +38,17 @@ namespace Microsoft.Build.Execution
Condition = xml.Condition;
Name = xml.Name;
Value = xml.Value;
- #if NET_4_5
ConditionLocation = xml.ConditionLocation;
Location = xml.Location;
- #endif
}
public string Condition { get; private set; }
public string Name { get; private set; }
public string Value { get; private set; }
- #if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation Location { get; private set; }
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectOnErrorInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectOnErrorInstance.cs
index b5572ef8a54..e8f2607ba91 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectOnErrorInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectOnErrorInstance.cs
@@ -36,11 +36,9 @@ namespace Microsoft.Build.Execution
condition = xml.Condition;
ExecuteTargets = xml.ExecuteTargetsAttribute;
//this.FullPath = fullPath;
- #if NET_4_5
condition_location = xml.ConditionLocation;
ExecuteTargetsLocation = xml.ExecuteTargetsAttributeLocation;
location = xml.Location;
- #endif
}
readonly string condition;
@@ -53,27 +51,15 @@ namespace Microsoft.Build.Execution
readonly ElementLocation condition_location, location;
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
ElementLocation ExecuteTargetsLocation { get; private set; }
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation Location {
get { return location; }
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskInstance.cs
index 1e5d7fa6e3e..18e8eec4c2a 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskInstance.cs
@@ -51,29 +51,17 @@ namespace Microsoft.Build.Execution
get { return condition; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation Location {
get { return location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
ElementLocation ExecuteTargetsLocation { get; private set; }
public ICollection<ProjectPropertyGroupTaskPropertyInstance> Properties { get; private set; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskPropertyInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskPropertyInstance.cs
index df1d2c6af15..280d4760ca3 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskPropertyInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectPropertyGroupTaskPropertyInstance.cs
@@ -39,10 +39,8 @@ namespace Microsoft.Build.Execution
Condition = xml.Condition;
Name = xml.Name;
Value = xml.Value;
- #if NET_4_5
ConditionLocation = xml.ConditionLocation;
Location = xml.Location;
- #endif
}
public string Condition { get; private set; }
@@ -51,11 +49,9 @@ namespace Microsoft.Build.Execution
public string Value { get; private set; }
- #if NET_4_5
public ElementLocation ConditionLocation { get; private set; }
public ElementLocation Location { get; private set; }
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstance.cs
index 582cfb4c33a..b9558703b81 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstance.cs
@@ -35,9 +35,7 @@ using System.Linq;
namespace Microsoft.Build.Execution
{
-#if NET_4_5
public
-#endif
sealed class ProjectTargetInstance
{
internal ProjectTargetInstance (ProjectTargetElement xml)
@@ -64,7 +62,6 @@ namespace Microsoft.Build.Execution
Outputs = xml.Outputs;
Returns = xml.Returns;
Tasks = xml.Tasks.Select (t => new ProjectTaskInstance (t)).ToArray ();
- #if NET_4_5
AfterTargetsLocation = xml.AfterTargetsLocation;
BeforeTargetsLocation = xml.BeforeTargetsLocation;
ConditionLocation = xml.ConditionLocation;
@@ -74,7 +71,6 @@ namespace Microsoft.Build.Execution
Location = xml.Location;
OutputsLocation = xml.OutputsLocation;
ReturnsLocation = xml.ReturnsLocation;
- #endif
}
public ElementLocation AfterTargetsLocation { get; private set; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstanceChild.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstanceChild.cs
index aa38e6b006e..90ea65b14d6 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstanceChild.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTargetInstanceChild.cs
@@ -34,18 +34,10 @@ namespace Microsoft.Build.Execution
{
public abstract string Condition { get; }
public string FullPath { get; internal set; }
- #if NET_4_5
public
- #else
- internal
- #endif
abstract ElementLocation ConditionLocation { get; }
- #if NET_4_5
public
- #else
- internal
- #endif
abstract ElementLocation Location { get; }
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstance.cs
index bc53da16566..4ce9ef11d83 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstance.cs
@@ -47,7 +47,6 @@ namespace Microsoft.Build.Execution
throw new NotSupportedException ();
}).ToArray ();
Parameters = new Dictionary<string,string> (xml.Parameters);
- #if NET_4_5
MSBuildArchitecture = xml.MSBuildArchitecture;
MSBuildRuntime = xml.MSBuildRuntime;
@@ -56,7 +55,6 @@ namespace Microsoft.Build.Execution
location = xml.Location;
MSBuildArchitectureLocation = xml.MSBuildArchitectureLocation;
MSBuildRuntimeLocation = xml.MSBuildRuntimeLocation;
- #endif
}
string condition;
@@ -66,27 +64,18 @@ namespace Microsoft.Build.Execution
ElementLocation condition_location, location;
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation ConditionLocation {
get { return condition_location; }
}
- #if NET_4_5
public
- #else
- internal
- #endif
override ElementLocation Location {
get { return location; }
}
public string ContinueOnError { get; private set; }
- #if NET_4_5
public ElementLocation ContinueOnErrorLocation { get; private set; }
public string MSBuildArchitecture { get; private set; }
@@ -96,7 +85,6 @@ namespace Microsoft.Build.Execution
public string MSBuildRuntime { get; private set; }
public ElementLocation MSBuildRuntimeLocation { get; private set; }
- #endif
public string Name { get; private set; }
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstanceChild.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstanceChild.cs
index 77ea7a25251..425f376b6ab 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstanceChild.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskInstanceChild.cs
@@ -6,11 +6,9 @@ namespace Microsoft.Build.Execution
public abstract class ProjectTaskInstanceChild
{
public abstract string Condition { get; }
- #if NET_4_5
public abstract ElementLocation ConditionLocation { get; }
public abstract ElementLocation Location { get; }
public abstract ElementLocation TaskParameterLocation { get; }
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputItemInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputItemInstance.cs
index 356f9a62f2c..2562c50590b 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputItemInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputItemInstance.cs
@@ -10,11 +10,9 @@ namespace Microsoft.Build.Execution
condition = xml.Condition;
ItemType = xml.ItemType;
TaskParameter = xml.TaskParameter;
- #if NET_4_5
condition_location = xml.ConditionLocation;
location = xml.Location;
task_parameter_location = xml.TaskParameterLocation;
- #endif
}
public string ItemType { get; private set; }
@@ -24,7 +22,6 @@ namespace Microsoft.Build.Execution
public override string Condition {
get { return condition; }
}
- #if NET_4_5
readonly ElementLocation condition_location, location, task_parameter_location;
public ElementLocation ItemTypeLocation { get; private set; }
public override ElementLocation ConditionLocation {
@@ -36,7 +33,6 @@ namespace Microsoft.Build.Execution
public override ElementLocation TaskParameterLocation {
get { return task_parameter_location; }
}
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputPropertyInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputPropertyInstance.cs
index 855268e1309..34604cace42 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputPropertyInstance.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectTaskOutputPropertyInstance.cs
@@ -10,11 +10,9 @@ namespace Microsoft.Build.Execution
condition = xml.Condition;
PropertyName = xml.PropertyName;
TaskParameter = xml.TaskParameter;
- #if NET_4_5
condition_location = xml.ConditionLocation;
location = xml.Location;
task_parameter_location = xml.TaskParameterLocation;
- #endif
}
public string PropertyName { get; private set; }
@@ -25,7 +23,6 @@ namespace Microsoft.Build.Execution
get { return condition; }
}
- #if NET_4_5
readonly ElementLocation condition_location, location, task_parameter_location;
public ElementLocation PropertyNameLocation { get; private set; }
public override ElementLocation ConditionLocation {
@@ -37,7 +34,6 @@ namespace Microsoft.Build.Execution
public override ElementLocation TaskParameterLocation {
get { return task_parameter_location; }
}
- #endif
}
}
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
index 76f7f906e8b..93244292518 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
@@ -42,11 +42,7 @@ using System.Xml;
namespace Microsoft.Build.Internal
{
class BuildEngine4
-#if NET_4_5
: IBuildEngine4
-#else
- : IBuildEngine3
-#endif
{
public BuildEngine4 (BuildSubmission submission)
{
@@ -318,10 +314,8 @@ namespace Microsoft.Build.Internal
// Create Task instance.
var factoryIdentityParameters = new Dictionary<string,string> ();
- #if NET_4_5
factoryIdentityParameters ["MSBuildRuntime"] = taskInstance.MSBuildRuntime;
factoryIdentityParameters ["MSBuildArchitecture"] = taskInstance.MSBuildArchitecture;
- #endif
var task = args.BuildTaskFactory.CreateTask (taskInstance.Name, factoryIdentityParameters, this);
if (task == null)
throw new InvalidOperationException (string.Format ("TaskFactory {0} returned null Task", args.BuildTaskFactory));
@@ -523,7 +517,6 @@ namespace Microsoft.Build.Internal
}
}
-#if NET_4_5
#region IBuildEngine4 implementation
// task objects are not in use anyways though...
@@ -564,7 +557,6 @@ namespace Microsoft.Build.Internal
return reg.Object;
}
#endregion
-#endif
#region IBuildEngine3 implementation
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildTaskFactory.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildTaskFactory.cs
index c587b351365..c33f7b5a459 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildTaskFactory.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildTaskFactory.cs
@@ -62,12 +62,10 @@ namespace Microsoft.Build.Internal
var tf = task_factories.FirstOrDefault (f => f.GetType () == td.TaskFactoryType);
if (tf == null) {
tf = (ITaskFactory) Activator.CreateInstance (td.TaskFactoryType);
-#if NET_4_5
var tf2 = tf as ITaskFactory2;
if (tf2 != null)
tf2.Initialize (name, factoryIdentityParameters, td.TaskFactoryParameters, td.TaskBody, engine);
else
-#endif
tf.Initialize (name, td.TaskFactoryParameters, td.TaskBody, engine);
task_factories.Add (tf);
}
diff --git a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs
index 5f8bff5d062..0fed5e43f17 100644
--- a/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs
+++ b/mcs/class/Mono.CodeContracts/Mono.CodeContracts.Rewrite/ContractsRuntime.cs
@@ -195,11 +195,7 @@ namespace Mono.CodeContracts.Rewrite {
TypeReference typeContractFailureKind = this.module.Import (typeof (ContractFailureKind));
TypeReference typeString = this.module.Import (typeof (string));
TypeReference typeException = this.module.Import (typeof (Exception));
-#if NET_4_5
var helper = typeof (ContractHelper);
-#else
- var helper = typeof (System.Diagnostics.Contracts.Internal.ContractHelper);
-#endif
MethodReference mRaiseContractFailedEvent = this.module.Import (helper.GetMethod ("RaiseContractFailedEvent"));
// Create method
MethodDefinition method = new MethodDefinition ("ReportFailure",
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
index e65f62fc945..6c20cd9937a 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
@@ -2,9 +2,7 @@ using System;
using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
using System.Threading;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace Mono.Debugger.Soft
{
@@ -169,7 +167,6 @@ namespace Mono.Debugger.Soft
return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
}
-#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
BeginInvokeMethod (thread, method, arguments, options, iar =>
@@ -199,7 +196,6 @@ namespace Mono.Debugger.Soft
}, null);
return tcs.Task;
}
-#endif
//
// Invoke the members of METHODS one-by-one, calling CALLBACK after each invoke was finished. The IAsyncResult will be marked as completed after all invokes have
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
index 1aa1a4ef5ee..f42d9dcb9ea 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace Mono.Debugger.Soft
{
@@ -103,7 +101,6 @@ namespace Mono.Debugger.Soft
return result;
}
-#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
BeginInvokeMethod (thread, method, arguments, options, iar =>
@@ -133,6 +130,5 @@ namespace Mono.Debugger.Soft
}, null);
return tcs.Task;
}
-#endif
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
index 3970f2a5768..f92dca03932 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
@@ -3,9 +3,7 @@ using System.Collections.Generic;
using System.Reflection;
using C = Mono.Cecil;
using Mono.Cecil.Metadata;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace Mono.Debugger.Soft
{
@@ -810,7 +808,6 @@ namespace Mono.Debugger.Soft
return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
}
-#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
BeginInvokeMethod (thread, method, arguments, options, iar =>
@@ -825,7 +822,6 @@ namespace Mono.Debugger.Soft
}, null);
return tcs.Task;
}
-#endif
public Value NewInstance (ThreadMirror thread, MethodMirror method, IList<Value> arguments) {
return NewInstance (thread, method, arguments, InvokeOptions.None);
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
index 787a3924793..bf425763924 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
@@ -40,9 +40,7 @@ namespace Mono.Security.Protocol.Tls
Ssl2 = 12,
Ssl3 = 48,
Tls = 192,
-#if NET_4_5
Tls11 = 768,
Tls12 = 3072,
-#endif
}
} \ No newline at end of file
diff --git a/mcs/class/System.Core/System.Linq.Expressions/DynamicExpressionVisitor.cs b/mcs/class/System.Core/System.Linq.Expressions/DynamicExpressionVisitor.cs
index d83e62ff58e..7b15a2cef37 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/DynamicExpressionVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/DynamicExpressionVisitor.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
namespace System.Linq.Expressions
{
@@ -35,4 +34,3 @@ namespace System.Linq.Expressions
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs
index 7bd031f567f..b3d93f7718b 100644
--- a/mcs/class/System.Core/System.Linq/Enumerable.cs
+++ b/mcs/class/System.Core/System.Linq/Enumerable.cs
@@ -744,11 +744,9 @@ namespace System.Linq
if (list != null)
return list [index];
-#if NET_4_5
var readOnlyList = source as IReadOnlyList<TSource>;
if (readOnlyList != null)
return readOnlyList[index];
-#endif
return source.ElementAt (index, Fallback.Throw);
}
@@ -768,11 +766,9 @@ namespace System.Linq
if (list != null)
return index < list.Count ? list [index] : default (TSource);
-#if NET_4_5
var readOnlyList = source as IReadOnlyList<TSource>;
if (readOnlyList != null)
return index < readOnlyList.Count ? readOnlyList [index] : default (TSource);
-#endif
return source.ElementAt (index, Fallback.Default);
}
diff --git a/mcs/class/System.Core/System.Runtime.CompilerServices/ExtensionAttribute.cs b/mcs/class/System.Core/System.Runtime.CompilerServices/ExtensionAttribute.cs
index 860b7b09aa9..6b563367930 100644
--- a/mcs/class/System.Core/System.Runtime.CompilerServices/ExtensionAttribute.cs
+++ b/mcs/class/System.Core/System.Runtime.CompilerServices/ExtensionAttribute.cs
@@ -27,19 +27,8 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Runtime.CompilerServices;
[assembly: TypeForwardedTo (typeof (ExtensionAttribute))]
-#else
-
-namespace System.Runtime.CompilerServices {
-
- [AttributeUsage (AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
- public sealed class ExtensionAttribute : Attribute {
- }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.cs b/mcs/class/System.Core/System/TimeZoneInfo.cs
index df093f8cb8f..3588520a454 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.cs
@@ -389,12 +389,10 @@ namespace System
return new TimeZoneInfo (id, baseUtcOffset, displayName, standardDisplayName, daylightDisplayName, adjustmentRules, disableDaylightSavingTime);
}
-#if NET_4_5
public override bool Equals (object obj)
{
return Equals (obj as TimeZoneInfo);
}
-#endif
public bool Equals (TimeZoneInfo other)
{
diff --git a/mcs/class/System.Data/System.Data.Common/DbCommand.cs b/mcs/class/System.Data/System.Data.Common/DbCommand.cs
index e7cbdbe6b40..ad569315fca 100644
--- a/mcs/class/System.Data/System.Data.Common/DbCommand.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbCommand.cs
@@ -33,10 +33,8 @@
using System.ComponentModel;
using System.Data;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Data.Common {
public abstract class DbCommand : Component, IDbCommand, IDisposable
@@ -150,7 +148,6 @@ namespace System.Data.Common {
public abstract void Prepare ();
-#if NET_4_5
protected virtual Task<DbDataReader> ExecuteDbDataReaderAsync (CommandBehavior behavior, CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested) {
@@ -236,7 +233,6 @@ namespace System.Data.Common {
}
}
-#endif
#endregion // Methods
diff --git a/mcs/class/System.Data/System.Data.Common/DbConnection.cs b/mcs/class/System.Data/System.Data.Common/DbConnection.cs
index 87f4521e4d1..c8c51f2af3b 100644
--- a/mcs/class/System.Data/System.Data.Common/DbConnection.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbConnection.cs
@@ -34,10 +34,8 @@ using System.ComponentModel;
using System.Data;
using System.Transactions;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Data.Common {
public abstract class DbConnection : Component, IDbConnection, IDisposable
@@ -742,7 +740,6 @@ namespace System.Data.Common {
StateChange (this, stateChange);
}
-#if NET_4_5
public Task OpenAsync ()
{
return OpenAsync (CancellationToken.None);
@@ -761,7 +758,6 @@ namespace System.Data.Common {
return TaskHelper.CreateExceptionTask (e);
}
}
-#endif
#endregion // Methods
diff --git a/mcs/class/System.Data/System.Data.Common/DbDataReader.cs b/mcs/class/System.Data/System.Data.Common/DbDataReader.cs
index deadc74868d..45b5a5c9862 100644
--- a/mcs/class/System.Data/System.Data.Common/DbDataReader.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbDataReader.cs
@@ -35,10 +35,8 @@ using System.ComponentModel;
using System.Data;
using System.IO;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Data.Common {
public abstract class DbDataReader : MarshalByRefObject, IDataReader, IDataRecord, IDisposable, IEnumerable
@@ -182,7 +180,6 @@ namespace System.Data.Common {
return schemaTable;
}
-#if NET_4_5
public virtual T GetFieldValue<T> (int i)
{
return (T) GetValue (i);
@@ -284,7 +281,6 @@ namespace System.Data.Common {
return TaskHelper.CreateExceptionTask<bool> (e);
}
}
-#endif
#endregion // Methods
}
diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
index 0ea515a3455..d9c2b485d2c 100644
--- a/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
@@ -78,7 +78,6 @@ namespace System.Data.Common {
throw new ConfigurationErrorsException (String.Format("Failed to find or load the registered .Net Framework Data Provider '{0}'.", providerInvariantName));
}
-#if NET_4_5
public static DbProviderFactory GetFactory (DbConnection connection)
{
if (connection == null)
@@ -86,7 +85,6 @@ namespace System.Data.Common {
return connection.DbProviderFactory;
}
-#endif
public static DataTable GetFactoryClasses ()
{
diff --git a/mcs/class/System.Data/System.Data.Common/TaskHelper.cs b/mcs/class/System.Data/System.Data.Common/TaskHelper.cs
index 511edbff86e..d10c73fb522 100644
--- a/mcs/class/System.Data/System.Data.Common/TaskHelper.cs
+++ b/mcs/class/System.Data/System.Data.Common/TaskHelper.cs
@@ -23,7 +23,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System;
using System.Threading.Tasks;
@@ -68,4 +67,3 @@ namespace System.Data.Common {
}
}
-#endif
diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
index a9c1439332e..1b7d3e867c1 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs
@@ -1406,7 +1406,6 @@ namespace System.Data.SqlClient
return (sb);
}
-#if NET_4_5
[MonoTODO]
public override T GetFieldValue<T> (int i)
{
@@ -1419,7 +1418,6 @@ namespace System.Data.SqlClient
throw new NotImplementedException ();
}
-#endif
#endregion // Methods
}
}
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
index 5d999cb9520..ff9734656ef 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
@@ -25,7 +25,6 @@
// 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.Xml;
@@ -36,4 +35,3 @@ namespace System.IdentityModel.Configuration
void LoadCustomConfiguration(XmlNodeList nodeList);
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs
index 14a1c7f33bf..42e0fb07d59 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs
@@ -25,7 +25,6 @@
// 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.IdentityModel.Tokens;
@@ -37,4 +36,3 @@ namespace System.IdentityModel.Configuration
public TokenReplayCache TokenReplayCache { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
index e7efc435221..c61eda717fc 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
@@ -25,7 +25,6 @@
// 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;
@@ -50,4 +49,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
index 81756083214..36507efca33 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.ObjectModel;
@@ -61,4 +60,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs
index 57647c680d5..2e81813ea99 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs
@@ -25,7 +25,6 @@
// 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.IdentityModel.Tokens;
using System.Security.Cryptography;
@@ -57,4 +56,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs
index f573f9173ce..539de33e9a6 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs
@@ -25,7 +25,6 @@
// 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;
@@ -46,4 +45,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
index df81a3822a2..f7cc20a968c 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Tokens;
@@ -52,4 +51,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
index 6efd2d918be..f31045f7bcf 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
@@ -25,7 +25,6 @@
// 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.IdentityModel.Tokens;
@@ -52,4 +51,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
index 9d976d07f01..fd73040f64c 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Tokens;
@@ -54,4 +53,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
index 04d2f31c4ca..9b01ad86fd1 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Tokens;
@@ -47,4 +46,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs
index 7d6d83649de..5646993e1c7 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs
@@ -25,7 +25,6 @@
// 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;
@@ -42,4 +41,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs
index b30caef7ef8..8f6a57c15c8 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Tokens;
@@ -54,4 +53,3 @@ namespace System.IdentityModel.Protocols.WSTrust
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
index e339b7208b3..ddb110a1d2a 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel;
@@ -55,4 +54,3 @@ namespace System.IdentityModel.Protocols.WSTrust
public UseKey UseKey { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs
index 610231822de..73317ea6016 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs
@@ -25,7 +25,6 @@
// 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.Collections.ObjectModel;
using System.IdentityModel.Selectors;
@@ -48,4 +47,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs
index a89e150b464..9e70be106af 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.ObjectModel;
@@ -43,4 +42,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs
index 13879c5342f..14b3c2b596d 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.ObjectModel;
@@ -44,4 +43,3 @@ namespace System.Security.Claims
public String Session { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs
index 5e9f589c294..d835a6acc8e 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs
@@ -25,7 +25,6 @@
// 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;
using System.IO;
using System.Runtime.Serialization;
@@ -114,4 +113,3 @@ namespace System.IdentityModel.Tokens {
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs
index c73dc8273ee..833adb15468 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs
@@ -25,7 +25,6 @@
// 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;
@@ -47,4 +46,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs
index cdfded6ea27..d6992445508 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs
@@ -25,7 +25,6 @@
// 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.IdentityModel.Configuration;
using System.Xml;
@@ -52,4 +51,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs
index 8afc60133fd..f0edaf09fe8 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs
@@ -25,7 +25,6 @@
// 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.IdentityModel.Protocols.WSTrust;
@@ -38,4 +37,3 @@ namespace System.IdentityModel.Tokens
public abstract void ApplyTo (RequestSecurityTokenResponse response);
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
index 7e0930817fe..1b03da61861 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
@@ -71,4 +70,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
index 2f10c949029..c5301cd6f8e 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
@@ -25,7 +25,6 @@
// 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;
using System.Runtime.Serialization;
@@ -51,4 +50,3 @@ namespace System.IdentityModel.Tokens
{ }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs
index 7b6de3f6fcd..14bc4bfcb2e 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.ObjectModel;
@@ -120,4 +119,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
index 1b0be5519a5..71ec5da12ce 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
@@ -194,4 +193,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
index 89f37c8c6e0..4d4589c427a 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Configuration;
@@ -63,4 +62,3 @@ namespace System.IdentityModel.Tokens
public StoreLocation TrustedStoreLocation { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
index 9f15b7b6448..4f9e5f18f6c 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
@@ -25,7 +25,6 @@
// 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;
using System.Runtime.Serialization;
@@ -51,4 +50,3 @@ namespace System.IdentityModel.Tokens
{ }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
index eb4a786b336..e04d0cbd28e 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
@@ -25,7 +25,6 @@
// 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;
using System.Runtime.Serialization;
@@ -51,4 +50,3 @@ namespace System.IdentityModel.Tokens
{ }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs
index 5597b8de2af..175dfadbef2 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.ObjectModel;
@@ -106,4 +105,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
index aecc0c8057f..06f65d5af03 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
@@ -48,4 +47,3 @@ namespace System.IdentityModel.Tokens
public abstract void RemoveAll (string endpointId, UniqueId contextId);
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
index 27b6d8f4234..410a1143b02 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
@@ -25,7 +25,6 @@
// 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;
using System.Xml;
@@ -71,4 +70,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
index d6f72359b4e..e4f62268339 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
@@ -145,4 +144,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs
index 468fd633f90..0e5fd79bfea 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs
@@ -25,7 +25,6 @@
// 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;
using System.IdentityModel.Configuration;
@@ -49,4 +48,3 @@ namespace System.IdentityModel.Tokens
public abstract void Remove (string key);
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs
index e191f40770e..8347a553784 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs
@@ -25,7 +25,6 @@
// 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;
using System.Security.Cryptography.X509Certificates;
@@ -59,4 +58,3 @@ namespace System.IdentityModel.Tokens
}
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs b/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs
index f310a84adba..b51d0c4fe9e 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs
@@ -25,7 +25,6 @@
// 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;
@@ -36,4 +35,3 @@ namespace System.IdentityModel
public abstract byte[] Encode (byte[] value);
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs b/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs
index 9f6b79343a4..6f41eb1b4ec 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
@@ -39,4 +38,3 @@ namespace System.IdentityModel
public Dictionary<string, object> Properties { get { return properties; } }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs b/mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs
index 2e1e7115ca9..0a1f0ceb480 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs
@@ -25,7 +25,6 @@
// 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;
using System.Runtime.Serialization;
@@ -51,4 +50,3 @@ namespace System.IdentityModel
{ }
}
}
-#endif
diff --git a/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs b/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs
index 832e2a43c1e..b66db3bb0d8 100644
--- a/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs
+++ b/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs
@@ -25,7 +25,6 @@
// 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.ServiceModel.Security
{
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Security
Custom
}
}
-#endif
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
index 44b1ae16164..8a33e29d1b5 100755
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
@@ -213,7 +213,6 @@ namespace System.Runtime.Serialization
DataContractResolver = dataContractResolver;
}
-#if NET_4_5
public DataContractSerializer (Type type, DataContractSerializerSettings settings)
: this (type, settings.RootName, settings.RootNamespace, settings.KnownTypes,
settings.MaxItemsInObjectGraph, settings.IgnoreExtensionDataObject,
@@ -221,7 +220,6 @@ namespace System.Runtime.Serialization
settings.DataContractResolver)
{
}
-#endif
void PopulateTypes (IEnumerable<Type> knownTypes)
{
@@ -549,12 +547,10 @@ namespace System.Runtime.Serialization
WriteEndObject (XmlDictionaryWriter.CreateDictionaryWriter (writer));
}
-#if NET_4_5
[MonoTODO]
public bool SerializeReadOnlyTypes {
get { throw new NotImplementedException (); }
}
-#endif
private bool IsAny ()
{
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DateTimeFormat.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DateTimeFormat.cs
index 3ccc33a09a4..a6dc3585255 100644
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DateTimeFormat.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DateTimeFormat.cs
@@ -23,7 +23,6 @@
// 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;
using System.Globalization;
@@ -54,4 +53,3 @@ namespace System.Runtime.Serialization {
}
}
}
-#endif
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
index 4168ba014d2..702e7f31b8f 100755
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs
@@ -76,13 +76,6 @@ namespace System.Runtime.Serialization
internal static class TypeExtensions
{
-#if !NET_4_5
- public static T GetCustomAttribute<T> (this MemberInfo type, bool inherit)
- {
- var arr = type.GetCustomAttributes (typeof (T), inherit);
- return arr != null && arr.Length == 1 ? (T) arr [0] : default (T);
- }
-#endif
public static IEnumerable<Type> GetInterfacesOrSelfInterface (this Type type)
{
if (type.IsInterface)
diff --git a/mcs/class/System.ServiceModel.Web/Assembly/TypeForwarders.cs b/mcs/class/System.ServiceModel.Web/Assembly/TypeForwarders.cs
index 47f656845fd..bce4e8f9d08 100644
--- a/mcs/class/System.ServiceModel.Web/Assembly/TypeForwarders.cs
+++ b/mcs/class/System.ServiceModel.Web/Assembly/TypeForwarders.cs
@@ -24,7 +24,5 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.Json.DataContractJsonSerializer))]
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
index 8ae0ce57356..8077136394d 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/DataContractJsonSerializer.cs
@@ -117,13 +117,11 @@ namespace System.Runtime.Serialization.Json
{
}
-#if NET_4_5
public DataContractJsonSerializer (Type type, DataContractJsonSerializerSettings settings)
: this (type, settings.RootName, settings.KnownTypes, settings.MaxItemsInObjectGraph, settings.IgnoreExtensionDataObject,
settings.DataContractSurrogate, false)
{
}
-#endif
#endregion
@@ -271,7 +269,6 @@ namespace System.Runtime.Serialization.Json
writer.WriteEndElement ();
}
-#if NET_4_5
[MonoTODO]
public DateTimeFormat DateTimeFormat {
get { throw new NotImplementedException (); }
@@ -291,7 +288,6 @@ namespace System.Runtime.Serialization.Json
public bool UseSimpleDictionaryFormat {
get { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
index cb2a163bbe1..64f235d2ab7 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
@@ -154,12 +154,10 @@ namespace System.ServiceModel.Channels
}
#endif
-#if NET_4_5
[MonoTODO]
public CompressionFormat CompressionFormat {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingParameterCollection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingParameterCollection.cs
index 0787dd3b094..21c8222f8aa 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingParameterCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BindingParameterCollection.cs
@@ -33,7 +33,6 @@ namespace System.ServiceModel.Channels
public class BindingParameterCollection
: KeyedByTypeCollection<object>
{
-#if NET_4_5
protected override Type GetKeyForItem (object item)
{
return base.GetKeyForItem (item);
@@ -48,6 +47,5 @@ namespace System.ServiceModel.Channels
{
base.SetItem (index, item);
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs
index 8ea39448f04..e0f6cb67507 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestMessageProperty.cs
@@ -31,9 +31,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
public sealed class HttpRequestMessageProperty
-#if NET_4_5
: IMessageProperty
-#endif
{
public static string Name {
get { return "httpRequest"; }
@@ -67,7 +65,6 @@ namespace System.ServiceModel.Channels
}
-#if NET_4_5
IMessageProperty IMessageProperty.CreateCopy ()
{
var copy = new HttpRequestMessageProperty ();
@@ -78,6 +75,5 @@ namespace System.ServiceModel.Channels
copy.suppress_entity = suppress_entity;
return copy;
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpResponseMessageProperty.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpResponseMessageProperty.cs
index e2cbf303b74..c14f001949c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpResponseMessageProperty.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpResponseMessageProperty.cs
@@ -31,9 +31,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
public sealed class HttpResponseMessageProperty
-#if NET_4_5
: IMessageProperty
-#endif
{
public static string Name {
get { return "httpResponse"; }
@@ -67,7 +65,6 @@ namespace System.ServiceModel.Channels
set { suppress_entity = value; }
}
-#if NET_4_5
IMessageProperty IMessageProperty.CreateCopy ()
{
var copy = new HttpResponseMessageProperty ();
@@ -78,6 +75,5 @@ namespace System.ServiceModel.Channels
copy.suppress_entity = suppress_entity;
return copy;
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
index ee06d69d499..eff17df9bca 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
@@ -237,12 +237,10 @@ namespace System.ServiceModel.Channels
return base.GetProperty<T> (context);
}
-#if NET_4_5
public WebSocketTransportSettings WebSocketSettings {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
#if !NET_2_1
void IPolicyExportExtension.ExportPolicy (
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
index 864fd8c4e25..2ef66929502 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
@@ -94,7 +94,6 @@ namespace System.ServiceModel.Channels
Close ();
}
-#if NET_4_5
public T GetBody<T> ()
{
return OnGetBody<T> (GetReaderAtBodyContents ());
@@ -111,17 +110,6 @@ namespace System.ServiceModel.Channels
var xmlFormatter = new DataContractSerializer (typeof (T));
return (T)xmlFormatter.ReadObject (reader);
}
-#else
- public T GetBody<T> ()
- {
- return GetBody<T> (new DataContractSerializer (typeof (T)));
- }
-
- public T GetBody<T> (XmlObjectSerializer xmlFormatter)
- {
- return (T) xmlFormatter.ReadObject (GetReaderAtBodyContents ());
- }
-#endif
public string GetBodyAttribute (string localName, string ns)
{
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
index fd19d6a764d..523f0ac7666 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportSettings.cs
@@ -23,7 +23,6 @@
// 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.ServiceModel.Channels {
@@ -64,4 +63,3 @@ namespace System.ServiceModel.Channels {
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportUsage.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportUsage.cs
index d919923c894..5653ffc9983 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportUsage.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/WebSocketTransportUsage.cs
@@ -23,7 +23,6 @@
// 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.ServiceModel.Channels {
public enum WebSocketTransportUsage {
WhenDuplex,
@@ -31,4 +30,3 @@ namespace System.ServiceModel.Channels {
Never
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BasicHttpBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BasicHttpBindingElement.cs
index c42a42e23e6..536573b826e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BasicHttpBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BasicHttpBindingElement.cs
@@ -31,229 +31,3 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_4_5
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Configuration;
-using System.Net;
-using System.Net.Security;
-using System.Reflection;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Principal;
-using System.IdentityModel.Claims;
-using System.IdentityModel.Policy;
-using System.IdentityModel.Tokens;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.ServiceModel.Diagnostics;
-using System.ServiceModel.Dispatcher;
-using System.ServiceModel.MsmqIntegration;
-using System.ServiceModel.PeerResolvers;
-using System.ServiceModel.Security;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Xml;
-
-namespace System.ServiceModel.Configuration
-{
- public class BasicHttpBindingElement
- : StandardBindingElement, IBindingConfigurationElement
- {
- ConfigurationPropertyCollection _properties;
-
- public BasicHttpBindingElement ()
- {
- }
-
- public BasicHttpBindingElement (string name) : base (name) { }
-
- // Properties
-
- [ConfigurationProperty ("allowCookies",
- DefaultValue = false,
- Options = ConfigurationPropertyOptions.None)]
- public bool AllowCookies {
- get { return (bool) this ["allowCookies"]; }
- set { this ["allowCookies"] = value; }
- }
-
- protected override Type BindingElementType {
- get { return typeof (BasicHttpBinding); }
- }
-
- [ConfigurationProperty ("bypassProxyOnLocal",
- DefaultValue = false,
- Options = ConfigurationPropertyOptions.None)]
- public bool BypassProxyOnLocal {
- get { return (bool) this ["bypassProxyOnLocal"]; }
- set { this ["bypassProxyOnLocal"] = value; }
- }
-
- [ConfigurationProperty ("hostNameComparisonMode",
- DefaultValue = "StrongWildcard",
- Options = ConfigurationPropertyOptions.None)]
- public HostNameComparisonMode HostNameComparisonMode {
- get { return (HostNameComparisonMode) this ["hostNameComparisonMode"]; }
- set { this ["hostNameComparisonMode"] = value; }
- }
-
- [LongValidator ( MinValue = 0,
- MaxValue = 9223372036854775807,
- ExcludeRange = false)]
- [ConfigurationProperty ("maxBufferPoolSize",
- DefaultValue = "524288",
- Options = ConfigurationPropertyOptions.None)]
- public long MaxBufferPoolSize {
- get { return (long) this ["maxBufferPoolSize"]; }
- set { this ["maxBufferPoolSize"] = value; }
- }
-
- [IntegerValidator ( MinValue = 1,
- MaxValue = int.MaxValue,
- ExcludeRange = false)]
- [ConfigurationProperty ("maxBufferSize",
- DefaultValue = "65536",
- Options = ConfigurationPropertyOptions.None)]
- public int MaxBufferSize {
- get { return (int) this ["maxBufferSize"]; }
- set { this ["maxBufferSize"] = value; }
- }
-
- [LongValidator ( MinValue = 1,
- MaxValue = 9223372036854775807,
- ExcludeRange = false)]
- [ConfigurationProperty ("maxReceivedMessageSize",
- DefaultValue = "65536",
- Options = ConfigurationPropertyOptions.None)]
- public long MaxReceivedMessageSize {
- get { return (long) this ["maxReceivedMessageSize"]; }
- set { this ["maxReceivedMessageSize"] = value; }
- }
-
- [ConfigurationProperty ("messageEncoding",
- DefaultValue = "Text",
- Options = ConfigurationPropertyOptions.None)]
- public WSMessageEncoding MessageEncoding {
- get { return (WSMessageEncoding) this ["messageEncoding"]; }
- set { this ["messageEncoding"] = value; }
- }
-
- protected override ConfigurationPropertyCollection Properties {
- get {
- if (_properties == null) {
- _properties = base.Properties;
- _properties.Add (new ConfigurationProperty ("allowCookies", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("bypassProxyOnLocal", typeof (bool), "false", null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("hostNameComparisonMode", typeof (HostNameComparisonMode), "StrongWildcard", null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("maxBufferPoolSize", typeof (long), "524288", null, new LongValidator (0, 9223372036854775807, false), ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("maxBufferSize", typeof (int), "65536", null, new IntegerValidator (1, int.MaxValue, false), ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("maxReceivedMessageSize", typeof (long), "65536", null, new LongValidator (1, 9223372036854775807, false), ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("messageEncoding", typeof (WSMessageEncoding), "Text", null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("proxyAddress", typeof (Uri), null, new UriTypeConverter (), null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("readerQuotas", typeof (XmlDictionaryReaderQuotasElement), null, null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("security", typeof (BasicHttpSecurityElement), null, null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("textEncoding", typeof (Encoding), BasicHttpBinding.DefaultTextEncoding, EncodingConverter.Instance, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("transferMode", typeof (TransferMode), "Buffered", null, null, ConfigurationPropertyOptions.None));
- _properties.Add (new ConfigurationProperty ("useDefaultWebProxy", typeof (bool), "true", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
- }
- return _properties;
- }
- }
-
- [ConfigurationProperty ("proxyAddress",
- DefaultValue = null,
- Options = ConfigurationPropertyOptions.None)]
- public Uri ProxyAddress {
- get { return (Uri) this ["proxyAddress"]; }
- set { this ["proxyAddress"] = value; }
- }
-
- [ConfigurationProperty ("readerQuotas",
- Options = ConfigurationPropertyOptions.None)]
- public XmlDictionaryReaderQuotasElement ReaderQuotas {
- get { return (XmlDictionaryReaderQuotasElement) this ["readerQuotas"]; }
- }
-
- [ConfigurationProperty ("security",
- Options = ConfigurationPropertyOptions.None)]
- public BasicHttpSecurityElement Security {
- get { return (BasicHttpSecurityElement) this ["security"]; }
- }
-
- [TypeConverter (typeof (EncodingConverter))]
- [ConfigurationProperty ("textEncoding",
- DefaultValue = "utf-8",
- Options = ConfigurationPropertyOptions.None)]
- public Encoding TextEncoding {
- get { return (Encoding) this ["textEncoding"]; }
- set { this ["textEncoding"] = value; }
- }
-
- [ConfigurationProperty ("transferMode",
- DefaultValue = "Buffered",
- Options = ConfigurationPropertyOptions.None)]
- public TransferMode TransferMode {
- get { return (TransferMode) this ["transferMode"]; }
- set { this ["transferMode"] = value; }
- }
-
- [ConfigurationProperty ("useDefaultWebProxy",
- DefaultValue = true,
- Options = ConfigurationPropertyOptions.None)]
- public bool UseDefaultWebProxy {
- get { return (bool) this ["useDefaultWebProxy"]; }
- set { this ["useDefaultWebProxy"] = value; }
- }
-
- protected override void OnApplyConfiguration (Binding binding)
- {
- BasicHttpBinding basicHttpBinding = (BasicHttpBinding) binding;
-
- basicHttpBinding.AllowCookies = AllowCookies;
- basicHttpBinding.BypassProxyOnLocal = BypassProxyOnLocal;
- basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode;
- basicHttpBinding.MaxBufferPoolSize = MaxBufferPoolSize;
- basicHttpBinding.MaxBufferSize = MaxBufferSize;
- basicHttpBinding.MaxReceivedMessageSize = MaxReceivedMessageSize;
- basicHttpBinding.MessageEncoding = MessageEncoding;
- basicHttpBinding.ProxyAddress = ProxyAddress;
-
- ReaderQuotas.ApplyConfiguration (basicHttpBinding.ReaderQuotas);
-
- basicHttpBinding.Security.Mode = Security.Mode;
- Security.Transport.ApplyConfiguration (basicHttpBinding.Security.Transport);
- basicHttpBinding.TextEncoding = TextEncoding;
- basicHttpBinding.TransferMode = TransferMode;
- basicHttpBinding.UseDefaultWebProxy = UseDefaultWebProxy;
- }
-
- protected internal override void InitializeFrom (Binding binding)
- {
- BasicHttpBinding b = (BasicHttpBinding) binding;
-
- base.InitializeFrom (binding);
- AllowCookies = b.AllowCookies;
- BypassProxyOnLocal = b.BypassProxyOnLocal;
- HostNameComparisonMode = b.HostNameComparisonMode;
- MaxBufferPoolSize = b.MaxBufferPoolSize;
- MaxBufferSize = b.MaxBufferSize;
- MaxReceivedMessageSize = b.MaxReceivedMessageSize;
- MessageEncoding = b.MessageEncoding;
- ProxyAddress = b.ProxyAddress;
-
- ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
-
- Security.Mode = b.Security.Mode;
- Security.Transport.ApplyConfiguration (b.Security.Transport);
- TextEncoding = b.TextEncoding;
- TransferMode = b.TransferMode;
- UseDefaultWebProxy = b.UseDefaultWebProxy;
- }
- }
-
-}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs
index 81fad5f27f1..1b17fc25e3f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs
@@ -68,13 +68,11 @@ namespace System.ServiceModel.Configuration
get { return (BasicHttpBindingCollectionElement) this ["basicHttpBinding"]; }
}
-#if NET_4_5
[ConfigurationProperty ("basicHttpsBinding",
Options = ConfigurationPropertyOptions.None)]
public BasicHttpsBindingCollectionElement BasicHttpsBinding {
get { return (BasicHttpsBindingCollectionElement) this ["basicHttpsBinding"]; }
}
-#endif
public List<BindingCollectionElement> BindingCollections {
get {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
index 805053196d4..f8bcfaea50e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ContractDescription.cs
@@ -40,24 +40,6 @@ using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Description
{
-#if !NET_4_5
- internal static class Extensions
- {
- public static T GetCustomAttribute<T> (this MemberInfo mi, bool inherit) where T : Attribute
- {
- foreach (T att in mi.GetCustomAttributes (typeof (T), inherit))
- return att;
- return null;
- }
-
- public static T GetCustomAttribute<T> (this ParameterInfo pi, bool inherit) where T : Attribute
- {
- foreach (T att in pi.GetCustomAttributes (typeof (T), inherit))
- return att;
- return null;
- }
- }
-#endif
[DebuggerDisplay ("Name={name}, Namespace={ns}, ContractType={contractType}")]
public class ContractDescription
@@ -122,12 +104,10 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
-#if NET_4_5
[MonoTODO]
public KeyedCollection<Type,IContractBehavior> ContractBehaviors {
get { throw new NotImplementedException (); }
}
-#endif
public Type CallbackContractType {
get { return callback_contract_type; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
index caf9ddbeaf8..292baca3f4e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationDescription.cs
@@ -74,7 +74,6 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
-#if NET_4_5
[MonoTODO]
public KeyedCollection<Type,IOperationBehavior> OperationBehaviors {
get { throw new NotImplementedException (); }
@@ -85,7 +84,6 @@ namespace System.ServiceModel.Description
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
public ContractDescription DeclaringContract {
get { return contract; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
index 708faf24509..2a12209998f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
@@ -27,9 +27,7 @@
//
using System;
using System.Collections.Generic;
-#if NET_4_5
using System.Collections.ObjectModel;
-#endif
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
@@ -70,12 +68,10 @@ namespace System.ServiceModel.Description
get { return behaviors; }
}
-#if NET_4_5
[MonoTODO]
public KeyedCollection<Type,IEndpointBehavior> EndpointBehaviors {
get { throw new NotImplementedException (); }
}
-#endif
public ContractDescription Contract {
get { return contract; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
index 6d99d5b16d7..3f218beb728 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs
@@ -186,7 +186,6 @@ namespace System.ServiceModel.Dispatcher
throw new InvalidOperationException ("Cannot change this property after the service host is opened");
}
-#if NET_4_5
[MonoTODO]
public ICollection<IParameterInspector> ClientParameterInspectors {
get { throw new NotImplementedException (); }
@@ -203,7 +202,6 @@ namespace System.ServiceModel.Dispatcher
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
index 3f215925e6f..08f1839c4f7 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientRuntime.cs
@@ -98,7 +98,6 @@ namespace System.ServiceModel.Dispatcher
}
#endif
-#if NET_4_5
[MonoTODO]
public ICollection<ClientOperation> ClientOperations {
get { throw new NotImplementedException (); }
@@ -108,7 +107,6 @@ namespace System.ServiceModel.Dispatcher
public ICollection<IClientMessageInspector> ClientMessageInspectors {
get { throw new NotImplementedException (); }
}
-#endif
public bool ManualAddressing {
get { return manual_addressing; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
index 777573fc1fd..1574e68bd11 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
@@ -74,13 +74,11 @@ namespace System.ServiceModel
TransportCredentialOnly,
}
-#if NET_4_5
public enum BasicHttpsSecurityMode
{
Transport,
TransportWithMessageCredential
}
-#endif
public enum CommunicationState
{
@@ -241,9 +239,7 @@ namespace System.ServiceModel // used to be S.SM.Ch
Ntlm,
Windows,
Certificate,
-#if NET_4_5
InheritedFromHost
-#endif
}
public enum HttpProxyCredentialType
@@ -411,17 +407,6 @@ namespace System.ServiceModel.Security
Custom,
}
-#if !NET_4_5
-
- public enum X509CertificateValidationMode
- {
- None,
- PeerTrust,
- ChainTrust,
- PeerOrChainTrust,
- Custom,
- }
-#endif
}
namespace System.ServiceModel.Security.Tokens
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
index d74ec8bbc9e..ac398666b1c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
@@ -29,300 +29,3 @@
// 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 && !MOBILE
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Security;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-using System.Text;
-using System.Xml;
-using System.ServiceModel.Configuration;
-
-namespace System.ServiceModel
-{
- public class BasicHttpBinding : Binding,
- IBindingRuntimePreferences
- {
- bool allow_cookies, bypass_proxy_on_local;
- HostNameComparisonMode host_name_comparison_mode
- = HostNameComparisonMode.StrongWildcard;
- long max_buffer_pool_size = 0x80000;
- int max_buffer_size = 0x10000;
- long max_recv_message_size = 0x10000;
- WSMessageEncoding message_encoding
- = WSMessageEncoding.Text;
- Uri proxy_address;
- XmlDictionaryReaderQuotas reader_quotas
- = new XmlDictionaryReaderQuotas ();
- EnvelopeVersion env_version = EnvelopeVersion.Soap11;
- static readonly Encoding default_text_encoding = new UTF8Encoding ();
- Encoding text_encoding = default_text_encoding;
- TransferMode transfer_mode
- = TransferMode.Buffered;
- bool use_default_web_proxy = true;
- BasicHttpSecurity security;
-
- public BasicHttpBinding ()
- : this (BasicHttpSecurityMode.None)
- {
- }
-
-#if !NET_2_1
- public BasicHttpBinding (string configurationName)
- : this ()
- {
- BindingsSection bindingsSection = ConfigUtil.BindingsSection;
- BasicHttpBindingElement el =
- bindingsSection.BasicHttpBinding.Bindings [configurationName];
-
- el.ApplyConfiguration (this);
- }
-#endif
-
- public BasicHttpBinding (
- BasicHttpSecurityMode securityMode)
- {
- security = new BasicHttpSecurity (securityMode);
- }
-
- public bool AllowCookies {
- get { return allow_cookies; }
- set { allow_cookies = value; }
- }
-
- public bool BypassProxyOnLocal {
- get { return bypass_proxy_on_local; }
- set { bypass_proxy_on_local = value; }
- }
-
-#if NET_2_1
- public bool EnableHttpCookieContainer {
- get; set;
- }
-#elif NET_4_5
- [Obsolete ("Use AllowCookies.")]
- public bool EnableHttpCookieContainer {
- get { return AllowCookies; }
- set { AllowCookies = value; }
- }
-#endif
-
- public HostNameComparisonMode HostNameComparisonMode {
- get { return host_name_comparison_mode; }
- set { host_name_comparison_mode = value; }
- }
-
- public long MaxBufferPoolSize {
- get { return max_buffer_pool_size; }
- set {
- if (value <= 0)
- throw new ArgumentOutOfRangeException ();
- max_buffer_pool_size = value;
- }
- }
-
- public int MaxBufferSize {
- get { return max_buffer_size; }
- set {
- if (value <= 0)
- throw new ArgumentOutOfRangeException ();
- max_buffer_size = value;
- }
- }
-
- public long MaxReceivedMessageSize {
- get { return max_recv_message_size; }
- set {
- if (value <= 0)
- throw new ArgumentOutOfRangeException ();
- max_recv_message_size = value;
- }
- }
-
- public WSMessageEncoding MessageEncoding {
- get { return message_encoding; }
- set { message_encoding = value; }
- }
-
- public Uri ProxyAddress {
- get { return proxy_address; }
- set { proxy_address = value; }
- }
-
- public XmlDictionaryReaderQuotas ReaderQuotas {
- get { return reader_quotas; }
- set { reader_quotas = value; }
- }
-
- public override string Scheme {
- get {
- switch (Security.Mode) {
- case BasicHttpSecurityMode.Transport:
- case BasicHttpSecurityMode.TransportWithMessageCredential:
- return Uri.UriSchemeHttps;
- default:
- return Uri.UriSchemeHttp;
- }
- }
- }
-
- public BasicHttpSecurity Security {
- get { return security; }
- }
-
- public EnvelopeVersion EnvelopeVersion {
- get { return env_version; }
- }
-
- internal static Encoding DefaultTextEncoding {
- get { return default_text_encoding; }
- }
-
- public Encoding TextEncoding {
- get { return text_encoding; }
- set { text_encoding = value; }
- }
-
- public TransferMode TransferMode {
- get { return transfer_mode; }
- set { transfer_mode = value; }
- }
-
- public bool UseDefaultWebProxy {
- get { return use_default_web_proxy; }
- set { use_default_web_proxy = value; }
- }
-
- public override BindingElementCollection
- CreateBindingElements ()
- {
- var list = new List<BindingElement> ();
-
- var security = CreateSecurityBindingElement ();
- if (security != null)
- list.Add (security);
-
-#if NET_2_1
- if (EnableHttpCookieContainer)
- list.Add (new HttpCookieContainerBindingElement ());
-#endif
-
- list.Add (BuildMessageEncodingBindingElement ());
- list.Add (GetTransport ());
-
- return new BindingElementCollection (list.ToArray ());
- }
-
- SecurityBindingElement CreateSecurityBindingElement ()
- {
- SecurityBindingElement element;
- switch (Security.Mode) {
-#if !NET_2_1
- case BasicHttpSecurityMode.Message:
- if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
- throw new InvalidOperationException ("When Message security is enabled in a BasicHttpBinding, the message security credential type must be BasicHttpMessageCredentialType.Certificate.");
- element = SecurityBindingElement.CreateMutualCertificateBindingElement (
- MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10);
- break;
-
- case BasicHttpSecurityMode.TransportWithMessageCredential:
- if (Security.Message.ClientCredentialType != BasicHttpMessageCredentialType.Certificate)
- // FIXME: pass proper security token parameters.
- element = SecurityBindingElement.CreateCertificateOverTransportBindingElement ();
- else
- element = new AsymmetricSecurityBindingElement ();
- break;
-#endif
- default:
- return null;
- }
-
-#if !NET_2_1
- element.SetKeyDerivation (false);
- element.SecurityHeaderLayout = SecurityHeaderLayout.Lax;
-#endif
- return element;
- }
-
- MessageEncodingBindingElement BuildMessageEncodingBindingElement ()
- {
- if (MessageEncoding == WSMessageEncoding.Text) {
- TextMessageEncodingBindingElement tm = new TextMessageEncodingBindingElement (
- MessageVersion.CreateVersion (EnvelopeVersion, AddressingVersion.None), TextEncoding);
-#if !NET_2_1
- ReaderQuotas.CopyTo (tm.ReaderQuotas);
-#endif
- return tm;
- }
- else
-#if NET_2_1
- throw new SystemException ("INTERNAL ERROR: should not happen");
-#else
- return new MtomMessageEncodingBindingElement (
- MessageVersion.CreateVersion (EnvelopeVersion, AddressingVersion.None), TextEncoding);
-#endif
- }
-
- TransportBindingElement GetTransport ()
- {
- HttpTransportBindingElement h;
- switch (Security.Mode) {
- case BasicHttpSecurityMode.Transport:
- case BasicHttpSecurityMode.TransportWithMessageCredential:
- h = new HttpsTransportBindingElement ();
- break;
- default:
- h = new HttpTransportBindingElement ();
- break;
- }
-
- h.AllowCookies = AllowCookies;
- h.BypassProxyOnLocal = BypassProxyOnLocal;
- h.HostNameComparisonMode = HostNameComparisonMode;
- h.MaxBufferPoolSize = MaxBufferPoolSize;
- h.MaxBufferSize = MaxBufferSize;
- h.MaxReceivedMessageSize = MaxReceivedMessageSize;
- h.ProxyAddress = ProxyAddress;
- h.UseDefaultWebProxy = UseDefaultWebProxy;
- h.TransferMode = TransferMode;
- h.ExtendedProtectionPolicy = Security.Transport.ExtendedProtectionPolicy;
-
-#if !NET_2_1 || MOBILE
- switch (Security.Transport.ClientCredentialType) {
- case HttpClientCredentialType.Basic:
- h.AuthenticationScheme = AuthenticationSchemes.Basic;
- break;
- case HttpClientCredentialType.Ntlm:
- h.AuthenticationScheme = AuthenticationSchemes.Ntlm;
- break;
- case HttpClientCredentialType.Windows:
- h.AuthenticationScheme = AuthenticationSchemes.Negotiate;
- break;
- case HttpClientCredentialType.Digest:
- h.AuthenticationScheme = AuthenticationSchemes.Digest;
- break;
- case HttpClientCredentialType.Certificate:
- switch (Security.Mode) {
- case BasicHttpSecurityMode.Transport:
- (h as HttpsTransportBindingElement).RequireClientCertificate = true;
- break;
- case BasicHttpSecurityMode.TransportCredentialOnly:
- throw new InvalidOperationException ("Certificate-based client authentication is not supported by 'TransportCredentialOnly' mode.");
- }
- break;
- }
-#endif
-
- return h;
- }
-
- // explicit interface implementations
-
- bool IBindingRuntimePreferences.ReceiveSynchronously {
- get { return false; }
- }
- }
-}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ExceptionDetail.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ExceptionDetail.cs
index ac7af3c37da..cf8aa1f45db 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ExceptionDetail.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ExceptionDetail.cs
@@ -53,45 +53,30 @@ namespace System.ServiceModel
[DataMember]
public string HelpLink {
get;
-#if !NET_4_5
- private
-#endif
set;
}
[DataMember]
public ExceptionDetail InnerException {
get;
-#if !NET_4_5
- private
-#endif
set;
}
[DataMember]
public string Message {
get;
-#if !NET_4_5
- private
-#endif
set;
}
[DataMember]
public string StackTrace {
get;
-#if !NET_4_5
- private
-#endif
set;
}
[DataMember]
public string Type {
get;
-#if !NET_4_5
- private
-#endif
set;
}
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
index d71e791b879..7ccc40dc19b 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
@@ -128,11 +128,9 @@ namespace System.Web
public virtual int TotalBytes { get { NotImplemented (); return 0; } }
-#if NET_4_5
public virtual ReadEntityBodyMode ReadEntityBodyMode { get { NotImplemented(); return ReadEntityBodyMode.Classic; } }
public virtual UnvalidatedRequestValuesBase Unvalidated { get { NotImplemented (); return null; } }
-#endif
public virtual Uri Url { get { NotImplemented (); return null; } }
@@ -146,12 +144,10 @@ namespace System.Web
public virtual string [] UserLanguages { get { NotImplemented (); return null; } }
-#if NET_4_5
public virtual void Abort ()
{
NotImplemented();
}
-#endif
public virtual byte [] BinaryRead (int count)
{
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
index e861ce56169..43abae80433 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
@@ -200,17 +200,13 @@ namespace System.Web
get { return w.TotalBytes; }
}
-#if NET_4_5
public override UnvalidatedRequestValuesBase Unvalidated {
get { return new UnvalidatedRequestValuesWrapper (w.Unvalidated); }
}
-#endif
-#if NET_4_5
public override ReadEntityBodyMode ReadEntityBodyMode {
get { return ReadEntityBodyMode.Classic; }
}
-#endif
public override Uri Url {
get { return w.Url; }
@@ -236,12 +232,10 @@ namespace System.Web
get { return w.UserLanguages; }
}
-#if NET_4_5
public void Abort ()
{
w.WorkerRequest.CloseConnection();
}
-#endif
public override byte [] BinaryRead (int count)
{
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
index c83060493e3..d7c76d44292 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
@@ -66,9 +66,7 @@ namespace System.Web
public virtual string Charset { get { NotImplemented (); return null; } set { NotImplemented (); } }
-#if NET_4_5
public virtual CancellationToken ClientDisconnectedToken { get { NotImplemented (); return CancellationToken.None; } }
-#endif
public virtual Encoding ContentEncoding { get { NotImplemented (); return null; } set { NotImplemented (); } }
@@ -106,9 +104,7 @@ namespace System.Web
public virtual bool SuppressContent { get { NotImplemented (); return false; } set { NotImplemented (); } }
-#if NET_4_5
public virtual bool SuppressFormsAuthenticationRedirect { get { NotImplemented (); return false; } set { NotImplemented (); } }
-#endif
public virtual bool TrySkipIisCustomErrors { get { NotImplemented (); return false; } set { NotImplemented (); } }
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
index 93789acbea6..1e437e4621f 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
@@ -81,11 +81,9 @@ namespace System.Web
set { w.Charset = value; }
}
-#if NET_4_5
public override CancellationToken ClientDisconnectedToken {
get { return CancellationToken.None; }
}
-#endif
public override Encoding ContentEncoding {
get { return w.ContentEncoding; }
@@ -172,12 +170,10 @@ namespace System.Web
set { w.SuppressContent = value; }
}
-#if NET_4_5
public override bool SuppressFormsAuthenticationRedirect {
get { return w.SuppressFormsAuthenticationRedirect; }
set { w.SuppressFormsAuthenticationRedirect = value; }
}
-#endif
public override bool TrySkipIisCustomErrors {
get { return w.TrySkipIisCustomErrors; }
diff --git a/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs b/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
index 4a43b737014..da8d37df9fe 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
@@ -47,13 +47,8 @@ namespace System.Web.Compilation
{
class AppResourcesAssemblyBuilder
{
-#if NET_4_5
static string framework_version = "4.5";
static string profile_path = "net_4_5";
-#else
- static string framework_version = "4.0";
- static string profile_path = "net_4_0";
-#endif
CompilationSection config;
CompilerInfo ci;
CodeDomProvider _provider;
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
index b2b979cfe60..62eb0716440 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
@@ -62,9 +62,7 @@ namespace System.Web.Configuration
static ConfigurationProperty maxUrlLengthProp;
static ConfigurationProperty encoderTypeProp;
static ConfigurationProperty relaxedUrlToFileSystemMappingProp;
-#if NET_4_5
static ConfigurationProperty targetFrameworkProp;
-#endif
static ConfigurationPropertyCollection properties;
static HttpRuntimeSection ()
@@ -139,12 +137,10 @@ namespace System.Web.Configuration
PropertyHelper.NonEmptyStringValidator,
ConfigurationPropertyOptions.None);
relaxedUrlToFileSystemMappingProp = new ConfigurationProperty ("relaxedUrlToFileSystemMapping", typeof (bool), false);
-#if NET_4_5
targetFrameworkProp = new ConfigurationProperty ("targetFramework", typeof (Version), new Version (4, 0),
PropertyHelper.VersionConverter,
PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
-#endif
properties = new ConfigurationPropertyCollection();
properties.Add (apartmentThreadingProp);
@@ -172,9 +168,7 @@ namespace System.Web.Configuration
properties.Add (maxUrlLengthProp);
properties.Add (encoderTypeProp);
properties.Add (relaxedUrlToFileSystemMappingProp);
-#if NET_4_5
properties.Add (targetFrameworkProp);
-#endif
}
public HttpRuntimeSection()
@@ -346,14 +340,12 @@ namespace System.Web.Configuration
get { return (bool) base [relaxedUrlToFileSystemMappingProp]; }
set { base [relaxedUrlToFileSystemMappingProp] = value; }
}
-#if NET_4_5
[ConfigurationProperty ("targetFramework", DefaultValue = "4.0")]
[TypeConverter ("System.Web.Configuration.VersionConverter")]
public Version TargetFramework {
get { return (Version) base [targetFrameworkProp]; }
set { base [targetFrameworkProp] = value; }
}
-#endif
protected internal override ConfigurationPropertyCollection Properties {
get { return properties; }
}
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
index 7dbfc43ee2d..9f302f07daf 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs
@@ -163,10 +163,8 @@ namespace System.Web.Security
if (context.Response.StatusCode != 401 || context.Request.QueryString ["ReturnUrl"] != null)
return;
-#if NET_4_5
if (context.Response.StatusCode == 401 && context.Response.SuppressFormsAuthenticationRedirect)
return;
-#endif
string loginPage;
InitConfig (context);
diff --git a/mcs/class/System.Web/System.Web.Security/MachineKey.cs b/mcs/class/System.Web/System.Web.Security/MachineKey.cs
index 193ec751952..b038c2e2856 100644
--- a/mcs/class/System.Web/System.Web.Security/MachineKey.cs
+++ b/mcs/class/System.Web/System.Web.Security/MachineKey.cs
@@ -108,7 +108,6 @@ namespace System.Web.Security
return MachineKeySectionUtils.GetHexString (result);
}
-#if NET_4_5
public static byte[] Protect (byte[] userData, params string[] purposes)
{
if (userData == null)
@@ -162,6 +161,5 @@ namespace System.Web.Security
return hash.ComputeHash (bytes, 0, bytes.Length);
}
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs
index c0da39bd53a..d273f1cf1fd 100755
--- a/mcs/class/System.Web/System.Web/HttpRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpRequest.cs
@@ -1406,7 +1406,6 @@ namespace System.Web
}
}
-#if NET_4_5
public UnvalidatedRequestValues Unvalidated {
get {
var vals = new UnvalidatedRequestValues ();
@@ -1424,7 +1423,6 @@ namespace System.Web
return vals;
}
}
-#endif
public Uri Url {
get {
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs
index 26b3b7d79c5..cc90a54ab97 100644
--- a/mcs/class/System.Web/System.Web/HttpResponse.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponse.cs
@@ -394,12 +394,10 @@ namespace System.Web
set;
}
-#if NET_4_5
public bool SuppressFormsAuthenticationRedirect {
get;
set;
}
-#endif
public bool TrySkipIisCustomErrors {
get;
diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs
index 151b959b084..d2822357434 100644
--- a/mcs/class/System.Web/System.Web/HttpRuntime.cs
+++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs
@@ -272,7 +272,6 @@ namespace System.Web
public static bool UsingIntegratedPipeline { get { return false; } }
-#if NET_4_5
public static Version IISVersion {
get {
// Null means not hosted by IIS
@@ -285,7 +284,6 @@ namespace System.Web
return runtime_section.TargetFramework;
}
}
-#endif
[SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public static void Close ()
diff --git a/mcs/class/System.Web/System.Web/MimeMapping.cs b/mcs/class/System.Web/System.Web/MimeMapping.cs
index 83bc8727162..0e4f3b3e2be 100644
--- a/mcs/class/System.Web/System.Web/MimeMapping.cs
+++ b/mcs/class/System.Web/System.Web/MimeMapping.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Web {
@@ -40,4 +39,3 @@ namespace System.Web {
}
}
-#endif
diff --git a/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs b/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
index 2013fa83c9f..f32bb39e091 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
@@ -135,12 +135,10 @@ namespace System.Xml.Serialization
void LookupTypeConvertor ()
{
-#if NET_4_5
// We only need this for System.Xml.Linq.
var convertor = type.GetCustomAttribute<XmlTypeConvertorAttribute> ();
if (convertor != null)
typeConvertor = type.GetMethod (convertor.Method, BindingFlags.Static | BindingFlags.NonPublic);
-#endif
}
internal void ConvertForAssignment (ref object value)
diff --git a/mcs/class/System.XML/System.Xml/XmlReader.cs b/mcs/class/System.XML/System.Xml/XmlReader.cs
index ef90b40e5d4..18243c5d9e3 100644
--- a/mcs/class/System.XML/System.Xml/XmlReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReader.cs
@@ -39,10 +39,8 @@ using System.Xml.Schema; // only required for NET_2_0 (SchemaInfo)
using System.Xml.Serialization; // only required for NET_2_0 (SchemaInfo)
using Mono.Xml.Schema; // only required for NET_2_0
using Mono.Xml; // only required for NET_2_0
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Xml
{
@@ -190,15 +188,11 @@ namespace System.Xml
#region Methods
-#if NET_4_5
public virtual void Close ()
{
if (asyncRunning)
throw new InvalidOperationException ("An asynchronous operation is already in progress.");
}
-#else
- public abstract void Close ();
-#endif
private static XmlNameTable PopulateNameTable (
XmlReaderSettings settings)
@@ -272,9 +266,7 @@ namespace System.Xml
copy = new XmlReaderSettings ();
else
copy = src.Clone ();
-#if NET_4_5
copy.SetReadOnly ();
-#endif
return copy;
}
@@ -285,11 +277,9 @@ namespace System.Xml
copy = new XmlReaderSettings ();
else
copy = src.Clone ();
-#if NET_4_5
if (reader.Settings != null)
copy.Async = reader.Settings.Async;
copy.SetReadOnly ();
-#endif
return copy;
}
@@ -946,7 +936,6 @@ namespace System.Xml
return ReadContentAs (ValueType, null);
}
-#if NET_4_5
public virtual DateTimeOffset ReadContentAsDateTimeOffset ()
{
try {
@@ -955,7 +944,6 @@ namespace System.Xml
throw XmlError ("Typed value is invalid.", e);
}
}
-#endif
public virtual object ReadElementContentAs (Type returnType, IXmlNamespaceResolver namespaceResolver)
{
@@ -1354,7 +1342,6 @@ namespace System.Xml
}
#endregion
-#if NET_4_5
#region .NET 4.5 Async Methods
bool asyncRunning;
@@ -1575,6 +1562,5 @@ namespace System.Xml
}
#endregion
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
index 767d057d1ae..cb762954756 100644
--- a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
@@ -58,10 +58,8 @@ namespace System.Xml
private long maxCharactersFromEntities;
private long maxCharactersInDocument;
-#if NET_4_5
private bool isReadOnly;
private bool isAsync;
-#endif
public XmlReaderSettings ()
{
@@ -73,9 +71,7 @@ namespace System.Xml
public XmlReaderSettings Clone ()
{
var clone = (XmlReaderSettings) MemberwiseClone ();
-#if NET_4_5
clone.isReadOnly = false;
-#endif
return clone;
}
@@ -97,9 +93,7 @@ namespace System.Xml
XsValidationFlags.AllowXmlAttributes;
validationType = ValidationType.None;
xmlResolver = new XmlUrlResolver ();
-#if NET_4_5
isAsync = false;
-#endif
}
public bool CheckCharacters {
@@ -215,7 +209,6 @@ namespace System.Xml
set { xmlResolver = value; }
}
-#if NET_4_5
internal void SetReadOnly ()
{
isReadOnly = true;
@@ -238,6 +231,5 @@ namespace System.Xml
isAsync = value;
}
}
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlResolver.cs b/mcs/class/System.XML/System.Xml/XmlResolver.cs
index 9d780a1ee7f..cb51c01c99e 100644
--- a/mcs/class/System.XML/System.Xml/XmlResolver.cs
+++ b/mcs/class/System.XML/System.Xml/XmlResolver.cs
@@ -33,21 +33,15 @@
using System.IO;
using System.Net;
using System.Security.Permissions;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Xml
{
public abstract class XmlResolver
{
-#if NET_4_5
public virtual ICredentials Credentials {
set { throw new NotImplementedException (); }
}
-#else
- public abstract ICredentials Credentials { set; }
-#endif
public abstract object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn);
@@ -80,20 +74,16 @@ namespace System.Xml
.Replace ("%", "%25")
.Replace ("\"", "%22");
}
-#if NET_4_5
public virtual bool SupportsType (Uri absoluteUri, Type type)
{
if (absoluteUri == null)
throw new ArgumentNullException ("absoluteUri");
return ((type == null) || (type == typeof (Stream)));
}
-#endif
-#if NET_4_5
public virtual Task<object> GetEntityAsync (Uri absoluteUri, string role, Type ofObjectToReturn)
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlSecureResolver.cs b/mcs/class/System.XML/System.Xml/XmlSecureResolver.cs
index 2400c52cb26..4e82f99245d 100644
--- a/mcs/class/System.XML/System.Xml/XmlSecureResolver.cs
+++ b/mcs/class/System.XML/System.Xml/XmlSecureResolver.cs
@@ -32,9 +32,7 @@ using System.Net;
using System.Security;
using System.Security.Policy;
using System.Security.Permissions;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Xml
{
@@ -135,7 +133,6 @@ namespace System.Xml
return resolver.ResolveUri (baseUri, relativeUri);
}
-#if NET_4_5
public override Task<object> GetEntityAsync (
Uri absoluteUri, string role, Type ofObjectToReturn)
{
@@ -149,7 +146,6 @@ namespace System.Xml
}
return resolver.GetEntityAsync (absoluteUri, role, ofObjectToReturn);
}
-#endif
#endregion
}
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader2.cs b/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
index a7c85b8d006..d4ce33709c4 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
@@ -256,11 +256,6 @@ namespace System.Xml
[MonoTODO]
public DtdProcessing DtdProcessing { get; set; }
-#if !NET_4_5
- public override XmlReaderSettings Settings {
- get { return base.Settings; }
- }
-#endif
public override string Value {
get { return Current.Value; }
diff --git a/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs b/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs
index 8d79d244a6e..b9ba4948d68 100644
--- a/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs
+++ b/mcs/class/System.XML/System.Xml/XmlUrlResolver.cs
@@ -30,10 +30,8 @@
using System.Net;
using System.IO;
using System.Text;
-#if NET_4_5
using System.Net.Cache;
using System.Threading.Tasks;
-#endif
namespace System.Xml
{
@@ -41,10 +39,8 @@ namespace System.Xml
{
// Field
ICredentials credential;
-#if NET_4_5
RequestCachePolicy cachePolicy;
IWebProxy proxy;
-#endif
// Constructor
public XmlUrlResolver ()
@@ -58,7 +54,6 @@ namespace System.Xml
set { credential = value; }
}
-#if NET_4_5
public RequestCachePolicy CachePolicy {
set { cachePolicy = value; }
}
@@ -66,7 +61,6 @@ namespace System.Xml
public IWebProxy Proxy {
set { proxy = value; }
}
-#endif
// Methods
public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
@@ -87,7 +81,6 @@ namespace System.Xml
// (MS documentation says) parameter role isn't used yet.
WebRequest req = WebRequest.Create (absoluteUri);
-#if NET_4_5
#if !NET_2_1
if (cachePolicy != null)
@@ -95,7 +88,6 @@ namespace System.Xml
#endif
if (proxy != null)
req.Proxy = proxy;
-#endif
if (credential != null)
req.Credentials = credential;
return req.GetResponse().GetResponseStream();
@@ -117,7 +109,6 @@ namespace System.Xml
.Replace ("%25", "%");
}
-#if NET_4_5
public override async Task<object> GetEntityAsync (
Uri absoluteUri, string role, Type ofObjectToReturn)
{
@@ -148,6 +139,5 @@ namespace System.Xml
var res = await req.GetResponseAsync ().ConfigureAwait (false);
return res.GetResponseStream ();
}
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlWriter.cs b/mcs/class/System.XML/System.Xml/XmlWriter.cs
index 29d196686eb..2a411fef37c 100755
--- a/mcs/class/System.XML/System.Xml/XmlWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriter.cs
@@ -36,10 +36,8 @@ using System.Collections;
using System.IO;
using System.Text;
using System.Xml.XPath;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Xml
{
@@ -73,15 +71,11 @@ namespace System.Xml
#region Methods
-#if NET_4_5
public virtual void Close ()
{
if (asyncRunning)
throw new InvalidOperationException ("An asynchronous operation is already in progress.");
}
-#else
- public abstract void Close ();
-#endif
public static XmlWriter Create (Stream output)
{
@@ -143,9 +137,7 @@ namespace System.Xml
if (src == null) {
settings.ConformanceLevel = ConformanceLevel.Document; // Huh? Why??
output = new DefaultXmlWriter (output);
-#if NET_4_5
settings.SetReadOnly ();
-#endif
output.settings = settings;
} else {
ConformanceLevel dst = src.ConformanceLevel;
@@ -162,9 +154,7 @@ namespace System.Xml
settings.MergeFrom (src);
-#if NET_4_5
settings.SetReadOnly ();
-#endif
// It returns a new XmlWriter instance if 1) Settings is null, or 2) Settings ConformanceLevel (or might be other members as well) give significant difference.
if (src.ConformanceLevel != dst) {
@@ -684,16 +674,13 @@ namespace System.Xml
WriteString (value);
}
-#if NET_4_5
public virtual void WriteValue (DateTimeOffset value)
{
WriteString (XmlConvert.ToString (value));
}
-#endif
#endregion
-#if NET_4_5
#region .NET 4.5 Async Methods
bool asyncRunning;
@@ -1085,6 +1072,5 @@ namespace System.Xml
}
#endregion
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
index e79b7d366ca..1799681b2fd 100644
--- a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
@@ -50,10 +50,8 @@ namespace System.Xml
private bool omitXmlDeclaration;
private XmlOutputMethod outputMethod;
-#if NET_4_5
private bool isReadOnly;
private bool isAsync;
-#endif
public XmlWriterSettings ()
{
@@ -87,9 +85,7 @@ namespace System.Xml
newLineHandling = NewLineHandling.Replace;
omitXmlDeclaration = false;
outputMethod = XmlOutputMethod.AutoDetect;
-#if NET_4_5
isAsync = false;
-#endif
}
// It affects only on XmlTextWriter
@@ -164,7 +160,6 @@ namespace System.Xml
public
NamespaceHandling NamespaceHandling { get; set; }
-#if NET_4_5
internal void SetReadOnly ()
{
isReadOnly = true;
@@ -193,7 +188,6 @@ namespace System.Xml
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 33e899b42f6..48662a02e2e 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -358,11 +358,7 @@ namespace Mono.CSharp
}
}
-#if NET_4_5
args.Append("/sdk:4.5");
-#else
- args.Append("/sdk:4");
-#endif
args.Append (" -- ");
foreach (string source in fileNames)
diff --git a/mcs/class/System/System.IO.Compression/CompressionLevel.cs b/mcs/class/System/System.IO.Compression/CompressionLevel.cs
index 2242c19cf58..902aca6e80b 100644
--- a/mcs/class/System/System.IO.Compression/CompressionLevel.cs
+++ b/mcs/class/System/System.IO.Compression/CompressionLevel.cs
@@ -24,7 +24,6 @@
// 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.IO.Compression {
public enum CompressionLevel {
Optimal,
@@ -32,4 +31,3 @@ namespace System.IO.Compression {
NoCompression
}
}
-#endif
diff --git a/mcs/class/System/System.IO.Compression/DeflateStream.cs b/mcs/class/System/System.IO.Compression/DeflateStream.cs
index 726edf3f113..939a0c9b540 100644
--- a/mcs/class/System/System.IO.Compression/DeflateStream.cs
+++ b/mcs/class/System/System.IO.Compression/DeflateStream.cs
@@ -80,7 +80,6 @@ namespace System.IO.Compression
this.leaveOpen = leaveOpen;
}
-#if NET_4_5
public DeflateStream (Stream stream, CompressionLevel compressionLevel)
: this (stream, compressionLevel, false, false)
{
@@ -95,7 +94,6 @@ namespace System.IO.Compression
: this (stream, CompressionMode.Compress, leaveOpen, gzip)
{
}
-#endif
protected override void Dispose (bool disposing)
{
diff --git a/mcs/class/System/System.IO.Compression/GZipStream.cs b/mcs/class/System/System.IO.Compression/GZipStream.cs
index 96fe159a441..fdfca13559b 100644
--- a/mcs/class/System/System.IO.Compression/GZipStream.cs
+++ b/mcs/class/System/System.IO.Compression/GZipStream.cs
@@ -49,7 +49,6 @@ namespace System.IO.Compression {
}
-#if NET_4_5
public GZipStream (Stream stream, CompressionLevel compressionLevel)
: this (stream, compressionLevel, false)
{
@@ -59,7 +58,6 @@ namespace System.IO.Compression {
{
this.deflateStream = new DeflateStream (stream, compressionLevel, leaveOpen, true);
}
-#endif
protected override void Dispose (bool disposing)
{
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs
index 4b5002a7ee0..278e6e3426f 100644
--- a/mcs/class/System/System.Net.Mail/SmtpClient.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs
@@ -55,9 +55,7 @@ using System.Net.Configuration;
using System.Configuration;
using System.Net.Security;
using System.Security.Authentication;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net.Mail {
public class SmtpClient
@@ -727,7 +725,6 @@ namespace System.Net.Mail {
Send (new MailMessage (from, to, subject, body));
}
-#if NET_4_5
public Task SendMailAsync (MailMessage message)
{
var tcs = new TaskCompletionSource<object> ();
@@ -762,7 +759,6 @@ namespace System.Net.Mail {
source.SetResult (null);
}
-#endif
private void SendDot()
{
diff --git a/mcs/class/System/System.Net.NetworkInformation/Ping.cs b/mcs/class/System/System.Net.NetworkInformation/Ping.cs
index 246c8967623..3f2ae21e2ea 100644
--- a/mcs/class/System/System.Net.NetworkInformation/Ping.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/Ping.cs
@@ -36,10 +36,8 @@ using System.Net.Sockets;
using System.Security.Principal;
using System.Security.Cryptography;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Net.NetworkInformation {
[MonoTODO ("IPv6 support is missing")]
@@ -83,9 +81,7 @@ namespace System.Net.NetworkInformation {
BackgroundWorker worker;
object user_async_state;
-#if NET_4_5
CancellationTokenSource cts;
-#endif
public event PingCompletedEventHandler PingCompleted;
@@ -155,9 +151,7 @@ namespace System.Net.NetworkInformation {
{
user_async_state = null;
worker = null;
-#if NET_4_5
cts = null;
-#endif
if (PingCompleted != null)
PingCompleted (this, e);
@@ -374,13 +368,8 @@ namespace System.Net.NetworkInformation {
public void SendAsync (IPAddress address, int timeout, byte [] buffer, PingOptions options, object userToken)
{
-#if NET_4_5
if ((worker != null) || (cts != null))
throw new InvalidOperationException ("Another SendAsync operation is in progress");
-#else
- if (worker != null)
- throw new InvalidOperationException ("Another SendAsync operation is in progress");
-#endif
worker = new BackgroundWorker ();
worker.DoWork += delegate (object o, DoWorkEventArgs ea) {
@@ -403,12 +392,10 @@ namespace System.Net.NetworkInformation {
public void SendAsyncCancel ()
{
-#if NET_4_5
if (cts != null) {
cts.Cancel ();
return;
}
-#endif
if (worker == null)
throw new InvalidOperationException ("SendAsync operation is not in progress");
@@ -549,7 +536,6 @@ namespace System.Net.NetworkInformation {
return args.ToString ();
}
-#if NET_4_5
public Task<PingReply> SendPingAsync (IPAddress address, int timeout, byte [] buffer)
{
return SendPingAsync (address, default_timeout, default_buffer, new PingOptions ());
@@ -605,7 +591,6 @@ namespace System.Net.NetworkInformation {
return task;
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net.Security/SslStream.cs b/mcs/class/System/System.Net.Security/SslStream.cs
index 0f3f7fd2546..aa075912da2 100644
--- a/mcs/class/System/System.Net.Security/SslStream.cs
+++ b/mcs/class/System/System.Net.Security/SslStream.cs
@@ -71,9 +71,7 @@ using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.Security.Cryptography;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net.Security
{
@@ -597,7 +595,6 @@ namespace System.Net.Security
throw new InvalidOperationException ("This operation is invalid until it is successfully authenticated");
}
-#if NET_4_5
public virtual Task AuthenticateAsClientAsync (string targetHost)
{
return Task.Factory.FromAsync (BeginAuthenticateAsClient, EndAuthenticateAsClient, targetHost, null);
@@ -627,7 +624,6 @@ namespace System.Net.Security
return d.Item5.BeginAuthenticateAsServer (d.Item1, d.Item2, d.Item3, d.Item4, callback, null);
}, EndAuthenticateAsServer, t);
}
-#endif
#endregion // Methods
}
diff --git a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
index f3d2ecc908f..0095d200cab 100644
--- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
@@ -952,13 +952,11 @@ namespace System.Net.Sockets {
#endif
}
-#if NET_4_5
[MonoTODO ("Currently hardcoded to IPv4. Ideally, support v4/v6 dual-stack.")]
public Socket (SocketType socketType, ProtocolType protocolType)
: this (AddressFamily.InterNetwork, socketType, protocolType)
{
}
-#endif
~Socket ()
{
diff --git a/mcs/class/System/System.Net.Sockets/TcpClient.cs b/mcs/class/System/System.Net.Sockets/TcpClient.cs
index a66e55abadf..46d16b4e475 100644
--- a/mcs/class/System/System.Net.Sockets/TcpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/TcpClient.cs
@@ -34,9 +34,7 @@
using System;
using System.Net;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net.Sockets
{
@@ -428,7 +426,6 @@ namespace System.Net.Sockets
finally { CheckDisposed (); }
}
-#if NET_4_5
public Task ConnectAsync (IPAddress address, int port)
{
return Task.Factory.FromAsync (BeginConnect, EndConnect, address, port, null);
@@ -443,7 +440,6 @@ namespace System.Net.Sockets
{
return Task.Factory.FromAsync (BeginConnect, EndConnect, host, port, null);
}
-#endif
private void CheckDisposed ()
{
if (disposed)
diff --git a/mcs/class/System/System.Net.Sockets/TcpListener.cs b/mcs/class/System/System.Net.Sockets/TcpListener.cs
index d9322f52e67..8ab582e5541 100644
--- a/mcs/class/System/System.Net.Sockets/TcpListener.cs
+++ b/mcs/class/System/System.Net.Sockets/TcpListener.cs
@@ -38,9 +38,7 @@
using System;
using System.Net;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net.Sockets
{
@@ -302,7 +300,6 @@ namespace System.Net.Sockets
Init (AddressFamily.InterNetwork, savedEP);
}
-#if NET_4_5
public Task<Socket> AcceptSocketAsync ()
{
return Task<Socket>.Factory.FromAsync (BeginAcceptSocket, EndAcceptSocket, null);
@@ -312,6 +309,5 @@ namespace System.Net.Sockets
{
return Task<TcpClient>.Factory.FromAsync (BeginAcceptTcpClient, EndAcceptTcpClient, null);
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net.Sockets/UdpClient.cs b/mcs/class/System/System.Net.Sockets/UdpClient.cs
index a8bc06de5a8..fc2a2ef16c1 100644
--- a/mcs/class/System/System.Net.Sockets/UdpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/UdpClient.cs
@@ -33,9 +33,7 @@
using System;
using System.Net;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net.Sockets
{
@@ -604,7 +602,6 @@ namespace System.Net.Sockets
}
#endregion
-#if NET_4_5
public Task<UdpReceiveResult> ReceiveAsync ()
{
@@ -634,7 +631,6 @@ namespace System.Net.Sockets
}, EndSend, t);
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
index ff011d2f930..b6a23c2a2f8 100644
--- a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
@@ -26,7 +26,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System;
using System.Net;
@@ -388,4 +387,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
index 586752d7f67..66b884a3db7 100644
--- a/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Net;
@@ -105,4 +104,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs b/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs
index dddc002c473..d37eb24697a 100644
--- a/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs
+++ b/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
#if SECURITY_DEP
using System;
@@ -127,4 +126,3 @@ namespace System.Net.WebSockets
}
}
#endif
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocket.cs b/mcs/class/System/System.Net.WebSockets/WebSocket.cs
index c32c5714f73..4d0c9b248d2 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocket.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocket.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.IO;
@@ -128,4 +127,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs b/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
index e3dba2748cb..c89f2de39a2 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Runtime.CompilerServices;
@@ -48,4 +47,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs b/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs
index a0a19dad212..1fd14a9a621 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Collections.Specialized;
@@ -69,4 +68,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketError.cs b/mcs/class/System/System.Net.WebSockets/WebSocketError.cs
index 38e2881cb09..1218d16489d 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketError.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketError.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Runtime.CompilerServices;
@@ -48,4 +47,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketException.cs b/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
index e617ab38b0b..1c724067b2f 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.ComponentModel;
@@ -109,4 +108,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
index f6cb2fc2a86..23695482ee6 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Runtime.CompilerServices;
@@ -41,4 +40,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs b/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
index af97ebcdca9..cadf9671067 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Security.Principal;
@@ -81,4 +80,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketState.cs b/mcs/class/System/System.Net.WebSockets/WebSocketState.cs
index 8a8f220d72f..f942dae99d4 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketState.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketState.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Runtime.CompilerServices;
@@ -45,4 +44,3 @@ namespace System.Net.WebSockets
}
}
-#endif
diff --git a/mcs/class/System/System.Net/Dns.cs b/mcs/class/System/System.Net/Dns.cs
index 81da4fa2084..d5ff6effa2b 100644
--- a/mcs/class/System/System.Net/Dns.cs
+++ b/mcs/class/System/System.Net/Dns.cs
@@ -41,9 +41,7 @@ using System.Collections;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Runtime.Remoting.Messaging;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
#if !MOBILE
using Mono.Net.Dns;
@@ -456,7 +454,6 @@ namespace System.Net {
return ret;
}
-#if NET_4_5
public static Task<IPAddress[]> GetHostAddressesAsync (string hostNameOrAddress)
{
return Task<IPAddress[]>.Factory.FromAsync (BeginGetHostAddresses, EndGetHostAddresses, hostNameOrAddress, null);
@@ -471,7 +468,6 @@ namespace System.Net {
{
return Task<IPHostEntry>.Factory.FromAsync (BeginGetHostEntry, EndGetHostEntry, hostNameOrAddress, null);
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net/HttpListener.cs b/mcs/class/System/System.Net/HttpListener.cs
index 889d01d447e..82cf8bda9eb 100644
--- a/mcs/class/System/System.Net/HttpListener.cs
+++ b/mcs/class/System/System.Net/HttpListener.cs
@@ -32,9 +32,7 @@
using System.Collections;
using System.Threading;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
//TODO: logging
namespace System.Net {
@@ -288,12 +286,10 @@ namespace System.Net {
disposed = true;
}
-#if NET_4_5
public Task<HttpListenerContext> GetContextAsync ()
{
return Task<HttpListenerContext>.Factory.FromAsync (BeginGetContext, EndGetContext, null);
}
-#endif
internal void CheckDisposed ()
{
diff --git a/mcs/class/System/System.Net/HttpListenerContext.cs b/mcs/class/System/System.Net/HttpListenerContext.cs
index a1cdf3f8b2a..d495e4af581 100644
--- a/mcs/class/System/System.Net/HttpListenerContext.cs
+++ b/mcs/class/System/System.Net/HttpListenerContext.cs
@@ -32,10 +32,8 @@ using System.Collections.Specialized;
using System.IO;
using System.Security.Principal;
using System.Text;
-#if NET_4_5
using System.Threading.Tasks;
using System.Net.WebSockets;
-#endif
namespace System.Net {
public sealed class HttpListenerContext {
@@ -139,7 +137,6 @@ namespace System.Net {
}
}
-#if NET_4_5
public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol)
{
throw new NotImplementedException ();
@@ -154,7 +151,6 @@ namespace System.Net {
{
throw new NotImplementedException ();
}
-#endif
}
}
#endif
diff --git a/mcs/class/System/System.Net/HttpListenerRequest.cs b/mcs/class/System/System.Net/HttpListenerRequest.cs
index a7d76f19506..e1c032c6da0 100644
--- a/mcs/class/System/System.Net/HttpListenerRequest.cs
+++ b/mcs/class/System/System.Net/HttpListenerRequest.cs
@@ -44,9 +44,7 @@ using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Security.Authentication.ExtendedProtection;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net {
public sealed class HttpListenerRequest
@@ -521,7 +519,6 @@ namespace System.Net {
}
}
-#if NET_4_5
[MonoTODO]
public bool IsWebSocketRequest {
get {
@@ -533,7 +530,6 @@ namespace System.Net {
{
return Task<X509Certificate2>.Factory.FromAsync (BeginGetClientCertificate, EndGetClientCertificate, null);
}
-#endif
}
}
#endif
diff --git a/mcs/class/System/System.Net/HttpStatusCode.cs b/mcs/class/System/System.Net/HttpStatusCode.cs
index fcc3e26d701..4cc32e7fae8 100644
--- a/mcs/class/System/System.Net/HttpStatusCode.cs
+++ b/mcs/class/System/System.Net/HttpStatusCode.cs
@@ -73,9 +73,7 @@ namespace System.Net {
UnsupportedMediaType = 415,
RequestedRangeNotSatisfiable = 416,
ExpectationFailed = 417,
-#if NET_4_5
UpgradeRequired = 426,
-#endif
InternalServerError = 500,
NotImplemented = 501,
BadGateway = 502,
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index b1afa08a7bb..f9da76c6e20 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -200,7 +200,6 @@ namespace System.Net
set { allowBuffering = value; }
}
-#if NET_4_5
public virtual bool AllowReadStreamBuffering {
get { return false; }
set {
@@ -208,7 +207,6 @@ namespace System.Net
throw new InvalidOperationException ();
}
}
-#endif
static Exception GetMustImplement ()
{
@@ -307,9 +305,7 @@ namespace System.Net
set { continueDelegate = value; }
}
-#if NET_4_5
virtual
-#endif
public CookieContainer CookieContainer {
get { return cookieContainer; }
set { cookieContainer = value; }
@@ -378,9 +374,7 @@ namespace System.Net
}
}
-#if NET_4_5
virtual
-#endif
public bool HaveResponse {
get { return haveResponse; }
}
@@ -500,13 +494,11 @@ namespace System.Net
}
}
-#if NET_4_5
[MonoTODO]
public int ContinueTimeout {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
public string MediaType {
get { return mediaType; }
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index b4008299239..1e83a6ddb57 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -155,9 +155,7 @@ namespace System.Net
}
}
-#if NET_4_5
virtual
-#endif
public CookieCollection Cookies {
get {
CheckDisposed ();
@@ -202,9 +200,7 @@ namespace System.Net
}
}
-#if NET_4_5
virtual
-#endif
public string Method {
get {
CheckDisposed ();
@@ -233,18 +229,14 @@ namespace System.Net
}
}
-#if NET_4_5
virtual
-#endif
public HttpStatusCode StatusCode {
get {
return statusCode;
}
}
-#if NET_4_5
virtual
-#endif
public string StatusDescription {
get {
CheckDisposed ();
diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs
index 2bd9dee7507..70705adf4e0 100644
--- a/mcs/class/System/System.Net/WebClient.cs
+++ b/mcs/class/System/System.Net/WebClient.cs
@@ -70,9 +70,7 @@ using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using System.Net.Cache;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Net
{
@@ -95,9 +93,7 @@ namespace System.Net
Encoding encoding = Encoding.Default;
IWebProxy proxy;
// RequestCachePolicy cache_policy;
-#if NET_4_5
CancellationTokenSource cts;
-#endif
// Constructors
static WebClient ()
@@ -215,11 +211,7 @@ namespace System.Net
public bool IsBusy {
get {
-#if NET_4_5
return is_busy || (cts != null);
-#else
- return is_busy;
-#endif
}
}
// Methods
@@ -1067,12 +1059,10 @@ namespace System.Net
public void CancelAsync ()
{
lock (this){
-#if NET_4_5
if (cts != null) {
cts.Cancel ();
return;
}
-#endif
if (async_thread == null)
return;
@@ -1094,11 +1084,9 @@ namespace System.Net
lock (this) {
is_busy = false;
async_thread = null;
-#if NET_4_5
if (cts != null)
cts.Dispose ();
cts = null;
-#endif
}
}
@@ -1565,7 +1553,6 @@ namespace System.Net
return response;
}
-#if NET_4_5
// DownloadDataTaskAsync
@@ -2268,7 +2255,6 @@ namespace System.Net
}
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
index 59079da8d24..97d4965b035 100644
--- a/mcs/class/System/System.Net/WebRequest.cs
+++ b/mcs/class/System/System.Net/WebRequest.cs
@@ -39,9 +39,7 @@ using System.Net.Configuration;
using System.Net.Security;
using System.Net.Cache;
using System.Security.Principal;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
#if NET_2_1
using ConfigurationException = System.ArgumentException;
@@ -514,7 +512,6 @@ namespace System.Net
prefixes [prefix] = o;
}
-#if NET_4_5
public virtual Task<Stream> GetRequestStreamAsync ()
{
return Task<Stream>.Factory.FromAsync (BeginGetRequestStream, EndGetRequestStream, null);
@@ -524,7 +521,6 @@ namespace System.Net
{
return Task<WebResponse>.Factory.FromAsync (BeginGetResponse, EndGetResponse, null);
}
-#endif
}
}
diff --git a/mcs/class/System/System.Security.Authentication/SslProtocols.cs b/mcs/class/System/System.Security.Authentication/SslProtocols.cs
index 94d29a9944e..39393d8bdf8 100644
--- a/mcs/class/System/System.Security.Authentication/SslProtocols.cs
+++ b/mcs/class/System/System.Security.Authentication/SslProtocols.cs
@@ -37,12 +37,10 @@ namespace System.Security.Authentication {
Ssl2 = 12,
Ssl3 = 48,
Tls = 192,
-#if NET_4_5
[MonoTODO ("unsupported")]
Tls11 = 768,
[MonoTODO ("unsupported")]
Tls12 = 3072,
-#endif
Default = Ssl3 | Tls
}
}
diff --git a/mcs/class/System/System.Windows.Input/ICommand.cs b/mcs/class/System/System.Windows.Input/ICommand.cs
index 149e9346a9f..95dcbb114c1 100644
--- a/mcs/class/System/System.Windows.Input/ICommand.cs
+++ b/mcs/class/System/System.Windows.Input/ICommand.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Runtime.CompilerServices;
@@ -42,4 +41,3 @@ namespace System.Windows.Input {
}
}
-#endif
diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs
index f44c3160307..eab294b3f8f 100644
--- a/mcs/class/System/System/Uri.cs
+++ b/mcs/class/System/System/Uri.cs
@@ -140,9 +140,7 @@ namespace System {
static Uri ()
{
-#if NET_4_5
IriParsing = true;
-#endif
var iriparsingVar = Environment.GetEnvironmentVariable ("MONO_URI_IRIPARSING");
if (iriparsingVar == "true")
@@ -1790,18 +1788,6 @@ namespace System {
return false;
}
-#if !NET_4_5
- switch (b) {
- case '!':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '-':
- case '.':
- return false;
- }
-#endif
return true;
}
@@ -1855,11 +1841,9 @@ namespace System {
case '_':
case '~':
return false;
-#if NET_4_5
case '[':
case ']':
return false;
-#endif
}
return true;
diff --git a/mcs/class/System/System/UriComponents.cs b/mcs/class/System/System/UriComponents.cs
index b20e6dcab2e..bc5fe6b8cac 100644
--- a/mcs/class/System/System/UriComponents.cs
+++ b/mcs/class/System/System/UriComponents.cs
@@ -39,9 +39,7 @@ namespace System {
Query = 32,
Fragment = 64,
StrongPort = 128,
-#if NET_4_5
NormalizedHost = 256,
-#endif
KeepDelimiter = 0x40000000,
HostAndPort = Host | StrongPort,
diff --git a/mcs/class/System/System/UriHelper.cs b/mcs/class/System/System/UriHelper.cs
index f1f85372255..76a86f86b47 100644
--- a/mcs/class/System/System/UriHelper.cs
+++ b/mcs/class/System/System/UriHelper.cs
@@ -481,12 +481,7 @@ namespace System {
(formatFlags & FormatFlags.HasFragmentPercentage) != 0)
return true;
-#if NET_4_5
return false;
-#else
- return uriFormat == UriFormat.UriEscaped ||
- (uriFormat != UriFormat.Unescaped && (formatFlags & FormatFlags.HasComponentCharactersToNormalize) != 0);
-#endif
}
if (uriFormat == UriFormat.SafeUnescaped || uriFormat == ToStringUnescape) {
diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs
index 13df087002f..2e1e3c5d485 100644
--- a/mcs/class/System/System/UriParseComponents.cs
+++ b/mcs/class/System/System/UriParseComponents.cs
@@ -403,11 +403,7 @@ namespace System {
if (possibleIpv6) {
IPv6Address ipv6addr;
if (IPv6Address.TryParse (sb.ToString (), out ipv6addr)) {
-#if NET_4_5
var ipStr = ipv6addr.ToString (false);
-#else
- var ipStr = ipv6addr.ToString (true);
-#endif
//remove scope
ipStr = ipStr.Split ('%') [0];
diff --git a/mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs b/mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs
index f87ec18d9ef..39815acf36a 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/EnumerablePartitionerOptions.cs
@@ -26,7 +26,6 @@
// 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 {
@@ -37,4 +36,3 @@ namespace System.Collections.Concurrent {
NoBuffering
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs b/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
index 6542b3fe038..58149fb192f 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
@@ -98,14 +98,12 @@ 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>
diff --git a/mcs/class/corlib/System.Collections.Generic/Comparer.cs b/mcs/class/corlib/System.Collections.Generic/Comparer.cs
index 7a8eb928f0c..d19ce2cc8bb 100644
--- a/mcs/class/corlib/System.Collections.Generic/Comparer.cs
+++ b/mcs/class/corlib/System.Collections.Generic/Comparer.cs
@@ -47,7 +47,6 @@ namespace System.Collections.Generic {
}
}
-#if NET_4_5
public static Comparer<T> Create (Comparison<T> comparison)
{
if (comparison == null)
@@ -55,7 +54,6 @@ namespace System.Collections.Generic {
return new ComparisonComparer<T> (comparison);
}
-#endif
int IComparer.Compare (object x, object y)
{
@@ -110,7 +108,6 @@ namespace System.Collections.Generic {
return x.CompareTo (y);
}
}
-#if NET_4_5
[Serializable]
sealed class ComparisonComparer<T> : Comparer<T>
{
@@ -126,5 +123,4 @@ namespace System.Collections.Generic {
return comparison (x, y);
}
}
-#endif
}
diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
index 9fcc7475627..9436b7419fb 100644
--- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
+++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
@@ -59,9 +59,7 @@ namespace System.Collections.Generic {
[DebuggerDisplay ("Count={Count}")]
[DebuggerTypeProxy (typeof (CollectionDebuggerView<,>))]
public class Dictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, ISerializable, IDeserializationCallback
-#if NET_4_5
, IReadOnlyDictionary<TKey, TValue>
-#endif
{
// The implementation of this class uses a hash table and linked lists
// (see: http://msdn2.microsoft.com/en-us/library/ms379571(VS.80).aspx).
@@ -656,7 +654,6 @@ namespace System.Collections.Generic {
get { return Values; }
}
-#if NET_4_5
IEnumerable<TKey> IReadOnlyDictionary<TKey, TValue>.Keys {
get { return Keys; }
}
@@ -664,7 +661,6 @@ namespace System.Collections.Generic {
IEnumerable<TValue> IReadOnlyDictionary<TKey, TValue>.Values {
get { return Values; }
}
-#endif
public KeyCollection Keys {
get { return new KeyCollection (this); }
diff --git a/mcs/class/corlib/System.Collections.Generic/IReadOnlyCollection.cs b/mcs/class/corlib/System.Collections.Generic/IReadOnlyCollection.cs
index 084548b47a9..99fa4d9fd6b 100644
--- a/mcs/class/corlib/System.Collections.Generic/IReadOnlyCollection.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IReadOnlyCollection.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Collections.Generic
{
@@ -36,4 +35,3 @@ namespace System.Collections.Generic
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Generic/IReadOnlyDictionary.cs b/mcs/class/corlib/System.Collections.Generic/IReadOnlyDictionary.cs
index 4d686190472..3b7e555a4b1 100644
--- a/mcs/class/corlib/System.Collections.Generic/IReadOnlyDictionary.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IReadOnlyDictionary.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Collections.Generic
{
@@ -41,4 +40,3 @@ namespace System.Collections.Generic
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Generic/IReadOnlyList.cs b/mcs/class/corlib/System.Collections.Generic/IReadOnlyList.cs
index 99102340b66..6d565f1c411 100644
--- a/mcs/class/corlib/System.Collections.Generic/IReadOnlyList.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IReadOnlyList.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Collections.Generic
{
@@ -36,4 +35,3 @@ namespace System.Collections.Generic
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Generic/List.cs b/mcs/class/corlib/System.Collections.Generic/List.cs
index 8f326784730..245070972eb 100644
--- a/mcs/class/corlib/System.Collections.Generic/List.cs
+++ b/mcs/class/corlib/System.Collections.Generic/List.cs
@@ -42,9 +42,7 @@ namespace System.Collections.Generic {
[DebuggerDisplay ("Count={Count}")]
[DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
public class List<T> : IList<T>, IList
-#if NET_4_5
, IReadOnlyList<T>
-#endif
{
T [] _items;
int _size;
diff --git a/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs b/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
index c5f09e7ab2a..d30330b4c7e 100644
--- a/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
+++ b/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs
@@ -49,9 +49,7 @@ namespace System.Collections.ObjectModel
[DebuggerDisplay ("Count={Count}")]
[DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
public class Collection<T> : IList<T>, IList
-#if NET_4_5
, IReadOnlyList<T>
-#endif
{
IList <T> items;
diff --git a/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyCollection.cs b/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyCollection.cs
index 7b0510ec995..7f5c06f562a 100644
--- a/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyCollection.cs
+++ b/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyCollection.cs
@@ -48,9 +48,7 @@ namespace System.Collections.ObjectModel
[DebuggerDisplay ("Count={Count}")]
[DebuggerTypeProxy (typeof (CollectionDebuggerView<>))]
public class ReadOnlyCollection<T> : IList<T>, IList
-#if NET_4_5
, IReadOnlyList<T>
-#endif
{
IList <T> list;
diff --git a/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyDictionary.cs b/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyDictionary.cs
index a012b56dd06..422f6fa88f2 100644
--- a/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyDictionary.cs
+++ b/mcs/class/corlib/System.Collections.ObjectModel/ReadOnlyDictionary.cs
@@ -25,7 +25,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -437,5 +436,4 @@ namespace System.Collections.ObjectModel {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Configuration.Assemblies/AssemblyHashAlgorithm.cs b/mcs/class/corlib/System.Configuration.Assemblies/AssemblyHashAlgorithm.cs
index b64a1e1dd5f..ebac5f3d552 100644
--- a/mcs/class/corlib/System.Configuration.Assemblies/AssemblyHashAlgorithm.cs
+++ b/mcs/class/corlib/System.Configuration.Assemblies/AssemblyHashAlgorithm.cs
@@ -40,10 +40,8 @@ namespace System.Configuration.Assemblies {
None = 0,
MD5 = 32771,
SHA1 = 32772,
-#if NET_4_5
SHA256 = 32780,
SHA384 = 32781,
SHA512 = 32782,
-#endif
}
}
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs b/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
index 350fbcf2759..b531f08b3f4 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
@@ -34,9 +34,7 @@ using System.Runtime.ConstrainedExecution;
namespace System.Diagnostics.Contracts.Internal
{
-#if NET_4_5
[Obsolete ("Type has been moved to System.Runtime.CompilerServices")]
-#endif
public static class ContractHelper
{
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.cs
index 6240252671e..f011a4ed8b3 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractAbbreviatorAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Contracts
{
@@ -37,4 +36,3 @@ namespace System.Diagnostics.Contracts
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.cs
index 2b7d1c77a26..6d230b9d3ab 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractArgumentValidatorAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Contracts
{
@@ -37,4 +36,3 @@ namespace System.Diagnostics.Contracts
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs
index 3119d312561..079380d3b94 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractOptionAttribute.cs
@@ -23,7 +23,6 @@
// 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)]
@@ -66,4 +65,3 @@ namespace System.Diagnostics.Contracts {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs
index c22ddf445a3..191e9932def 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -45,4 +44,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventCommand.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventCommand.cs
index 26f665e560a..f8ecf7b5c4c 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventCommand.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventCommand.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -39,4 +38,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventCommandEventArgs.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventCommandEventArgs.cs
index e195c64f415..3186020b201 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventCommandEventArgs.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventCommandEventArgs.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Collections.Generic;
@@ -63,4 +62,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs
index 3322d78929f..ca2bfd77102 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -44,4 +43,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs
index 4a060833175..6d56cffbdcf 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -41,4 +40,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
index cfa4bcaba5d..37c2b3aba61 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventSource.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -81,4 +80,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceAttribute.cs
index 0bc0faef9f5..078c0875405 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -47,4 +46,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/NonEventAttribute.cs b/mcs/class/corlib/System.Diagnostics.Tracing/NonEventAttribute.cs
index 914315a0f9e..568d1f2986a 100644
--- a/mcs/class/corlib/System.Diagnostics.Tracing/NonEventAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Tracing/NonEventAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Diagnostics.Tracing
{
@@ -36,4 +35,3 @@ namespace System.Diagnostics.Tracing
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics/StackTrace.cs b/mcs/class/corlib/System.Diagnostics/StackTrace.cs
index c9bb574a216..8a89e4a067f 100644
--- a/mcs/class/corlib/System.Diagnostics/StackTrace.cs
+++ b/mcs/class/corlib/System.Diagnostics/StackTrace.cs
@@ -148,9 +148,7 @@ namespace System.Diagnostics {
}
[MonoLimitation ("Not possible to create StackTraces from other threads")]
-#if NET_4_5
[Obsolete]
-#endif
public StackTrace (Thread targetThread, bool needFileInfo)
{
if (targetThread == Thread.CurrentThread){
diff --git a/mcs/class/corlib/System.Globalization/Calendar.cs b/mcs/class/corlib/System.Globalization/Calendar.cs
index 49dc1ede5df..3d235028d4d 100644
--- a/mcs/class/corlib/System.Globalization/Calendar.cs
+++ b/mcs/class/corlib/System.Globalization/Calendar.cs
@@ -1028,13 +1028,11 @@ public abstract class Calendar : ICloneable
internal int m_currentEraValue; // Unused, by MS serializes this
#pragma warning restore 649
-#if NET_4_5
protected virtual int DaysInYearBeforeMinSupportedYear {
get{
return 365;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/ChineseLunisolarCalendar.cs b/mcs/class/corlib/System.Globalization/ChineseLunisolarCalendar.cs
index 3d1245d2fb8..7fad8661eed 100644
--- a/mcs/class/corlib/System.Globalization/ChineseLunisolarCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/ChineseLunisolarCalendar.cs
@@ -87,13 +87,11 @@ public class ChineseLunisolarCalendar : EastAsianLunisolarCalendar {
}
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 384;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs
index 9be308de78d..9c7bb548501 100644
--- a/mcs/class/corlib/System.Globalization/CultureInfo.cs
+++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs
@@ -379,9 +379,7 @@ namespace System.Globalization
RegionInfo.ClearCachedData ();
TimeZone.ClearCachedData ();
DateTime.ClearCachedData ();
-#if NET_4_5
TimeZoneInfo.ClearCachedData ();
-#endif
}
public virtual object Clone()
@@ -1013,7 +1011,6 @@ namespace System.Globalization
return new CultureNotFoundException ("name", "Culture name " + name + " is not supported.");
}
-#if NET_4_5
public static CultureInfo DefaultThreadCurrentCulture {
get {
return Thread.default_culture;
@@ -1031,6 +1028,5 @@ namespace System.Globalization
Thread.default_ui_culture = value;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/GregorianCalendar.cs b/mcs/class/corlib/System.Globalization/GregorianCalendar.cs
index 1f363733676..7d1ebafac4f 100644
--- a/mcs/class/corlib/System.Globalization/GregorianCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/GregorianCalendar.cs
@@ -344,13 +344,6 @@ public class GregorianCalendar : Calendar {
return 12;
}
-#if !NET_4_5
- [ComVisible (false)]
- public override int GetWeekOfYear (DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
- {
- return base.GetWeekOfYear (time, rule, firstDayOfWeek);
- }
-#endif
/// <summary>
/// Overridden. Gives the number of the year of the specified
diff --git a/mcs/class/corlib/System.Globalization/HijriCalendar.cs b/mcs/class/corlib/System.Globalization/HijriCalendar.cs
index ecee2638039..c39822034dc 100644
--- a/mcs/class/corlib/System.Globalization/HijriCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/HijriCalendar.cs
@@ -957,13 +957,11 @@ public class HijriCalendar : Calendar {
set { throw new NotImplementedException (); }
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 354;
}
}
-#endif
} // class HijriCalendar
} // namespace System.Globalization
diff --git a/mcs/class/corlib/System.Globalization/JapaneseLunisolarCalendar.cs b/mcs/class/corlib/System.Globalization/JapaneseLunisolarCalendar.cs
index dfca69b1c3e..7c4271be6c9 100644
--- a/mcs/class/corlib/System.Globalization/JapaneseLunisolarCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/JapaneseLunisolarCalendar.cs
@@ -91,13 +91,11 @@ public class JapaneseLunisolarCalendar : EastAsianLunisolarCalendar {
}
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 354;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/KoreanLunisolarCalendar.cs b/mcs/class/corlib/System.Globalization/KoreanLunisolarCalendar.cs
index 5339fccc5e4..83b69a493a4 100644
--- a/mcs/class/corlib/System.Globalization/KoreanLunisolarCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/KoreanLunisolarCalendar.cs
@@ -81,13 +81,11 @@ public class KoreanLunisolarCalendar : EastAsianLunisolarCalendar {
}
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 384;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/SortVersion.cs b/mcs/class/corlib/System.Globalization/SortVersion.cs
index dc21faf74e9..b6b627e8b01 100644
--- a/mcs/class/corlib/System.Globalization/SortVersion.cs
+++ b/mcs/class/corlib/System.Globalization/SortVersion.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Collections.Generic;
@@ -78,4 +77,3 @@ namespace System.Globalization
}
}
-#endif
diff --git a/mcs/class/corlib/System.Globalization/TaiwanLunisolarCalendar.cs b/mcs/class/corlib/System.Globalization/TaiwanLunisolarCalendar.cs
index a66fcba27b5..c89b8eb9b2b 100644
--- a/mcs/class/corlib/System.Globalization/TaiwanLunisolarCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/TaiwanLunisolarCalendar.cs
@@ -81,13 +81,11 @@ public class TaiwanLunisolarCalendar : EastAsianLunisolarCalendar {
}
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 384;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Globalization/UmAlQuraCalendar.cs b/mcs/class/corlib/System.Globalization/UmAlQuraCalendar.cs
index 469e6139be7..7774df9393b 100644
--- a/mcs/class/corlib/System.Globalization/UmAlQuraCalendar.cs
+++ b/mcs/class/corlib/System.Globalization/UmAlQuraCalendar.cs
@@ -952,13 +952,11 @@ public class UmAlQuraCalendar : Calendar {
}
}
-#if NET_4_5
protected override int DaysInYearBeforeMinSupportedYear {
get{
return 384;
}
}
-#endif
} // class HijriCalendar
} // namespace System.Globalization
diff --git a/mcs/class/corlib/System.IO/BinaryReader.cs b/mcs/class/corlib/System.IO/BinaryReader.cs
index ad24f8ca8c5..0ee3a5c94c4 100644
--- a/mcs/class/corlib/System.IO/BinaryReader.cs
+++ b/mcs/class/corlib/System.IO/BinaryReader.cs
@@ -62,7 +62,6 @@ namespace System.IO {
{
}
-#if NET_4_5
readonly bool leave_open;
public BinaryReader(Stream input, Encoding encoding)
@@ -71,11 +70,6 @@ namespace System.IO {
}
public BinaryReader(Stream input, Encoding encoding, bool leaveOpen)
-#else
- const bool leave_open = false;
-
- public BinaryReader(Stream input, Encoding encoding)
-#endif
{
if (input == null || encoding == null)
throw new ArgumentNullException(Locale.GetText ("Input or Encoding is a null reference."));
@@ -84,9 +78,7 @@ namespace System.IO {
m_stream = input;
m_encoding = encoding;
-#if NET_4_5
leave_open = leaveOpen;
-#endif
decoder = encoding.GetDecoder ();
// internal buffer size is documented to be between 16 and the value
diff --git a/mcs/class/corlib/System.IO/BinaryWriter.cs b/mcs/class/corlib/System.IO/BinaryWriter.cs
index bab371824c0..292573c45ac 100644
--- a/mcs/class/corlib/System.IO/BinaryWriter.cs
+++ b/mcs/class/corlib/System.IO/BinaryWriter.cs
@@ -59,7 +59,6 @@ namespace System.IO {
{
}
-#if NET_4_5
readonly bool leave_open;
public BinaryWriter(Stream output, Encoding encoding)
@@ -68,11 +67,6 @@ namespace System.IO {
}
public BinaryWriter(Stream output, Encoding encoding, bool leaveOpen)
-#else
- const bool leave_open = false;
-
- public BinaryWriter(Stream output, Encoding encoding)
-#endif
{
if (output == null)
throw new ArgumentNullException("output");
@@ -81,9 +75,7 @@ namespace System.IO {
if (!output.CanWrite)
throw new ArgumentException(Locale.GetText ("Stream does not support writing or already closed."));
-#if NET_4_5
leave_open = leaveOpen;
-#endif
OutStream = output;
m_encoding = encoding;
buffer = new byte [16];
diff --git a/mcs/class/corlib/System.IO/FileAttributes.cs b/mcs/class/corlib/System.IO/FileAttributes.cs
index de99c787c55..4fb16ea0968 100644
--- a/mcs/class/corlib/System.IO/FileAttributes.cs
+++ b/mcs/class/corlib/System.IO/FileAttributes.cs
@@ -55,10 +55,8 @@ namespace System.IO
SparseFile = 0x00200,
System = 0x00004,
Temporary = 0x00100,
-#if NET_4_5
IntegrityStream = 0x8000,
NoScrubData = 0x20000,
-#endif
//
// This flag is used internall by Mono to make it Executable
//
diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs
index 8c6fa0cc6a1..f68f53610a5 100644
--- a/mcs/class/corlib/System.IO/FileStream.cs
+++ b/mcs/class/corlib/System.IO/FileStream.cs
@@ -47,9 +47,7 @@ using System.IO.IsolatedStorage;
using System.Security.AccessControl;
#endif
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -950,7 +948,6 @@ namespace System.IO
}
#endif
-#if NET_4_5
public override Task FlushAsync (CancellationToken cancellationToken)
{
return base.FlushAsync (cancellationToken);
@@ -965,7 +962,6 @@ namespace System.IO
{
return base.WriteAsync (buffer, offset, count, cancellationToken);
}
-#endif
// private.
diff --git a/mcs/class/corlib/System.IO/MemoryStream.cs b/mcs/class/corlib/System.IO/MemoryStream.cs
index 4ce86df30b6..995cf46af40 100644
--- a/mcs/class/corlib/System.IO/MemoryStream.cs
+++ b/mcs/class/corlib/System.IO/MemoryStream.cs
@@ -34,9 +34,7 @@
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -55,10 +53,8 @@ namespace System.IO
bool streamClosed;
int position;
int dirty_bytes;
-#if NET_4_5
[NonSerialized]
Task<int> read_task;
-#endif
public MemoryStream () : this (0)
{
@@ -425,7 +421,6 @@ namespace System.IO
stream.Write (internalBuffer, initialIndex, length - initialIndex);
}
-#if NET_4_5
public override Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
{
@@ -495,6 +490,5 @@ namespace System.IO
return Task<object>.FromException (ex);
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs
index 79f67371deb..8307d0aff26 100644
--- a/mcs/class/corlib/System.IO/Stream.cs
+++ b/mcs/class/corlib/System.IO/Stream.cs
@@ -34,9 +34,7 @@
using System.Threading;
using System.Runtime.Remoting.Messaging;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -262,14 +260,11 @@ namespace System.IO
destination.Write (buffer, 0, nread);
}
-#if NET_4_5
[ObsoleteAttribute("Do not call or override this method")]
-#endif
protected virtual void ObjectInvariant ()
{
}
-#if NET_4_5
public Task CopyToAsync (Stream destination)
{
@@ -340,7 +335,6 @@ namespace System.IO
{
return Task.Factory.FromAsync (BeginWrite, EndWrite, buffer, offset, count, null);
}
-#endif
}
class NullStream : Stream
diff --git a/mcs/class/corlib/System.IO/StreamReader.cs b/mcs/class/corlib/System.IO/StreamReader.cs
index 8a0a9e9bb10..1adf8ab51ac 100644
--- a/mcs/class/corlib/System.IO/StreamReader.cs
+++ b/mcs/class/corlib/System.IO/StreamReader.cs
@@ -33,9 +33,7 @@
using System;
using System.Text;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO {
[Serializable]
@@ -126,10 +124,8 @@ namespace System.IO {
bool mayBlock;
-#if NET_4_5
IDecoupledTask async_task;
readonly bool leave_open;
-#endif
public new static readonly StreamReader Null = new NullStreamReader ();
@@ -147,22 +143,14 @@ namespace System.IO {
public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks)
: this (stream, encoding, detectEncodingFromByteOrderMarks, DefaultBufferSize) { }
-#if NET_4_5
public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)
: this (stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, false)
{
}
public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize, bool leaveOpen)
-#else
- const bool leave_open = false;
-
- public StreamReader(Stream stream, Encoding encoding, bool detectEncodingFromByteOrderMarks, int bufferSize)
-#endif
{
-#if NET_4_5
leave_open = leaveOpen;
-#endif
Initialize (stream, encoding, detectEncodingFromByteOrderMarks, bufferSize);
}
@@ -590,13 +578,10 @@ namespace System.IO {
if (base_stream == null)
throw new ObjectDisposedException ("StreamReader", "Cannot read from a closed StreamReader");
-#if NET_4_5
if (async_task != null && !async_task.IsCompleted)
throw new InvalidOperationException ();
-#endif
}
-#if NET_4_5
public override int ReadBlock ([In, Out] char[] buffer, int index, int count)
{
if (buffer == null)
@@ -766,6 +751,5 @@ namespace System.IO {
return decoded_count;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index fe3a6062617..ef4e866f3c4 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -32,9 +32,7 @@
using System.Text;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO {
@@ -58,10 +56,8 @@ namespace System.IO {
private bool iflush;
private bool preamble_done;
-#if NET_4_5
readonly bool leave_open;
IDecoupledTask async_task;
-#endif
public new static readonly StreamWriter Null = new StreamWriter (Stream.Null, Encoding.UTF8Unmarked, 1);
@@ -83,18 +79,12 @@ namespace System.IO {
preamble_done = true;
}
-#if NET_4_5
public StreamWriter (Stream stream, Encoding encoding, int bufferSize)
: this (stream, encoding, bufferSize, false)
{
}
public StreamWriter (Stream stream, Encoding encoding, int bufferSize, bool leaveOpen)
-#else
- const bool leave_open = false;
-
- public StreamWriter (Stream stream, Encoding encoding, int bufferSize)
-#endif
{
if (null == stream)
throw new ArgumentNullException("stream");
@@ -105,9 +95,7 @@ namespace System.IO {
if (!stream.CanWrite)
throw new ArgumentException ("Can not write to stream");
-#if NET_4_5
leave_open = leaveOpen;
-#endif
internalStream = stream;
Initialize(encoding, bufferSize);
@@ -273,7 +261,6 @@ namespace System.IO {
}
}
-#if NET_4_5
async Task FlushCoreAsync ()
{
await DecodeAsync ().ConfigureAwait (false);
@@ -346,7 +333,6 @@ namespace System.IO {
decode_pos += todo;
}
}
-#endif
public override void Write (char[] buffer, int index, int count)
{
@@ -413,13 +399,10 @@ namespace System.IO {
if (byte_buf == null)
throw new ObjectDisposedException ("StreamWriter");
-#if NET_4_5
if (async_task != null && !async_task.IsCompleted)
throw new InvalidOperationException ();
-#endif
}
-#if NET_4_5
public override Task FlushAsync ()
{
CheckState ();
@@ -559,6 +542,5 @@ namespace System.IO {
async_task = res = new DecoupledTask (WriteAsyncCore (value, true));
return res.Task;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/StringReader.cs b/mcs/class/corlib/System.IO/StringReader.cs
index e182d71b7b5..bd8bd82d05d 100644
--- a/mcs/class/corlib/System.IO/StringReader.cs
+++ b/mcs/class/corlib/System.IO/StringReader.cs
@@ -32,9 +32,7 @@
using System;
using System.Globalization;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO {
[Serializable]
@@ -155,7 +153,6 @@ namespace System.IO {
return toEnd;
}
-#if NET_4_5
//
// All async methods return finished task with a result as it's faster
// than setting up async call
@@ -179,7 +176,6 @@ namespace System.IO {
{
return Task.FromResult (ReadToEnd ());
}
-#endif
static void ObjectDisposedException ()
{
diff --git a/mcs/class/corlib/System.IO/StringWriter.cs b/mcs/class/corlib/System.IO/StringWriter.cs
index 461aaa721e0..6bd836020a7 100644
--- a/mcs/class/corlib/System.IO/StringWriter.cs
+++ b/mcs/class/corlib/System.IO/StringWriter.cs
@@ -33,9 +33,7 @@
using System.Globalization;
using System.Text;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -140,7 +138,6 @@ namespace System.IO
internalString.Append (buffer, index, count);
}
-#if NET_4_5
public override Task FlushAsync ()
{
// it appears to do nothing
@@ -186,6 +183,5 @@ namespace System.IO
WriteLine (value);
return TaskConstants.Finished;
}
-#endif
}
} \ No newline at end of file
diff --git a/mcs/class/corlib/System.IO/TextReader.cs b/mcs/class/corlib/System.IO/TextReader.cs
index b7080fde80c..66182097c94 100644
--- a/mcs/class/corlib/System.IO/TextReader.cs
+++ b/mcs/class/corlib/System.IO/TextReader.cs
@@ -32,9 +32,7 @@
using System;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO {
@@ -163,7 +161,6 @@ namespace System.IO {
return new SynchronizedReader (reader);
}
-#if NET_4_5
//
// Use tuple to pack the arguments because it's faster than
// setting up anonymous method container with an instance delegate
@@ -193,7 +190,6 @@ namespace System.IO {
{
return Task.Factory.StartNew (l => ((TextReader) l).ReadToEnd (), this);
}
-#endif
}
//
@@ -258,7 +254,6 @@ namespace System.IO {
}
}
-#if NET_4_5
public override Task<int> ReadAsync (char[] buffer, int index, int count)
{
lock (this) {
@@ -286,6 +281,5 @@ namespace System.IO {
return reader.ReadToEndAsync ();
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/TextWriter.cs b/mcs/class/corlib/System.IO/TextWriter.cs
index ad3906fe2b4..bedf2694d0a 100644
--- a/mcs/class/corlib/System.IO/TextWriter.cs
+++ b/mcs/class/corlib/System.IO/TextWriter.cs
@@ -33,9 +33,7 @@
using System.Text;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -361,7 +359,6 @@ namespace System.IO
WriteLine ();
}
-#if NET_4_5
public virtual Task FlushAsync ()
{
return Task.Factory.StartNew (l => ((TextWriter)l).Flush (), this);
@@ -439,7 +436,6 @@ namespace System.IO
t.Item1.WriteLine (t.Item2);
}, Tuple.Create (this, value));
}
-#endif
}
//
@@ -719,7 +715,6 @@ namespace System.IO
}
#endregion
-#if NET_4_5
public override Task FlushAsync ()
{
lock (this) {
@@ -775,7 +770,6 @@ namespace System.IO
return writer.WriteLineAsync (value);
}
}
-#endif
public override Encoding Encoding {
get {
lock (this) {
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
index dc8801f5e18..f7a715b5d3a 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
@@ -33,10 +33,8 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.IO
{
@@ -50,9 +48,7 @@ namespace System.IO
long initial_position;
long current_position;
SafeBuffer safebuffer;
-#if NET_4_5
Task<int> read_task;
-#endif
internal event EventHandler Closed;
@@ -206,7 +202,6 @@ namespace System.IO
return progress;
}
-#if NET_4_5
public override Task<int> ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
if (buffer == null)
@@ -234,7 +229,6 @@ namespace System.IO
}
}
-#endif
public override int ReadByte ()
{
@@ -317,7 +311,6 @@ namespace System.IO
//but is included as part of the Stream base class
}
-#if NET_4_5
public override Task FlushAsync (CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested)
@@ -330,7 +323,6 @@ namespace System.IO
return Task<object>.FromException (ex);
}
}
-#endif
protected override void Dispose (bool disposing)
{
@@ -386,7 +378,6 @@ namespace System.IO
length = current_position;
}
-#if NET_4_5
public override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
if (buffer == null)
@@ -410,7 +401,6 @@ namespace System.IO
return Task<object>.FromException (ex);
}
}
-#endif
public override void WriteByte (byte value)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
index 80864bc8351..6acc3c4ec77 100644
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
@@ -458,7 +458,6 @@ namespace System.Reflection.Emit
}
*/
-#if NET_4_5
public static AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access)
{
if (name == null)
@@ -466,7 +465,6 @@ namespace System.Reflection.Emit
return new AssemblyBuilder (name, null, access, false);
}
-#endif
public ModuleBuilder DefineDynamicModule (string name)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
index 358601cb819..e3c30a4e4b2 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicMethod.cs
@@ -162,9 +162,7 @@ namespace System.Reflection.Emit {
}
[ComVisible (true)]
-#if NET_4_5
sealed override
-#endif
public Delegate CreateDelegate (Type delegateType)
{
if (delegateType == null)
@@ -179,9 +177,7 @@ namespace System.Reflection.Emit {
}
[ComVisible (true)]
-#if NET_4_5
sealed override
-#endif
public Delegate CreateDelegate (Type delegateType, object target)
{
if (delegateType == null)
diff --git a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
index eecc6b33ab2..b5baac27ea0 100644
--- a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
@@ -44,11 +44,7 @@ namespace System.Reflection.Emit {
[ComDefaultInterface (typeof (_EnumBuilder))]
[ClassInterface (ClassInterfaceType.None)]
public sealed class EnumBuilder :
-#if NET_4_5
TypeInfo
-#else
- Type
-#endif
, _EnumBuilder
{
private TypeBuilder _tb;
@@ -424,7 +420,6 @@ namespace System.Reflection.Emit {
}
}
-#if NET_4_5
public override bool IsConstructedGenericType {
get { return false; }
}
@@ -433,7 +428,6 @@ namespace System.Reflection.Emit {
{
return base.IsAssignableFrom (typeInfo);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
index 06241b7baa1..af03fefbe85 100644
--- a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
@@ -43,11 +43,7 @@ namespace System.Reflection.Emit
[ComVisible (true)]
[StructLayout (LayoutKind.Sequential)]
public sealed class GenericTypeParameterBuilder :
-#if NET_4_5
TypeInfo
-#else
- Type
-#endif
{
#region Sync with reflection.h
private TypeBuilder tbuilder;
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index 253b2bb39f7..5621065d803 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -44,9 +44,6 @@ using System.Security;
using System.Security.Permissions;
using System.Diagnostics.SymbolStore;
-#if !NET_4_5
-using TypeInfo = System.Type;
-#endif
namespace System.Reflection.Emit
{
@@ -755,9 +752,7 @@ namespace System.Reflection.Emit
return CreateTypeInfo ();
}
-#if NET_4_5
public
-#endif
TypeInfo CreateTypeInfo ()
{
/* handle nesting_type */
@@ -1944,7 +1939,6 @@ namespace System.Reflection.Emit
}
}
-#if NET_4_5
public override bool IsConstructedGenericType {
get { return false; }
}
@@ -1953,7 +1947,6 @@ namespace System.Reflection.Emit
{
return base.IsAssignableFrom (typeInfo);
}
-#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs
index 9428605ace9..5401c0b7bca 100644
--- a/mcs/class/corlib/System.Reflection/Assembly.cs
+++ b/mcs/class/corlib/System.Reflection/Assembly.cs
@@ -936,7 +936,6 @@ namespace System.Reflection {
return !left.Equals (right);
}
-#if NET_4_5
public virtual IEnumerable<TypeInfo> DefinedTypes {
get {
foreach (var type in GetTypes ()) {
@@ -956,6 +955,5 @@ namespace System.Reflection {
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
get { return GetCustomAttributesData (); }
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/AssemblyContentType.cs b/mcs/class/corlib/System.Reflection/AssemblyContentType.cs
index ebaebdd364a..927d4ed12a7 100644
--- a/mcs/class/corlib/System.Reflection/AssemblyContentType.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblyContentType.cs
@@ -24,7 +24,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System.Runtime.InteropServices;
namespace System.Reflection {
@@ -35,4 +34,3 @@ namespace System.Reflection {
WindowsRuntime
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/AssemblyMetadataAttribute.cs b/mcs/class/corlib/System.Reflection/AssemblyMetadataAttribute.cs
index d0b0917b0b4..87e192aa563 100644
--- a/mcs/class/corlib/System.Reflection/AssemblyMetadataAttribute.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblyMetadataAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Reflection
{
@@ -44,4 +43,3 @@ namespace System.Reflection
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/AssemblyName.cs b/mcs/class/corlib/System.Reflection/AssemblyName.cs
index c1114225767..2712e90ce09 100644
--- a/mcs/class/corlib/System.Reflection/AssemblyName.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblyName.cs
@@ -76,9 +76,7 @@ namespace System.Reflection {
#endregion
#pragma warning restore 169
-#if NET_4_5
AssemblyContentType contentType;
-#endif
public AssemblyName ()
{
// defaults
@@ -431,7 +429,6 @@ namespace System.Reflection {
}
#endif
-#if NET_4_5
public string CultureName {
get {
if (cultureinfo == null)
@@ -451,6 +448,5 @@ namespace System.Reflection {
contentType = value;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/AssemblySignatureKeyAttribute.cs b/mcs/class/corlib/System.Reflection/AssemblySignatureKeyAttribute.cs
index a4229aa6cab..93ea9cf3288 100644
--- a/mcs/class/corlib/System.Reflection/AssemblySignatureKeyAttribute.cs
+++ b/mcs/class/corlib/System.Reflection/AssemblySignatureKeyAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Reflection
{
@@ -44,4 +43,3 @@ namespace System.Reflection
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeData.cs b/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
index 4a5918281f4..6c12b105b33 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
@@ -127,11 +127,9 @@ namespace System.Reflection {
return MonoCustomAttrs.GetCustomAttributesData (target);
}
-#if NET_4_5
public Type AttributeType {
get { return ctorInfo.DeclaringType; }
}
-#endif
public override string ToString ()
{
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeExtensions.cs b/mcs/class/corlib/System.Reflection/CustomAttributeExtensions.cs
index e917b869b22..a3099ed3777 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeExtensions.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeExtensions.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System;
using System.Collections.Generic;
@@ -219,4 +218,3 @@ namespace System.Reflection
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs b/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
index 446aa5d0379..594c60a74a2 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
@@ -63,7 +63,6 @@ namespace System.Reflection {
}
}
-#if NET_4_5
public bool IsField {
get { return memberInfo.MemberType == MemberTypes.Field; }
}
@@ -71,7 +70,6 @@ namespace System.Reflection {
public string MemberName {
get { return memberInfo.Name; }
}
-#endif
public override string ToString ()
{
diff --git a/mcs/class/corlib/System.Reflection/EventInfo.cs b/mcs/class/corlib/System.Reflection/EventInfo.cs
index 6c965d38382..040fe38beae 100644
--- a/mcs/class/corlib/System.Reflection/EventInfo.cs
+++ b/mcs/class/corlib/System.Reflection/EventInfo.cs
@@ -268,7 +268,6 @@ namespace System.Reflection {
}
#endif
-#if NET_4_5
public virtual MethodInfo AddMethod {
get { return GetAddMethod (true); }
}
@@ -278,6 +277,5 @@ namespace System.Reflection {
public virtual MethodInfo RemoveMethod {
get { return GetRemoveMethod (true); }
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/IReflectableType.cs b/mcs/class/corlib/System.Reflection/IReflectableType.cs
index 02fcd9c3d8c..887ab2fe0be 100644
--- a/mcs/class/corlib/System.Reflection/IReflectableType.cs
+++ b/mcs/class/corlib/System.Reflection/IReflectableType.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
namespace System.Reflection
{
@@ -35,4 +34,3 @@ namespace System.Reflection
TypeInfo GetTypeInfo ();
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/ImageFileMachine.cs b/mcs/class/corlib/System.Reflection/ImageFileMachine.cs
index fba3f12345f..50c24aefc2d 100644
--- a/mcs/class/corlib/System.Reflection/ImageFileMachine.cs
+++ b/mcs/class/corlib/System.Reflection/ImageFileMachine.cs
@@ -38,8 +38,6 @@ namespace System.Reflection {
I386 = 332,
IA64 = 512,
AMD64 = 34404,
-#if NET_4_5
ARM = 452,
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs b/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
index 7f7cd76b9c5..1d54e1bd38e 100644
--- a/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
+++ b/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Reflection
{
@@ -44,4 +43,3 @@ namespace System.Reflection
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/MemberInfo.cs b/mcs/class/corlib/System.Reflection/MemberInfo.cs
index 4b250ba253d..64d9c8d9213 100644
--- a/mcs/class/corlib/System.Reflection/MemberInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MemberInfo.cs
@@ -114,11 +114,9 @@ namespace System.Reflection {
throw new NotImplementedException ();
}
-#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
get { return GetCustomAttributesData (); }
}
-#endif
#if !MOBILE
void _MemberInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Reflection/MethodBase.cs b/mcs/class/corlib/System.Reflection/MethodBase.cs
index 011a2832af5..c91c4be203f 100644
--- a/mcs/class/corlib/System.Reflection/MethodBase.cs
+++ b/mcs/class/corlib/System.Reflection/MethodBase.cs
@@ -288,11 +288,9 @@ namespace System.Reflection {
}
}
-#if NET_4_5
public virtual MethodImplAttributes MethodImplementationFlags {
get { return GetMethodImplementationFlags (); }
}
-#endif
#if !MOBILE
void _MethodBase.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Reflection/MethodImplAttributes.cs b/mcs/class/corlib/System.Reflection/MethodImplAttributes.cs
index f24c2c68d93..fec39006c25 100644
--- a/mcs/class/corlib/System.Reflection/MethodImplAttributes.cs
+++ b/mcs/class/corlib/System.Reflection/MethodImplAttributes.cs
@@ -103,8 +103,6 @@ namespace System.Reflection {
/// </summary>
MaxMethodImplVal = 65535,
-#if NET_4_5
AggressiveInlining = 256
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/MethodInfo.cs b/mcs/class/corlib/System.Reflection/MethodInfo.cs
index b63d5887788..83fc9a72ac9 100644
--- a/mcs/class/corlib/System.Reflection/MethodInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MethodInfo.cs
@@ -142,7 +142,6 @@ namespace System.Reflection {
return !left.Equals (right);
}
-#if NET_4_5
public virtual Delegate CreateDelegate (Type delegateType)
{
return Delegate.CreateDelegate (delegateType, this);
@@ -152,6 +151,5 @@ namespace System.Reflection {
{
return Delegate.CreateDelegate (delegateType, target, this);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs
index 1c2c3e998e4..a414acc3d5f 100644
--- a/mcs/class/corlib/System.Reflection/Module.cs
+++ b/mcs/class/corlib/System.Reflection/Module.cs
@@ -446,10 +446,8 @@ namespace System.Reflection {
throw CreateNIE ();
}
-#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
get { return GetCustomAttributesData (); }
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/MonoGenericClass.cs b/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
index 34c2b848949..51a1a50522b 100644
--- a/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
+++ b/mcs/class/corlib/System.Reflection/MonoGenericClass.cs
@@ -51,11 +51,7 @@ namespace System.Reflection
*/
[StructLayout (LayoutKind.Sequential)]
sealed class MonoGenericClass :
-#if NET_4_5
TypeInfo
-#else
- Type
-#endif
{
#region Keep in sync with object-internals.h
#pragma warning disable 649
diff --git a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
index afa1a399abb..d8df9bde557 100644
--- a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
@@ -185,7 +185,6 @@ namespace System.Reflection
return types;
}
-#if NET_4_5
public override bool HasDefaultValue {
get {
object defaultValue = DefaultValue;
@@ -198,6 +197,5 @@ namespace System.Reflection
return true;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
index 7627635ee95..19b9bb7b438 100644
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -192,7 +192,6 @@ namespace System.Reflection
return DefaultValueImpl;
}
-#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
get { return GetCustomAttributesData (); }
}
@@ -200,7 +199,6 @@ namespace System.Reflection
public virtual bool HasDefaultValue {
get { throw new NotImplementedException (); }
}
-#endif
#if !MOBILE
void _ParameterInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs b/mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs
index ad63190d169..c282a81847f 100644
--- a/mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs
+++ b/mcs/class/corlib/System.Reflection/PortableExecutableKinds.cs
@@ -41,9 +41,7 @@ namespace System.Reflection {
Required32Bit = 2,
PE32Plus = 4,
Unmanaged32Bit = 8,
-#if NET_4_5
Preferred32Bit = 16
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs b/mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs
index ed804f1b481..4822d98f94f 100644
--- a/mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs
+++ b/mcs/class/corlib/System.Reflection/ProcessorArchitecture.cs
@@ -40,9 +40,7 @@ namespace System.Reflection {
X86 = 2,
IA64 = 3,
Amd64 = 4,
-#if NET_4_5
Arm = 5
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/PropertyInfo.cs b/mcs/class/corlib/System.Reflection/PropertyInfo.cs
index a2780089c78..68a62f74a67 100644
--- a/mcs/class/corlib/System.Reflection/PropertyInfo.cs
+++ b/mcs/class/corlib/System.Reflection/PropertyInfo.cs
@@ -47,7 +47,6 @@ namespace System.Reflection {
public abstract bool CanRead { get; }
public abstract bool CanWrite { get; }
-#if NET_4_5
public virtual MethodInfo GetMethod {
get { return GetGetMethod(true); }
}
@@ -55,7 +54,6 @@ namespace System.Reflection {
public virtual MethodInfo SetMethod {
get { return GetSetMethod(true); }
}
-#endif
public bool IsSpecialName {
get {return (Attributes & PropertyAttributes.SpecialName) != 0;}
@@ -97,14 +95,12 @@ namespace System.Reflection {
return GetValue(obj, BindingFlags.Default, null, index, null);
}
-#if NET_4_5
[DebuggerHidden]
[DebuggerStepThrough]
public object GetValue (object obj)
{
return GetValue(obj, BindingFlags.Default, null, null, null);
}
-#endif
public abstract object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
@@ -115,14 +111,12 @@ namespace System.Reflection {
SetValue (obj, value, BindingFlags.Default, null, index, null);
}
-#if NET_4_5
[DebuggerHidden]
[DebuggerStepThrough]
public void SetValue (object obj, object value)
{
SetValue (obj, value, BindingFlags.Default, null, null, null);
}
-#endif
public abstract void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture);
diff --git a/mcs/class/corlib/System.Reflection/ReflectionContext.cs b/mcs/class/corlib/System.Reflection/ReflectionContext.cs
index 1c9f835443a..157ee46b052 100644
--- a/mcs/class/corlib/System.Reflection/ReflectionContext.cs
+++ b/mcs/class/corlib/System.Reflection/ReflectionContext.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
namespace System.Reflection
{
@@ -48,4 +47,3 @@ namespace System.Reflection
public abstract TypeInfo MapType (TypeInfo type);
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs b/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
index d3284fb0d78..9cf23dc6137 100644
--- a/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
+++ b/mcs/class/corlib/System.Reflection/RuntimeReflectionExtensions.cs
@@ -25,7 +25,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System.Collections.Generic;
@@ -124,5 +123,4 @@ namespace System.Reflection
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Reflection/TypeAttributes.cs b/mcs/class/corlib/System.Reflection/TypeAttributes.cs
index f08c7c8173f..a2fe7e2ac69 100644
--- a/mcs/class/corlib/System.Reflection/TypeAttributes.cs
+++ b/mcs/class/corlib/System.Reflection/TypeAttributes.cs
@@ -128,9 +128,7 @@ namespace System.Reflection {
/// </summary>
Serializable = 8192,
-#if NET_4_5
WindowsRuntime = 16384,
-#endif
/// <summary>
/// </summary>
diff --git a/mcs/class/corlib/System.Reflection/TypeDelegator.cs b/mcs/class/corlib/System.Reflection/TypeDelegator.cs
index 01b4d58841d..8beffb64cd2 100644
--- a/mcs/class/corlib/System.Reflection/TypeDelegator.cs
+++ b/mcs/class/corlib/System.Reflection/TypeDelegator.cs
@@ -37,11 +37,7 @@ namespace System.Reflection {
[ComVisible (true)]
[Serializable]
public class TypeDelegator :
-#if NET_4_5
TypeInfo, IReflectableType
-#else
- Type
-#endif
{
protected Type typeImpl;
@@ -260,7 +256,6 @@ namespace System.Reflection {
}
}
-#if NET_4_5
public override bool IsConstructedGenericType {
get { return typeImpl.IsConstructedGenericType; }
}
@@ -272,7 +267,6 @@ namespace System.Reflection {
return IsAssignableFrom (typeInfo.AsType ());
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/TypeInfo.cs b/mcs/class/corlib/System.Reflection/TypeInfo.cs
index 101aadc727e..6311c6dd123 100644
--- a/mcs/class/corlib/System.Reflection/TypeInfo.cs
+++ b/mcs/class/corlib/System.Reflection/TypeInfo.cs
@@ -25,7 +25,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System.Collections.Generic;
namespace System.Reflection
@@ -140,4 +139,3 @@ namespace System.Reflection
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncStateMachineAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncStateMachineAttribute.cs
index 1d6f14ee6b6..0f107d5f29b 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncStateMachineAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncStateMachineAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -41,4 +40,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs
index f651d36a4b6..311f5cf1898 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -119,4 +118,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs
index f315213408f..a3518e4f282 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncTaskMethodBuilder_T.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -119,4 +118,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.cs b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.cs
index fa4306af778..975b7b08905 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/AsyncVoidMethodBuilder.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
@@ -108,4 +107,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/CallerFilePathAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/CallerFilePathAttribute.cs
index a53be5b4025..b353f0d61ae 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/CallerFilePathAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/CallerFilePathAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -36,4 +35,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/CallerLineNumberAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/CallerLineNumberAttribute.cs
index bab58301eff..28fedf0b23e 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/CallerLineNumberAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/CallerLineNumberAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -36,4 +35,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/CallerMemberNameAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/CallerMemberNameAttribute.cs
index cf53119fc42..6e56ed5f821 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/CallerMemberNameAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/CallerMemberNameAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -36,4 +35,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs
index b15a016dc0c..035ffc13a72 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -93,4 +92,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs
index d6b5e88ad6e..44f401d4b31 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ConfiguredTaskAwaitable_T.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -95,4 +94,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs
index 25ff7fdee7d..5cc778d7451 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ContractHelper.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System;
using System.Text;
@@ -138,4 +137,3 @@ namespace System.Runtime.CompilerServices
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs
index 848168fdf86..40b86f847ab 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ExtensionAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -39,4 +38,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs b/mcs/class/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs
index c6633912a95..43f90fd834a 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/IAsyncStateMachine.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -37,4 +36,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs
index b0881cb053e..b5af2f99235 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ICriticalNotifyCompletion.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -36,4 +35,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs b/mcs/class/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs
index f43451dbdda..8f288791727 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/INotifyCompletion.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -36,4 +35,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/IteratorStateMachineAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/IteratorStateMachineAttribute.cs
index 923f5a84c83..5b75a688f43 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/IteratorStateMachineAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/IteratorStateMachineAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -41,4 +40,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/MethodImplOptions.cs b/mcs/class/corlib/System.Runtime.CompilerServices/MethodImplOptions.cs
index 7e3a2c6deae..f6d22ed9ec4 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/MethodImplOptions.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/MethodImplOptions.cs
@@ -70,9 +70,7 @@ namespace System.Runtime.CompilerServices {
NoOptimization = 64,
-#if NET_4_5
AggressiveInlining = 256,
-#endif
} // MethodImplOptions
} // System.Runtime.CompilerServices
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/StateMachineAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/StateMachineAttribute.cs
index 58d8f321642..0c33d765817 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/StateMachineAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/StateMachineAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.CompilerServices
{
@@ -43,4 +42,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs
index 71cd7c4083a..48fa97605ae 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -129,4 +128,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs
index cdb08b8e3b7..b38d1acfb08 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter_T.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -79,4 +78,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs b/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs
index 9a9f727cfa1..c218ef0ca1f 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/YieldAwaitable.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
@@ -94,4 +93,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs b/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs
index 538d0921740..6e69510cf77 100644
--- a/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs
+++ b/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
using System.Diagnostics;
@@ -64,4 +63,3 @@ namespace System.Runtime.ExceptionServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
index 284839e093f..44c76628f5d 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// DefaultInterfaceAttribute.cs
//
@@ -43,4 +42,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
index 33dbc8343de..ea98e336111 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// DesignerNamespaceResolveEventArgs.cs
//
@@ -50,4 +49,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
index 35d4161d3c3..e3479ebd83c 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// EventRegistrationToken.cs
//
@@ -56,4 +55,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
index e4d7623f22e..0f096810acb 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// EventRegistrationTokenTable.cs
//
@@ -64,5 +63,4 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
index e7d010d1b77..7c516aaa6d0 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// IActivationFactory.cs
//
@@ -35,4 +34,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
object ActivateInstance ();
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
index c2e45b40c18..c489221907a 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
@@ -24,7 +24,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System.Runtime.CompilerServices;
namespace System.Runtime.InteropServices.WindowsRuntime
@@ -68,4 +67,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
index f57569b2bbd..4dbde04c94c 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// NamespaceResolveEventArgs.cs
//
@@ -57,4 +56,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
index 0c5ecc3d9e2..9aa41a0407c 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// ReadOnlyArrayAttribute.cs
//
@@ -34,4 +33,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
index fc245948057..70d53012221 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// WindowsRuntimeMarshal.cs
//
@@ -68,5 +67,4 @@ namespace System.Runtime.InteropServices.WindowsRuntime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
index 445733626cb..e2e905533da 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// WindowsRuntimeMetadata.cs
//
@@ -49,5 +48,4 @@ namespace System.Runtime.InteropServices.WindowsRuntime
#pragma warning restore 0067
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
index 7d5e4614940..bfb3c0674d2 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// WriteOnlyArrayAttribute.cs
//
@@ -34,4 +33,3 @@ namespace System.Runtime.InteropServices.WindowsRuntime
{
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs
index 82a0b58b449..edfe6affa10 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs
@@ -38,8 +38,6 @@ namespace System.Runtime.InteropServices
InterfaceIsDual = 0,
InterfaceIsIUnknown = 1,
InterfaceIsIDispatch = 2,
-#if NET_4_5
InterfaceIsIInspectable = 3
-#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
index e861f50df63..424bb0b2607 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
@@ -187,11 +187,9 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException ();
}
-#if NET_4_5
public static IntPtr CreateAggregatedObject<T> (IntPtr pOuter, T o) {
return CreateAggregatedObject (pOuter, (object)o);
}
-#endif
#if !FULL_AOT_RUNTIME
public static object CreateWrapperOfType (object o, Type t)
@@ -211,22 +209,18 @@ namespace System.Runtime.InteropServices
return ComInteropProxy.GetProxy (co.IUnknown, t).GetTransparentProxy ();
}
-#if NET_4_5
public static TWrapper CreateWrapperOfType<T, TWrapper> (T o) {
return (TWrapper)CreateWrapperOfType ((object)o, typeof (TWrapper));
}
#endif
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ComVisible (true)]
public extern static void DestroyStructure (IntPtr ptr, Type structuretype);
-#if NET_4_5
public static void DestroyStructure<T> (IntPtr ptr) {
DestroyStructure (ptr, typeof (T));
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void FreeBSTR (IntPtr ptr);
@@ -347,11 +341,9 @@ namespace System.Runtime.InteropServices
#endif
}
-#if NET_4_5
public static IntPtr GetComInterfaceForObject<T, TInterface> (T o) {
return GetComInterfaceForObject ((object)o, typeof (T));
}
-#endif
[MonoTODO]
public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
@@ -489,11 +481,9 @@ namespace System.Runtime.InteropServices
Marshal.StructureToPtr(vt, pDstNativeVariant, false);
}
-#if NET_4_5
public static void GetNativeVariantForObject<T> (T obj, IntPtr pDstNativeVariant) {
GetNativeVariantForObject ((object)obj, pDstNativeVariant);
}
-#endif
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -521,12 +511,10 @@ namespace System.Runtime.InteropServices
return vt.GetValue();
}
-#if NET_4_5
public static T GetObjectForNativeVariant<T> (IntPtr pSrcNativeVariant) {
Variant vt = (Variant)Marshal.PtrToStructure(pSrcNativeVariant, typeof(Variant));
return (T)vt.GetValue();
}
-#endif
public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars)
{
@@ -539,7 +527,6 @@ namespace System.Runtime.InteropServices
return objects;
}
-#if NET_4_5
public static T[] GetObjectsForNativeVariants<T> (IntPtr aSrcNativeVariant, int cVars) {
if (cVars < 0)
throw new ArgumentOutOfRangeException ("cVars", "cVars cannot be a negative number.");
@@ -549,7 +536,6 @@ namespace System.Runtime.InteropServices
i * SizeOf (typeof(Variant))));
return objects;
}
-#endif
[MonoTODO]
public static int GetStartComSlot (Type t)
@@ -583,12 +569,10 @@ namespace System.Runtime.InteropServices
throw new NotImplementedException ();
}
-#if NET_4_5
public static Type GetTypeFromCLSID (Guid clsid)
{
throw new NotImplementedException ();
}
-#endif
#if !FULL_AOT_RUNTIME
[Obsolete]
@@ -697,11 +681,9 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr OffsetOf (Type t, string fieldName);
-#if NET_4_5
public static IntPtr OffsetOf<T> (string fieldName) {
return OffsetOf (typeof (T), fieldName);
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void Prelink (MethodInfo m);
@@ -751,7 +733,6 @@ namespace System.Runtime.InteropServices
[ComVisible (true)]
public extern static object PtrToStructure (IntPtr ptr, Type structureType);
-#if NET_4_5
public static void PtrToStructure<T> (IntPtr ptr, T structure) {
PtrToStructure (ptr, (object)structure);
}
@@ -759,7 +740,6 @@ namespace System.Runtime.InteropServices
public static T PtrToStructure<T> (IntPtr ptr) {
return (T) PtrToStructure (ptr, typeof (T));
}
-#endif
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -987,7 +967,6 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static int SizeOf (Type t);
-#if NET_4_5
public static int SizeOf<T> () {
return SizeOf (typeof (T));
}
@@ -995,7 +974,6 @@ namespace System.Runtime.InteropServices
public static int SizeOf<T> (T structure) {
return SizeOf (structure.GetType ());
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr StringToBSTR (string s);
@@ -1143,11 +1121,9 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld);
-#if NET_4_5
public static void StructureToPtr<T> (T structure, IntPtr ptr, bool fDeleteOld) {
StructureToPtr ((object)structure, ptr, fDeleteOld);
}
-#endif
public static void ThrowExceptionForHR (int errorCode) {
Exception ex = GetExceptionForHR (errorCode);
@@ -1164,11 +1140,9 @@ namespace System.Runtime.InteropServices
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index);
-#if NET_4_5
public static IntPtr UnsafeAddrOfPinnedArrayElement<T> (T[] arr, int index) {
return UnsafeAddrOfPinnedArrayElement ((Array)arr, index);
}
-#endif
public static void WriteByte (IntPtr ptr, byte val)
{
@@ -1649,11 +1623,9 @@ namespace System.Runtime.InteropServices
return GetDelegateForFunctionPointerInternal (ptr, t);
}
-#if NET_4_5
public static TDelegate GetDelegateForFunctionPointer<TDelegate> (IntPtr ptr) {
return (TDelegate) (object) GetDelegateForFunctionPointer (ptr, typeof (TDelegate));
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern IntPtr GetFunctionPointerForDelegateInternal (Delegate d);
@@ -1666,13 +1638,11 @@ namespace System.Runtime.InteropServices
return GetFunctionPointerForDelegateInternal (d);
}
-#if NET_4_5
public static IntPtr GetFunctionPointerForDelegate<TDelegate> (TDelegate d) {
if (d == null)
throw new ArgumentNullException ("d");
return GetFunctionPointerForDelegateInternal ((Delegate)(object)d);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
index 4e9338b2f59..e2a8702befa 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
@@ -40,11 +40,7 @@ using System.Globalization;
namespace System.Runtime.Serialization
{
[System.Runtime.InteropServices.ComVisibleAttribute (true)]
-#if NET_4_5
static
-#else
- sealed
-#endif
public class FormatterServices
{
private const BindingFlags fieldFlags = BindingFlags.Public |
@@ -52,11 +48,6 @@ namespace System.Runtime.Serialization
BindingFlags.NonPublic |
BindingFlags.DeclaredOnly;
-#if !NET_4_5
- private FormatterServices ()
- {
- }
-#endif
public static object [] GetObjectData (object obj, MemberInfo [] members)
{
diff --git a/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs b/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs
index dec90850a68..766269284d5 100644
--- a/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime.Versioning {
public static class CompatibilitySwitch
@@ -43,4 +42,3 @@ namespace System.Runtime.Versioning {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime/GCLargeObjectHeapCompactionMode.cs b/mcs/class/corlib/System.Runtime/GCLargeObjectHeapCompactionMode.cs
index 48becfe94ad..5303b633442 100644
--- a/mcs/class/corlib/System.Runtime/GCLargeObjectHeapCompactionMode.cs
+++ b/mcs/class/corlib/System.Runtime/GCLargeObjectHeapCompactionMode.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System.Runtime
{
@@ -37,4 +36,3 @@ namespace System.Runtime
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
index 8274d34596a..2bb0fd9f6c3 100644
--- a/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
+++ b/mcs/class/corlib/System.Runtime/GCLatencyMode.cs
@@ -35,8 +35,6 @@ namespace System.Runtime
Batch = 0,
Interactive = 1,
LowLatency = 2,
-#if NET_4_5
SustainedLowLatency = 3
-#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime/GCSettings.cs b/mcs/class/corlib/System.Runtime/GCSettings.cs
index 7e65ffa2e82..7d0dd050cdd 100644
--- a/mcs/class/corlib/System.Runtime/GCSettings.cs
+++ b/mcs/class/corlib/System.Runtime/GCSettings.cs
@@ -45,13 +45,11 @@ namespace System.Runtime
set { ; }
}
-#if NET_4_5
public static GCLargeObjectHeapCompactionMode LargeObjectHeapCompactionMode {
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
get;
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
set;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Claims/Claim.cs b/mcs/class/corlib/System.Security.Claims/Claim.cs
index 0347052d236..e40023fdef5 100644
--- a/mcs/class/corlib/System.Security.Claims/Claim.cs
+++ b/mcs/class/corlib/System.Security.Claims/Claim.cs
@@ -25,7 +25,6 @@
// 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;
using System.Collections.Generic;
namespace System.Security.Claims {
@@ -94,4 +93,3 @@ namespace System.Security.Claims {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
index 562c89d03be..07ae8fd449f 100644
--- a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
@@ -25,7 +25,6 @@
// 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.Security.Claims
@@ -141,4 +140,3 @@ namespace System.Security.Claims
public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname";
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimValueTypes.cs b/mcs/class/corlib/System.Security.Claims/ClaimValueTypes.cs
index 58b933d5d92..abffe8c7a22 100644
--- a/mcs/class/corlib/System.Security.Claims/ClaimValueTypes.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimValueTypes.cs
@@ -25,7 +25,6 @@
// 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.Security.Claims {
@@ -60,4 +59,3 @@ namespace System.Security.Claims {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
index 60092f73b38..dd31436924c 100644
--- a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
@@ -26,7 +26,6 @@
// 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.Collections.Generic;
using System.Security.Principal;
@@ -282,4 +281,3 @@ namespace System.Security.Claims {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
index b923e227665..d17ecb67c88 100755
--- a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
@@ -25,7 +25,6 @@
// 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.Collections.Generic;
using System.Security.Principal;
@@ -212,4 +211,3 @@ namespace System.Security.Claims {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
index 5b79db673f3..c705a3d2935 100644
--- a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
@@ -31,10 +31,8 @@
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Threading;
using System.Threading.Tasks;
-#endif
namespace System.Security.Cryptography {
@@ -361,7 +359,6 @@ namespace System.Security.Cryptography {
get { return _flushedFinalBlock; }
}
-#if NET_4_5
public override Task FlushAsync (CancellationToken cancellationToken)
{
return base.FlushAsync (cancellationToken);
@@ -376,6 +373,5 @@ namespace System.Security.Cryptography {
{
return base.WriteAsync (buffer, offset, count, cancellationToken);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
index d66e2f93a24..a8aab2b898c 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
@@ -59,14 +59,10 @@ namespace System.Security.Cryptography {
public abstract void GetBytes (byte[] data);
-#if NET_4_5
public virtual void GetNonZeroBytes (byte[] data)
{
throw new NotImplementedException ();
}
-#else
- public abstract void GetNonZeroBytes (byte[] data);
-#endif
public void Dispose ()
diff --git a/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs b/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
index 6bbf305af5b..23069f672bd 100644
--- a/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
+++ b/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
@@ -30,20 +30,14 @@
using System.Runtime.InteropServices;
using System.Collections.Generic;
-#if NET_4_5
using System.Security.Claims;
-#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
public class GenericIdentity :
-#if NET_4_5
ClaimsIdentity
-#else
- IIdentity
-#endif
{
// field names are serialization compatible with .net
@@ -61,9 +55,7 @@ namespace System.Security.Principal {
m_name = name;
m_type = type;
-#if NET_4_5
AddDefaultClaim (name);
-#endif
}
public GenericIdentity (string name)
@@ -71,52 +63,36 @@ namespace System.Security.Principal {
{
}
-#if NET_4_5
protected GenericIdentity (GenericIdentity identity)
: base (identity)
{
}
-#endif
-#if NET_4_5
override
-#else
- virtual
-#endif
public string AuthenticationType {
get {
return m_type;
}
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public string Name {
get {
return m_name;
}
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public bool IsAuthenticated {
get {
return (m_name.Length > 0);
}
}
-#if NET_4_5
public override IEnumerable<Claim> Claims {
get {
return base.Claims;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs b/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
index 3b8e8d4bd20..e1baf73fcee 100644
--- a/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
@@ -29,20 +29,14 @@
//
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Security.Claims;
-#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
public class GenericPrincipal :
-#if NET_4_5
ClaimsPrincipal
-#else
- IPrincipal
-#endif
{
// field names are serialization compatible with .net
@@ -67,20 +61,12 @@ namespace System.Security.Principal {
get { return m_roles; }
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public IIdentity Identity {
get { return m_identity; }
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public bool IsInRole (string role)
{
if (m_roles == null)
diff --git a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
index 698583f9ead..7f2eef3e1e4 100644
--- a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
+++ b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
@@ -39,9 +39,7 @@ namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
public class WindowsIdentity :
-#if NET_4_5
System.Security.Claims.ClaimsIdentity,
-#endif
IIdentity, IDeserializationCallback, ISerializable, IDisposable {
private IntPtr _token;
private string _type;
@@ -52,10 +50,8 @@ namespace System.Security.Principal {
static private IntPtr invalidWindows = IntPtr.Zero;
-#if NET_4_5
[NonSerialized]
public new const string DefaultIssuer = "AD AUTHORITY";
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPrincipal=true)]
public WindowsIdentity (IntPtr userToken)
@@ -177,9 +173,7 @@ namespace System.Security.Principal {
}
// properties
-#if NET_4_5
sealed override
-#endif
public string AuthenticationType {
get { return _type; }
}
@@ -189,11 +183,7 @@ namespace System.Security.Principal {
get { return (_account == WindowsAccountType.Anonymous); }
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public bool IsAuthenticated
{
get { return _authenticated; }
@@ -209,11 +199,7 @@ namespace System.Security.Principal {
get { return (_account == WindowsAccountType.System); }
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public string Name
{
get {
diff --git a/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs b/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
index bbadfa47888..76af9ec5a10 100644
--- a/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
@@ -30,20 +30,14 @@
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-#if NET_4_5
using System.Security.Claims;
-#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
public class WindowsPrincipal :
-#if NET_4_5
ClaimsPrincipal
-#else
- IPrincipal
-#endif
{
private WindowsIdentity _identity;
// http://groups.google.ca/groups?q=WindowsPrincipal+m_roles&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OghXf4OgCHA.4228%40tkmsftngp08&rnum=4
@@ -61,11 +55,7 @@ namespace System.Security.Principal {
}
// properties
-#if NET_4_5
override
-#else
- virtual
-#endif
public IIdentity Identity {
get { return _identity; }
}
@@ -114,11 +104,7 @@ namespace System.Security.Principal {
}
}
-#if NET_4_5
override
-#else
- virtual
-#endif
public bool IsInRole (string role)
{
if (role == null)
diff --git a/mcs/class/corlib/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.cs b/mcs/class/corlib/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.cs
index b2b6e51db73..c9c2c2d6ae6 100644
--- a/mcs/class/corlib/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -28,7 +28,6 @@
//
//
-#if NET_4_5
using System;
using System.Threading;
@@ -270,4 +269,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/DecoupledTask.cs b/mcs/class/corlib/System.Threading.Tasks/DecoupledTask.cs
index daf7e59349c..f0e3d12ec22 100644
--- a/mcs/class/corlib/System.Threading.Tasks/DecoupledTask.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/DecoupledTask.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
namespace System.Threading.Tasks
{
@@ -72,4 +71,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs
index fe1517a819c..94b55507aea 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs
@@ -80,9 +80,7 @@ namespace System.Threading.Tasks
internal const TaskCreationOptions WorkerTaskNotSupportedOptions = TaskCreationOptions.LongRunning | TaskCreationOptions.PreferFairness;
const TaskCreationOptions MaxTaskCreationOptions =
-#if NET_4_5
TaskCreationOptions.DenyChildAttach | TaskCreationOptions.HideScheduler |
-#endif
TaskCreationOptions.PreferFairness | TaskCreationOptions.LongRunning | TaskCreationOptions.AttachedToParent;
public Task (Action action)
@@ -149,12 +147,8 @@ namespace System.Threading.Tasks
this.status = cancellationToken.IsCancellationRequested && !ignoreCancellation ? TaskStatus.Canceled : TaskStatus.Created;
// Process creationOptions
-#if NET_4_5
if (parent != null && HasFlag (creationOptions, TaskCreationOptions.AttachedToParent)
&& !HasFlag (parent.CreationOptions, TaskCreationOptions.DenyChildAttach))
-#else
- if (parent != null && HasFlag (creationOptions, TaskCreationOptions.AttachedToParent))
-#endif
parent.AddChild ();
if (token.CanBeCanceled && !ignoreCancellation)
@@ -276,9 +270,7 @@ namespace System.Threading.Tasks
internal Task ContinueWith (TaskActionInvoker invoker, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
{
var lazyCancellation = false;
-#if NET_4_5
lazyCancellation = (continuationOptions & TaskContinuationOptions.LazyCancellation) > 0;
-#endif
var continuation = new Task (invoker, null, cancellationToken, GetCreationOptions (continuationOptions), null, this, lazyCancellation);
ContinueWithCore (continuation, continuationOptions, scheduler);
@@ -319,9 +311,7 @@ namespace System.Threading.Tasks
internal Task<TResult> ContinueWith<TResult> (TaskActionInvoker invoker, CancellationToken cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
{
var lazyCancellation = false;
-#if NET_4_5
lazyCancellation = (continuationOptions & TaskContinuationOptions.LazyCancellation) > 0;
-#endif
var continuation = new Task<TResult> (invoker, null, cancellationToken, GetCreationOptions (continuationOptions), parent, this, lazyCancellation);
ContinueWithCore (continuation, continuationOptions, scheduler);
@@ -420,11 +410,7 @@ namespace System.Threading.Tasks
var saveScheduler = TaskScheduler.Current;
current = this;
-#if NET_4_5
TaskScheduler.Current = HasFlag (creationOptions, TaskCreationOptions.HideScheduler) ? TaskScheduler.Default : scheduler;
-#else
- TaskScheduler.Current = scheduler;
-#endif
if (!token.IsCancellationRequested) {
@@ -592,10 +578,8 @@ namespace System.Threading.Tasks
{
if (!HasFlag (creationOptions, TaskCreationOptions.AttachedToParent))
return true;
-#if NET_4_5
if (HasFlag (parent.CreationOptions, TaskCreationOptions.DenyChildAttach))
return true;
-#endif
if (status != TaskStatus.WaitingForChildrenToComplete)
parent.ChildCompleted (Exception);
@@ -913,11 +897,7 @@ namespace System.Threading.Tasks
}
#endregion
-#if NET_4_5
public
-#else
- internal
-#endif
Task ContinueWith (Action<Task, object> continuationAction, object state, CancellationToken cancellationToken,
TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
{
@@ -936,7 +916,6 @@ namespace System.Threading.Tasks
return continuation;
}
-#if NET_4_5
public ConfiguredTaskAwaitable ConfigureAwait (bool continueOnCapturedContext)
{
@@ -1231,7 +1210,6 @@ namespace System.Threading.Tasks
{
return new YieldAwaitable ();
}
-#endif
internal static Task WhenAllCore (IList<Task> tasks)
{
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskConstants_T.cs b/mcs/class/corlib/System.Threading.Tasks/TaskConstants_T.cs
index c53061b0cc6..615027a1905 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskConstants_T.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskConstants_T.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_5
using System;
using System.Runtime.CompilerServices;
@@ -45,4 +44,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs b/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
index 0b5a390e682..aaf5f425c51 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
@@ -33,11 +33,9 @@ namespace System.Threading.Tasks
PreferFairness = 0x00001,
LongRunning = 0x00002,
AttachedToParent = 0x00004,
-#if NET_4_5
DenyChildAttach = 0x00008,
HideScheduler = 0x00010,
LazyCancellation = 0x00020,
-#endif
NotOnRanToCompletion = 0x10000,
NotOnFaulted = 0x20000,
NotOnCanceled = 0x40000,
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
index 47944f94349..cbdf273e766 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
@@ -37,9 +37,7 @@ namespace System.Threading.Tasks
PreferFairness = 0x1,
LongRunning = 0x2,
AttachedToParent = 0x4,
-#if NET_4_5
DenyChildAttach = 0x8,
HideScheduler = 0x10
-#endif
}
}
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs b/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
index f3cc9c14ae7..121a5ce95b4 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
@@ -41,9 +41,7 @@ namespace System.Threading.Tasks
public ConcurrentQueue<AggregateException> ChildExceptions;
volatile AggregateException exception;
-#if NET_4_5
volatile ExceptionDispatchInfo dispatchInfo;
-#endif
readonly Task parent;
public TaskExceptionSlot (Task parent)
@@ -59,7 +57,6 @@ namespace System.Threading.Tasks
public void SetException (AggregateException exception)
{
-#if NET_4_5
if (dispatchInfo == null) {
//
// Used by task awaiter to rethrow an exception with original call stack, it's
@@ -67,7 +64,6 @@ namespace System.Threading.Tasks
//
dispatchInfo = ExceptionDispatchInfo.Capture (exception.InnerException);
}
-#endif
this.exception = exception;
}
@@ -79,9 +75,6 @@ namespace System.Threading.Tasks
//
// .NET allows to configure this using config element ThrowUnobservedTaskExceptions
//
-#if !NET_4_5
- throw Exception;
-#endif
}
}
}
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task_T.cs b/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
index ac7d740e9ce..76deb17d8ec 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
@@ -229,11 +229,7 @@ namespace System.Threading.Tasks
return true;
}
-#if NET_4_5
public
-#else
- internal
-#endif
Task ContinueWith (Action<Task<TResult>, object> continuationAction, object state, CancellationToken cancellationToken,
TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
{
@@ -254,7 +250,6 @@ namespace System.Threading.Tasks
return t;
}
-#if NET_4_5
public Task ContinueWith (Action<Task<TResult>, object> continuationAction, object state)
{
@@ -334,6 +329,5 @@ namespace System.Threading.Tasks
tcs.TrySetException (ex);
return tcs.Task;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs b/mcs/class/corlib/System.Threading/CancellationTokenSource.cs
index 5321a06ac0b..e47194c2277 100644
--- a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs
+++ b/mcs/class/corlib/System.Threading/CancellationTokenSource.cs
@@ -31,9 +31,6 @@ using System.Collections.Concurrent;
namespace System.Threading
{
-#if !NET_4_5
- sealed
-#endif
public class CancellationTokenSource : IDisposable
{
const int StateValid = 0;
@@ -50,21 +47,17 @@ namespace System.Threading
internal static readonly CancellationTokenSource NoneSource = new CancellationTokenSource ();
internal static readonly CancellationTokenSource CanceledSource = new CancellationTokenSource ();
-#if NET_4_5
static readonly TimerCallback timer_callback;
Timer timer;
-#endif
static CancellationTokenSource ()
{
CanceledSource.state = StateCanceled;
-#if NET_4_5
timer_callback = token => {
var cts = (CancellationTokenSource) token;
cts.CancelSafe ();
};
-#endif
}
public CancellationTokenSource ()
@@ -73,7 +66,6 @@ namespace System.Threading
handle = new ManualResetEvent (false);
}
-#if NET_4_5
public CancellationTokenSource (int millisecondsDelay)
: this ()
{
@@ -88,7 +80,6 @@ namespace System.Threading
: this (CheckTimeout (delay))
{
}
-#endif
public CancellationToken Token {
get {
@@ -177,7 +168,6 @@ namespace System.Threading
throw new AggregateException (exceptions);
}
-#if NET_4_5
public void CancelAfter (TimeSpan delay)
{
CancelAfter (CheckTimeout (delay));
@@ -202,7 +192,6 @@ namespace System.Threading
timer.Change (millisecondsDelay, Timeout.Infinite);
}
-#endif
public static CancellationTokenSource CreateLinkedTokenSource (CancellationToken token1, CancellationToken token2)
{
@@ -250,9 +239,7 @@ namespace System.Threading
Dispose (true);
}
-#if NET_4_5
protected virtual
-#endif
void Dispose (bool disposing)
{
if (disposing && (state & StateDisposed) == 0) {
@@ -266,10 +253,8 @@ namespace System.Threading
state |= StateDisposed;
Thread.MemoryBarrier ();
}
-#if NET_4_5
if (timer != null)
timer.Dispose ();
-#endif
handle.Dispose ();
handle = null;
diff --git a/mcs/class/corlib/System.Threading/Interlocked.cs b/mcs/class/corlib/System.Threading/Interlocked.cs
index 301cdc99745..f7a5135535a 100644
--- a/mcs/class/corlib/System.Threading/Interlocked.cs
+++ b/mcs/class/corlib/System.Threading/Interlocked.cs
@@ -118,10 +118,8 @@ namespace System.Threading
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static long Add(ref long location1, long value);
-#if NET_4_5
public static void MemoryBarrier () {
Thread.MemoryBarrier ();
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Threading/Monitor.cs b/mcs/class/corlib/System.Threading/Monitor.cs
index a227b683da4..026f46c3797 100644
--- a/mcs/class/corlib/System.Threading/Monitor.cs
+++ b/mcs/class/corlib/System.Threading/Monitor.cs
@@ -227,11 +227,7 @@ namespace System.Threading
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static bool Monitor_test_owner (object obj);
-#if NET_4_5
public
-#else
- internal
-#endif
static bool IsEntered (object obj)
{
return Monitor_test_owner(obj);
diff --git a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
index 93024f2165e..e536e64b314 100644
--- a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
+++ b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
@@ -24,9 +24,7 @@
using System;
using System.Diagnostics;
-#if NET_4_5
using System.Threading.Tasks;
-#endif
namespace System.Threading
{
@@ -188,7 +186,6 @@ namespace System.Threading
}
}
-#if NET_4_5
public Task WaitAsync ()
{
return Task.Factory.StartNew (() => Wait ());
@@ -218,7 +215,6 @@ namespace System.Threading
{
return Task.Factory.StartNew (() => Wait (timeout, cancellationToken), cancellationToken);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Threading/ThreadLocal.cs b/mcs/class/corlib/System.Threading/ThreadLocal.cs
index ac9ed8cddf9..4e5fece1368 100644
--- a/mcs/class/corlib/System.Threading/ThreadLocal.cs
+++ b/mcs/class/corlib/System.Threading/ThreadLocal.cs
@@ -67,7 +67,6 @@ namespace System.Threading
this.valueFactory = valueFactory;
}
-#if NET_4_5
public ThreadLocal (bool trackAllValues) : this () {
if (trackAllValues)
throw new NotImplementedException ();
@@ -77,7 +76,6 @@ namespace System.Threading
if (trackAllValues)
throw new NotImplementedException ();
}
-#endif
public void Dispose ()
{
@@ -150,7 +148,6 @@ namespace System.Threading
}
}
-#if NET_4_5
public IList<T> Values {
get {
if (tls_offset == 0)
@@ -158,7 +155,6 @@ namespace System.Threading
throw new NotImplementedException ();
}
}
-#endif
public override string ToString ()
{
diff --git a/mcs/class/corlib/System.Threading/Volatile.cs b/mcs/class/corlib/System.Threading/Volatile.cs
index 6460f728492..5c80d7a16c9 100644
--- a/mcs/class/corlib/System.Threading/Volatile.cs
+++ b/mcs/class/corlib/System.Threading/Volatile.cs
@@ -29,9 +29,7 @@ using System.Runtime.CompilerServices;
namespace System.Threading
{
-#if NET_4_5
public
-#endif
static class Volatile
{
[MethodImplAttribute (MethodImplOptions.InternalCall)]
diff --git a/mcs/class/corlib/System/AppDomain.cs b/mcs/class/corlib/System/AppDomain.cs
index d6db872bcf7..45964d3bc82 100644
--- a/mcs/class/corlib/System/AppDomain.cs
+++ b/mcs/class/corlib/System/AppDomain.cs
@@ -1361,9 +1361,7 @@ namespace System {
[method: SecurityPermission (SecurityAction.LinkDemand, ControlAppDomain = true)]
public event UnhandledExceptionEventHandler UnhandledException;
-#if NET_4_5
public event EventHandler<FirstChanceExceptionEventArgs> FirstChanceException;
-#endif
[MonoTODO]
public bool IsHomogenous {
diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs
index d0ad692056c..6519b9f6902 100644
--- a/mcs/class/corlib/System/Array.cs
+++ b/mcs/class/corlib/System/Array.cs
@@ -140,7 +140,6 @@ namespace System
Copy (this, this.GetLowerBound (0), array, index, this.GetLength (0));
}
-#if NET_4_5
internal T InternalArray__IReadOnlyList_get_Item<T> (int index)
{
if (unchecked ((uint) index) >= unchecked ((uint) Length))
@@ -155,7 +154,6 @@ namespace System
{
return Length;
}
-#endif
internal void InternalArray__Insert<T> (int index, T item)
{
diff --git a/mcs/class/corlib/System/ArraySegment.cs b/mcs/class/corlib/System/ArraySegment.cs
index 612e603f600..cdaf217963e 100644
--- a/mcs/class/corlib/System/ArraySegment.cs
+++ b/mcs/class/corlib/System/ArraySegment.cs
@@ -36,9 +36,7 @@ namespace System
{
[Serializable]
public struct ArraySegment<T>
-#if NET_4_5
: IList<T>, IReadOnlyList<T>
-#endif
{
T [] array;
readonly int offset, count;
@@ -119,7 +117,6 @@ namespace System
return !(a.Equals(b));
}
-#if NET_4_5
bool ICollection<T>.IsReadOnly {
get {
return true;
@@ -199,6 +196,5 @@ namespace System
return res < 0 ? -1 : res - offset;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Console.cs b/mcs/class/corlib/System/Console.cs
index 08f8a4c1da1..c0cc6f85e07 100644
--- a/mcs/class/corlib/System/Console.cs
+++ b/mcs/class/corlib/System/Console.cs
@@ -661,7 +661,6 @@ namespace System
set { ConsoleDriver.WindowWidth = value; }
}
-#if NET_4_5
public static bool IsErrorRedirected {
get {
return ConsoleDriver.IsErrorRedirected;
@@ -679,7 +678,6 @@ namespace System
return ConsoleDriver.IsInputRedirected;
}
}
-#endif
public static void Beep ()
{
diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs
index d3847e55142..ce3b0112f2c 100644
--- a/mcs/class/corlib/System/Environment.cs
+++ b/mcs/class/corlib/System/Environment.cs
@@ -162,13 +162,11 @@ namespace System {
}
}
-#if NET_4_5
public static int CurrentManagedThreadId {
get {
return Thread.CurrentThread.ManagedThreadId;
}
}
-#endif
/// <summary>
/// Gets or sets the exit code of this process
diff --git a/mcs/class/corlib/System/EventHandler.cs b/mcs/class/corlib/System/EventHandler.cs
index b9fffcb3fc5..4d6706799dd 100644
--- a/mcs/class/corlib/System/EventHandler.cs
+++ b/mcs/class/corlib/System/EventHandler.cs
@@ -35,9 +35,6 @@ namespace System {
[Serializable]
public delegate void EventHandler<TEventArgs> (object sender, TEventArgs e)
-#if !NET_4_5
- where TEventArgs : EventArgs
-#endif
;
[Serializable]
diff --git a/mcs/class/corlib/System/Exception.cs b/mcs/class/corlib/System/Exception.cs
index e7df399c6f7..4a03d8bd670 100644
--- a/mcs/class/corlib/System/Exception.cs
+++ b/mcs/class/corlib/System/Exception.cs
@@ -120,17 +120,10 @@ namespace System
set { help_link = value; }
}
-#if NET_4_5
public int HResult {
get { return hresult; }
protected set { hresult = value; }
}
-#else
- protected int HResult {
- get { return hresult; }
- set { hresult = value; }
- }
-#endif
internal void SetMessage (string s)
{
message = s;
diff --git a/mcs/class/corlib/System/GC.cs b/mcs/class/corlib/System/GC.cs
index 1b1a5d4f587..a673419bcf6 100644
--- a/mcs/class/corlib/System/GC.cs
+++ b/mcs/class/corlib/System/GC.cs
@@ -62,12 +62,10 @@ namespace System
Collect (generation);
}
-#if NET_4_5
[MonoDocumentationNote ("mode and blocking parameters ignored")]
public static void Collect (int generation, GCCollectionMode mode, bool blocking) {
Collect (generation);
}
-#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
public extern static int GetGeneration (object obj);
diff --git a/mcs/class/corlib/System/IProgress.cs b/mcs/class/corlib/System/IProgress.cs
index 7cdbdcf23f2..690f62d5b3e 100644
--- a/mcs/class/corlib/System/IProgress.cs
+++ b/mcs/class/corlib/System/IProgress.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_5
namespace System
{
@@ -36,4 +35,3 @@ namespace System
}
}
-#endif
diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs
index 85ba2449491..8a1f75a59b7 100644
--- a/mcs/class/corlib/System/MonoType.cs
+++ b/mcs/class/corlib/System/MonoType.cs
@@ -52,11 +52,7 @@ namespace System
[Serializable]
[StructLayout (LayoutKind.Sequential)]
sealed class MonoType :
-#if NET_4_5
TypeInfo
-#else
- Type
-#endif
, ISerializable
{
[NonSerialized]
@@ -743,12 +739,10 @@ namespace System
}
}
-#if NET_4_5
public override bool IsConstructedGenericType {
get {
return IsGenericType && !ContainsGenericParameters;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Progress.cs b/mcs/class/corlib/System/Progress.cs
index 2b62bd46cfa..7880c4ea2bd 100644
--- a/mcs/class/corlib/System/Progress.cs
+++ b/mcs/class/corlib/System/Progress.cs
@@ -23,7 +23,6 @@
// 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.Threading;
namespace System {
@@ -70,4 +69,3 @@ namespace System {
}
}
-#endif
diff --git a/mcs/class/corlib/System/Type.cs b/mcs/class/corlib/System/Type.cs
index f99b7c0d594..2d465c42f86 100644
--- a/mcs/class/corlib/System/Type.cs
+++ b/mcs/class/corlib/System/Type.cs
@@ -232,13 +232,11 @@ namespace System {
}
}
-#if NET_4_5
public virtual bool IsConstructedGenericType {
get {
throw new NotImplementedException ();
}
}
-#endif
public bool IsContextful {
get {
@@ -1351,13 +1349,11 @@ namespace System {
}
}
-#if NET_4_5
public virtual Type[] GenericTypeArguments {
get {
return IsGenericType ? GetGenericArguments () : EmptyTypes;
}
}
-#endif
public virtual Type[] GetGenericArguments ()
{
diff --git a/mcs/class/corlib/System/WeakReference_T.cs b/mcs/class/corlib/System/WeakReference_T.cs
index 182d42a5362..da613e97ff3 100644
--- a/mcs/class/corlib/System/WeakReference_T.cs
+++ b/mcs/class/corlib/System/WeakReference_T.cs
@@ -24,7 +24,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_5
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
@@ -96,4 +95,3 @@ namespace System {
}
}
}
-#endif