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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs4
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs4
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs6
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs2
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs4
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs8
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs10
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs6
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs4
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs6
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs10
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs89
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs4
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs10
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs6
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs160
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs4
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs2
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs4
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs8
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs12
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs4
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs8
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs2
-rw-r--r--mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs8
-rw-r--r--mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs2
-rw-r--r--mcs/class/Mono.Parallel/Mono.Threading/CSnzi.cs2
-rw-r--r--mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs2
-rw-r--r--mcs/class/Mono.Parallel/Mono.Threading/Snzi.cs2
-rw-r--r--mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs2
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs8
-rw-r--r--mcs/class/PEAPI/Metadata.cs4
-rw-r--r--mcs/class/System.Core/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs2
-rw-r--r--mcs/class/System.Core/System.Collections.Generic/HashSet.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs2
-rw-r--r--mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs232
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/RangeList.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/Enumerable.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/EnumerableExecutor.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/EnumerableQuery.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/IGrouping.cs4
-rw-r--r--mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs4
-rw-r--r--mcs/class/System.Core/System.Linq/IQueryable_T.cs4
-rw-r--r--mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/ParallelEnumerable.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/ParallelQuery.cs2
-rw-r--r--mcs/class/System.Core/System.Linq/Queryable.cs2
-rw-r--r--mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs2
-rw-r--r--mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs2
-rw-r--r--mcs/class/System.Core/System.Security.Cryptography/Aes.cs2
-rw-r--r--mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs2
-rw-r--r--mcs/class/System.Core/System.Threading/LockRecursionException.cs34
-rw-r--r--mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs12
-rw-r--r--mcs/class/System.Core/System/Actions.cs9
-rw-r--r--mcs/class/System.Core/System/Funcs.cs10
-rw-r--r--mcs/class/System.Core/System/InvalidTimeZoneException.cs23
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs12
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs2
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs12
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.cs16
-rw-r--r--mcs/class/System.Core/System/TimeZoneNotFoundException.cs23
-rw-r--r--mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Data.Services/System.Data.Services/DataService.cs4
-rw-r--r--mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs4
-rw-r--r--mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs2
-rw-r--r--mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs16
-rw-r--r--mcs/class/System.Net/Assembly/AssemblyInfo.cs6
-rw-r--r--mcs/class/System.Net/Assembly/TypeForwarders.cs2
-rw-r--r--mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs5
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs4
-rwxr-xr-xmcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs10
-rw-r--r--mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs9
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.cs2
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs9
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs4
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs24
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs10
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs36
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs12
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs10
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs8
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs6
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs16
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs4
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs4
-rw-r--r--mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs5
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs6
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs6
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs8
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs8
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs6
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs6
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs2
-rw-r--r--mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs2
-rw-r--r--mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs4
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs16
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs4
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs2
-rw-r--r--mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs5
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs5
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs5
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs9
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/Route.cs12
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs16
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs2
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs34
-rw-r--r--mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs2
-rw-r--r--mcs/class/System.Web/Assembly/AssemblyInfo.cs10
-rw-r--r--mcs/class/System.Web/System.Web.Caching/CacheDependency.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs14
-rw-r--r--mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs9
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BuildManager.cs16
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/TagType.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs23
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs20
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs19
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Mail/MailAttachment.cs5
-rw-r--r--mcs/class/System.Web/System.Web.Mail/MailMessage.cs5
-rw-r--r--mcs/class/System.Web/System.Web.Mail/SmtpMail.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs8
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsIdentity.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipHelper.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipProvider.cs18
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipUser.cs14
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/PassportIdentity.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/RolePrincipal.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Security/RoleProvider.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs2
-rw-r--r--mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs22
-rw-r--r--mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs22
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs10
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs52
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs8
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Image.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Label.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Login.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs13
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs12
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Style.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Table.cs9
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs14
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs57
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs15
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs16
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs25
-rw-r--r--mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/Control.cs32
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/KeyedList.cs41
-rw-r--r--mcs/class/System.Web/System.Web.UI/LosFormatter.cs23
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPage.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/ObjectConverter.cs3
-rw-r--r--mcs/class/System.Web/System.Web.UI/Page.cs18
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParser.cs12
-rw-r--r--mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/UserControlParser.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Util/HttpEncoder.cs66
-rw-r--r--mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplication.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplicationFactory.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpContext.cs8
-rw-r--r--mcs/class/System.Web/System.Web/HttpException.cs4
-rw-r--r--mcs/class/System.Web/System.Web/HttpHeaderCollection.cs4
-rwxr-xr-xmcs/class/System.Web/System.Web/HttpRequest.cs43
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponse.cs26
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponseHeader.cs8
-rw-r--r--mcs/class/System.Web/System.Web/HttpUtility.cs46
-rw-r--r--mcs/class/System.Web/System.Web/IPartitionResolver.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/DtdProcessing.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/NamespaceHandling.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/XmlConvert.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlDocument.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReader.cs8
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReaderSettings.cs6
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader2.cs2
-rwxr-xr-xmcs/class/System.XML/System.Xml/XmlWriter.cs4
-rw-r--r--mcs/class/System.XML/System.Xml/XmlWriterSettings.cs4
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs6
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs8
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs4
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs36
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs2
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs4
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs2
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs2
-rw-r--r--mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs2
-rw-r--r--mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs2
-rw-r--r--mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs2
-rw-r--r--mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs2
-rw-r--r--mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs2
-rw-r--r--mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs2
-rw-r--r--mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs2
-rw-r--r--mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs2
-rw-r--r--mcs/class/System/System.Diagnostics/Debug.cs4
-rw-r--r--mcs/class/System/System.Diagnostics/Stopwatch.cs2
-rw-r--r--mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs2
-rw-r--r--mcs/class/System/System.Net.Mail/MailMessage.cs10
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpClient.cs13
-rw-r--r--mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs4
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket_2_1.cs12
-rw-r--r--mcs/class/System/System.Net/DnsEndPoint.cs2
-rw-r--r--mcs/class/System/System.Net/FileWebResponse.cs4
-rw-r--r--mcs/class/System/System.Net/HttpListenerRequest.cs6
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.cs29
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.cs9
-rw-r--r--mcs/class/System/System.Net/IPAddress.cs2
-rw-r--r--mcs/class/System/System.Net/NetworkCredential.cs6
-rw-r--r--mcs/class/System/System.Net/WebRequest.cs2
-rw-r--r--mcs/class/System/System.Net/WebResponse.cs12
-rw-r--r--mcs/class/System/System.Net/WebUtility.cs2
-rw-r--r--mcs/class/System/System.Runtime.Versioning/FrameworkName.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs2
-rw-r--r--mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs2
-rw-r--r--mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs2
-rw-r--r--mcs/class/System/System/Uri.cs12
-rw-r--r--mcs/class/System/System/UriBuilder.cs2
-rw-r--r--mcs/class/System/System/UriFormatException.cs2
-rw-r--r--mcs/class/System/System/UriHelper.cs5
-rw-r--r--mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs2
-rw-r--r--mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs2
-rw-r--r--mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs2
-rw-r--r--mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs167
-rw-r--r--mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs59
-rw-r--r--mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs14
-rw-r--r--mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs17
-rw-r--r--mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs189
-rw-r--r--mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs11
-rw-r--r--mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.cs2
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs33
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs47
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs50
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs66
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs68
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs51
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs43
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs37
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs38
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs37
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs35
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs40
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs61
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs56
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs46
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs46
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs36
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs43
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs43
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs43
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs171
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs60
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs36
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs46
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs52
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs58
-rw-r--r--mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs52
-rw-r--r--mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/Registry.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/RegistryKey.cs18
-rw-r--r--mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/RegistryView.cs2
-rw-r--r--mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs6
-rw-r--r--mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs6
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs2
-rw-r--r--mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs29
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IComparer.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IEnumerable.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IEnumerator.cs4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs4
-rw-r--r--mcs/class/corlib/System.Collections/IStructuralComparable.cs2
-rw-r--r--mcs/class/corlib/System.Collections/IStructuralEquatable.cs2
-rw-r--r--mcs/class/corlib/System.Collections/StructuralComparisons.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs6
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs4
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Diagnostics/Debugger.cs4
-rw-r--r--mcs/class/corlib/System.Globalization/CultureInfo.cs16
-rw-r--r--mcs/class/corlib/System.Globalization/CultureNotFoundException.cs2
-rw-r--r--mcs/class/corlib/System.Globalization/CultureTypes.cs4
-rw-r--r--mcs/class/corlib/System.Globalization/TimeSpanStyles.cs2
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs8
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs39
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs4
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs2
-rw-r--r--mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs2
-rw-r--r--mcs/class/corlib/System.IO/BinaryReader.cs4
-rw-r--r--mcs/class/corlib/System.IO/BinaryWriter.cs4
-rw-r--r--mcs/class/corlib/System.IO/Directory.cs2
-rw-r--r--mcs/class/corlib/System.IO/DirectoryInfo.cs4
-rw-r--r--mcs/class/corlib/System.IO/File.cs2
-rw-r--r--mcs/class/corlib/System.IO/FileStream.cs2
-rw-r--r--mcs/class/corlib/System.IO/Path.cs12
-rw-r--r--mcs/class/corlib/System.IO/Stream.cs2
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs2
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs20
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs4
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs2
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/Assembly.cs36
-rw-r--r--mcs/class/corlib/System.Reflection/ConstructorInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeData.cs12
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/EventInfo.cs10
-rw-r--r--mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs22
-rw-r--r--mcs/class/corlib/System.Reflection/FieldInfo.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/LocalVariableInfo.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs4
-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/MethodBody.cs19
-rw-r--r--mcs/class/corlib/System.Reflection/MethodInfo.cs21
-rw-r--r--mcs/class/corlib/System.Reflection/Module.cs12
-rw-r--r--mcs/class/corlib/System.Reflection/MonoAssembly.cs29
-rw-r--r--mcs/class/corlib/System.Reflection/MonoEvent.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MonoField.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/MonoMethod.cs4
-rw-r--r--mcs/class/corlib/System.Reflection/MonoModule.cs82
-rw-r--r--mcs/class/corlib/System.Reflection/MonoParameterInfo.cs52
-rw-r--r--mcs/class/corlib/System.Reflection/MonoProperty.cs2
-rw-r--r--mcs/class/corlib/System.Reflection/ParameterInfo.cs20
-rw-r--r--mcs/class/corlib/System.Reflection/PropertyInfo.cs2
-rw-r--r--mcs/class/corlib/System.Resources/ResourceManager.cs2
-rw-r--r--mcs/class/corlib/System.Resources/ResourceReader.cs4
-rw-r--r--mcs/class/corlib/System.Resources/ResourceWriter.cs18
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs4
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs7
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs16
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs16
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs2
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs2
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs2
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs4
-rw-r--r--mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs8
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs6
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs2
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs4
-rw-r--r--mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs4
-rw-r--r--mcs/class/corlib/System.Security.Permissions/SecurityAction.cs8
-rw-r--r--mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs8
-rw-r--r--mcs/class/corlib/System.Security.Policy/Evidence.cs70
-rw-r--r--mcs/class/corlib/System.Security.Policy/EvidenceBase.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Gac.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Hash.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Publisher.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Site.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/StrongName.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Url.cs2
-rw-r--r--mcs/class/corlib/System.Security.Policy/Zone.cs2
-rw-r--r--mcs/class/corlib/System.Security/SecureString.cs10
-rw-r--r--mcs/class/corlib/System.Security/SecurityContext.cs4
-rw-r--r--mcs/class/corlib/System.Security/SecurityContextSource.cs2
-rw-r--r--mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs9
-rw-r--r--mcs/class/corlib/System.Security/SecurityCriticalScope.cs2
-rw-r--r--mcs/class/corlib/System.Security/SecurityManager.cs26
-rw-r--r--mcs/class/corlib/System.Security/SecurityManager_mobile.cs26
-rw-r--r--mcs/class/corlib/System.Security/SecurityRuleSet.cs2
-rw-r--r--mcs/class/corlib/System.Security/SecurityRulesAttribute.cs2
-rw-r--r--mcs/class/corlib/System.Text/StringBuilder.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/IScheduler.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Parallel.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/PopResult.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskContinuation.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/TaskDebuggerView.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task_T.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs2
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs2
-rw-r--r--mcs/class/corlib/System.Threading/AsyncFlowControl.cs4
-rw-r--r--mcs/class/corlib/System.Threading/CancellationToken.cs2
-rw-r--r--mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs2
-rw-r--r--mcs/class/corlib/System.Threading/CancellationTokenSource.cs2
-rw-r--r--mcs/class/corlib/System.Threading/CompressedStack.cs13
-rw-r--r--mcs/class/corlib/System.Threading/CountdownEvent.cs2
-rw-r--r--mcs/class/corlib/System.Threading/ExecutionContext.cs4
-rw-r--r--mcs/class/corlib/System.Threading/LazyInitializer.cs2
-rw-r--r--mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs2
-rw-r--r--mcs/class/corlib/System.Threading/LockRecursionException.cs2
-rw-r--r--mcs/class/corlib/System.Threading/ManualResetEventSlim.cs2
-rw-r--r--mcs/class/corlib/System.Threading/Monitor.cs2
-rw-r--r--mcs/class/corlib/System.Threading/SemaphoreSlim.cs2
-rw-r--r--mcs/class/corlib/System.Threading/SpinLock.cs2
-rw-r--r--mcs/class/corlib/System.Threading/SpinWait.cs2
-rw-r--r--mcs/class/corlib/System.Threading/Thread.cs2
-rw-r--r--mcs/class/corlib/System.Threading/ThreadLocal.cs2
-rw-r--r--mcs/class/corlib/System.Threading/WaitHandle.cs4
-rw-r--r--mcs/class/corlib/System.Threading/Watch.cs2
-rw-r--r--mcs/class/corlib/System/Action.cs15
-rw-r--r--mcs/class/corlib/System/Activator.cs10
-rw-r--r--mcs/class/corlib/System/AggregateException.cs2
-rw-r--r--mcs/class/corlib/System/AppDomain.cs62
-rw-r--r--mcs/class/corlib/System/Array.cs4
-rw-r--r--mcs/class/corlib/System/Char.cs4
-rw-r--r--mcs/class/corlib/System/CharEnumerator.cs4
-rw-r--r--mcs/class/corlib/System/Comparison.cs4
-rw-r--r--mcs/class/corlib/System/ContextMarshalException.cs3
-rw-r--r--mcs/class/corlib/System/Converter.cs4
-rw-r--r--mcs/class/corlib/System/Decimal.cs4
-rw-r--r--mcs/class/corlib/System/Double.cs2
-rw-r--r--mcs/class/corlib/System/Enum.cs4
-rw-r--r--mcs/class/corlib/System/Environment.cs26
-rw-r--r--mcs/class/corlib/System/Exception.cs2
-rw-r--r--mcs/class/corlib/System/ExecutionEngineException.cs2
-rw-r--r--mcs/class/corlib/System/Funcs.cs15
-rw-r--r--mcs/class/corlib/System/GC.cs4
-rw-r--r--mcs/class/corlib/System/Guid.cs8
-rw-r--r--mcs/class/corlib/System/IComparable.cs6
-rw-r--r--mcs/class/corlib/System/IObservable.cs2
-rw-r--r--mcs/class/corlib/System/IObserver.cs2
-rw-r--r--mcs/class/corlib/System/InsufficientExecutionStackException.cs2
-rw-r--r--mcs/class/corlib/System/IntPtr.cs8
-rw-r--r--mcs/class/corlib/System/InvalidTimeZoneException.cs4
-rw-r--r--mcs/class/corlib/System/Lazy.cs2
-rw-r--r--mcs/class/corlib/System/MonoType.cs4
-rw-r--r--mcs/class/corlib/System/OperationCanceledException.cs4
-rw-r--r--mcs/class/corlib/System/Predicate.cs4
-rw-r--r--mcs/class/corlib/System/ResolveEventArgs.cs6
-rw-r--r--mcs/class/corlib/System/Single.cs2
-rw-r--r--mcs/class/corlib/System/String.cs41
-rw-r--r--mcs/class/corlib/System/TimeSpan.cs100
-rw-r--r--mcs/class/corlib/System/TimeZoneNotFoundException.cs4
-rw-r--r--mcs/class/corlib/System/Tuple.cs2
-rw-r--r--mcs/class/corlib/System/Tuples.cs2
-rw-r--r--mcs/class/corlib/System/Type.cs39
-rw-r--r--mcs/class/corlib/System/TypeAccessException.cs2
-rw-r--r--mcs/class/corlib/System/TypeSpec.cs2
-rw-r--r--mcs/class/corlib/System/UIntPtr.cs2
-rw-r--r--mcs/class/corlib/System/Version.cs2
-rw-r--r--mcs/class/corlib/System/_AppDomain.cs3
760 files changed, 21 insertions, 6438 deletions
diff --git a/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs b/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs
index c51d63c78a5..e61769c1e86 100644
--- a/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs
+++ b/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs
@@ -48,11 +48,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-#if NET_4_0
[assembly: AssemblyVersion("4.84.0.0")]
-#else
-[assembly: AssemblyVersion("2.84.0.0")]
-#endif
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("SharpZipLib.pub")]
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
index 38dda5712a8..a27ce51eb86 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
@@ -42,9 +42,7 @@ namespace System.Windows.Forms
[Docking (DockingBehavior.AutoDock)]
[Designer ("System.Windows.Forms.Design.SplitContainerDesigner, " + Consts.AssemblySystem_Design)]
public class SplitContainer : ContainerControl
-#if NET_4_0
, ISupportInitialize
-#endif
{
#region Local Variables
private FixedPanel fixed_panel;
@@ -474,7 +472,6 @@ namespace System.Windows.Forms
#endregion
#region Public Methods
-#if NET_4_0
[MonoTODO]
public void BeginInit ()
{
@@ -484,7 +481,6 @@ namespace System.Windows.Forms
public void EndInit ()
{
}
-#endif
public void OnSplitterMoved (SplitterEventArgs e)
{
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
index 0d776b9fbb2..d0dcf340a7d 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
@@ -291,11 +291,7 @@ namespace Microsoft.Build.BuildEngine
// Hence we expect sender as a valid object only if it is IBuildEngine4 -
// only Microsoft.Build.Internal.BuildEngine4 implements it so far.
// (Used IBuildEngine3 because it needs to build for NET_4_0).
-#if NET_4_0
var key = sender as IBuildEngine3 ?? dummy_key;
-#else
- var key = dummy_key;
-#endif
if (!build_records.TryGetValue (key, out r)) {
r = new BuildRecord (this);
build_records.Add (key, r);
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
index ea0d322b3a6..31a72d2b341 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
@@ -116,10 +116,8 @@ namespace Microsoft.Build.BuildEngine {
Toolsets.Add (new Toolset ("3.5",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version35)));
#endif
-#if NET_4_0
Toolsets.Add (new Toolset ("4.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40)));
-#endif
#if XBUILD_12
Toolsets.Add (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0")));
#endif
@@ -562,11 +560,7 @@ namespace Microsoft.Build.BuildEngine {
// project can't find a version to use
return String.IsNullOrEmpty (defaultToolsVersion)
?
-#if NET_4_0
"4.0"
-#else
- "2.0"
-#endif
: defaultToolsVersion;
}
set {
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
index b4d996faa9c..14d026ff973 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
@@ -231,7 +231,6 @@ namespace Microsoft.Build.BuildEngine {
if (String.IsNullOrEmpty (parsed_import))
throw new InvalidProjectFileException ("The required attribute \"Project\" in Import is empty");
-#if NET_4_0
if (DirectoryScanner.HasWildcard (parsed_import)) {
var directoryScanner = new DirectoryScanner () {
Includes = new ITaskItem [] { new TaskItem (parsed_import) },
@@ -242,7 +241,6 @@ namespace Microsoft.Build.BuildEngine {
foreach (ITaskItem matchedItem in directoryScanner.MatchedItems)
yield return matchedItem.ItemSpec;
} else
-#endif
yield return parsed_import;
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
index 065dc4c77bc..097fd8b2844 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
@@ -323,9 +323,7 @@ namespace Microsoft.Build.BuildEngine {
Reevaluate ();
}
-#if NET_4_0
ProcessBeforeAndAfterTargets ();
-#endif
if (targetNames == null || targetNames.Length == 0) {
if (defaultTargets != null && defaultTargets.Length != 0) {
@@ -404,7 +402,6 @@ namespace Microsoft.Build.BuildEngine {
return sb.ToString ();
}
-#if NET_4_0
void ProcessBeforeAndAfterTargets ()
{
var beforeTable = Targets.AsIEnumerable ()
@@ -440,7 +437,6 @@ namespace Microsoft.Build.BuildEngine {
expr.Parse (targets, ParseOptions.AllowItemsNoMetadataAndSplit);
return (string []) expr.ConvertTo (this, typeof (string []));
}
-#endif
[MonoTODO]
public string [] GetConditionedPropertyValues (string propertyName)
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
index 630cb4a46e1..21008a5ee6b 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
@@ -176,14 +176,10 @@ namespace Microsoft.Build.BuildEngine {
try {
buildState = BuildState.Started;
-#if NET_4_0
result = BuildDependencies (out executeOnErrors) &&
BuildBeforeThisTargets (out executeOnErrors) &&
DoBuild (out executeOnErrors) && // deps & Before targets built fine, do main build
BuildAfterThisTargets (out executeOnErrors);
-#else
- result = BuildDependencies (out executeOnErrors) && DoBuild (out executeOnErrors);
-#endif
buildState = BuildState.Finished;
} catch (Exception e) {
@@ -224,7 +220,6 @@ namespace Microsoft.Build.BuildEngine {
return result;
}
-#if NET_4_0
bool BuildBeforeThisTargets (out bool executeOnErrors)
{
executeOnErrors = false;
@@ -246,7 +241,6 @@ namespace Microsoft.Build.BuildEngine {
return result;
}
-#endif
bool BuildOtherTargets (IEnumerable<string> targetNames, Action<string> missing_target, out bool executeOnErrors)
{
@@ -379,7 +373,6 @@ namespace Microsoft.Build.BuildEngine {
}
}
-#if NET_4_0
internal string BeforeTargets {
get { return targetElement.GetAttribute ("BeforeTargets"); }
}
@@ -390,7 +383,6 @@ namespace Microsoft.Build.BuildEngine {
internal List<string> BeforeThisTargets { get; set; }
internal List<string> AfterThisTargets { get; set; }
-#endif
internal List<IBuildTask> BuildTasks {
get { return buildTasks; }
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs
index a6e27f24b05..44e2ac5905d 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs
@@ -31,11 +31,7 @@ using System;
namespace Microsoft.Build.Framework {
[Serializable]
public class BuildErrorEventArgs
-#if NET_4_0
: LazyFormattedBuildEventArgs {
-#else
- : BuildEventArgs {
-#endif
string code;
int columnNumber;
@@ -44,9 +40,7 @@ namespace Microsoft.Build.Framework {
string file;
int lineNumber;
string subcategory;
-#if NET_4_0
string projectFile;
-#endif
protected BuildErrorEventArgs ()
{
@@ -70,7 +64,6 @@ namespace Microsoft.Build.Framework {
this.endColumnNumber = endColumnNumber;
}
-#if NET_4_0
public BuildErrorEventArgs (string subcategory, string code,
string file, int lineNumber, int columnNumber,
int endLineNumber, int endColumnNumber, string message,
@@ -97,7 +90,6 @@ namespace Microsoft.Build.Framework {
this.endColumnNumber = endColumnNumber;
}
-#endif
public string Code {
get {
@@ -141,12 +133,10 @@ namespace Microsoft.Build.Framework {
}
}
-#if NET_4_0
public string ProjectFile {
get { return projectFile; }
set { projectFile = value; }
}
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
index 20566ffe215..b2e33740379 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
@@ -54,9 +54,7 @@ namespace Microsoft.Build.Framework
{
}
-#if NET_4_0
protected
-#endif
BuildEventArgs (string message, string helpKeyword,
string senderName, DateTime eventTimestamp)
{
@@ -76,18 +74,14 @@ namespace Microsoft.Build.Framework
}
}
-#if NET_4_0
virtual
-#endif
public string Message {
get {
return message;
}
-#if NET_4_0
protected set {
message = value;
}
-#endif
}
public string SenderName {
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
index 4655d80e0f7..d0cb357dc9d 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
@@ -46,7 +46,6 @@ namespace Microsoft.Build.Framework {
this.succeeded = succeeded;
}
-#if NET_4_0
public BuildFinishedEventArgs (string message,
string helpKeyword,
bool succeeded,
@@ -65,7 +64,6 @@ namespace Microsoft.Build.Framework {
{
this.succeeded = succeeded;
}
-#endif
public bool Succeeded {
get {
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
index e6497b0f3d0..1ca70e2fbe2 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
@@ -33,9 +33,7 @@ namespace Microsoft.Build.Framework {
[Serializable]
public class BuildStartedEventArgs : BuildStatusEventArgs {
-#if NET_4_0
IDictionary<string, string> buildEnvironment;
-#endif
protected BuildStartedEventArgs ()
{
@@ -47,7 +45,6 @@ namespace Microsoft.Build.Framework {
{
}
-#if NET_4_0
public BuildStartedEventArgs (string message,
string helpKeyword,
IDictionary<string, string> environmentOfBuild)
@@ -74,7 +71,6 @@ namespace Microsoft.Build.Framework {
public IDictionary<string, string> BuildEnvironment {
get { return buildEnvironment; }
}
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
index c0b5b3c0526..9d2612e7463 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
@@ -32,11 +32,7 @@ namespace Microsoft.Build.Framework
{
[Serializable]
public abstract class BuildStatusEventArgs
-#if NET_4_0
: LazyFormattedBuildEventArgs {
-#else
- : BuildEventArgs {
-#endif
protected BuildStatusEventArgs ()
{
@@ -49,7 +45,6 @@ namespace Microsoft.Build.Framework
{
}
-#if NET_4_0
protected BuildStatusEventArgs (string message,
string helpKeyword,
string senderName,
@@ -66,7 +61,6 @@ namespace Microsoft.Build.Framework
: base (message, helpKeyword, senderName, eventTimestamp, messageArgs)
{
}
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs
index a928e6187b7..b959fa8d366 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs
@@ -31,11 +31,7 @@ using System;
namespace Microsoft.Build.Framework {
[Serializable]
public class BuildWarningEventArgs
-#if NET_4_0
: LazyFormattedBuildEventArgs {
-#else
- : BuildEventArgs {
-#endif
string subcategory;
string code;
@@ -44,9 +40,7 @@ namespace Microsoft.Build.Framework {
int columnNumber;
int endLineNumber;
int endColumnNumber;
-#if NET_4_0
string projectFile;
-#endif
protected BuildWarningEventArgs ()
{
@@ -71,7 +65,6 @@ namespace Microsoft.Build.Framework {
this.endColumnNumber = endColumnNumber;
}
-#if NET_4_0
public BuildWarningEventArgs (string subcategory, string code,
string file, int lineNumber, int columnNumber,
int endLineNumber, int endColumnNumber, string message,
@@ -98,7 +91,6 @@ namespace Microsoft.Build.Framework {
this.endColumnNumber = endColumnNumber;
}
-#endif
public string Code {
get {
@@ -142,11 +134,9 @@ namespace Microsoft.Build.Framework {
}
}
-#if NET_4_0
public string ProjectFile {
get { return projectFile; }
set { projectFile = value; }
}
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs
index 10923776c83..d4d7370179e 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs
@@ -1,4 +1,3 @@
-#if NET_4_0
using System;
namespace Microsoft.Build.Framework
@@ -10,4 +9,3 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs
index 4b08961e0fc..dd2e62b7739 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs
@@ -1,6 +1,5 @@
using System;
-#if NET_4_0
namespace Microsoft.Build.Framework
{
@@ -11,5 +10,4 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs
index 3fe741d436e..3da4baa5c1d 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs
@@ -27,7 +27,6 @@
//
-#if NET_4_0
using System;
using System.Collections;
@@ -41,4 +40,3 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs
index b9d882c62e9..1fa2e084219 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
@@ -47,4 +46,3 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
index 26a0306278a..33a9af67dc6 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.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_0
using System;
@@ -72,4 +71,3 @@ namespace Microsoft.Build.Framework
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
index dab39dd9841..2102d41c3f3 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.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_0
using System;
using Microsoft.Build.Framework;
using System.Collections.Generic;
@@ -213,4 +212,3 @@ namespace Microsoft.Build.Tasks
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
index ebabe1103af..07a5db8f5ec 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
@@ -26,92 +26,3 @@
///// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/////
-#if !NET_4_0
-
-using System;
-using Microsoft.Build.Framework;
-using Microsoft.Build.Utilities;
-
-namespace Microsoft.Build.Tasks
-{
- public class CreateTemporaryVCProject : TaskExtension
- {
- [MonoTODO]
- public CreateTemporaryVCProject ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- [Required]
- public string Configuration {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- [Required]
- public ITaskItem OutputProjectFile {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- [Required]
- public ITaskItem ProjectFile {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public ITaskItem[] ReferenceAssemblies {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- [Required]
- public ITaskItem[] ReferenceGuids {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public ITaskItem[] ReferenceImportLibraries {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public override bool Execute ()
- {
- throw new NotImplementedException ();
- }
- }
-}
-
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
index 06b04b2670c..ec58c1eaf8b 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
@@ -41,10 +41,6 @@ namespace Microsoft.Build.Tasks {
protected internal override void AddResponseFileCommands (CommandLineBuilderExtension commandLine)
{
-#if !NET_4_0
- //pre-MSBuild 2 targets don't support multi-targeting, so tell compiler to use 2.0 corlib
- commandLine.AppendSwitch ("/sdk:2");
-#endif
base.AddResponseFileCommands (commandLine);
if (AdditionalLibPaths != null && AdditionalLibPaths.Length > 0)
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
index cfcc2d65892..fe1f00bfa5f 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
@@ -49,9 +49,7 @@ namespace Microsoft.Build.Tasks {
string workingDirectory;
string scriptFile;
-#if NET_4_0
Func<string, bool> errorMatcher, warningMatcher;
-#endif
public Exec ()
{
@@ -80,10 +78,8 @@ namespace Microsoft.Build.Tasks {
string commandLineCommands)
{
try {
-#if NET_4_0
errorMatcher = GetTryMatchRegexFunc (CustomErrorRegularExpression, true);
warningMatcher = GetTryMatchRegexFunc (CustomWarningRegularExpression, false);
-#endif
return base.ExecuteTool (pathToTool, responseFileCommands, commandLineCommands);
} finally {
if (scriptFile != null)
@@ -124,14 +120,11 @@ namespace Microsoft.Build.Tasks {
protected override void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
-#if NET_4_0
if (IgnoreStandardErrorWarningFormat ||
(!errorMatcher (singleLine) && !warningMatcher (singleLine)))
-#endif
Log.LogMessage (messageImportance, singleLine);
}
-#if NET_4_0
// @is_error_type - log as errors, else warnings
Func<string, bool> GetTryMatchRegexFunc (string regex_str, bool is_error_type)
{
@@ -164,7 +157,6 @@ namespace Microsoft.Build.Tasks {
return true;
};
}
-#endif
[MonoTODO]
protected override bool ValidateParameters ()
@@ -209,13 +201,11 @@ namespace Microsoft.Build.Tasks {
get { return base.StandardOutputLoggingImportance; }
}
-#if NET_4_0
public bool IgnoreStandardErrorWarningFormat { get; set; }
public string CustomErrorRegularExpression { get; set; }
public string CustomWarningRegularExpression { get; set; }
-#endif
[MonoTODO]
[Output]
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 3ab6979ef9a..699e33899b9 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
@@ -89,7 +89,6 @@ namespace Microsoft.Build.Tasks {
}
#endif
-#if NET_4_0
[Output]
public string FrameworkVersion40Path {
get {
@@ -97,7 +96,6 @@ namespace Microsoft.Build.Tasks {
TargetDotNetFrameworkVersion.Version40);
}
}
-#endif
#if NET_4_5
[Output]
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
index a8ad35c8e69..b74e26ab43e 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
@@ -35,7 +35,6 @@ using System.Collections.Generic;
using Mono.XBuild.Utilities;
-#if NET_4_0
namespace Microsoft.Build.Tasks
{
@@ -273,4 +272,3 @@ namespace Microsoft.Build.Tasks
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
index 5a40c8e0c1e..a4fa05f9158 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
@@ -627,11 +627,7 @@ namespace Microsoft.Build.Tasks {
}
public
-#if NET_4_0
ITaskItem[]
-#else
- string[]
-#endif
InstalledAssemblyTables { get; set; }
[Output]
@@ -685,11 +681,9 @@ namespace Microsoft.Build.Tasks {
get { return suggestedRedirects; }
}
-#if NET_4_0
public string TargetFrameworkMoniker { get; set; }
public string TargetFrameworkMonikerDisplayName { get; set; }
-#endif
public string TargetFrameworkVersion { get; set; }
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
index 23e7e2c3c7f..e89b877d179 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
@@ -26,163 +26,3 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_4_0
-
-using System;
-using System.Collections.Specialized;
-using Microsoft.Build.Framework;
-
-namespace Microsoft.Build.Tasks {
-
- [MonoTODO]
- public class VCBuild : ToolTaskExtension {
-
- [MonoTODO]
- public VCBuild ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public ITaskItem[] AdditionalLibPaths {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string AdditionalOptions {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool Clean {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string Configuration {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public ITaskItem Override {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public string Platform {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- [Required]
- public ITaskItem[] Projects {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool Rebuild {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public ITaskItem SolutionFile {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public bool UserEnvironment {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- protected override StringDictionary EnvironmentOverride {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- protected override string ToolName {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- public override bool Execute ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected internal override void AddCommandLineCommands (
- CommandLineBuilderExtension commandLine )
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override string GenerateFullPathToTool ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override bool ValidateParameters ()
- {
- throw new NotImplementedException ();
- }
- }
-}
-
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
index 7358d9604b6..bc3a5fbd15e 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
@@ -306,11 +306,7 @@ namespace Microsoft.Build.Tasks {
[MonoTODO]
protected override string ToolName {
get {
-#if NET_4_0
return MSBuildUtils.RunningOnWindows ? "vbnc.bat" : "vbnc";
-#else
- return MSBuildUtils.RunningOnWindows ? "vbnc2.bat" : "vbnc2";
-#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs
index 55724e0e777..2afcfe67161 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -127,4 +126,3 @@ namespace Microsoft.Build.Tasks
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
index d15d7943fc0..6eb9193bbc9 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
@@ -328,11 +328,7 @@ namespace Microsoft.Build.Utilities
}
}
-#if NET_4_0
public
-#else
- protected
-#endif
void AppendTextUnquoted (string textToAppend)
{
commandLine.Append (textToAppend);
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 0a894e7b0f6..959647f9593 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
@@ -44,9 +44,7 @@ namespace Microsoft.Build.Utilities
Version30,
Version35,
#endif
-#if NET_4_0
Version40,
-#endif
#if NET_4_5
Version45,
#endif
@@ -63,12 +61,8 @@ namespace Microsoft.Build.Utilities
VersionLatest = Version451
#elif NET_4_5
VersionLatest = Version45
-#elif NET_4_0
- VersionLatest = Version40
-#elif NET_3_5
- VersionLatest = Version35
#else
- VersionLatest = Version20
+ VersionLatest = Version40
#endif
}
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs
index c287842987b..2d2de50cd9e 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs
@@ -39,9 +39,7 @@ namespace Microsoft.Build.Utilities
public
#endif
sealed class TaskItem : MarshalByRefObject, ITaskItem
-#if NET_4_0
, ITaskItem2
-#endif
{
IDictionary escapedMetadata;
string escapedItemSpec;
@@ -57,13 +55,11 @@ namespace Microsoft.Build.Utilities
if (sourceItem == null)
throw new ArgumentNullException ("sourceItem");
-#if NET_4_0
var ti2 = sourceItem as ITaskItem2;
if (ti2 != null) {
escapedItemSpec = ti2.EvaluatedIncludeEscaped;
escapedMetadata = ti2.CloneCustomMetadataEscaped ();
} else
-#endif
{
escapedItemSpec = MSBuildUtils.Escape (sourceItem.ItemSpec);
escapedMetadata = sourceItem.CloneCustomMetadata ();
@@ -106,12 +102,10 @@ namespace Microsoft.Build.Utilities
return CollectionsUtil.CreateCaseInsensitiveHashtable (escapedMetadata);
}
-#if NET_4_0
IDictionary ITaskItem2.CloneCustomMetadataEscaped ()
{
return CloneCustomMetadataEscaped ();
}
-#endif
public void CopyMetadataTo (ITaskItem destinationItem)
{
@@ -139,12 +133,10 @@ namespace Microsoft.Build.Utilities
return ((string) escapedMetadata [metadataName]) ?? String.Empty;
}
-#if NET_4_0
string ITaskItem2.GetMetadataValueEscaped (string metadataName)
{
return GetMetadataValue (metadataName);
}
-#endif
public override object InitializeLifetimeService ()
{
@@ -175,12 +167,10 @@ namespace Microsoft.Build.Utilities
escapedMetadata [metadataName] = metadataValue;
}
-#if NET_4_0
void ITaskItem2.SetMetadataValueLiteral (string metadataName, string metadataValue)
{
SetMetadata (metadataName, MSBuildUtils.Escape (metadataValue));
}
-#endif
public override string ToString ()
{
return escapedItemSpec;
@@ -191,12 +181,10 @@ namespace Microsoft.Build.Utilities
set { escapedItemSpec = value; }
}
-#if NET_4_0
string ITaskItem2.EvaluatedIncludeEscaped {
get { return escapedItemSpec; }
set { escapedItemSpec = value; }
}
-#endif
public int MetadataCount {
get { return escapedMetadata.Count + 11; }
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
index 736b8ad0c4a..62778aeab2a 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
@@ -57,10 +57,8 @@ namespace Microsoft.Build.Utilities
lib_mono_dir = t2.FullName;
-#if NET_4_0
var windowsPath = Environment.GetFolderPath (Environment.SpecialFolder.Windows);
runningOnDotNet = !string.IsNullOrEmpty (windowsPath) && lib_mono_dir.StartsWith (windowsPath);
-#endif
if (Environment.GetEnvironmentVariable ("TESTING_MONO") != null) {
mono_dir = new string [] {
@@ -158,7 +156,6 @@ namespace Microsoft.Build.Utilities
throw new NotImplementedException ();
}
- #if NET_4_0
public static string GetPathToStandardLibraries (string targetFrameworkIdentifier,
string targetFrameworkVersion,
string targetFrameworkProfile)
@@ -209,7 +206,6 @@ namespace Microsoft.Build.Utilities
// I'm not sure if this is completely valid assumption...
return path;
}
- #endif
[MonoTODO]
public static string GetPathToSystemFile (string fileName)
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
index df15d1a8469..3bbb97dda66 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
@@ -46,9 +46,7 @@ using SCS = System.Collections.Specialized;
namespace Microsoft.Build.Utilities
{
public abstract class ToolTask : Task
-#if NET_4_0
, ICancelableTask
-#endif
{
int exitCode;
int timeout;
@@ -58,9 +56,7 @@ namespace Microsoft.Build.Utilities
MessageImportance standardOutputLoggingImportance;
StringBuilder toolOutput;
bool typeLoadException;
-#if NET_4_0
ManualResetEvent canceled;
-#endif
protected ToolTask ()
: this (null, null)
@@ -81,9 +77,7 @@ namespace Microsoft.Build.Utilities
this.HelpKeywordPrefix = helpKeywordPrefix;
this.responseFileEncoding = Encoding.UTF8;
this.timeout = Int32.MaxValue;
-#if NET_4_0
canceled = new ManualResetEvent (false);
-#endif
}
[MonoTODO]
@@ -506,7 +500,6 @@ namespace Microsoft.Build.Utilities
set { toolPath = value; }
}
-#if NET_4_0
protected ManualResetEvent ToolCanceled {
get {
return canceled;
@@ -517,7 +510,6 @@ namespace Microsoft.Build.Utilities
{
canceled.Set ();
}
-#endif
#if XBUILD_12
protected MessageImportance StandardErrorImportanceToUse {
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
index 60ccbe37bde..d7d761f3a95 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
@@ -251,10 +251,8 @@ namespace Microsoft.Build.Evaluation
//FIXME: should also support config file, depending on ToolsetLocations
void LoadDefaultToolsets ()
{
-#if NET_4_0
AddToolset (new Toolset ("4.0",
ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version40), this, null));
-#endif
#if XBUILD_12
AddToolset (new Toolset ("12.0", ToolLocationHelper.GetPathToBuildTools ("12.0"), this, null));
#endif
diff --git a/mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs b/mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs
index 19b444ebd39..a1c13b6fbd9 100644
--- a/mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs
+++ b/mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs
@@ -35,11 +35,7 @@ using System.Runtime.ConstrainedExecution;
#if !PLATFORM_COMPACTFRAMEWORK
[assembly: AllowPartiallyTrustedCallers]
[assembly: ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
- #if NET_4_0
[assembly: SecurityRules(SecurityRuleSet.Level1)]
- #else
- [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
- #endif
#endif
// Version information for an assembly consists of the following four values:
@@ -52,11 +48,7 @@ using System.Runtime.ConstrainedExecution;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
#if !MOBILE
- #if NET_4_0
[assembly: AssemblyVersion("4.0.0.0")]
- #else // NET_4_0
- [assembly: AssemblyVersion("2.0.0.0")]
- #endif // NET_4_0
#else
[assembly: AssemblyVersion(Consts.FxVersion)]
#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs b/mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs
index 07b7ff28ba5..cc21c209b67 100644
--- a/mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs
+++ b/mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
using System.Collections;
@@ -425,4 +424,3 @@ namespace Mono.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading/CSnzi.cs b/mcs/class/Mono.Parallel/Mono.Threading/CSnzi.cs
index ad9abd19f51..6692ad565cc 100644
--- a/mcs/class/Mono.Parallel/Mono.Threading/CSnzi.cs
+++ b/mcs/class/Mono.Parallel/Mono.Threading/CSnzi.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_0
using System;
using System.Threading;
@@ -242,4 +241,3 @@ namespace Mono.Threading
}
}
}
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs b/mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs
index 71200f34050..509b02e7a06 100644
--- a/mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs
+++ b/mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -140,4 +139,3 @@ namespace Mono.Threading
}
}
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading/Snzi.cs b/mcs/class/Mono.Parallel/Mono.Threading/Snzi.cs
index 3be91f2f036..97acdf9f88a 100644
--- a/mcs/class/Mono.Parallel/Mono.Threading/Snzi.cs
+++ b/mcs/class/Mono.Parallel/Mono.Threading/Snzi.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_0
using System;
using System.Threading;
@@ -305,4 +304,3 @@ namespace Mono.Threading
}
}
}
-#endif
diff --git a/mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs b/mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs
index 38efde695ac..ff4d3f75dda 100644
--- a/mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs
+++ b/mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -48,4 +47,3 @@ namespace Mono.Threading
}
}
}
-#endif
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
index 6d78fc9d386..91d8034467b 100644
--- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
@@ -477,12 +477,8 @@ namespace Mono.Security.Protocol.Tls
break;
case CipherAlgorithmType.Rijndael:
-#if MOBILE || NET_4_0
// only AES is really used - and we can use CommonCrypto for iOS and OSX this way
this.encryptionAlgorithm = Aes.Create();
-#else
- this.encryptionAlgorithm = Rijndael.Create();
-#endif
break;
}
@@ -548,12 +544,8 @@ namespace Mono.Security.Protocol.Tls
break;
case CipherAlgorithmType.Rijndael:
-#if MOBILE || NET_4_0
// only AES is really used - and we can use CommonCrypto for iOS and OSX this way
this.decryptionAlgorithm = Aes.Create();
-#else
- this.decryptionAlgorithm = Rijndael.Create();
-#endif
break;
}
diff --git a/mcs/class/PEAPI/Metadata.cs b/mcs/class/PEAPI/Metadata.cs
index 55af156cb6d..1e08ff38590 100644
--- a/mcs/class/PEAPI/Metadata.cs
+++ b/mcs/class/PEAPI/Metadata.cs
@@ -4927,11 +4927,7 @@ namespace PEAPI {
private static readonly uint max3BitSmlIx = 0x1FFF;
private static readonly uint max5BitSmlIx = 0x7FF;
// NOTE: version and stream name strings MUST always be quad padded
-#if NET_4_0
private static readonly string version = "v4.0.30319\0\0";
-#else
- private static readonly string version = "v2.0.50727\0\0";
-#endif
private static readonly char[] tildeName = {'#','~','\0','\0'};
private static readonly char[] stringsName = {'#','S','t','r','i','n','g','s','\0','\0','\0','\0'};
private static readonly char[] usName = {'#','U','S','\0'};
diff --git a/mcs/class/System.Core/Assembly/AssemblyInfo.cs b/mcs/class/System.Core/Assembly/AssemblyInfo.cs
index 3b5cf8d1d24..9ce9f129597 100644
--- a/mcs/class/System.Core/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Core/Assembly/AssemblyInfo.cs
@@ -67,8 +67,6 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-#if NET_4_0
[assembly: TypeForwardedTo (typeof (System.Security.Cryptography.Aes))]
[assembly: TypeForwardedTo (typeof (System.Threading.LazyThreadSafetyMode ))]
[assembly: TypeForwardedTo (typeof (System.Lazy<>))]
-#endif
diff --git a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
index 73f12afc504..f165f3f6279 100644
--- a/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
+++ b/mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -53,4 +52,3 @@ namespace Microsoft.Win32.SafeHandles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
index a146fd90023..6b6f3d1d73a 100644
--- a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
+++ b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs
@@ -44,9 +44,7 @@ namespace System.Collections.Generic {
[DebuggerDisplay ("Count={Count}")]
[DebuggerTypeProxy (typeof (CollectionDebuggerView<,>))]
public class HashSet<T> : ICollection<T>, ISerializable, IDeserializationCallback
-#if NET_4_0
, ISet<T>
-#endif
{
const int INITIAL_SIZE = 10;
const float DEFAULT_LOAD_FACTOR = (90f / 100);
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
index feaaa5ab984..5bd03a9fe3b 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.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_0
using System;
using System.IO;
@@ -362,4 +361,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
index eaf4473c727..95fb9d757c6 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -43,5 +42,4 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
index ced4a161b2d..f60d81a6f10 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -40,4 +39,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
index 517ed6cbf80..68c0f32f00b 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -51,4 +50,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
index e74c10edfa4..e9bd968b646 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Security.AccessControl;
@@ -40,4 +39,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
index c66acdb55c6..783aa9142fb 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -94,4 +93,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
index 651e2d0d262..58f933ae792 100644
--- a/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
+++ b/mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -90,4 +89,3 @@ namespace System.IO.MemoryMappedFiles
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs b/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
index 9950ac8e018..b79455944f0 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
@@ -26,235 +26,3 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !NET_4_0
-
-using System;
-using System.Collections.ObjectModel;
-
-namespace System.Linq.Expressions {
-
- abstract class ExpressionVisitor {
-
- protected virtual void Visit (Expression expression)
- {
- if (expression == null)
- return;
-
- switch (expression.NodeType) {
- case ExpressionType.Negate:
- case ExpressionType.NegateChecked:
- case ExpressionType.Not:
- case ExpressionType.Convert:
- case ExpressionType.ConvertChecked:
- case ExpressionType.ArrayLength:
- case ExpressionType.Quote:
- case ExpressionType.TypeAs:
- case ExpressionType.UnaryPlus:
- VisitUnary ((UnaryExpression) expression);
- break;
- case ExpressionType.Add:
- case ExpressionType.AddChecked:
- case ExpressionType.Subtract:
- case ExpressionType.SubtractChecked:
- case ExpressionType.Multiply:
- case ExpressionType.MultiplyChecked:
- case ExpressionType.Divide:
- case ExpressionType.Modulo:
- case ExpressionType.Power:
- case ExpressionType.And:
- case ExpressionType.AndAlso:
- case ExpressionType.Or:
- case ExpressionType.OrElse:
- case ExpressionType.LessThan:
- case ExpressionType.LessThanOrEqual:
- case ExpressionType.GreaterThan:
- case ExpressionType.GreaterThanOrEqual:
- case ExpressionType.Equal:
- case ExpressionType.NotEqual:
- case ExpressionType.Coalesce:
- case ExpressionType.ArrayIndex:
- case ExpressionType.RightShift:
- case ExpressionType.LeftShift:
- case ExpressionType.ExclusiveOr:
- VisitBinary ((BinaryExpression) expression);
- break;
- case ExpressionType.TypeIs:
- VisitTypeIs ((TypeBinaryExpression) expression);
- break;
- case ExpressionType.Conditional:
- VisitConditional ((ConditionalExpression) expression);
- break;
- case ExpressionType.Constant:
- VisitConstant ((ConstantExpression) expression);
- break;
- case ExpressionType.Parameter:
- VisitParameter ((ParameterExpression) expression);
- break;
- case ExpressionType.MemberAccess:
- VisitMemberAccess ((MemberExpression) expression);
- break;
- case ExpressionType.Call:
- VisitMethodCall ((MethodCallExpression) expression);
- break;
- case ExpressionType.Lambda:
- VisitLambda ((LambdaExpression) expression);
- break;
- case ExpressionType.New:
- VisitNew ((NewExpression) expression);
- break;
- case ExpressionType.NewArrayInit:
- case ExpressionType.NewArrayBounds:
- VisitNewArray ((NewArrayExpression) expression);
- break;
- case ExpressionType.Invoke:
- VisitInvocation ((InvocationExpression) expression);
- break;
- case ExpressionType.MemberInit:
- VisitMemberInit ((MemberInitExpression) expression);
- break;
- case ExpressionType.ListInit:
- VisitListInit ((ListInitExpression) expression);
- break;
- default:
- throw new ArgumentException (string.Format ("Unhandled expression type: '{0}'", expression.NodeType));
- }
- }
-
- protected virtual void VisitBinding (MemberBinding binding)
- {
- switch (binding.BindingType) {
- case MemberBindingType.Assignment:
- VisitMemberAssignment ((MemberAssignment) binding);
- break;
- case MemberBindingType.MemberBinding:
- VisitMemberMemberBinding ((MemberMemberBinding) binding);
- break;
- case MemberBindingType.ListBinding:
- VisitMemberListBinding ((MemberListBinding) binding);
- break;
- default:
- throw new ArgumentException (string.Format ("Unhandled binding type '{0}'", binding.BindingType));
- }
- }
-
- protected virtual void VisitElementInitializer (ElementInit initializer)
- {
- VisitExpressionList (initializer.Arguments);
- }
-
- protected virtual void VisitUnary (UnaryExpression unary)
- {
- Visit (unary.Operand);
- }
-
- protected virtual void VisitBinary (BinaryExpression binary)
- {
- Visit (binary.Left);
- Visit (binary.Right);
- Visit (binary.Conversion);
- }
-
- protected virtual void VisitTypeIs (TypeBinaryExpression type)
- {
- Visit (type.Expression);
- }
-
- protected virtual void VisitConstant (ConstantExpression constant)
- {
- }
-
- protected virtual void VisitConditional (ConditionalExpression conditional)
- {
- Visit (conditional.Test);
- Visit (conditional.IfTrue);
- Visit (conditional.IfFalse);
- }
-
- protected virtual void VisitParameter (ParameterExpression parameter)
- {
- }
-
- protected virtual void VisitMemberAccess (MemberExpression member)
- {
- Visit (member.Expression);
- }
-
- protected virtual void VisitMethodCall (MethodCallExpression methodCall)
- {
- Visit (methodCall.Object);
- VisitExpressionList (methodCall.Arguments);
- }
-
- protected virtual void VisitList<T> (ReadOnlyCollection<T> list, Action<T> visitor)
- {
- foreach (T element in list) {
- visitor (element);
- }
- }
-
- protected virtual void VisitExpressionList (ReadOnlyCollection<Expression> list)
- {
- VisitList (list, Visit);
- }
-
- protected virtual void VisitMemberAssignment (MemberAssignment assignment)
- {
- Visit (assignment.Expression);
- }
-
- protected virtual void VisitMemberMemberBinding (MemberMemberBinding binding)
- {
- VisitBindingList (binding.Bindings);
- }
-
- protected virtual void VisitMemberListBinding (MemberListBinding binding)
- {
- VisitElementInitializerList (binding.Initializers);
- }
-
- protected virtual void VisitBindingList (ReadOnlyCollection<MemberBinding> list)
- {
- VisitList (list, VisitBinding);
- }
-
- protected virtual void VisitElementInitializerList (ReadOnlyCollection<ElementInit> list)
- {
- VisitList (list, VisitElementInitializer);
- }
-
- protected virtual void VisitLambda (LambdaExpression lambda)
- {
- Visit (lambda.Body);
- }
-
- protected virtual void VisitNew (NewExpression nex)
- {
- VisitExpressionList (nex.Arguments);
- }
-
- protected virtual void VisitMemberInit (MemberInitExpression init)
- {
- VisitNew (init.NewExpression);
- VisitBindingList (init.Bindings);
- }
-
- protected virtual void VisitListInit (ListInitExpression init)
- {
- VisitNew (init.NewExpression);
- VisitElementInitializerList (init.Initializers);
- }
-
- protected virtual void VisitNewArray (NewArrayExpression newArray)
- {
- VisitExpressionList (newArray.Expressions);
- }
-
- protected virtual void VisitInvocation (InvocationExpression invocation)
- {
- VisitExpressionList (invocation.Arguments);
- Visit (invocation.Expression);
- }
- }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
index 37cc578c316..0caa593f5ca 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.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_0
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -50,4 +49,3 @@ namespace System.Linq.Parallel.QueryNodes
internal abstract IEnumerable<T> GetSequential ();
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs
index 4dbb49b23b4..4065313d22a 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.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_0
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -61,4 +60,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs
index 646d7e76715..b4cbeb5b540 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.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_0
using System;
namespace System.Linq.Parallel.QueryNodes
@@ -59,4 +58,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
index e09dfbf9543..d7ae545c43b 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -75,4 +74,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
index c3b766eaa2a..5050abf761b 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -88,4 +87,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
index 55bd421f0fa..c5ac99f772b 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -87,4 +86,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
index adec857c2d5..8e3f09a29c4 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -147,4 +146,3 @@ namespace System.Linq.Parallel.QueryNodes
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
index 79ed83eb11c..60bbef4e885 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -185,4 +184,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
index 4a320c78935..96eedc28506 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.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_0
using System;
using System.Linq;
using System.Collections.Generic;
@@ -58,4 +57,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
index a6c713e26b8..902da86f6d6 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.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_0
using System;
using System.Threading;
using System.Collections.Generic;
@@ -157,4 +156,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
index d3b7caeeb9b..bacf7701e7b 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -119,4 +118,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
index 4b4b75daf3f..d495090fba1 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
@@ -23,7 +23,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if NET_4_0
using System;
using System.Collections.Generic;
@@ -100,4 +99,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
index 388ae952517..e9719402ecf 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.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_0
using System;
namespace System.Linq.Parallel.QueryNodes
@@ -37,4 +36,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
index c7128658a43..8956ddbb156 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.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_0
using System;
using System.Linq;
using System.Threading;
@@ -64,4 +63,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
index 815cb5fc9f6..bfec9e8579d 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.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_0
using System;
using System.Threading;
using System.Collections;
@@ -204,4 +203,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
index 78ffd83af20..71c315446c6 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.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_0
using System;
using System.Linq;
using System.Collections.Generic;
@@ -81,4 +80,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs
index 7e3d18be232..ba5a10b457f 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.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_0
using System;
using System.Linq;
using System.Collections.Generic;
@@ -141,4 +140,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs
index 31b70ff5a66..07a509c3999 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.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_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -124,4 +123,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
index cd1700f33e0..118a9f02d65 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.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_0
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -76,4 +75,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
index 8d9c9ad7f5f..d76f3f981fd 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.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_0
using System;
using System.Linq;
using System.Threading;
@@ -164,4 +163,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs
index 9b9b475ac68..2aa4edcb440 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.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_0
using System;
using System.Threading;
using System.Linq;
@@ -157,4 +156,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs
index 5f974c99df2..68450ad4db3 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.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_0
using System;
using System.Linq;
using System.Collections.Generic;
@@ -49,4 +48,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs
index b3239e4165f..dbd137c44bd 100644
--- a/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.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_0
using System;
using System.Linq;
using System.Collections;
@@ -63,4 +62,3 @@ namespace System.Linq.Parallel.QueryNodes
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs b/mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs
index 0d403ed3a4c..ef0a2d1b910 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/AggregationList.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_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -132,4 +131,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs
index 3864b48a531..d0063ba691d 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.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_0
using System;
using System.Threading;
using System.Collections;
@@ -62,4 +61,3 @@ namespace System.Linq.Parallel
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs
index 6795cf02190..fbd4f02bee4 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.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_0
using System;
using System.Threading;
using System.Collections;
@@ -114,4 +113,3 @@ namespace System.Linq.Parallel
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs
index 5b68a4425a5..c1e608cabbf 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.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_0
using System;
using System.Linq.Parallel.QueryNodes;
@@ -42,4 +41,3 @@ namespace System.Linq.Parallel
void Visit (QueryHeadWorkerNode node);
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs b/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs
index 013dc53598a..8ad81c4139a 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.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_0
using System;
namespace System.Linq.Parallel
@@ -34,4 +33,3 @@ namespace System.Linq.Parallel
void Visit (INodeVisitor visitor);
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs b/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs
index 6012f790493..48d5fa546c5 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.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_0
using System;
using System.Threading;
using System.Collections;
@@ -216,4 +215,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
index 85996ef89be..d34cccdb1c1 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.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_0
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -267,4 +266,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs
index e9bf2f8b4e2..d4bcae6b588 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.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_0
using System;
using System.Collections.Generic;
@@ -74,4 +73,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs
index a3d17520c62..9b9fc91edd2 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.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_0
using System;
using System.Threading;
using System.Collections;
@@ -128,4 +127,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs
index cb46dcc86ae..b1fa13f774e 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.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_0
using System;
using System.Linq;
using System.Collections;
@@ -282,4 +281,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs
index 1bf8f6b3cc6..770951eacf8 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.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_0
using System;
using System.Threading;
using System.Linq.Parallel.QueryNodes;
@@ -185,4 +184,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs
index 01cab21f68e..5de8f5d35c4 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.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_0
using System;
using System.Threading;
using System.Linq.Parallel.QueryNodes;
@@ -80,4 +79,3 @@ namespace System.Linq.Parallel
#endregion
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs b/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs
index 7ca9a8586d3..d481fa04934 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/QueryOptions.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_0
using System;
using System.Threading;
@@ -126,4 +125,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs b/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
index dc533d75034..fb1c48be8f9 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/RangeList.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_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -122,4 +121,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs b/mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs
index e2c99d2ed57..45c2f852762 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/RepeatList.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_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -116,4 +115,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs b/mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs
index 909de501bda..b7687d38e3e 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ReverseList.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_0
using System.Linq;
using System.Threading;
using System.Collections;
@@ -116,4 +115,3 @@ namespace System.Linq.Parallel
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs b/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs
index 8b4c41210c9..efe9792839d 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.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_0
using System;
using System.Threading;
using System.Collections.Generic;
@@ -59,4 +58,3 @@ namespace System.Linq.Parallel
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.cs b/mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.cs
index b8be6abc055..423f036b32c 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.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_0
using System;
using System.Threading;
using System.Collections;
@@ -68,4 +67,3 @@ namespace System.Linq.Parallel
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Enumerable.cs b/mcs/class/System.Core/System.Linq/Enumerable.cs
index 157b53c8be3..7bd031f567f 100644
--- a/mcs/class/System.Core/System.Linq/Enumerable.cs
+++ b/mcs/class/System.Core/System.Linq/Enumerable.cs
@@ -3073,7 +3073,6 @@ namespace System.Linq
#endregion
-#if NET_4_0
#region Zip
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult> (this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
@@ -3098,7 +3097,6 @@ namespace System.Linq
}
#endregion
-#endif
#region Where
diff --git a/mcs/class/System.Core/System.Linq/EnumerableExecutor.cs b/mcs/class/System.Core/System.Linq/EnumerableExecutor.cs
index 7d7b16abbf0..f97ed482815 100644
--- a/mcs/class/System.Core/System.Linq/EnumerableExecutor.cs
+++ b/mcs/class/System.Core/System.Linq/EnumerableExecutor.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Linq
{
@@ -38,4 +37,3 @@ namespace System.Linq
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs b/mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs
index 8558f095f1f..403bf985a7c 100644
--- a/mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs
+++ b/mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Linq.Expressions;
@@ -40,4 +39,3 @@ namespace System.Linq
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/EnumerableQuery.cs b/mcs/class/System.Core/System.Linq/EnumerableQuery.cs
index 3ead6e60bad..b57cf63fefb 100644
--- a/mcs/class/System.Core/System.Linq/EnumerableQuery.cs
+++ b/mcs/class/System.Core/System.Linq/EnumerableQuery.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Linq
{
@@ -38,4 +37,3 @@ namespace System.Linq
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs b/mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs
index b5e2bce9280..d7c7c6d5b46 100644
--- a/mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs
+++ b/mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Collections;
using System.Collections.Generic;
@@ -98,4 +97,3 @@ namespace System.Linq
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/IGrouping.cs b/mcs/class/System.Core/System.Linq/IGrouping.cs
index e08aa64e6d2..de6267a5318 100644
--- a/mcs/class/System.Core/System.Linq/IGrouping.cs
+++ b/mcs/class/System.Core/System.Linq/IGrouping.cs
@@ -30,11 +30,7 @@
using System.Collections.Generic;
namespace System.Linq {
-#if NET_4_0
public interface IGrouping<out TKey, out TElement> : IEnumerable<TElement>
-#else
- public interface IGrouping<TKey, TElement> : IEnumerable<TElement>
-#endif
{
TKey Key { get; }
}
diff --git a/mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs b/mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs
index 9c81bfd853f..d2ae730245b 100644
--- a/mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs
+++ b/mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs
@@ -28,11 +28,7 @@
//
namespace System.Linq {
-#if NET_4_0
public interface IOrderedQueryable<out T> : IOrderedQueryable, IQueryable<T>
-#else
- public interface IOrderedQueryable<T> : IOrderedQueryable, IQueryable<T>
-#endif
{
}
}
diff --git a/mcs/class/System.Core/System.Linq/IQueryable_T.cs b/mcs/class/System.Core/System.Linq/IQueryable_T.cs
index 2a2cda92624..320864d600d 100644
--- a/mcs/class/System.Core/System.Linq/IQueryable_T.cs
+++ b/mcs/class/System.Core/System.Linq/IQueryable_T.cs
@@ -25,11 +25,7 @@ using System.Collections.Generic;
namespace System.Linq {
-#if NET_4_0
public interface IQueryable<out T> : IQueryable, IEnumerable<T>
-#else
- public interface IQueryable<T> : IQueryable, IEnumerable<T>
-#endif
{
}
}
diff --git a/mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs b/mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs
index 842555c4c4b..59da18cca0c 100644
--- a/mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs
+++ b/mcs/class/System.Core/System.Linq/OrderedParallelQuery.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_0
using System;
using System.Threading;
using System.Collections;
@@ -57,4 +56,3 @@ namespace System.Linq
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs b/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs
index 44b45c35820..1a93bd3e927 100644
--- a/mcs/class/System.Core/System.Linq/ParallelEnumerable.cs
+++ b/mcs/class/System.Core/System.Linq/ParallelEnumerable.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_0
using System;
using System.Threading;
using System.Collections;
@@ -2329,4 +2328,3 @@ namespace System.Linq
#endregion
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs b/mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs
index 7b6687cfd74..1e284e08da1 100644
--- a/mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs
+++ b/mcs/class/System.Core/System.Linq/ParallelExecutionMode.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_0
using System;
namespace System.Linq
@@ -35,4 +34,3 @@ namespace System.Linq
ForceParallelism = 1
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs b/mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs
index 5b0399de7a3..69757091141 100644
--- a/mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs
+++ b/mcs/class/System.Core/System.Linq/ParallelMergeOptions.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_0
using System;
namespace System.Linq
@@ -37,4 +36,3 @@ namespace System.Linq
FullyBuffered
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/ParallelQuery.cs b/mcs/class/System.Core/System.Linq/ParallelQuery.cs
index c5ea95e41b0..38a5c87a5e0 100644
--- a/mcs/class/System.Core/System.Linq/ParallelQuery.cs
+++ b/mcs/class/System.Core/System.Linq/ParallelQuery.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_0
using System;
using System.Threading;
@@ -124,4 +123,3 @@ namespace System.Linq
}
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Linq/Queryable.cs b/mcs/class/System.Core/System.Linq/Queryable.cs
index b2fedba0c2f..35fd70e3e25 100644
--- a/mcs/class/System.Core/System.Linq/Queryable.cs
+++ b/mcs/class/System.Core/System.Linq/Queryable.cs
@@ -1603,7 +1603,6 @@ namespace System.Linq {
#endregion
-#if NET_4_0
#region Zip
public static IQueryable<TResult> Zip<TFirst, TSecond, TResult> (this IQueryable<TFirst> source1, IEnumerable<TSecond> source2, Expression<Func<TFirst, TSecond, TResult>> resultSelector)
@@ -1620,6 +1619,5 @@ namespace System.Linq {
}
#endregion
-#endif
}
}
diff --git a/mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs b/mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs
index 2d9f7e07847..5fa5cdf7db9 100644
--- a/mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs
+++ b/mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections.Generic;
@@ -62,4 +61,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs b/mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs
index 877501e8d32..998ac275ea7 100644
--- a/mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs
+++ b/mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs
@@ -32,11 +32,9 @@ namespace System.Runtime.CompilerServices {
public T Value;
-#if NET_4_0
public StrongBox ()
{
}
-#endif
public StrongBox (T value)
{
diff --git a/mcs/class/System.Core/System.Security.Cryptography/Aes.cs b/mcs/class/System.Core/System.Security.Cryptography/Aes.cs
index 09fa19da0f8..87d73047843 100644
--- a/mcs/class/System.Core/System.Security.Cryptography/Aes.cs
+++ b/mcs/class/System.Core/System.Security.Cryptography/Aes.cs
@@ -47,7 +47,7 @@ namespace System.Security.Cryptography {
#if MOBILE
// version has not changed between SL3 (System.Core) and SL4
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
- #elif NET_4_0
+ #else
// use 3.5 version
[TypeForwardedFrom ("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
#endif
diff --git a/mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs b/mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs
index 4206c53de1c..7ef2584833e 100644
--- a/mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs
+++ b/mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Threading.Tasks
{
@@ -52,4 +51,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/System.Core/System.Threading/LockRecursionException.cs b/mcs/class/System.Core/System.Threading/LockRecursionException.cs
index 974f7373bde..34a37208d73 100644
--- a/mcs/class/System.Core/System.Threading/LockRecursionException.cs
+++ b/mcs/class/System.Core/System.Threading/LockRecursionException.cs
@@ -24,43 +24,9 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if NET_4_0
using System;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof(System.Threading.LockRecursionException))]
-#else
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Threading
-{
- [Serializable]
- public class LockRecursionException : Exception
- {
- public LockRecursionException ()
- : base ()
- {
- }
-
- public LockRecursionException (string message)
- : base (message)
- {
- }
-
- public LockRecursionException (string message, Exception e)
- : base (message, e)
- {
- }
-
- protected LockRecursionException (SerializationInfo info, StreamingContext sc)
- : base (info, sc)
- {
- }
- }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs
index 18d6f6ef886..d504f45ca9d 100644
--- a/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs
+++ b/mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs
@@ -37,21 +37,9 @@ namespace System.Threading
return (state & value) > 0;
}
-#if !NET_4_0
- internal static bool Wait (this ManualResetEvent self, int timeout)
- {
- return self.WaitOne (timeout);
- }
-
- internal static bool IsSet (this ManualResetEvent self)
- {
- return self.WaitOne (0);
- }
-#else
internal static bool IsSet (this ManualResetEventSlim self)
{
return self.IsSet;
}
-#endif
}
} \ No newline at end of file
diff --git a/mcs/class/System.Core/System/Actions.cs b/mcs/class/System.Core/System/Actions.cs
index 3768e244bc8..88fecb30a54 100644
--- a/mcs/class/System.Core/System/Actions.cs
+++ b/mcs/class/System.Core/System/Actions.cs
@@ -29,17 +29,14 @@
using System;
using System.Runtime.CompilerServices;
-#if NET_4_0
[assembly:TypeForwardedTo (typeof(Action<>))]
[assembly:TypeForwardedTo (typeof(Action<,>))]
[assembly:TypeForwardedTo (typeof(Action<,,>))]
[assembly:TypeForwardedTo (typeof(Action<,,,>))]
[assembly:TypeForwardedTo (typeof (Action))]
-#endif
namespace System
{
-#if NET_4_0
public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9> (
T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
@@ -63,10 +60,4 @@ namespace System
public delegate void Action<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16> (
T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
-#else
- public delegate void Action ();
- public delegate void Action<T1, T2> (T1 arg1, T2 arg2);
- public delegate void Action<T1, T2, T3> (T1 arg1, T2 arg2, T3 arg3);
- public delegate void Action<T1, T2, T3, T4> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-#endif
}
diff --git a/mcs/class/System.Core/System/Funcs.cs b/mcs/class/System.Core/System/Funcs.cs
index dcb6e33ab13..26e42ec5362 100644
--- a/mcs/class/System.Core/System/Funcs.cs
+++ b/mcs/class/System.Core/System/Funcs.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
//
-#if NET_4_0
using System;
using System.Runtime.CompilerServices;
@@ -34,11 +33,9 @@ using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof(Func<,,>))]
[assembly:TypeForwardedTo (typeof(Func<,,,>))]
[assembly:TypeForwardedTo (typeof(Func<,,,,>))]
-#endif
namespace System
{
-#if NET_4_0
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, out TResult> (
T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
@@ -62,11 +59,4 @@ namespace System
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, in T11, in T12, in T13, in T14, in T15, in T16, out TResult> (
T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16);
-#else
- public delegate TResult Func<TResult> ();
- public delegate TResult Func<T, TResult> (T arg);
- public delegate TResult Func<T1, T2, TResult> (T1 arg1, T2 arg2);
- public delegate TResult Func<T1, T2, T3, TResult> (T1 arg1, T2 arg2, T3 arg3);
- public delegate TResult Func<T1, T2, T3, T4, TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
-#endif
}
diff --git a/mcs/class/System.Core/System/InvalidTimeZoneException.cs b/mcs/class/System.Core/System/InvalidTimeZoneException.cs
index e2182cf5ced..9f6c22720bb 100644
--- a/mcs/class/System.Core/System/InvalidTimeZoneException.cs
+++ b/mcs/class/System.Core/System/InvalidTimeZoneException.cs
@@ -24,32 +24,9 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if NET_4_0
using System;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof(InvalidTimeZoneException))]
-#else
-
-namespace System
-{
- [Serializable]
- public class InvalidTimeZoneException : Exception
- {
- public InvalidTimeZoneException () : base ()
- {}
-
- public InvalidTimeZoneException (string message) : base (message)
- {}
-
- public InvalidTimeZoneException (string message, Exception e) : base (message, e)
- {}
-
- protected InvalidTimeZoneException (Runtime.Serialization.SerializationInfo info, Runtime.Serialization.StreamingContext sc) : base (info, sc)
- {}
- }
-}
-
-#endif
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
index 37f21464dcf..0947ef42d1e 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
@@ -30,14 +30,12 @@ using System.Runtime.Serialization;
namespace System
{
-#if NET_4_0 || !INSIDE_CORLIB
public
-#endif
sealed partial class TimeZoneInfo {
[SerializableAttribute]
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public sealed class AdjustmentRule : IEquatable<TimeZoneInfo.AdjustmentRule>, ISerializable, IDeserializationCallback
@@ -138,11 +136,7 @@ namespace System
daylightTransitionEnd.GetHashCode ();
}
-#if NET_4_0
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
-#else
- public void GetObjectData (SerializationInfo info, StreamingContext context)
-#endif
{
if (info == null)
throw new ArgumentNullException ("info");
@@ -152,11 +146,7 @@ namespace System
info.AddValue ("DaylightTransitionStart", DaylightTransitionStart);
info.AddValue ("DaylightTransitionEnd", DaylightTransitionEnd);
}
-#if NET_4_0
void IDeserializationCallback.OnDeserialization (object sender)
-#else
- public void OnDeserialization (object sender)
-#endif
{
try {
TimeZoneInfo.AdjustmentRule.Validate (dateStart, dateEnd, daylightDelta,
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs b/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
index 3a7da39ec7f..39de7319479 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
@@ -33,9 +33,7 @@ using System.Text;
namespace System
{
-#if NET_4_0 || !INSIDE_CORLIB
public
-#endif
partial class TimeZoneInfo
{
public static TimeZoneInfo FromSerializedString (string source)
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
index 719bb9d51f3..d1651dc09a9 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
@@ -31,15 +31,13 @@ using System.Runtime.Serialization;
namespace System
{
-#if NET_4_0 || !INSIDE_CORLIB
public
-#endif
sealed partial class TimeZoneInfo
{
[SerializableAttribute]
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public struct TransitionTime : IEquatable<TimeZoneInfo.TransitionTime>, ISerializable, IDeserializationCallback
@@ -207,11 +205,7 @@ namespace System
}
-#if NET_4_0
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
-#else
- public void GetObjectData (SerializationInfo info, StreamingContext context)
-#endif
{
if (info == null)
throw new ArgumentNullException ("info");
@@ -249,11 +243,7 @@ namespace System
return (day ^ (int)dayOfWeek ^ month ^ (int)timeOfDay.Ticks ^ week);
}
-#if NET_4_0
void IDeserializationCallback.OnDeserialization (object sender)
-#else
- public void OnDeserialization (object sender)
-#endif
{
try {
TimeZoneInfo.TransitionTime.Validate (timeOfDay, month, week, day, dayOfWeek, isFixedDateRule);
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.cs b/mcs/class/System.Core/System/TimeZoneInfo.cs
index 5db5889419a..df093f8cb8f 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.cs
@@ -53,13 +53,11 @@ namespace System
{
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
[SerializableAttribute]
-#if NET_4_0 || !INSIDE_CORLIB
public
-#endif
sealed partial class TimeZoneInfo : IEquatable<TimeZoneInfo>, ISerializable, IDeserializationCallback
{
TimeSpan baseUtcOffset;
@@ -321,11 +319,7 @@ namespace System
//FIXME: do not rely on DateTime implementation !
if (this == TimeZoneInfo.Local)
{
-#if NET_4_0
return dateTime.ToLocalTime ();
-#else
- return DateTime.SpecifyKind (dateTime.ToLocalTime (), DateTimeKind.Unspecified);
-#endif
}
@@ -616,11 +610,7 @@ namespace System
return hash_code;
}
-#if NET_4_0
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
-#else
- public void GetObjectData (SerializationInfo info, StreamingContext context)
-#endif
{
if (info == null)
throw new ArgumentNullException ("info");
@@ -892,11 +882,7 @@ namespace System
return false;
}
-#if NET_4_0
void IDeserializationCallback.OnDeserialization (object sender)
-#else
- public void OnDeserialization (object sender)
-#endif
{
try {
TimeZoneInfo.Validate (id, baseUtcOffset, adjustmentRules);
diff --git a/mcs/class/System.Core/System/TimeZoneNotFoundException.cs b/mcs/class/System.Core/System/TimeZoneNotFoundException.cs
index 2364e937ca0..4ce2ff206d2 100644
--- a/mcs/class/System.Core/System/TimeZoneNotFoundException.cs
+++ b/mcs/class/System.Core/System/TimeZoneNotFoundException.cs
@@ -24,32 +24,9 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if NET_4_0
using System;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof(TimeZoneNotFoundException))]
-#else
-
-namespace System
-{
- [Serializable]
- public class TimeZoneNotFoundException : Exception
- {
- public TimeZoneNotFoundException () : base ()
- {}
-
- public TimeZoneNotFoundException (string message) : base (message)
- {}
-
- public TimeZoneNotFoundException (string message, Exception e) : base (message, e)
- {}
-
- protected TimeZoneNotFoundException (Runtime.Serialization.SerializationInfo info, Runtime.Serialization.StreamingContext sc) : base (info, sc)
- {}
- }
-}
-
-#endif
diff --git a/mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs b/mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs
index be6cfea5b22..b5d9b925392 100644
--- a/mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs
@@ -43,7 +43,6 @@ using System.Runtime.Versioning;
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../ecma.pub")]
-#if NET_4_0
[assembly: System.Security.SecurityCritical]
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
@@ -74,4 +73,3 @@ internal static class AssemblyRef
internal const string EcmaPublicKeyToken = "b77a5c561934e089";
}
-#endif
diff --git a/mcs/class/System.Data.Services/System.Data.Services/DataService.cs b/mcs/class/System.Data.Services/System.Data.Services/DataService.cs
index 73c3ddbaa3d..2ba11a69dd2 100644
--- a/mcs/class/System.Data.Services/System.Data.Services/DataService.cs
+++ b/mcs/class/System.Data.Services/System.Data.Services/DataService.cs
@@ -36,9 +36,7 @@ namespace System.Data.Services {
[AspNetCompatibilityRequirements (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class DataService<T> : IRequestHandler
{
-#if NET_4_0
DataServiceProcessingPipeline processingPipeline;
-#endif
public void AttachHost (IDataServiceHost host)
{
if (host == null)
@@ -63,7 +61,6 @@ namespace System.Data.Services {
protected T CurrentDataSource {
get; private set;
}
-#if NET_4_0
public DataServiceProcessingPipeline ProcessingPipeline {
get {
if (processingPipeline == null)
@@ -71,7 +68,6 @@ namespace System.Data.Services {
return processingPipeline;
}
}
-#endif
protected virtual T CreateDataSource()
{
throw new NotImplementedException();
diff --git a/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs b/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs
index a5914259a54..bdceab73df7 100644
--- a/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs
+++ b/mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs
@@ -30,9 +30,7 @@ using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
-#if NET_4_0
using System.Data.Services.Providers;
-#endif
namespace System.Data.Services
{
@@ -47,13 +45,11 @@ namespace System.Data.Services
this.Name = name;
this.Filter = filter;
}
-#if NET_4_0
public ResourceProperty ExpandedProperty {
get {
throw new NotImplementedException ();
}
}
-#endif
public string Name {
get;
private set;
diff --git a/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs b/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs
index cdd042c34a6..606aca5553b 100644
--- a/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs
+++ b/mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs
@@ -30,11 +30,9 @@ namespace System.Data.Services
{
public sealed class ProcessRequestArgs
{
-#if NET_4_0
public DataServiceOperationContext OperationContext {
get; private set;
}
-#endif
public bool IsBatchOperation {
get; private set;
}
diff --git a/mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs b/mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs
index 6d5cc7c520f..edd07bce34e 100644
--- a/mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs
+++ b/mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs
@@ -598,17 +598,7 @@ namespace System.Json
private static bool TryGuidParse (string value, out Guid guid)
{
-#if NET_4_0
return Guid.TryParse (value, out guid);
-#else
- try {
- guid = new Guid (value);
- return true;
- } catch (Exception) {
- guid = Guid.Empty;
- return false;
- }
-#endif
}
private static ConvertResult StringToGuid(string valueString)
@@ -940,9 +930,7 @@ namespace System.Json
}
sb.Append(val, startIndex, count);
-#if NET_4_0
Contract.Assert(i < val.Length, "Found that a '\' was the last character in a string, which is invalid JSON. Verify the calling method uses a valid JSON string as the input parameter of this method.");
-#endif
switch (val[i])
{
case '"':
@@ -967,9 +955,7 @@ namespace System.Json
sb.Append('\t');
break;
case 'u':
-#if NET_4_0
Contract.Assert((i + 3) < val.Length, String.Format(CultureInfo.CurrentCulture, "Unexpected char {0} at position {1}. The unicode escape sequence should be followed by 4 digits.", val[i], i));
-#endif
sb.Append(ParseChar(val.Substring(i + 1, 4), NumberStyles.HexNumber));
i += 4;
break;
@@ -1067,9 +1053,7 @@ namespace System.Json
if (jsonType == JsonType.String)
{
string str = UnescapeJsonString(ToString());
-#if NET_4_0
Contract.Assert(str.Length >= 2 && str.StartsWith("\"", StringComparison.Ordinal) && str.EndsWith("\"", StringComparison.Ordinal), "The unescaped string must begin and end with quotes.");
-#endif
str = str.Substring(1, str.Length - 2);
if (stringConverters.ContainsKey(type))
diff --git a/mcs/class/System.Net/Assembly/AssemblyInfo.cs b/mcs/class/System.Net/Assembly/AssemblyInfo.cs
index 85396e8a834..249f6ebf8f6 100644
--- a/mcs/class/System.Net/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Net/Assembly/AssemblyInfo.cs
@@ -59,12 +59,8 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System.Windows, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Windows.Browser, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
[assembly: InternalsVisibleTo ("System.Xml, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
-#elif NET_4_0
- [assembly: AssemblyKeyFile ("../msfinal.pub")]
- [assembly: AllowPartiallyTrustedCallers]
- [assembly: SecurityCritical]
#else
- [assembly: AssemblyKeyFile ("../ecma.pub")]
+ [assembly: AssemblyKeyFile ("../msfinal.pub")]
[assembly: AllowPartiallyTrustedCallers]
[assembly: SecurityCritical]
#endif
diff --git a/mcs/class/System.Net/Assembly/TypeForwarders.cs b/mcs/class/System.Net/Assembly/TypeForwarders.cs
index d219ffb4a12..01f563043b8 100644
--- a/mcs/class/System.Net/Assembly/TypeForwarders.cs
+++ b/mcs/class/System.Net/Assembly/TypeForwarders.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_0
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Cookie))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.CookieCollection))]
@@ -47,4 +46,3 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkChange))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.NetworkInformation.NetworkInterface))]
-#endif
diff --git a/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
index 856052858a3..fd73dc6f690 100644
--- a/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
@@ -64,14 +64,9 @@ using System.Runtime.InteropServices;
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: SecurityCritical (SecurityCriticalScope.Explicit)]
-#if NET_4_0
// for SyndicationElementExtension
// FIXME: mcs in 2-10 branch breaks System.ServiceModel build on resolving this. So, disabling it so far.
// [assembly: InternalsVisibleTo ("System.ServiceModel, PublicKey=00000000000000000400000000000000")]
-#else
-// for SyndicationElementExtension
-[assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-#endif
#endif
[assembly: ComVisible (false)]
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs
index 60a3e66ba28..5a6dc289028 100644
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs
@@ -32,11 +32,7 @@ using System.Xml;
namespace System.Runtime.Serialization
{
// See http://msdn.microsoft.com/en-us/library/ee358759.aspx
-#if NET_4_0
public
-#else
- internal
-#endif
abstract class DataContractResolver
{
public abstract Type ResolveName (string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver);
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 95e35b0a09f..44b1ae16164 100755
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
+++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
@@ -173,7 +173,6 @@ namespace System.Runtime.Serialization
dataContractSurrogate);
}
-#if NET_4_0
public DataContractSerializer (Type type,
IEnumerable<Type> knownTypes,
int maxObjectsInGraph,
@@ -213,7 +212,6 @@ namespace System.Runtime.Serialization
{
DataContractResolver = dataContractResolver;
}
-#endif
#if NET_4_5
public DataContractSerializer (Type type, DataContractSerializerSettings settings)
@@ -287,11 +285,7 @@ namespace System.Runtime.Serialization
surrogate = dataContractSurrogate;
}
-#if NET_4_0
public
-#else
- internal
-#endif
DataContractResolver DataContractResolver {
get { return resolver; }
private set {
@@ -371,7 +365,6 @@ namespace System.Runtime.Serialization
return ret;
}
-#if NET_4_0
public object ReadObject (XmlDictionaryReader reader, bool verifyObjectName, DataContractResolver resolver)
{
var bak = DataContractResolver;
@@ -382,7 +375,6 @@ namespace System.Runtime.Serialization
DataContractResolver = bak;
}
}
-#endif
// SP1
public override void WriteObject (XmlWriter writer, object graph)
@@ -391,7 +383,6 @@ namespace System.Runtime.Serialization
WriteObject (w, graph);
}
-#if NET_4_0
public void WriteObject (XmlDictionaryWriter writer, object graph, DataContractResolver resolver)
{
var bak = DataContractResolver;
@@ -402,7 +393,6 @@ namespace System.Runtime.Serialization
DataContractResolver = bak;
}
}
-#endif
[MonoTODO ("use DataContractSurrogate")]
/*
diff --git a/mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs b/mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs
index a81061304c1..7584c950143 100644
--- a/mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs
+++ b/mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs
@@ -46,16 +46,7 @@ using Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
-#if NET_4_0
public static class X509Certificate2UI {
-#else
- public sealed class X509Certificate2UI {
-
- // sadly this isn't a static class
- private X509Certificate2UI ()
- {
- }
-#endif
[MonoTODO]
public static void DisplayCertificate (X509Certificate2 certificate)
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
index e45675fe0ef..a3b4163ace9 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -44,4 +43,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
index 4b00a0b3517..6d4ad5e2220 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
index 20d09f20615..42d77283204 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -126,4 +125,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs
index 29c0a5d55b1..a70cfe4695f 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -73,4 +72,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs
index 7292b2cd6cd..a99f8ea5f94 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -44,4 +43,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs
index e6079fb34e5..957899d49da 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -118,4 +117,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs
index 5556659a169..6e77a38aaf0 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -64,4 +63,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs
index 0f0a487bb14..ac6f8a47e04 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
index a509d3c5703..9dbb1ed6071 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -134,4 +133,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs
index c06c53dff15..0fe5d931cb4 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -113,4 +112,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs
index 6ab9dd06dd6..fd172299877 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs
index b5a123387d5..9f610897265 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -87,4 +86,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs
index 62896f256fb..4d89d2801be 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -97,4 +96,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs
index ed3659d289c..56f10ca4215 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -144,4 +143,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs
index 0ef36293594..30de12d357a 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -61,4 +60,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs
index d2576ff0622..2fda823bb11 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -44,4 +43,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs
index cb872d2ead1..5d4fc38d10c 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -66,4 +65,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs
index 8d610eb54c3..264b46d1367 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
index dce09836f27..ad09f0567cb 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -151,4 +150,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
index 11ff428be01..a50c39eb8c5 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -38,4 +37,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
index f627ad1bf38..8ac3d43a3e0 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -159,4 +158,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
index 8c9fee26e5b..26a7377fb95 100644
--- a/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
+++ b/mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
@@ -22,7 +22,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_0
using System;
using System.ComponentModel;
using System.Configuration;
@@ -150,4 +149,3 @@ namespace System.ServiceModel.Discovery.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.cs
index 8bf4c927946..4130275b490 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.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_0
using System;
using System.ComponentModel;
@@ -37,4 +36,3 @@ namespace System.ServiceModel.Configuration
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.cs
index fe02397683c..119df8eacf6 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.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_0
using System;
using System.Collections;
@@ -203,4 +202,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.cs
index 7a5a9ec1600..6b2833bd780 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.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_0
using System;
using System.ComponentModel;
@@ -37,4 +36,3 @@ namespace System.ServiceModel.Configuration
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.cs
index e12f1f0aded..10c5c58d597 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.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_0
using System;
using System.Collections;
@@ -173,4 +172,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
index da9f285b5d6..4787560a341 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
@@ -61,13 +61,11 @@ namespace System.ServiceModel.Description
DefaultOutgoingResponseFormat = WebMessageFormat.Xml;
}
-#if NET_4_0
public virtual bool AutomaticFormatSelectionEnabled { get; set; }
public virtual bool FaultExceptionEnabled { get; set; }
public virtual bool HelpEnabled { get; set; }
-#endif
public virtual WebMessageBodyStyle DefaultBodyStyle { get; set; }
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.cs
index 97d6ca06773..699eb0ac7b8 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.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_0
using System;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
@@ -83,4 +82,3 @@ namespace System.ServiceModel.Description
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.cs
index 4b37bcef639..e89a91df1b5 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.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_0
using System;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
@@ -50,4 +49,3 @@ namespace System.ServiceModel.Description
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.cs
index 9b2a9b63c92..ce1f9469ec0 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.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_0
using System;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
@@ -104,4 +103,3 @@ namespace System.ServiceModel.Description
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
index 81ea8544649..2091b2c7f77 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
@@ -642,16 +642,7 @@ namespace System.ServiceModel.Dispatcher
var ms = Stream as MemoryStream;
if (ms == null) {
ms = new MemoryStream ();
-#if NET_4_0
Stream.CopyTo (ms);
-#else
- byte [] tmp = new byte [0x1000];
- int size;
- do {
- size = Stream.Read (tmp, 0, tmp.Length);
- ms.Write (tmp, 0, size);
- } while (size > 0);
-#endif
this.Stream = ms;
}
return new RawMessageBuffer (ms.ToArray (), headers, properties);
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs
index be64183c576..83a7b3dec7f 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs
@@ -148,7 +148,6 @@ namespace System.ServiceModel.Syndication
{
if (serializer == null)
serializer = new DataContractSerializer (extension.GetType ());
-#if NET_4_0
// FIXME: this is a nasty workaround that mcs somehow fails to resolve InternalVisibleTo(System.ServiceModel) in System.Runtime.Serialization.dll and thus rejects the use of KnownTypeCollection unlike NET_2_0 case (where System.ServiceModel.Web.dll is referenced).
XmlQualifiedName qname = null;
if (name == null || ns == null) {
@@ -160,9 +159,6 @@ namespace System.ServiceModel.Syndication
xr.MoveToContent ();
qname = new XmlQualifiedName (xr.LocalName, xr.NamespaceURI);
}
-#else
- var qname = name == null || ns == null ? KnownTypeCollection.GetStaticQName (extension.GetType ()) : null;
-#endif
this.Name = name ?? qname.Name;
this.Namespace = ns ?? qname.Namespace;
this.extension = extension;
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
index 32d9e3606bf..f7fc5d893aa 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
@@ -89,23 +89,18 @@ namespace System.ServiceModel
}
#if !NET_2_1
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool AllowCookies {
get { return t.AllowCookies; }
set { t.AllowCookies = value; }
}
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool BypassProxyOnLocal {
get { return t.BypassProxyOnLocal; }
set { t.BypassProxyOnLocal = value; }
}
-#if NET_4_0
[MonoTODO]
public bool CrossDomainScriptAccessEnabled { get; set; }
@@ -113,60 +108,45 @@ namespace System.ServiceModel
get { return msgenc.ContentTypeMapper; }
set { msgenc.ContentTypeMapper = value; }
}
-#endif
-#if NET_4_0
[DefaultValue (HostNameComparisonMode.StrongWildcard)]
-#endif
public HostNameComparisonMode HostNameComparisonMode {
get { return t.HostNameComparisonMode; }
set { t.HostNameComparisonMode = value; }
}
-#if NET_4_0
[DefaultValue (0x10000)]
-#endif
public long MaxBufferPoolSize {
get { return t.MaxBufferPoolSize; }
set { t.MaxBufferPoolSize = value; }
}
-#if NET_4_0
[DefaultValue (TransferMode.Buffered)]
-#endif
public TransferMode TransferMode {
get { return t.TransferMode; }
set { t.TransferMode = value; }
}
-#if NET_4_0
[DefaultValue (true)]
-#endif
public bool UseDefaultWebProxy {
get { return t.UseDefaultWebProxy; }
set { t.UseDefaultWebProxy = value; }
}
-#if NET_4_0
[DefaultValue (null)]
-#endif
public Uri ProxyAddress {
get { return t.ProxyAddress; }
set { t.ProxyAddress = value; }
}
#endif
-#if NET_4_0
[DefaultValue (0x80000)]
-#endif
public int MaxBufferSize {
get { return t.MaxBufferSize; }
set { t.MaxBufferSize = value; }
}
-#if NET_4_0
[DefaultValue (0x10000)]
-#endif
public long MaxReceivedMessageSize {
get { return t.MaxReceivedMessageSize; }
set { t.MaxReceivedMessageSize = value; }
@@ -183,13 +163,11 @@ namespace System.ServiceModel
public WebHttpSecurity Security {
get { return security; }
-#if NET_4_0
set {
if (value == null)
throw new ArgumentNullException ("value");
security = value;
}
-#endif
}
public Encoding WriteEncoding {
@@ -210,7 +188,6 @@ namespace System.ServiceModel
get { return receive_synchronously; }
}
-#if NET_4_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
public bool ShouldSerializeReaderQuotas ()
{
@@ -228,6 +205,5 @@ namespace System.ServiceModel
{
return false;
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
index 9485b3ba112..4effb2e71a7 100644
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
+++ b/mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
@@ -31,11 +31,7 @@ namespace System.ServiceModel
{
public sealed class WebHttpSecurity
{
-#if NET_4_0
public WebHttpSecurity ()
-#else
- internal WebHttpSecurity ()
-#endif
{
// there is no public constructor for transport ...
#if !NET_2_1
@@ -50,14 +46,9 @@ namespace System.ServiceModel
set { mode = value; }
}
-#if NET_4_0
public HttpTransportSecurity Transport { get; set; }
-#elif !NET_2_1
- public HttpTransportSecurity Transport { get; private set; }
-#endif
-#if NET_4_0
[EditorBrowsable (EditorBrowsableState.Advanced)]
public bool ShouldSerializeMode ()
{
@@ -69,6 +60,5 @@ namespace System.ServiceModel
{
return false;
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
index 9bf8fad7b16..895062e1b33 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
@@ -30,9 +30,7 @@
namespace System.ServiceModel.Activation
{
-#if NET_4_0
[System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblySystemServiceModel_3_0)]
-#endif
public class ServiceHostFactory : ServiceHostFactoryBase
{
[MonoTODO]
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
index 5f4081bda7c..cb2a163bbe1 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
@@ -82,9 +82,7 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
-#if NET_4_0
set { quotas = value; }
-#endif
}
public override IChannelFactory<TChannel> BuildChannelFactory<TChannel> (
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
index d145ed18e4f..50c27e36b48 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
@@ -38,9 +38,7 @@ namespace System.ServiceModel.Channels
{
internal class HttpChannelFactory<TChannel> : TransportChannelFactoryBase<TChannel>
{
-#if NET_2_1 || NET_4_0
IHttpCookieContainerManager cookie_manager;
-#endif
public HttpChannelFactory (HttpTransportBindingElement source, BindingContext ctx)
: base (source, ctx)
@@ -52,11 +50,9 @@ namespace System.ServiceModel.Channels
MessageEncoder = CreateEncoder<TChannel> (mbe);
continue;
}
-#if NET_2_1 || NET_4_0
var tbe = be as HttpTransportBindingElement;
if (tbe != null)
cookie_manager = tbe.GetProperty<IHttpCookieContainerManager> (ctx);
-#endif
}
if (MessageEncoder == null)
MessageEncoder = new TextMessageEncoder (MessageVersion.Default, Encoding.UTF8);
@@ -109,10 +105,8 @@ namespace System.ServiceModel.Channels
public override T GetProperty<T> ()
{
-#if NET_2_1 || NET_4_0
if (cookie_manager is T)
return (T) (object) cookie_manager;
-#endif
return base.GetProperty<T> ();
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs
index b9dc0ab748d..fece7f3edc5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs
@@ -4,9 +4,7 @@ using System.ServiceModel;
namespace System.ServiceModel.Channels
{
-#if NET_4_0
[Obsolete ("Use AllowCookies.")]
-#endif
public class HttpCookieContainerBindingElement : BindingElement
{
HttpCookieContainerManager manager;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
index 6ebafbd99da..1eed451b7c2 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
@@ -90,12 +90,10 @@ namespace System.ServiceModel.Channels
result.WebRequest = web_request;
web_request.Method = "POST";
web_request.ContentType = Encoder.ContentType;
-#if NET_2_1 || NET_4_0
HttpWebRequest hwr = (web_request as HttpWebRequest);
var cmgr = source.GetProperty<IHttpCookieContainerManager> ();
if (cmgr != null)
hwr.CookieContainer = cmgr.CookieContainer;
-#endif
// client authentication (while SL3 has NetworkCredential class, it is not implemented yet. So, it is non-SL only.)
var httpbe = (HttpTransportBindingElement) source.Transport;
@@ -167,11 +165,9 @@ namespace System.ServiceModel.Channels
case "Expect":
web_request.Expect = hp.Headers [key];
break;
-#if NET_4_0
case "Host":
web_request.Host = hp.Headers [key];
break;
-#endif
//case "If-Modified-Since":
// web_request.IfModifiedSince = hp.Headers [key];
// break;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
index 84388adcb08..ee06d69d499 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
@@ -30,9 +30,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Net;
using System.Net.Security;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
-#endif
using System.ServiceModel.Channels;
#if !NET_2_1
using System.ServiceModel.Channels.Http;
@@ -62,9 +60,7 @@ namespace System.ServiceModel.Channels
AuthenticationSchemes proxy_auth_scheme =
AuthenticationSchemes.Anonymous;
// If you add fields, do not forget them in copy constructor.
-#if NET_4_0
HttpCookieContainerManager cookie_manager;
-#endif
public HttpTransportBindingElement ()
{
@@ -89,88 +85,66 @@ namespace System.ServiceModel.Channels
auth_scheme = other.auth_scheme;
proxy_auth_scheme = other.proxy_auth_scheme;
-#if NET_4_0
DecompressionEnabled = other.DecompressionEnabled;
LegacyExtendedProtectionPolicy = other.LegacyExtendedProtectionPolicy;
ExtendedProtectionPolicy = other.ExtendedProtectionPolicy;
cookie_manager = other.cookie_manager;
-#endif
}
-#if NET_4_0
[DefaultValue (AuthenticationSchemes.Anonymous)]
-#endif
public AuthenticationSchemes AuthenticationScheme {
get { return auth_scheme; }
set { auth_scheme = value; }
}
-#if NET_4_0
[DefaultValue (AuthenticationSchemes.Anonymous)]
-#endif
public AuthenticationSchemes ProxyAuthenticationScheme {
get { return proxy_auth_scheme; }
set { proxy_auth_scheme = value; }
}
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool AllowCookies {
get { return allow_cookies; }
set { allow_cookies = value; }
}
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool BypassProxyOnLocal {
get { return bypass_proxy_on_local; }
set { bypass_proxy_on_local = value; }
}
-#if NET_4_0
[DefaultValue (false)]
[MonoTODO]
public bool DecompressionEnabled { get; set; }
-#endif
-#if NET_4_0
[DefaultValue (HostNameComparisonMode.StrongWildcard)]
-#endif
public HostNameComparisonMode HostNameComparisonMode {
get { return host_cmp_mode; }
set { host_cmp_mode = value; }
}
-#if NET_4_0
[DefaultValue (true)]
-#endif
public bool KeepAliveEnabled {
get { return keep_alive_enabled; }
set { keep_alive_enabled = value; }
}
-#if NET_4_0
[DefaultValue (0x10000)]
-#endif
public int MaxBufferSize {
get { return max_buffer_size; }
set { max_buffer_size = value; }
}
-#if NET_4_0
[DefaultValue (null)]
[TypeConverter (typeof (UriTypeConverter))]
-#endif
public Uri ProxyAddress {
get { return proxy_address; }
set { proxy_address = value; }
}
-#if NET_4_0
[DefaultValue ("")]
-#endif
public string Realm {
get { return realm; }
set { realm = value; }
@@ -180,38 +154,30 @@ namespace System.ServiceModel.Channels
get { return Uri.UriSchemeHttp; }
}
-#if NET_4_0
[DefaultValue (TransferMode.Buffered)]
-#endif
public TransferMode TransferMode {
get { return transfer_mode; }
set { transfer_mode = value; }
}
-#if NET_4_0
[DefaultValue (false)]
-#endif
public bool UnsafeConnectionNtlmAuthentication {
get { return unsafe_ntlm_auth; }
set { unsafe_ntlm_auth = value; }
}
-#if NET_4_0
[DefaultValue (true)]
-#endif
public bool UseDefaultWebProxy {
get { return use_default_proxy; }
set { use_default_proxy = value; }
}
-#if NET_4_0
[Obsolete ("Use ExtendedProtectionPolicy")]
[MonoTODO]
public object LegacyExtendedProtectionPolicy { get; set; }
[MonoTODO]
public ExtendedProtectionPolicy ExtendedProtectionPolicy { get; set; }
-#endif
public override bool CanBuildChannelFactory<TChannel> (
BindingContext context)
@@ -261,7 +227,6 @@ namespace System.ServiceModel.Channels
return (T) (object) new HttpBindingProperties (this);
if (typeof (T) == typeof (TransferMode))
return (T) (object) TransferMode;
-#if NET_4_0
if (typeof(T) == typeof(IHttpCookieContainerManager)) {
if (!AllowCookies)
return null;
@@ -269,7 +234,6 @@ namespace System.ServiceModel.Channels
cookie_manager = new HttpCookieContainerManager ();
return (T) (object) cookie_manager;
}
-#endif
return base.GetProperty<T> (context);
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs
index b14d7a2290b..e016772f0b5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs
@@ -1,4 +1,3 @@
-#if NET_2_1 || NET_4_0
using System;
using System.Net;
@@ -10,4 +9,3 @@ namespace System.ServiceModel.Channels
CookieContainer CookieContainer { get; set; }
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
index 008bcea3e84..91caa49cc37 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
@@ -88,9 +88,7 @@ namespace System.ServiceModel.Channels
public XmlDictionaryReaderQuotas ReaderQuotas {
get { return quotas; }
-#if NET_4_0
set { quotas = value; }
-#endif
}
public Encoding WriteEncoding {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs
index 3ca509187b7..5bdd0c53ef4 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs
@@ -68,10 +68,8 @@ namespace System.ServiceModel.Configuration
static ConfigurationProperty headers;
static ConfigurationProperty identity;
static ConfigurationProperty name;
-#if NET_4_0
static ConfigurationProperty endpoint_configuration;
static ConfigurationProperty kind;
-#endif
static ChannelEndpointElement ()
{
@@ -108,10 +106,8 @@ namespace System.ServiceModel.Configuration
typeof (string), "", new StringConverter (), null,
ConfigurationPropertyOptions.IsKey);
-#if NET_4_0
endpoint_configuration = new ConfigurationProperty ("endpointConfiguration", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
kind = new ConfigurationProperty ("kind", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
-#endif
properties.Add (address);
properties.Add (behavior_configuration);
@@ -122,10 +118,8 @@ namespace System.ServiceModel.Configuration
properties.Add (identity);
properties.Add (name);
-#if NET_4_0
properties.Add (endpoint_configuration);
properties.Add (kind);
-#endif
}
public ChannelEndpointElement ()
@@ -211,7 +205,6 @@ namespace System.ServiceModel.Configuration
set { base [name] = value; }
}
-#if NET_4_0
[StringValidator (MinLength = 0)]
[ConfigurationProperty ("endpointConfiguration", DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
public string EndpointConfiguration {
@@ -225,7 +218,6 @@ namespace System.ServiceModel.Configuration
get { return (string) base [kind]; }
set { base [kind] = value; }
}
-#endif
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
index 3189ae80202..623743d0c7c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
@@ -77,7 +77,6 @@ namespace System.ServiceModel.Configuration
get { return (ExtensionsSection) GetSection ("system.serviceModel/extensions"); }
}
-#if NET_4_0
public static ProtocolMappingSection ProtocolMappingSection {
get {
return (ProtocolMappingSection) GetSection ("system.serviceModel/protocolMapping");
@@ -89,7 +88,6 @@ namespace System.ServiceModel.Configuration
return (StandardEndpointsSection) GetSection ("system.serviceModel/standardEndpoints");
}
}
-#endif
public static Binding CreateBinding (string binding, string bindingConfiguration)
{
@@ -124,9 +122,7 @@ namespace System.ServiceModel.Configuration
if (cached_assemblies.Contains (ass))
continue;
-#if NET_4_0
if (!ass.IsDynamic)
-#endif
cached_assemblies.Add (ass);
foreach (var t in ass.GetTypes ()) {
@@ -151,7 +147,6 @@ namespace System.ServiceModel.Configuration
return null;
}
-#if NET_4_0
public static Binding GetBindingByProtocolMapping (Uri address)
{
ProtocolMappingElement el = ConfigUtil.ProtocolMappingSection.ProtocolMappingCollection [address.Scheme];
@@ -207,7 +202,6 @@ namespace System.ServiceModel.Configuration
return inst;
}
-#endif
public static KeyedByTypeCollection<IEndpointBehavior> CreateEndpointBehaviors (string bindingConfiguration)
{
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs
index 409acc2cddd..4fbc78e56ba 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs
@@ -59,10 +59,8 @@ namespace System.ServiceModel.Configuration
{
// Static Fields
static ConfigurationPropertyCollection properties;
-#if NET_4_0
static ConfigurationProperty end_to_end_tracing;
static ConfigurationProperty etw_provider_id;
-#endif
static ConfigurationProperty message_logging;
static ConfigurationProperty performance_counters;
static ConfigurationProperty performance_counter_enabled;
@@ -71,11 +69,9 @@ namespace System.ServiceModel.Configuration
static DiagnosticSection ()
{
properties = new ConfigurationPropertyCollection ();
-#if NET_4_0
end_to_end_tracing = new ConfigurationProperty ("endToEndTracing", typeof (EndToEndTracingElement), null, null, null, ConfigurationPropertyOptions.None);
etw_provider_id = new ConfigurationProperty ("etwProviderId", typeof (string), null, null, null, ConfigurationPropertyOptions.None);
-#endif
message_logging = new ConfigurationProperty ("messageLogging", typeof (MessageLoggingElement), null, null, null, ConfigurationPropertyOptions.None);
performance_counters = new ConfigurationProperty ("performanceCounters", typeof (PerformanceCounterScope), "Off", null, null, ConfigurationPropertyOptions.None);
@@ -85,10 +81,8 @@ namespace System.ServiceModel.Configuration
wmi_provider_enabled = new ConfigurationProperty ("wmiProviderEnabled",
typeof (bool), "false", new BooleanConverter (), null, ConfigurationPropertyOptions.None);
-#if NET_4_0
properties.Add (end_to_end_tracing);
properties.Add (etw_provider_id);
-#endif
properties.Add (message_logging);
properties.Add (performance_counters);
properties.Add (performance_counter_enabled);
@@ -102,7 +96,6 @@ namespace System.ServiceModel.Configuration
// Properties
-#if NET_4_0
[ConfigurationProperty ("endToEndTracing", Options = ConfigurationPropertyOptions.None)]
public EndToEndTracingElement EndToEndTracing {
get { return (EndToEndTracingElement) base [end_to_end_tracing]; }
@@ -114,7 +107,6 @@ namespace System.ServiceModel.Configuration
get { return (string) base [etw_provider_id]; }
set { base [etw_provider_id] = value; }
}
-#endif
[ConfigurationProperty ("messageLogging",
Options = ConfigurationPropertyOptions.None)]
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs
index f4defed57e5..a7b8448f12b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs
@@ -1,4 +1,3 @@
-#if NET_4_0
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
@@ -111,4 +110,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs
index 91bc13bec8b..0ed2ed6290d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -79,4 +78,3 @@ namespace System.ServiceModel.Configuration
protected internal abstract bool TryAdd (string name, ServiceEndpoint endpoint, ConfigurationType config);
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs
index 0fd02c33957..3997993b641 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs
@@ -79,13 +79,11 @@ namespace System.ServiceModel.Configuration
get { return (ExtensionElementCollection) base ["bindingExtensions"]; }
}
-#if NET_4_0
[ConfigurationProperty ("endpointExtensions",
Options = ConfigurationPropertyOptions.None)]
public ExtensionElementCollection EndpointExtensions {
get { return (ExtensionElementCollection) base ["endpointExtensions"]; }
}
-#endif
protected override ConfigurationPropertyCollection Properties {
get {
@@ -94,9 +92,7 @@ namespace System.ServiceModel.Configuration
_properties.Add (new ConfigurationProperty ("behaviorExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("bindingElementExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("bindingExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
-#if NET_4_0
_properties.Add (new ConfigurationProperty ("endpointExtensions", typeof (ExtensionElementCollection), null, null, null, ConfigurationPropertyOptions.None));
-#endif
}
return _properties;
}
@@ -106,9 +102,7 @@ namespace System.ServiceModel.Configuration
InitializeBehaviorExtensionsDefault ();
InitializeBindingElementExtensionsDefault ();
InitializeBindingExtensionsDefault ();
-#if NET_4_0
InitializeEndpointExtensionsDefault ();
-#endif
}
void InitializeBindingExtensionsDefault () {
@@ -171,11 +165,9 @@ namespace System.ServiceModel.Configuration
BehaviorExtensions.Add (new ExtensionElement ("transactedBatching", typeof (TransactedBatchingElement).AssemblyQualifiedName));
}
-#if NET_4_0
void InitializeEndpointExtensionsDefault () {
EndpointExtensions.Add (new ExtensionElement ("mexEndpoint", typeof (ServiceMetadataEndpointCollectionElement).AssemblyQualifiedName));
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs
index 7ab8f4eed59..a7d0a61f272 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs
@@ -35,10 +35,8 @@ using System.Configuration;
using System.Net;
using System.Net.Security;
using System.Reflection;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
using System.Security.Authentication.ExtendedProtection.Configuration;
-#endif
using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.IdentityModel.Claims;
@@ -142,16 +140,13 @@ namespace System.ServiceModel.Configuration
_properties.Add (new ConfigurationProperty ("transferMode", typeof (TransferMode), "Buffered", null, null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("unsafeConnectionNtlmAuthentication", typeof (bool), "false", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("useDefaultWebProxy", typeof (bool), "true", new BooleanConverter (), null, ConfigurationPropertyOptions.None));
-#if NET_4_0
_properties.Add (new ConfigurationProperty ("decompressionEnabled", typeof (bool), false, new BooleanConverter (), null, ConfigurationPropertyOptions.None));
_properties.Add (new ConfigurationProperty ("extendedProtectionPolicy", typeof (ExtendedProtectionPolicyElement), null, new ExtendedProtectionPolicyTypeConverter (), null, ConfigurationPropertyOptions.None));
-#endif
}
return _properties;
}
}
-#if NET_4_0
[ConfigurationProperty ("decompressionEnabled",
Options = ConfigurationPropertyOptions.None)]
public bool DecompressionEnabled {
@@ -165,7 +160,6 @@ namespace System.ServiceModel.Configuration
get { return (ExtendedProtectionPolicyElement) base ["extendedProtectionPolicy"]; }
set { base ["extendedProtectionPolicy"] = value; }
}
-#endif
[ConfigurationProperty ("proxyAddress",
Options = ConfigurationPropertyOptions.None,
@@ -234,11 +228,9 @@ namespace System.ServiceModel.Configuration
b.TransferMode = TransferMode;
b.UnsafeConnectionNtlmAuthentication = UnsafeConnectionNtlmAuthentication;
b.UseDefaultWebProxy = UseDefaultWebProxy;
-#if NET_4_0
b.DecompressionEnabled = DecompressionEnabled;
// FIXME: enable this.
//b.ExtendedProtectionPolicy = ExtendedProtectionPolicy.BuildPolicy ();
-#endif
}
public override void CopyFrom (ServiceModelExtensionElement from)
@@ -257,7 +249,6 @@ namespace System.ServiceModel.Configuration
TransferMode = e.TransferMode;
UnsafeConnectionNtlmAuthentication = e.UnsafeConnectionNtlmAuthentication;
UseDefaultWebProxy = e.UseDefaultWebProxy;
-#if NET_4_0
DecompressionEnabled = e.DecompressionEnabled;
// FIXME: enable this.
/*
@@ -265,7 +256,6 @@ namespace System.ServiceModel.Configuration
foreach (var sne in ExtendedProtectionPolicy.CustomServiceNames)
ExtendedProtectionPolicy.CustomServiceNames.Add (sne);
*/
-#endif
}
protected override TransportBindingElement CreateDefaultBindingElement ()
@@ -289,7 +279,6 @@ namespace System.ServiceModel.Configuration
TransferMode = b.TransferMode;
UnsafeConnectionNtlmAuthentication = b.UnsafeConnectionNtlmAuthentication;
UseDefaultWebProxy = b.UseDefaultWebProxy;
-#if NET_4_0
DecompressionEnabled = b.DecompressionEnabled;
// FIXME: enable this.
/*
@@ -297,7 +286,6 @@ namespace System.ServiceModel.Configuration
foreach (var sn in b.ExtendedProtectionPolicy.CustomServiceNames)
ExtendedProtectionPolicy.CustomServiceNames.Add (new ServiceNameElement () { Name = sn.ToString () });
*/
-#endif
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs
index 55f85396c82..aaacef3525e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs
@@ -35,10 +35,8 @@ using System.Configuration;
using System.Net;
using System.Net.Security;
using System.Reflection;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
using System.Security.Authentication.ExtendedProtection.Configuration;
-#endif
using System.Security.Cryptography.X509Certificates;
using System.Security.Principal;
using System.IdentityModel.Claims;
@@ -84,18 +82,14 @@ namespace System.ServiceModel.Configuration
typeof (string), "", new StringConverter (), null,
ConfigurationPropertyOptions.None);
-#if NET_4_0
extended_protection_policy = new ConfigurationProperty ("extendedProtectionPolicy",
typeof (ExtendedProtectionPolicyElement), null, new ExtendedProtectionPolicyTypeConverter (), null,
ConfigurationPropertyOptions.None);
-#endif
properties.Add (client_credential_type);
properties.Add (proxy_credential_type);
properties.Add (realm);
-#if NET_4_0
properties.Add (extended_protection_policy);
-#endif
}
public HttpTransportSecurityElement ()
@@ -113,14 +107,12 @@ namespace System.ServiceModel.Configuration
set { base [client_credential_type] = value; }
}
-#if NET_4_0
[ConfigurationProperty ("extendedProtectionPolicy",
Options = ConfigurationPropertyOptions.None)]
public ExtendedProtectionPolicyElement extendedProtectionPolicy {
get { return (ExtendedProtectionPolicyElement) base [extended_protection_policy]; }
set { base [extended_protection_policy] = value; }
}
-#endif
protected override ConfigurationPropertyCollection Properties {
get { return properties; }
@@ -150,10 +142,8 @@ namespace System.ServiceModel.Configuration
security.ClientCredentialType = ClientCredentialType;
security.ProxyCredentialType = ProxyCredentialType;
security.Realm = Realm;
-#if NET_4_0
// FIXME: enable this
// security.ExtendedProtectionPolicy = ExtendedProtectionPolicy.BuildPolicy ();
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs
index 7f1ea7a10ea..2982bcfc1fe 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs
@@ -122,7 +122,6 @@ namespace System.ServiceModel.Configuration
set { base [log_entire_message] = value; }
}
-#if NET_4_0
[ConfigurationProperty ("logKnownPii",
Options = ConfigurationPropertyOptions.None,
DefaultValue = false)]
@@ -130,7 +129,6 @@ namespace System.ServiceModel.Configuration
get { return (bool) base [log_known_pii]; }
set { base [log_known_pii] = value; }
}
-#endif
[ConfigurationProperty ("logMalformedMessages",
Options = ConfigurationPropertyOptions.None,
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs
index 1ead2f89dc8..9ef944dc3f9 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs
@@ -58,11 +58,7 @@ namespace System.ServiceModel.Configuration
: ServiceModelExtensionCollectionElement<TServiceModelExtensionElement>, ICollection<TServiceModelExtensionElement>, IEnumerable<TServiceModelExtensionElement>, IEnumerable
where TServiceModelExtensionElement : ServiceModelExtensionElement
{
-#if NET_4_0
const int minNameLength = 0;
-#else
- const int minNameLength = 1;
-#endif
ConfigurationPropertyCollection _properties;
internal NamedServiceModelExtensionCollectionElement ()
@@ -71,11 +67,7 @@ namespace System.ServiceModel.Configuration
// Properties
-#if NET_4_0
[StringValidator ( MinLength = 0, MaxLength = int.MaxValue, InvalidCharacters = null)]
-#else
- [StringValidator ( MinLength = 1, MaxLength = int.MaxValue, InvalidCharacters = null)]
-#endif
[ConfigurationProperty ("name",
Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey,
IsRequired = true,
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs
index 05b36bc047a..58e7be10ec5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -109,4 +108,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs
index d4843c45647..093ea28a829 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -69,4 +68,3 @@ namespace System.ServiceModel.Configuration
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.cs
index 66a8082dbbd..f6c21fe2eb3 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.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_0
using System;
using System.Collections;
@@ -90,4 +89,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs
index b9d6d2da833..98dca152f4a 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs
@@ -82,7 +82,6 @@ namespace System.ServiceModel.Configuration
XmlReader reader, bool serializeCollectionKey) {
base.DeserializeElement (reader, serializeCollectionKey);
}
-#if NET_4_0
protected override void BaseAdd (ConfigurationElement element)
{
var sbe = element as ServiceBehaviorElement;
@@ -91,7 +90,6 @@ namespace System.ServiceModel.Configuration
base.BaseAdd (sbe);
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs
index b44abe84190..952ba7a0a9e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs
@@ -71,11 +71,9 @@ namespace System.ServiceModel.Configuration
static ConfigurationProperty listen_uri;
static ConfigurationProperty listen_uri_mode;
static ConfigurationProperty name;
-#if NET_4_0
static ConfigurationProperty endpoint_configuration;
static ConfigurationProperty is_system_endpoint;
static ConfigurationProperty kind;
-#endif
static ServiceEndpointElement ()
{
@@ -128,11 +126,9 @@ namespace System.ServiceModel.Configuration
typeof (string), "", new StringConverter (), new StringValidator (0, int.MaxValue, null),
ConfigurationPropertyOptions.None);
-#if NET_4_0
endpoint_configuration = new ConfigurationProperty ("endpointConfiguration", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
is_system_endpoint = new ConfigurationProperty ("isSystemEndpoint", typeof (bool), false, null, null, ConfigurationPropertyOptions.None);
kind = new ConfigurationProperty ("kind", typeof (string), "", null, new StringValidator (0), ConfigurationPropertyOptions.IsKey);
-#endif
properties.Add (address);
properties.Add (behavior_configuration);
@@ -147,11 +143,9 @@ namespace System.ServiceModel.Configuration
properties.Add (listen_uri_mode);
properties.Add (name);
-#if NET_4_0
properties.Add (endpoint_configuration);
properties.Add (is_system_endpoint);
properties.Add (kind);
-#endif
}
public ServiceEndpointElement ()
@@ -253,7 +247,6 @@ namespace System.ServiceModel.Configuration
get { return (IdentityElement) base [identity]; }
}
-#if NET_4_0
[StringValidator (MinLength = 0)]
[ConfigurationProperty ("endpointConfiguration", DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
public string EndpointConfiguration {
@@ -273,7 +266,6 @@ namespace System.ServiceModel.Configuration
get { return (string) base [kind]; }
set { base [kind] = value; }
}
-#endif
[ConfigurationProperty ("listenUri",
Options = ConfigurationPropertyOptions.None,
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs
index 3d8a380b37a..911cdd35cfb 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs
@@ -76,10 +76,8 @@ namespace System.ServiceModel.Configuration
GetHashCode (el.BindingConfiguration) +
GetHashCode (el.BindingName) +
GetHashCode (el.BindingNamespace) +
-#if NET_4_0
GetHashCode (el.EndpointConfiguration) +
GetHashCode (el.Kind) +
-#endif
GetHashCode (el.Contract);
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.cs
index 90ee4341543..1a994ec9075 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.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_0
using System;
using System.ComponentModel;
@@ -37,4 +36,3 @@ namespace System.ServiceModel.Configuration
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.cs
index 1e1be8d1742..1c8cd7a9d23 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.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_0
using System;
using System.Collections;
@@ -98,4 +97,3 @@ namespace System.ServiceModel.Configuration
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs
index 87dfb0a6a14..4c9d5d2f45e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs
@@ -79,7 +79,6 @@ namespace System.ServiceModel.Configuration
get { return (ServicesSection) Sections ["services"]; }
}
-#if NET_4_0
public ProtocolMappingSection ProtocolMapping {
get { return (ProtocolMappingSection) Sections ["protocolMapping"]; }
}
@@ -87,6 +86,5 @@ namespace System.ServiceModel.Configuration
public StandardEndpointsSection StandardEndpoints {
get { return (StandardEndpointsSection) Sections ["standardEndpoints"]; }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs
index 71b983a58b0..32946fe8993 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -126,4 +125,3 @@ namespace System.ServiceModel.Configuration
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs
index 00eca499191..559481da6b7 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -127,4 +126,3 @@ namespace System.ServiceModel.Configuration
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs
index 83b46e2aaf8..8ec996f042c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -74,4 +73,3 @@ namespace System.ServiceModel.Configuration
}
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs
index 3e6537f5576..2a82a49ac5f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.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_0
using System;
using System.Collections;
@@ -95,13 +94,11 @@ namespace System.ServiceModel.Configuration
}
}
-#if NET_4_0
internal ConfigurationPropertyCollection PropertiesInternal {
get {
return Properties;
}
}
-#endif
public static StandardEndpointsSection GetSection (System.Configuration.Configuration config) {
ServiceModelSectionGroup sm = ServiceModelSectionGroup.GetSectionGroup (config);
@@ -125,4 +122,3 @@ namespace System.ServiceModel.Configuration
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
index 05d14aae331..6ff63654326 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
@@ -59,9 +59,7 @@ namespace System.ServiceModel.Description
get { return format; }
}
-#if NET_4_0
public DataContractResolver DataContractResolver { get; set; }
-#endif
public bool IgnoreExtensionDataObject { get; set; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
index 259670f53cd..708faf24509 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
@@ -79,13 +79,11 @@ namespace System.ServiceModel.Description
public ContractDescription Contract {
get { return contract; }
-#if NET_4_0
set {
if (value == null)
throw new ArgumentNullException ("value");
contract = value;
}
-#endif
}
public EndpointAddress Address {
@@ -98,11 +96,7 @@ namespace System.ServiceModel.Description
set { binding = value; }
}
-#if NET_4_0
public
-#else
- internal
-#endif
bool IsSystemEndpoint { get; set; }
public Uri ListenUri {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.cs
index 6abcf13c18c..5e9b0e050b5 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.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_0
using System;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
@@ -50,4 +49,3 @@ namespace System.ServiceModel.Description
}
}
-#endif
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
index 9d96aaa3d46..190bc0ea247 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
@@ -39,9 +39,7 @@ namespace System.ServiceModel.Diagnostics
#if !NET_2_1
var e = ConfigUtil.DiagnosticSection.MessageLogging;
LogEntireMessage = e.LogEntireMessage;
-#if NET_4_0
LogKnownPii = e.LogKnownPii;
-#endif
LogMalformedMessages = e.LogMalformedMessages;
LogMessagesAtServiceLevel = e.LogMessagesAtServiceLevel;
LogMessagesAtTransportLevel = e.LogMessagesAtTransportLevel;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
index 2ad7f63d9f7..494195bd4b6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
@@ -114,15 +114,11 @@ namespace System.ServiceModel.Dispatcher
set { filter_priority = value; }
}
-#if NET_4_0
public bool IsSystemEndpoint { get; private set; }
-#endif
internal void InitializeServiceEndpoint (bool isCallback, Type serviceType, ServiceEndpoint se)
{
-#if NET_4_0
IsSystemEndpoint = se.IsSystemEndpoint;
-#endif
this.ContractFilter = GetContractFilter (se.Contract, isCallback);
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
index 4feebc7a115..d74ec8bbc9e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
@@ -287,9 +287,7 @@ namespace System.ServiceModel
h.ProxyAddress = ProxyAddress;
h.UseDefaultWebProxy = UseDefaultWebProxy;
h.TransferMode = TransferMode;
-#if NET_4_0
h.ExtendedProtectionPolicy = Security.Transport.ExtendedProtectionPolicy;
-#endif
#if !NET_2_1 || MOBILE
switch (Security.Transport.ClientCredentialType) {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
index 05235edcb9b..c671f1e7975 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
@@ -181,9 +181,7 @@ namespace System.ServiceModel
h.ProxyAddress = ProxyAddress;
h.UseDefaultWebProxy = UseDefaultWebProxy;
h.TransferMode = TransferMode;
-#if NET_4_0
h.ExtendedProtectionPolicy = Security.Transport.ExtendedProtectionPolicy;
-#endif
switch (Security.Transport.ClientCredentialType) {
case HttpClientCredentialType.Basic:
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs
index 889f9e74c40..ba1232250e4 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs
@@ -33,14 +33,12 @@ namespace System.ServiceModel
{
public sealed class BasicHttpSecurity
{
-#if NET_4_0
public BasicHttpSecurity ()
{
this.mode = BasicHttpSecurityMode.None;
this.message = new BasicHttpMessageSecurity ();
this.transport = new HttpTransportSecurity ();
}
-#endif
internal BasicHttpSecurity (BasicHttpSecurityMode mode)
{
@@ -55,9 +53,7 @@ namespace System.ServiceModel
public BasicHttpMessageSecurity Message {
get { return message; }
-#if NET_4_0
set { message = value; }
-#endif
}
public BasicHttpSecurityMode Mode {
@@ -67,9 +63,7 @@ namespace System.ServiceModel
public HttpTransportSecurity Transport {
get { return transport; }
-#if NET_4_0
set { transport = value; }
-#endif
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
index 1042cbc9f30..1c65906f6be 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
@@ -153,9 +153,7 @@ namespace System.ServiceModel
h.UseDefaultWebProxy = UseDefaultWebProxy;
h.TransferMode = TransferMode;
-#if NET_4_0
h.ExtendedProtectionPolicy = Security.Transport.ExtendedProtectionPolicy;
-#endif
switch (Security.Transport.ClientCredentialType) {
case HttpClientCredentialType.Basic:
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
index 442a33113f5..6835651516e 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
@@ -130,7 +130,6 @@ namespace System.ServiceModel
if (endpoint == null)
throw new InvalidOperationException (String.Format ("Client endpoint configuration '{0}' was not found in {1} endpoints.", endpointConfig, client.Endpoints.Count));
-#if NET_4_0
var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
var contractType = ConfigUtil.GetTypeFromConfigString (endpoint.Contract, NamedConfigCategory.Contract);
if (contractType == null)
@@ -151,7 +150,6 @@ namespace System.ServiceModel
if (binding == null && endpoint.Address != null) // look for protocol mapping
Endpoint.Binding = ConfigUtil.GetBindingByProtocolMapping (endpoint.Address);
}
-#endif
if (Endpoint.Binding == null)
Endpoint.Binding = ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
if (Endpoint.Address == null)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
index 07952e04f14..09f72793c27 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
@@ -129,7 +129,6 @@ namespace System.ServiceModel
Initialize (instance, binding, remoteAddress);
}
-#if NET_4_0
protected ClientBase (ServiceEndpoint endpoint)
: this (null, endpoint)
{
@@ -139,7 +138,6 @@ namespace System.ServiceModel
: this (instance, new ChannelFactory<TChannel> (endpoint))
{
}
-#endif
internal ClientBase (ChannelFactory<TChannel> factory)
: this (null, factory)
@@ -353,11 +351,7 @@ namespace System.ServiceModel
public object [] Results { get; private set; }
}
-#if NET_4_0
protected internal
-#else
- internal
-#endif
class ChannelBase<T> : IClientChannel, IOutputChannel, IRequestChannel where T : class
{
ServiceEndpoint endpoint;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
index 0eaf6c0e1ac..f437b1a495b 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
@@ -92,7 +92,6 @@ namespace System.ServiceModel
{
}
-#if NET_4_0
protected DuplexClientBase (object instance, ServiceEndpoint endpoint)
: this (new InstanceContext (instance), endpoint)
{
@@ -102,7 +101,6 @@ namespace System.ServiceModel
: base (instance, endpoint)
{
}
-#endif
public IDuplexContextChannel InnerDuplexChannel {
get { return (IDuplexContextChannel) base.InnerChannel; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs
index 7e6c0fbf82e..0ad486cb097 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs
@@ -26,9 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
-#endif
using System.ServiceModel.Security;
namespace System.ServiceModel
@@ -39,11 +37,7 @@ namespace System.ServiceModel
HttpProxyCredentialType proxy;
string realm = String.Empty;
-#if NET_4_0
public
-#else
- internal
-#endif
HttpTransportSecurity ()
{
}
@@ -63,9 +57,7 @@ namespace System.ServiceModel
set { realm = value; }
}
-#if NET_4_0
[MonoTODO]
public ExtendedProtectionPolicy ExtendedProtectionPolicy { get; set; }
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs b/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
index f9e112d1d4b..f0bf2b4eb8f 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
@@ -237,12 +237,10 @@ namespace System.ServiceModel
{
}
-#if NET_4_0
[MonoTODO]
public SynchronizationContext SynchronizationContext {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
index 9e7970fc021..4e1d5c4dfd0 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
@@ -32,9 +32,7 @@ using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
using System.ServiceModel.Security.Tokens;
-#if NET_4_0
using System.ServiceModel.Configuration;
-#endif
using System.Text;
using System.Xml;
@@ -67,7 +65,6 @@ namespace System.ServiceModel
transport = new TcpTransportBindingElement ();
}
-#if NET_4_0
public NetTcpBinding (string configurationName)
: this ()
{
@@ -75,7 +72,6 @@ namespace System.ServiceModel
var el = bindingsSection.NetTcpBinding.Bindings [configurationName];
el.ApplyConfiguration (this);
}
-#endif
internal NetTcpBinding (TcpTransportBindingElement transport,
NetTcpSecurity security,
@@ -133,9 +129,7 @@ namespace System.ServiceModel
public NetTcpSecurity Security {
get { return security; }
-#if NET_4_0
set { security = value; }
-#endif
}
public EnvelopeVersion EnvelopeVersion {
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
index 54c4ac9eb8d..26adc885cdd 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
@@ -33,12 +33,10 @@ namespace System.ServiceModel
{
public sealed class NetTcpSecurity
{
-#if NET_4_0
public NetTcpSecurity ()
: this (SecurityMode.Transport)
{
}
-#endif
internal NetTcpSecurity (SecurityMode mode)
{
@@ -53,9 +51,7 @@ namespace System.ServiceModel
public MessageSecurityOverTcp Message {
get { return message; }
-#if NET_4_0
set { message = value; }
-#endif
}
public SecurityMode Mode {
@@ -65,9 +61,7 @@ namespace System.ServiceModel
public TcpTransportSecurity Transport {
get { return transport; }
-#if NET_4_0
set { transport = value; }
-#endif
}
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
index 9d5524913f9..29a3d4aba6d 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
@@ -203,7 +203,6 @@ namespace System.ServiceModel
return AddServiceEndpointCore (cd, binding, ea, listenUri);
}
-#if NET_4_0
public virtual void AddServiceEndpoint (ServiceEndpoint endpoint)
{
if (endpoint == null)
@@ -224,7 +223,6 @@ namespace System.ServiceModel
Description.Endpoints.Add (endpoint);
}
-#endif
Type PopulateType (string typeName)
{
@@ -323,10 +321,8 @@ namespace System.ServiceModel
if (service != null)
LoadConfigurationSection (service);
-#if NET_4_0
// simplified configuration
AddServiceBehaviors (String.Empty, false);
-#endif
// TODO: consider commonBehaviors here
// ensure ServiceAuthorizationBehavior
@@ -346,13 +342,8 @@ namespace System.ServiceModel
void AddServiceBehaviors (string configurationName, bool throwIfNotFound)
{
-#if NET_4_0
if (configurationName == null)
return;
-#else
- if (String.IsNullOrEmpty (configurationName))
- return;
-#endif
ServiceBehaviorElement behavior = ConfigUtil.BehaviorsSection.ServiceBehaviors [configurationName];
if (behavior == null) {
if (throwIfNotFound)
@@ -384,7 +375,6 @@ namespace System.ServiceModel
foreach (ServiceEndpointElement endpoint in service.Endpoints) {
ServiceEndpoint se;
-#if NET_4_0
var binding = String.IsNullOrEmpty (endpoint.Binding) ? null : ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
if (!String.IsNullOrEmpty (endpoint.Kind)) {
@@ -404,10 +394,6 @@ namespace System.ServiceModel
binding = ConfigUtil.GetBindingByProtocolMapping (endpoint.Address);
se = AddServiceEndpoint (endpoint.Contract, binding, endpoint.Address);
}
-#else
- var binding = ConfigUtil.CreateBinding (endpoint.Binding, endpoint.BindingConfiguration);
- se = AddServiceEndpoint (endpoint.Contract, binding, endpoint.Address);
-#endif
// endpoint behaviors
EndpointBehaviorElement epbehavior = ConfigUtil.BehaviorsSection.EndpointBehaviors [endpoint.BehaviorConfiguration];
@@ -488,7 +474,6 @@ namespace System.ServiceModel
foreach (ServiceEndpoint endPoint in Description.Endpoints)
endPoint.Validate ();
-#if NET_4_0
// In 4.0, it seems that if there is no configured ServiceEndpoint, infer them from the service type.
if (Description.Endpoints.Count == 0) {
foreach (Type iface in Description.ServiceType.GetInterfaces ())
@@ -502,7 +487,6 @@ namespace System.ServiceModel
AddServiceEndpoint (iface.FullName, binding, baddr);
}
}
-#endif
if (Description.Endpoints.FirstOrDefault (e => e.Contract != mex_contract && !e.IsSystemEndpoint) == null)
throw new InvalidOperationException ("The ServiceHost must have at least one application endpoint (that does not include metadata exchange endpoint) defined by either configuration, behaviors or call to AddServiceEndpoint methods.");
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
index ae6d80d252c..e41c00bb197 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
@@ -30,9 +30,7 @@
namespace System.ServiceModel {
-#if NET_4_0
[System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblySystemServiceModel_3_0)]
-#endif
public static class ServiceHostingEnvironment
{
internal static bool InAspNet { get; set; }
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
index 2964e9f1a2e..d93be038818 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
@@ -47,12 +47,10 @@ namespace System.ServiceModel
{
}
-#if NET_4_0
[MonoTODO]
public static TimeSpan SpnLookupTime {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs b/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs
index fed1f8e9c0e..6d8a1d5aff2 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs
@@ -34,11 +34,7 @@ namespace System.ServiceModel
[MonoTODO]
public sealed class TcpTransportSecurity
{
-#if NET_4_0
public
-#else
- internal
-#endif
TcpTransportSecurity ()
{
ClientCredentialType = TcpClientCredentialType.Windows; // huh
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
index ad82f287178..20b4858ae40 100644
--- a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
@@ -48,11 +48,8 @@ namespace System.ServiceProcess
private string[] services_depended_on;
private ServiceStartMode start_type;
private string description;
-#if NET_4_0
private bool delayedAutoStart;
-#endif
-#if NET_4_0
[DefaultValue(false)]
[ServiceProcessDescription("Indicates that the service's start should be delayed after other automatically started services have started.")]
public bool DelayedAutoStart {
@@ -63,7 +60,6 @@ namespace System.ServiceProcess
delayedAutoStart = value;
}
}
-#endif
[ComVisible (false)]
[DefaultValue ("")]
diff --git a/mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs
index 8055508ca60..b0e5072ddf6 100644
--- a/mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs
@@ -60,15 +60,11 @@ using System.Web;
[assembly: AssemblyKeyFile ("../winfx.pub")]
[assembly: ComVisible (false)]
-#if !NET_4_0
-[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-#endif
[assembly: AllowPartiallyTrustedCallers]
// FIXME: We get collisions with this internalsVisibleTo because of Consts.cs and MonoTodo
//[assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-#if NET_4_0
[assembly: SecurityRules (SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
[assembly: TypeForwardedTo (typeof (System.Web.HttpStaticObjectsCollectionBase))]
[assembly: TypeForwardedTo (typeof (System.Web.HttpStaticObjectsCollectionWrapper))]
@@ -92,4 +88,3 @@ using System.Web;
[assembly: TypeForwardedTo (typeof (System.Web.HttpRequestWrapper))]
[assembly: TypeForwardedTo (typeof (System.Web.HttpResponseWrapper))]
[assembly: TypeForwardedTo (typeof (System.Web.HttpResponseBase))]
-#endif
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs
index f0c6bd07c55..6310cc0d2fb 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs
@@ -39,9 +39,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpApplicationStateBase : NameObjectCollectionBase, ICollection, IEnumerable
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs
index c9c5a6732bb..d0299ef73fd 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs
@@ -40,9 +40,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpApplicationStateWrapper : HttpApplicationStateBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs
index 2a6376ce3a6..cd9139966f1 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs
@@ -40,9 +40,7 @@ using System.Web.UI;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpBrowserCapabilitiesBase : IFilterResolutionService
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs
index 9185dae33a4..b5cc9638340 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs
@@ -40,9 +40,7 @@ using System.Web.UI;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpBrowserCapabilitiesWrapper : HttpBrowserCapabilitiesBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs
index 6f99f8970ff..70084749325 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs
@@ -38,9 +38,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpCachePolicyBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs
index e604fc7ce0b..c2fad9de494 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs
@@ -38,9 +38,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpCachePolicyWrapper : HttpCachePolicyBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs
index 37235b43f65..f81db297f8d 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs
@@ -40,9 +40,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpContextBase : IServiceProvider
@@ -141,12 +139,10 @@ namespace System.Web
NotImplemented ();
return null;
}
-#if NET_4_0
public virtual void RemapHandler (IHttpHandler handler)
{
NotImplemented ();
}
-#endif
public virtual void RewritePath (string path)
{
NotImplemented ();
@@ -166,11 +162,9 @@ namespace System.Web
{
NotImplemented ();
}
-#if NET_4_0
public virtual void SetSessionStateBehavior (SessionStateBehavior sessionStateBehavior)
{
NotImplemented ();
}
-#endif
}
}
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs
index 6581c0c1f77..64975a813c0 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs
@@ -40,9 +40,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpContextWrapper : HttpContextBase
@@ -187,12 +185,10 @@ namespace System.Web
{
return ((IServiceProvider)w).GetService (serviceType);
}
-#if NET_4_0
public override void RemapHandler (IHttpHandler handler)
{
w.RemapHandler (handler);
}
-#endif
public override void RewritePath (string path)
{
w.RewritePath (path);
@@ -212,11 +208,9 @@ namespace System.Web
{
w.RewritePath (filePath, pathInfo, queryString, setClientFilePath);
}
-#if NET_4_0
public override void SetSessionStateBehavior (SessionStateBehavior sessionStateBehavior)
{
w.SetSessionStateBehavior (sessionStateBehavior);
}
-#endif
}
}
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs
index d542aa33447..bd8c126723d 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs
@@ -39,9 +39,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpFileCollectionBase : NameObjectCollectionBase, ICollection, IEnumerable
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs
index 2ff06735fb7..4c7c919d1e4 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs
@@ -40,9 +40,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpFileCollectionWrapper : HttpFileCollectionBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs
index 96b59dad4df..d5a783b8d09 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs
@@ -38,9 +38,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpPostedFileBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs
index 5aea5a5663a..247b53866a8 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs
@@ -38,9 +38,7 @@ using System.Web.Caching;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpPostedFileWrapper : HttpPostedFileBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
index bf1d6f576aa..d71e791b879 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
@@ -40,16 +40,12 @@ using System.Security.Principal;
using System.Text;
using System.Web.Caching;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
using System.Web.Routing;
-#endif
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpRequestBase
@@ -94,11 +90,9 @@ namespace System.Web
public virtual string HttpMethod { get { NotImplemented (); return null; } }
public virtual Stream InputStream { get { NotImplemented (); return null; } }
-#if NET_4_0
// LAMESPEC: MSDN says NotImplementedException is thrown only when the request is
// not IIS7WorkerRequest or ISAPIWorkerRequestInProc, but it is thrown always.
public virtual ChannelBinding HttpChannelBinding { get { NotImplemented (); return null; } }
-#endif
public virtual bool IsAuthenticated { get { NotImplemented (); return false; } }
public virtual bool IsLocal { get { NotImplemented (); return false; } }
@@ -126,12 +120,10 @@ namespace System.Web
public virtual string RawUrl { get { NotImplemented (); return null; } }
public virtual string RequestType { get { NotImplemented (); return null; } set { NotImplemented (); } }
-#if NET_4_0
public virtual RequestContext RequestContext {
get { NotImplemented (); return null; }
internal set { NotImplemented (); }
}
-#endif
public virtual NameValueCollection ServerVariables { get { NotImplemented (); return null; } }
public virtual int TotalBytes { get { NotImplemented (); return 0; } }
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
index 197a7abd1c4..e861ce56169 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
@@ -40,16 +40,12 @@ using System.Security.Principal;
using System.Text;
using System.Web.Caching;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
using System.Web.Routing;
-#endif
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpRequestWrapper : HttpRequestBase
@@ -133,11 +129,9 @@ namespace System.Web
public override string HttpMethod {
get { return w.HttpMethod; }
}
-#if NET_4_0
public override ChannelBinding HttpChannelBinding {
get { return w.HttpChannelBinding; }
}
-#endif
public override Stream InputStream {
get { return w.InputStream; }
}
@@ -194,12 +188,10 @@ namespace System.Web
get { return w.RequestType; }
set { w.RequestType = value; }
}
-#if NET_4_0
public override RequestContext RequestContext {
get { return w.RequestContext; }
internal set { w.RequestContext = value; }
}
-#endif
public override NameValueCollection ServerVariables {
get { return w.ServerVariables; }
}
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
index 2bf8ebd2f21..c83060493e3 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
@@ -41,15 +41,11 @@ using System.Text;
using System.Web.Caching;
using System.Threading;
-#if NET_4_0
using System.Web.Routing;
-#endif
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpResponseBase
@@ -254,7 +250,6 @@ namespace System.Web
{
NotImplemented ();
}
-#if NET_4_0
public virtual void RedirectPermanent (string url)
{
NotImplemented ();
@@ -319,7 +314,6 @@ namespace System.Web
{
NotImplemented ();
}
-#endif
public virtual void RemoveOutputCacheItem (string path)
{
NotImplemented ();
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
index adb5f74edd7..93789acbea6 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
@@ -43,9 +43,7 @@ using System.Threading;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpResponseWrapper : HttpResponseBase
@@ -137,9 +135,7 @@ namespace System.Web
public override TextWriter Output {
get { return w.Output; }
-#if NET_4_0
set { w.Output = value; }
-#endif
}
public override Stream OutputStream {
@@ -302,7 +298,6 @@ namespace System.Web
{
w.Redirect (url, endResponse);
}
-#if NET_4_0
public override void RedirectPermanent (string url)
{
w.RedirectPermanent (url);
@@ -317,7 +312,6 @@ namespace System.Web
{
HttpResponse.RemoveOutputCacheItem (path, providerName);
}
-#endif
public override void RemoveOutputCacheItem (string path)
{
HttpResponse.RemoveOutputCacheItem (path);
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs
index 33cd857f8ff..a56c2c148aa 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs
@@ -41,9 +41,7 @@ using System.Web.Profile;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpServerUtilityBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs
index 8fef0a47cff..52fc7a1981d 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs
@@ -41,9 +41,7 @@ using System.Web.Profile;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpServerUtilityWrapper : HttpServerUtilityBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs
index 1c15c2f260b..61edd04b93a 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs
@@ -41,9 +41,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpSessionStateBase : ICollection, IEnumerable
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs
index 149513512d1..563eb0ba09e 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs
@@ -41,9 +41,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpSessionStateWrapper : HttpSessionStateBase
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs
index 9f425977480..ee9b9c2a461 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs
@@ -41,9 +41,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class HttpStaticObjectsCollectionBase : ICollection, IEnumerable
diff --git a/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs b/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs
index 504996807c0..4f33434663c 100644
--- a/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs
+++ b/mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs
@@ -41,9 +41,7 @@ using System.Web.SessionState;
namespace System.Web
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpStaticObjectsCollectionWrapper : HttpStaticObjectsCollectionBase
diff --git a/mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs
index bb2e6ea0784..c7313e561e0 100644
--- a/mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs
@@ -62,6 +62,4 @@ using System.Runtime.Versioning;
[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AllowPartiallyTrustedCallers]
-#if NET_4_0
[assembly: SecurityRules (SecurityRuleSet.Level2, SkipVerificationInFullTrust=true)]
-#endif
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
index 9095cb866d3..ae4272b40e3 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
@@ -133,11 +133,7 @@ namespace System.Web.Script.Serialization
return (T) ConvertToType (obj, typeof (T));
}
-#if NET_4_0
public
-#else
- internal
-#endif
object ConvertToType (object obj, Type targetType)
{
if (obj == null)
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs b/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs
index 7944ff08d64..b63bb72bb8d 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs
@@ -52,22 +52,6 @@ namespace System.Web.UI.WebControls
return base.OnBubbleEvent (source, e);
}
-#if !NET_4_0
- public virtual object DataItem {
- get;
- set;
- }
-
- public virtual int DataItemIndex {
- get;
- private set;
- }
-
- public virtual int DisplayIndex {
- get;
- private set;
- }
-#endif
}
}
#endif
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs b/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs
index c73332b2613..97d411ac39e 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs
@@ -35,9 +35,7 @@ namespace System.Web.UI.WebControls
{
[ToolboxItemAttribute (false)]
public class ListViewItem : Control, INamingContainer
-#if NET_4_0
, IDataItemContainer
-#endif
{
internal ListViewItem ()
: this (ListViewItemType.DataItem)
@@ -65,7 +63,6 @@ namespace System.Web.UI.WebControls
private set;
}
-#if NET_4_0
public virtual object DataItem {
get;
set;
@@ -80,7 +77,6 @@ namespace System.Web.UI.WebControls
get;
protected set;
}
-#endif
}
}
#endif
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs b/mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs
index f0b3e7760f8..0d08402b1ca 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs
@@ -148,14 +148,12 @@ namespace System.Web.UI
entriesCache.InsertOrUpdate ((uint)ret.GetHashCode (), ret, entries, entries);
return ret;
}
-#if NET_4_0
protected internal override bool IsAjaxFrameworkScript (ScriptManager scriptManager)
{
return false;
}
[Obsolete ("Use IsAjaxFrameworkScript(ScriptManager)")]
-#endif
protected internal override bool IsFromSystemWebExtensions ()
{
if (scripts == null || scripts.Count == 0)
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs
index 69641e2c81f..d5534d8e3db 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs
@@ -167,14 +167,12 @@ namespace System.Web.UI
return url;
}
-#if NET_4_0
protected internal override bool IsAjaxFrameworkScript (ScriptManager scriptManager)
{
return false;
}
[Obsolete ("Use IsAjaxFrameworkScript(ScriptManager)")]
-#endif
protected internal override bool IsFromSystemWebExtensions ()
{
return ResolvedAssembly == ThisAssembly;
diff --git a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs
index 1b95a559d36..ef27f6b01b6 100644
--- a/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs
@@ -76,14 +76,12 @@ namespace System.Web.UI
this.NotifyScriptLoaded = true;
this.ScriptMode = ScriptMode.Auto;
}
-#if NET_4_0
protected internal virtual bool IsAjaxFrameworkScript (ScriptManager scriptManager)
{
return false;
}
[Obsolete ("Use IsAjaxFrameworkScript(ScriptManager)")]
-#endif
protected internal abstract bool IsFromSystemWebExtensions ();
protected internal abstract string GetUrl (ScriptManager scriptManager, bool zip);
diff --git a/mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs
index 12d38152640..5487f687a3e 100644
--- a/mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs
@@ -60,15 +60,11 @@ using System.Web.Routing;
[assembly: AssemblyKeyFile ("../winfx.pub")]
[assembly: ComVisible (false)]
-#if !NET_4_0
-[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-#endif
[assembly: AllowPartiallyTrustedCallers]
// FIXME: We get collisions with this internalsVisibleTo because of Consts.cs and MonoTodo
//[assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-#if NET_4_0
[assembly: SecurityRules (SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
[assembly: SecurityTransparent]
[assembly: TypeForwardedToAttribute (typeof (System.Web.Routing.RouteBase))]
@@ -86,4 +82,3 @@ using System.Web.Routing;
[assembly: TypeForwardedToAttribute (typeof (System.Web.Routing.RouteDirection))]
[assembly: TypeForwardedToAttribute (typeof (System.Web.Routing.StopRoutingHandler))]
[assembly: TypeForwardedToAttribute (typeof (System.Web.Routing.RouteValueDictionary))]
-#endif
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs b/mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs
index b8e4d604ed2..c163c73ae9b 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs
@@ -36,9 +36,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class HttpMethodConstraint : IRouteConstraint
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs b/mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs
index b98548c1c33..00118433b47 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs
@@ -34,12 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#else
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public interface IRouteConstraint
{
bool Match (HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection);
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs b/mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs
index 9a1b14a16ab..a9a0d091cf2 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs
@@ -34,12 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#else
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public interface IRouteHandler
{
IHttpHandler GetHttpHandler (RequestContext requestContext);
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs
index b4ac0c209e0..62c6957c7fa 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs
@@ -34,20 +34,16 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class RequestContext
{
-#if NET_4_0
public RequestContext ()
{
HttpContext = null;
RouteData = null;
}
-#endif
public RequestContext (HttpContextBase httpContext, RouteData routeData)
{
if (httpContext == null)
@@ -59,12 +55,7 @@ namespace System.Web.Routing
RouteData = routeData;
}
-#if NET_4_0
public virtual HttpContextBase HttpContext { get; set; }
public virtual RouteData RouteData { get; set; }
-#else
- public HttpContextBase HttpContext { get; private set; }
- public RouteData RouteData { get; private set; }
-#endif
}
}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
index aeb02c319b2..0e284839cde 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
@@ -36,16 +36,12 @@ using System.Globalization;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class Route : RouteBase
{
-#if NET_4_0
static readonly Type httpRequestBaseType = typeof (HttpRequestBase);
-#endif
PatternParser url;
public RouteValueDictionary Constraints { get; set; }
@@ -176,7 +172,6 @@ namespace System.Web.Routing
if (!String.IsNullOrEmpty (v))
return MatchConstraintRegex (v, s);
-#if NET_4_0
else if (reqContext != null) {
RouteData rd = reqContext != null ? reqContext.RouteData : null;
RouteValueDictionary rdValues = rd != null ? rd.Values : null;
@@ -193,7 +188,6 @@ namespace System.Web.Routing
return MatchConstraintRegex (v, s);
}
-#endif
return false;
}
@@ -229,11 +223,7 @@ namespace System.Web.Routing
throw new NullReferenceException ();
RequestContext reqContext;
-#if NET_4_0
reqContext = SafeGetContext (httpContext != null ? httpContext.Request : null);
-#else
- reqContext = null;
-#endif
bool invalidConstraint;
bool ret = ProcessConstraintInternal (httpContext, this, constraint, parameterName, values, routeDirection, reqContext, out invalidConstraint);
@@ -261,7 +251,6 @@ namespace System.Web.Routing
return true;
}
-#if NET_4_0
RequestContext SafeGetContext (HttpRequestBase req)
{
if (req == null || req.GetType () != httpRequestBaseType)
@@ -269,6 +258,5 @@ namespace System.Web.Routing
return req.RequestContext;
}
-#endif
}
}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs
index 077f987529e..7e7d92135e4 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class RouteBase
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs
index 7993e4428ff..b3e4a1c16dc 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs
@@ -39,9 +39,7 @@ using System.Web.Hosting;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class RouteCollection : Collection<RouteBase>
@@ -123,20 +121,14 @@ namespace System.Web.Routing
if (httpContext.Request == null)
throw new ArgumentException ("The context does not contain any request data.", "httpContext");
-#if NET_4_0
if (Count == 0)
return null;
-#endif
if (!RouteExistingFiles) {
var path = httpContext.Request.AppRelativeCurrentExecutionFilePath;
VirtualPathProvider vpp = HostingEnvironment.VirtualPathProvider;
if (path != "~/" && vpp != null && (vpp.FileExists (path) || vpp.DirectoryExists (path)))
return null;
}
-#if !NET_4_0
- if (Count == 0)
- return null;
-#endif
foreach (RouteBase rb in this) {
var rd = rb.GetRouteData (httpContext);
if (rd != null)
@@ -155,19 +147,13 @@ namespace System.Web.Routing
{
if (requestContext == null)
throw new ArgumentNullException ("httpContext");
-#if !NET_4_0
- if (Count == 0)
- return null;
-#endif
VirtualPathData vp = null;
if (!String.IsNullOrEmpty (name)) {
RouteBase rb = this [name];
if (rb != null)
vp = rb.GetVirtualPath (requestContext, values);
-#if NET_4_0
else
throw new ArgumentException ("A route named '" + name + "' could not be found in the route collection.", "name");
-#endif
} else {
foreach (RouteBase rb in this) {
vp = rb.GetVirtualPath (requestContext, values);
@@ -193,7 +179,6 @@ namespace System.Web.Routing
{
return write_lock;
}
-#if NET_4_0
public void Ignore (string url)
{
Ignore (url, null);
@@ -240,7 +225,6 @@ namespace System.Web.Routing
return route;
}
-#endif
protected override void InsertItem (int index, RouteBase item)
{
// FIXME: what happens wrt its name?
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs
index f6412ff2aa6..4ae2289c5e3 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class RouteData
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs
index ad3c8bf4439..693d1dceac0 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs
@@ -31,9 +31,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
public enum RouteDirection
{
IncomingRequest,
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs
index 6d15a46795e..ff0bc2e13de 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class RouteTable
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs b/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs
index 7bd0b01ca01..eeef0dda75e 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs
@@ -39,9 +39,7 @@ using PairCollection = System.Collections.Generic.ICollection<System.Collections
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class RouteValueDictionary : IDictionary<string, object>
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs b/mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs
index 3edc78dd3f4..8e67ad106a4 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class StopRoutingHandler : IRouteHandler
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs b/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs
index dabfac1416e..f067b5ffcab 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class UrlRoutingHandler : IHttpHandler
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs b/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs
index dde26eb6b99..6fad0950bba 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs
@@ -35,18 +35,12 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class UrlRoutingModule : IHttpModule
{
RouteCollection routes;
-#if !NET_4_0
- object module_identity_key = new object ();
- object original_path_key = new object ();
-#endif
public RouteCollection RouteCollection {
get {
if (routes == null)
@@ -87,24 +81,9 @@ namespace System.Web.Routing
var app = (HttpApplication) o;
PostResolveRequestCache (new HttpContextWrapper (app.Context));
}
-#if NET_4_0
[Obsolete]
-#endif
public virtual void PostMapRequestHandler (HttpContextBase context)
{
-#if !NET_4_0
- if (context == null)
- throw new ArgumentNullException ("context");
-
- // FIXME: find out what it actually does.
- IHttpHandler h = (IHttpHandler) context.Items [module_identity_key];
- if (h != null)
- context.Handler = h;
-
- string original_path = context.Items [original_path_key] as string;
- if (!String.IsNullOrEmpty (original_path))
- context.RewritePath (original_path);
-#endif
}
[MonoTODO]
@@ -128,21 +107,8 @@ namespace System.Web.Routing
IHttpHandler http = rd.RouteHandler.GetHttpHandler (rc);
if (http == null)
throw new InvalidOperationException ("The mapped IRouteHandler did not return an IHttpHandler");
-#if NET_4_0
context.Request.RequestContext = rc;
context.RemapHandler (http);
-#else
- // note: It does not resolve paths using GetVirtualPath():
- //var vpd = RouteCollection.GetVirtualPath (rc, rd.Values);
- //context.RewritePath (vpd.VirtualPath);
-
- context.Items [original_path_key] = context.Request.Path;
-
- // default handler (forbidden in MVC/DynamicData projects)
- context.RewritePath ("~/UrlRouting.axd");
-
- context.Items [module_identity_key] = http;
-#endif
}
}
}
diff --git a/mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs b/mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs
index 81371d106b9..3449b3bd4cd 100644
--- a/mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs
+++ b/mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs
@@ -34,9 +34,7 @@ using System.Web;
namespace System.Web.Routing
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
-#endif
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class VirtualPathData
diff --git a/mcs/class/System.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.Web/Assembly/AssemblyInfo.cs
index 0b133b04193..a10e374faff 100644
--- a/mcs/class/System.Web/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web/Assembly/AssemblyInfo.cs
@@ -46,15 +46,9 @@ using System.Web.UI;
[assembly: AssemblyTitle("System.Web.dll")]
[assembly: AssemblyDescription("System.Web.dll")]
-#if !NET_4_0
-[assembly: AssemblyConfiguration("Development version")]
-#endif
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-#if !NET_4_0
-[assembly: AssemblyTrademark("")]
-#endif
[assembly: CLSCompliant(true)]
[assembly: ComVisible(false)]
[assembly: AssemblyDefaultAlias("System.Web.dll")]
@@ -67,7 +61,6 @@ using System.Web.UI;
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
-#if NET_4_0
[assembly: AssemblyFileVersion (Consts.FxVersion)]
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
[assembly: Dependency ("System", LoadHint.Always)]
@@ -86,7 +79,6 @@ using System.Web.UI;
[assembly: TypeForwardedTo (typeof (System.Web.Security.MembershipProvider))]
[assembly: InternalsVisibleTo ("Microsoft.Web.Infrastructure, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-#endif
[assembly: InternalsVisibleTo ("System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
@@ -138,9 +130,7 @@ using System.Web.UI;
[assembly: WebResource ("computer.gif", "image/gif")]
[assembly: WebResource ("TreeView.js", "text/javascript")]
[assembly: WebResource ("Menu.js", "text/javascript")]
-#if NET_4_0
[assembly: WebResource ("MenuModern.js", "text/javascript")]
-#endif
[assembly: WebResource ("GridView.js", "text/javascript")]
[assembly: WebResource ("webform.js", "text/javascript")]
[assembly: WebResource ("WebUIValidation_2.0.js", "text/javascript")]
diff --git a/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs b/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
index e9d54eb42af..1e7b393df01 100644
--- a/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
+++ b/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
@@ -56,11 +56,7 @@ namespace System.Web.Caching
remove { events.RemoveHandler (dependencyChangedEvent, value); }
}
-#if NET_4_0
protected
-#else
- public
-#endif
CacheDependency (): this (null, null, null, DateTime.Now)
{
}
diff --git a/mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs b/mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs
index 6e80d67f826..a9ac0a6328a 100644
--- a/mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs
+++ b/mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs
@@ -39,9 +39,7 @@ using System.Web.Util;
namespace System.Web.Caching
{
-#if NET_4_0
[Serializable]
-#endif
sealed class CachedVaryBy
{
string[] prms;
diff --git a/mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs b/mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs
index 6012049e3af..fd576c97747 100644
--- a/mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs
+++ b/mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs
@@ -50,20 +50,12 @@ namespace System.Web.Caching
Dictionary <string, string> keysCache;
Dictionary <string, string> entriesToInvalidate;
-#if !NET_4_0
- OutputCacheProvider provider;
-
- internal OutputCacheProvider InternalProvider {
- get { return provider; }
- }
-#endif
public OutputCacheModule ()
{
}
OutputCacheProvider FindCacheProvider (HttpApplication app)
{
-#if NET_4_0
HttpContext ctx = HttpContext.Current;
if (app == null) {
app = ctx != null ? ctx.ApplicationInstance : null;
@@ -81,12 +73,6 @@ namespace System.Web.Caching
throw new ProviderException (String.Format ("OutputCacheProvider named '{0}' cannot be found.", providerName));
return ret;
-#else
- if (provider == null)
- provider = new InMemoryOutputCacheProvider ();
-
- return provider;
-#endif
}
public void Dispose ()
diff --git a/mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs b/mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs
index 26d8efc49ee..31095078eef 100644
--- a/mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs
+++ b/mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs
@@ -30,9 +30,7 @@ using System.Configuration.Provider;
namespace System.Web.Caching
{
-#if NET_4_0
public
-#endif
abstract class OutputCacheProvider : ProviderBase
{
protected OutputCacheProvider ()
diff --git a/mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs b/mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs
index f3f12486592..f53701cdcc7 100644
--- a/mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs
+++ b/mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs
@@ -56,7 +56,6 @@ namespace System.Web.Caching
throw new ArgumentNullException ("tableName");
}
-#if NET_4_0
[MonoTODO ("Needs more testing - especially the return value and database+table lookup.")]
public static CacheDependency CreateOutputCacheDependency (string dependency)
{
@@ -100,7 +99,6 @@ For SQL Server 7.0 and SQL Server 2000, the valid format is ""database:tablename
For dependencies that use SQL Server 9.0 notifications, specify the value 'CommandNotification'.", dependency);
}
-#endif
protected override void DependencyDispose ()
{
diff --git a/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs b/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
index 3a503c24737..4a43b737014 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
@@ -50,12 +50,9 @@ namespace System.Web.Compilation
#if NET_4_5
static string framework_version = "4.5";
static string profile_path = "net_4_5";
-#elif NET_4_0
+#else
static string framework_version = "4.0";
static string profile_path = "net_4_0";
-#else
- static string framework_version = "2.0";
- static string profile_path = "net_2_0";
#endif
CompilationSection config;
CompilerInfo ci;
@@ -266,11 +263,7 @@ namespace System.Web.Compilation
info.FileName = monoPath;
return alPath + " ";
} else {
-#if NET_4_0
info.FileName = "al";
-#else
- info.FileName = "al2";
-#endif
return String.Empty;
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index d6c5cc7b2a5..41c06816a8c 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -945,9 +945,7 @@ namespace System.Web.Compilation
case TagType.DataBinding:
case TagType.CodeRenderExpression:
case TagType.CodeRender:
-#if NET_4_0
case TagType.CodeRenderEncode:
-#endif
if (isApplication)
throw new ParseException (location, "Invalid content for application file.");
@@ -1450,9 +1448,7 @@ namespace System.Web.Compilation
return CodeConstructType.ExpressionSnippet;
case TagType.CodeRender:
-#if NET_4_0
case TagType.CodeRenderEncode:
-#endif
return CodeConstructType.CodeSnippet;
case TagType.DataBinding:
@@ -1485,10 +1481,8 @@ namespace System.Web.Compilation
b = new CodeRenderBuilder (code, true, location);
else if (tagtype == TagType.DataBinding)
b = new DataBindingBuilder (code, location);
-#if NET_4_0
else if (tagtype == TagType.CodeRenderEncode)
b = new CodeRenderBuilder (code, true, location, true);
-#endif
else
throw new HttpException ("Should never happen");
@@ -1593,11 +1587,9 @@ namespace System.Web.Compilation
case TagType.CodeRenderExpression:
builder.AppendSubBuilder (new CodeRenderBuilder (tagid, true, location));
break;
-#if NET_4_0
case TagType.CodeRenderEncode:
builder.AppendSubBuilder (new CodeRenderBuilder (tagid, true, location, true));
break;
-#endif
case TagType.DataBinding:
builder.AppendSubBuilder (new DataBindingBuilder (tagid, location));
break;
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
index 3a9d22e089e..af165313b02 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs
@@ -597,14 +597,10 @@ namespace System.Web.Compilation
tokenizer.ExpectAttrValue = old;
bool varname;
bool databinding;
-#if NET_4_0
bool codeRenderEncode;
-#endif
varname = Eat ('=');
databinding = !varname && Eat ('#');
-#if NET_4_0
codeRenderEncode = !databinding && !varname && Eat (':');
-#endif
string odds = tokenizer.Odds;
tokenizer.Verbatim = true;
@@ -624,10 +620,8 @@ namespace System.Web.Compilation
tagtype = TagType.DataBinding;
else if (varname)
tagtype = TagType.CodeRenderExpression;
-#if NET_4_0
else if (codeRenderEncode)
tagtype = TagType.CodeRenderEncode;
-#endif
else
tagtype = TagType.CodeRender;
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
index 401c760b661..53fb1ca45e8 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
@@ -47,9 +47,7 @@ using System.Web.Caching;
using System.Web.Configuration;
using System.Web.Hosting;
using System.Web.Util;
-#if NET_4_0
using System.Runtime.Versioning;
-#endif
namespace System.Web.Compilation
{
@@ -81,13 +79,11 @@ namespace System.Web.Compilation
static int buildCount;
static bool is_precompiled;
static bool allowReferencedAssembliesCaching;
-#if NET_4_0
static List <Assembly> dynamicallyRegisteredAssemblies;
static bool? batchCompilationEnabled;
static FrameworkName targetFramework;
static bool preStartMethodsDone;
static bool preStartMethodsRunning;
-#endif
//static bool updatable; unused
static Dictionary<string, PreCompilationData> precompiled;
@@ -112,7 +108,6 @@ namespace System.Web.Compilation
remove { events.RemoveHandler (buildManagerRemoveEntryEvent, value); }
}
-#if NET_4_0
internal static bool CompilingTopLevelAssemblies {
get; set;
}
@@ -149,13 +144,10 @@ namespace System.Web.Compilation
return targetFramework;
}
}
-#endif
internal static bool BatchMode {
get {
-#if NET_4_0
if (batchCompilationEnabled != null)
return (bool)batchCompilationEnabled;
-#endif
if (!hosted)
return false; // Fix for bug #380985
@@ -198,13 +190,11 @@ namespace System.Web.Compilation
if (is_precompiled)
is_precompiled = LoadPrecompilationInfo (precomp_name);
}
-#if NET_4_0
internal static void AssertPreStartMethodsRunning ()
{
if (!BuildManager.PreStartMethodsRunning)
throw new InvalidOperationException ("This method must be called during the application's pre-start initialization stage.");
}
-#endif
// Deal with precompiled sites deployed in a different virtual path
static void FixVirtualPaths ()
{
@@ -535,7 +525,6 @@ namespace System.Web.Compilation
codeDomProviders.Add (type, ret);
return ret;
}
-#if NET_4_0
internal static void CallPreStartMethods ()
{
if (preStartMethodsDone)
@@ -698,7 +687,6 @@ namespace System.Web.Compilation
return new SimpleWebObjectFactory (type);
}
-#endif
public static object CreateInstanceFromVirtualPath (string virtualPath, Type requiredBaseType)
{
return CreateInstanceFromVirtualPath (GetAbsoluteVirtualPath (virtualPath), requiredBaseType);
@@ -887,13 +875,11 @@ namespace System.Web.Compilation
{
return null; // null is ok here until we store the dependency set in the Cache.
}
-#if NET_4_0
[MonoTODO ("Not implemented, always returns null")]
public static BuildDependencySet GetCachedBuildDependencySet (HttpContext context, string virtualPath, bool ensureIsUpToDate)
{
return null; // null is ok here until we store the dependency set in the Cache.
}
-#endif
static BuildManagerCacheItem GetCachedItem (string vp)
{
try {
@@ -1104,11 +1090,9 @@ namespace System.Web.Compilation
foreach (string assLocation in WebConfigurationManager.ExtraAssemblies)
LoadAssembly (assLocation, configReferencedAssemblies);
-#if NET_4_0
if (dynamicallyRegisteredAssemblies != null)
foreach (Assembly registeredAssembly in dynamicallyRegisteredAssemblies)
configReferencedAssemblies.Add (registeredAssembly);
-#endif
// Precompiled sites unconditionally load all assemblies from bin/ (fix for
// bug #502016)
if (is_precompiled || addAssembliesInBin) {
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs b/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
index 68fe0bd7709..e9f81498400 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
@@ -45,9 +45,7 @@ namespace System.Web.Compilation
{
public abstract class BuildProvider
{
-#if NET_4_0
static Dictionary <string, Type> registeredBuildProviderTypes;
-#endif
ArrayList ref_assemblies;
ICollection vpath_deps;
@@ -136,7 +134,6 @@ namespace System.Web.Compilation
// MS also throws a NullReferenceException here when not hosted.
return VirtualPathProvider.OpenFile (virtualPath);
}
-#if NET_4_0
public static void RegisterBuildProvider (string extension, Type providerType)
{
if (String.IsNullOrEmpty (extension))
@@ -181,7 +178,6 @@ namespace System.Web.Compilation
return Activator.CreateInstance (type, null) as global::System.Web.Compilation.BuildProvider;
}
-#endif
public virtual CompilerType CodeCompilerType {
get { return null; } // Documented to return null
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
index 149eb3a6050..406230ae638 100644
--- a/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
@@ -344,14 +344,12 @@ namespace System.Web.Compilation
CodeMethodInvokeExpression expr = new CodeMethodInvokeExpression (thisRef, "InitializeCulture");
method.Statements.Add (AddLinePragma (new CodeExpressionStatement (expr), directiveLocation));
}
-#if NET_4_0
protected override void AddStatementsToInitMethodBottom (ControlBuilder builder, CodeMemberMethod method)
{
ILocation directiveLocation = pageParser.DirectiveLocation;
AssignPropertyWithExpression <string> (method, "MetaDescription", pageParser.MetaDescription, directiveLocation);
AssignPropertyWithExpression <string> (method, "MetaKeywords", pageParser.MetaKeywords, directiveLocation);
}
-#endif
protected override void PrependStatementsToFrameworkInitialize (CodeMemberMethod method)
{
base.PrependStatementsToFrameworkInitialize (method);
diff --git a/mcs/class/System.Web/System.Web.Compilation/TagType.cs b/mcs/class/System.Web/System.Web.Compilation/TagType.cs
index 9d3b879599b..74a1a2d4947 100644
--- a/mcs/class/System.Web/System.Web.Compilation/TagType.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/TagType.cs
@@ -41,9 +41,7 @@ namespace System.Web.Compilation
CodeRender,
CodeRenderExpression,
Include,
-#if NET_4_0
CodeRenderEncode
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
index 4b3482b7308..7dab906cc2b 100644
--- a/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
@@ -452,7 +452,6 @@ namespace System.Web.Compilation
protected virtual void AddStatementsToInitMethodTop (ControlBuilder builder, CodeMemberMethod method)
{
-#if NET_4_0
ClientIDMode? mode = parser.ClientIDMode;
if (mode.HasValue) {
var cimRef = new CodeTypeReferenceExpression (typeof (ClientIDMode));
@@ -464,7 +463,6 @@ namespace System.Web.Compilation
method.Statements.Add (assign);
}
-#endif
}
protected virtual void AddStatementsToInitMethodBottom (ControlBuilder builder, CodeMemberMethod method)
@@ -1215,13 +1213,11 @@ namespace System.Web.Compilation
parms.Add (new CodeDelegateCreateExpression (
new CodeTypeReference (typeof (System.Web.UI.BuildMethod)),
thisRef, child.Method.Name));
-#if NET_4_0
string value = pca.ProviderName;
if (!String.IsNullOrEmpty (value) && String.Compare (OutputCache.DEFAULT_PROVIDER_NAME, value, StringComparison.Ordinal) != 0)
parms.Add (new CodePrimitiveExpression (value));
else
parms.Add (new CodePrimitiveExpression (null));
-#endif
methodStatements.Add (AddLinePragma (build, parent));
if (parent.HasAspCode)
AddRenderControl (parent);
@@ -1394,12 +1390,10 @@ namespace System.Web.Compilation
CodeExpression GetWrappedCodeExpression (CodeRenderBuilder cr)
{
var ret = new CodeSnippetExpression (cr.Code);
-#if NET_4_0
if (cr.HtmlEncode) {
var encodeRef = new CodeMethodReferenceExpression (new CodeTypeReferenceExpression (typeof (HttpUtility)), "HtmlEncode");
return new CodeMethodInvokeExpression (encodeRef, new CodeExpression[] { ret });
} else
-#endif
return ret;
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs
index de0813803f8..cf9aeb6dc82 100644
--- a/mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs
@@ -73,9 +73,7 @@ namespace System.Web.Compilation
AddPrimitiveArgument (arguments, parser.OutputCacheVaryByCustom);
AddPrimitiveArgument (arguments, parser.OutputCacheSqlDependency);
AddPrimitiveArgument (arguments, parser.OutputCacheShared);
-#if NET_4_0
arguments.Add (new CodeAttributeArgument ("ProviderName", new CodePrimitiveExpression (parser.ProviderName)));
-#endif
mainClass.CustomAttributes.Add (cad);
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs
index 9725763e4c2..79968cd0ef4 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs
@@ -77,9 +77,7 @@ namespace System.Web.Configuration
}
[ConfigurationProperty ("passport")]
-#if NET_4_0
[Obsolete ("This property is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public PassportAuthentication Passport {
get { return (PassportAuthentication) base [passportProp]; }
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs
index 82d49042922..441d29bb2a0 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs
@@ -103,35 +103,12 @@ namespace System.Web.Configuration
internal Type GetProviderTypeForExtension (string extension)
{
-#if NET_4_0
return global::System.Web.Compilation.BuildProvider.GetProviderTypeForExtension (extension);
-#else
- if (String.IsNullOrEmpty (extension))
- return null;
-
- BuildProvider provider = this [extension];
- if (provider == null)
- return null;
-
- Type type = HttpApplication.LoadType (provider.Type);
- if (type == null)
- return null;
-
- return type;
-#endif
}
internal global::System.Web.Compilation.BuildProvider GetProviderInstanceForExtension (string extension)
{
-#if NET_4_0
return global::System.Web.Compilation.BuildProvider.GetProviderInstanceForExtension (extension);
-#else
- Type type = GetProviderTypeForExtension (extension);
- if (type == null)
- return null;
-
- return Activator.CreateInstance (type, null) as global::System.Web.Compilation.BuildProvider;
-#endif
}
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
index 105623a1ed5..5db33b67d6b 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
@@ -55,9 +55,7 @@ namespace System.Web.Configuration
static ConfigurationProperty urlLinePragmasProp;
static ConfigurationProperty codeSubDirectoriesProp;
static ConfigurationProperty optimizeCompilationsProp;
-#if NET_4_0
static ConfigurationProperty targetFrameworkProp;
-#endif
static CompilationSection ()
{
@@ -96,11 +94,9 @@ namespace System.Web.Configuration
// this hotfix: http://support.microsoft.com/kb/961884
optimizeCompilationsProp = new ConfigurationProperty ("optimizeCompilations", typeof (bool), false);
-#if NET_4_0
// Mono ignores this as there is no way to switch the runtime version
// dynamically while application is running
targetFrameworkProp = new ConfigurationProperty ("targetFramework", typeof (string), null);
-#endif
properties = new ConfigurationPropertyCollection ();
properties.Add (assembliesProp);
@@ -121,9 +117,7 @@ namespace System.Web.Configuration
properties.Add (tempDirectoryProp);
properties.Add (urlLinePragmasProp);
properties.Add (optimizeCompilationsProp);
-#if NET_4_0
properties.Add (targetFrameworkProp);
-#endif
}
public CompilationSection ()
@@ -234,13 +228,11 @@ namespace System.Web.Configuration
set { base [strictProp] = value; }
}
-#if NET_4_0
[ConfigurationProperty ("targetFramework", DefaultValue = null)]
public string TargetFramework {
get { return (string) base [targetFrameworkProp]; }
set { base [targetFrameworkProp] = value; }
}
-#endif
[ConfigurationProperty ("tempDirectory", DefaultValue = "")]
public string TempDirectory {
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
index d37fa87d923..ce1ed81d3c0 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
@@ -1156,13 +1156,11 @@ namespace System.Web.Configuration
}
}
-#if NET_4_0
static HttpCapabilitiesProvider _provider = new HttpCapabilitiesDefaultProvider();
public static HttpCapabilitiesProvider BrowserCapabilitiesProvider {
get { return _provider; }
set { _provider = value; }
}
-#endif
}
}
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 30e8b6af611..b2b979cfe60 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
@@ -55,7 +55,6 @@ namespace System.Web.Configuration
static ConfigurationProperty shutdownTimeoutProp;
static ConfigurationProperty useFullyQualifiedRedirectUrlProp;
static ConfigurationProperty waitChangeNotificationProp;
-#if NET_4_0
static ConfigurationProperty requestPathInvalidCharactersProp;
static ConfigurationProperty requestValidationTypeProp;
static ConfigurationProperty requestValidationModeProp;
@@ -63,7 +62,6 @@ namespace System.Web.Configuration
static ConfigurationProperty maxUrlLengthProp;
static ConfigurationProperty encoderTypeProp;
static ConfigurationProperty relaxedUrlToFileSystemMappingProp;
-#endif
#if NET_4_5
static ConfigurationProperty targetFrameworkProp;
#endif
@@ -119,7 +117,6 @@ namespace System.Web.Configuration
TypeDescriptor.GetConverter (typeof (int)),
PropertyHelper.IntFromZeroToMaxValidator,
ConfigurationPropertyOptions.None);
-#if NET_4_0
requestPathInvalidCharactersProp = new ConfigurationProperty ("requestPathInvalidCharacters", typeof (string), "<,>,*,%,&,:,\\,?");
requestValidationTypeProp = new ConfigurationProperty ("requestValidationType", typeof (string),"System.Web.Util.RequestValidator",
TypeDescriptor.GetConverter (typeof (string)),
@@ -142,7 +139,6 @@ namespace System.Web.Configuration
PropertyHelper.NonEmptyStringValidator,
ConfigurationPropertyOptions.None);
relaxedUrlToFileSystemMappingProp = new ConfigurationProperty ("relaxedUrlToFileSystemMapping", typeof (bool), false);
-#endif
#if NET_4_5
targetFrameworkProp = new ConfigurationProperty ("targetFramework", typeof (Version), new Version (4, 0),
PropertyHelper.VersionConverter,
@@ -169,7 +165,6 @@ namespace System.Web.Configuration
properties.Add (shutdownTimeoutProp);
properties.Add (useFullyQualifiedRedirectUrlProp);
properties.Add (waitChangeNotificationProp);
-#if NET_4_0
properties.Add (requestPathInvalidCharactersProp);
properties.Add (requestValidationTypeProp);
properties.Add (requestValidationModeProp);
@@ -177,7 +172,6 @@ namespace System.Web.Configuration
properties.Add (maxUrlLengthProp);
properties.Add (encoderTypeProp);
properties.Add (relaxedUrlToFileSystemMappingProp);
-#endif
#if NET_4_5
properties.Add (targetFrameworkProp);
#endif
@@ -306,7 +300,6 @@ namespace System.Web.Configuration
set { base[waitChangeNotificationProp] = value; }
}
-#if NET_4_0
[ConfigurationProperty ("requestPathInvalidCharacters", DefaultValue = ",*,%,&,:,\\,?")]
public string RequestPathInvalidCharacters {
get { return (string) base [requestPathInvalidCharactersProp]; }
@@ -353,7 +346,6 @@ namespace System.Web.Configuration
get { return (bool) base [relaxedUrlToFileSystemMappingProp]; }
set { base [relaxedUrlToFileSystemMappingProp] = value; }
}
-#endif
#if NET_4_5
[ConfigurationProperty ("targetFramework", DefaultValue = "4.0")]
[TypeConverter ("System.Web.Configuration.VersionConverter")]
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs
index 56f29e45365..1ec33313b0c 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs
@@ -46,9 +46,7 @@ namespace System.Web.Configuration {
static ConfigurationProperty validationKeyProp;
static ConfigurationPropertyCollection properties;
static MachineKeyValidationConverter converter = new MachineKeyValidationConverter ();
-#if NET_4_0
MachineKeyValidation validation;
-#endif
static MachineKeySection ()
{
@@ -60,17 +58,10 @@ namespace System.Web.Configuration {
PropertyHelper.WhiteSpaceTrimStringConverter,
PropertyHelper.NonEmptyStringValidator,
ConfigurationPropertyOptions.None);
-#if NET_4_0
validationProp = new ConfigurationProperty ("validation", typeof (string), "HMACSHA256",
PropertyHelper.WhiteSpaceTrimStringConverter,
PropertyHelper.NonEmptyStringValidator,
ConfigurationPropertyOptions.None);
-#else
- validationProp = new ConfigurationProperty ("validation", typeof (MachineKeyValidation),
- MachineKeyValidation.SHA1, converter,
- PropertyHelper.DefaultValidator,
- ConfigurationPropertyOptions.None);
-#endif
validationKeyProp = new ConfigurationProperty ("validationKey", typeof (string), "AutoGenerate,IsolateApps",
PropertyHelper.WhiteSpaceTrimStringConverter,
PropertyHelper.NonEmptyStringValidator,
@@ -87,7 +78,6 @@ namespace System.Web.Configuration {
Config.AutoGenerate (MachineKeyRegistryStorage.KeyType.Validation);
}
-#if NET_4_0
public MachineKeySection ()
{
// get DefaultValue from ValidationAlgorithm
@@ -98,7 +88,6 @@ namespace System.Web.Configuration {
public MachineKeyCompatibilityMode CompatibilityMode {
get; set;
}
-#endif
protected internal override void Reset (ConfigurationElement parentElement)
{
@@ -131,7 +120,6 @@ namespace System.Web.Configuration {
}
}
-#if NET_4_0
// property exists for backward compatibility
public MachineKeyValidation Validation {
get { return validation; }
@@ -162,14 +150,6 @@ namespace System.Web.Configuration {
base[validationProp] = value;
}
}
-#else
- [TypeConverter (typeof (MachineKeyValidationConverter))]
- [ConfigurationProperty ("validation", DefaultValue = "SHA1")]
- public MachineKeyValidation Validation {
- get { return (MachineKeyValidation) base [validationProp];}
- set { base[validationProp] = value; }
- }
-#endif
[TypeConverter (typeof (WhiteSpaceTrimStringConverter))]
[StringValidator (MinLength = 1)]
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs
index f022a6d49d5..47d7ef1be88 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs
@@ -35,12 +35,10 @@ namespace System.Web.Configuration
SHA1 = 1,
TripleDES = 2,
AES = 3,
-#if NET_4_0
HMACSHA256 = 4,
HMACSHA384 = 5,
HMACSHA512 = 6,
Custom = 7
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs
index 42973b58592..9ad6baf7f9e 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs
@@ -38,11 +38,7 @@ namespace System.Web.Configuration {
public sealed class MachineKeyValidationConverter : ConfigurationConverterBase
{
-#if NET_4_0
const string InvalidValue = "The enumeration value must be one of the following: SHA1, MD5, 3DES, AES, HMACSHA256, HMACSHA384, HMACSHA512.";
-#else
- const string InvalidValue = "The enumeration value must be one of the following: SHA1, MD5, 3DES, AES.";
-#endif
public MachineKeyValidationConverter ()
{
}
@@ -58,14 +54,12 @@ namespace System.Web.Configuration {
return MachineKeyValidation.TripleDES;
case "AES":
return MachineKeyValidation.AES;
-#if NET_4_0
case "HMACSHA256":
return MachineKeyValidation.HMACSHA256;
case "HMACSHA384":
return MachineKeyValidation.HMACSHA384;
case "HMACSHA512":
return MachineKeyValidation.HMACSHA512;
-#endif
default:
throw new ArgumentException (InvalidValue);
}
@@ -73,15 +67,8 @@ namespace System.Web.Configuration {
public override object ConvertTo (ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type)
{
-#if NET_4_0
if ((value == null) || (value.GetType () != typeof (MachineKeyValidation)))
throw new ArgumentException (InvalidValue);
-#else
- if (value.GetType () != typeof (MachineKeyValidation)) {
- /* MS throws this exception on an invalid */
- throw new FormatException (InvalidValue);
- }
-#endif
switch ((MachineKeyValidation) value) {
case MachineKeyValidation.MD5:
@@ -92,7 +79,6 @@ namespace System.Web.Configuration {
return "3DES";
case MachineKeyValidation.AES:
return "AES";
-#if NET_4_0
case MachineKeyValidation.HMACSHA256:
return "HMACSHA256";
case MachineKeyValidation.HMACSHA384:
@@ -102,11 +88,6 @@ namespace System.Web.Configuration {
default:
// includes MachineKeyValidation.Custom
throw new ArgumentException (InvalidValue);
-#else
- default:
- /* MS throws this exception on an invalid */
- throw new FormatException (InvalidValue);
-#endif
}
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs
index 3d1606a3a96..7fd3f3558c3 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs
@@ -41,10 +41,8 @@ namespace System.Web.Configuration
static ConfigurationProperty omitVaryStarProp;
static ConfigurationProperty sendCacheControlHeaderProp;
static ConfigurationProperty enableKernelCacheForVaryByStarProp;
-#if NET_4_0
static ConfigurationProperty providersProp;
static ConfigurationProperty defaultProviderNameProp;
-#endif
static ConfigurationPropertyCollection properties;
@@ -55,10 +53,8 @@ namespace System.Web.Configuration
omitVaryStarProp = new ConfigurationProperty ("omitVaryStar", typeof (bool), false);
sendCacheControlHeaderProp = new ConfigurationProperty ("sendCacheControlHeader", typeof (bool), true);
enableKernelCacheForVaryByStarProp = new ConfigurationProperty ("enableKernelCacheForVaryByStar", typeof (bool), false);
-#if NET_4_0
providersProp = new ConfigurationProperty ("providers", typeof (ProviderSettingsCollection));
defaultProviderNameProp = new ConfigurationProperty ("defaultProvider", typeof (string), "AspNetInternalProvider");
-#endif
properties = new ConfigurationPropertyCollection ();
@@ -67,10 +63,8 @@ namespace System.Web.Configuration
properties.Add (omitVaryStarProp);
properties.Add (sendCacheControlHeaderProp);
properties.Add (enableKernelCacheForVaryByStarProp);
-#if NET_4_0
properties.Add (providersProp);
properties.Add (defaultProviderNameProp);
-#endif
}
[ConfigurationProperty ("enableFragmentCache", DefaultValue = "True")]
@@ -103,7 +97,6 @@ namespace System.Web.Configuration
set { base[sendCacheControlHeaderProp] = value; }
}
-#if NET_4_0
[StringValidatorAttribute(MinLength = 1)]
[ConfigurationPropertyAttribute("defaultProvider", DefaultValue = "AspNetInternalProvider")]
public string DefaultProviderName {
@@ -115,7 +108,6 @@ namespace System.Web.Configuration
public ProviderSettingsCollection Providers {
get { return base [providersProp] as ProviderSettingsCollection; }
}
-#endif
protected internal override ConfigurationPropertyCollection Properties {
get { return properties; }
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs
index fb109b3a392..780a7cab985 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs
@@ -61,10 +61,8 @@ namespace System.Web.Configuration
static ConfigurationProperty userControlBaseTypeProp;
static ConfigurationProperty validateRequestProp;
static ConfigurationProperty viewStateEncryptionModeProp;
-#if NET_4_0
static ConfigurationProperty clientIDModeProp;
static ConfigurationProperty controlRenderingCompatibilityVersionProp;
-#endif
static PagesSection ()
{
asyncTimeoutProp = new ConfigurationProperty ("asyncTimeout", typeof (TimeSpan), TimeSpan.FromSeconds (45.0),
@@ -99,7 +97,6 @@ namespace System.Web.Configuration
viewStateEncryptionModeProp = new ConfigurationProperty ("viewStateEncryptionMode", typeof (ViewStateEncryptionMode), ViewStateEncryptionMode.Auto,
new GenericEnumConverter (typeof (ViewStateEncryptionMode)), PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
-#if NET_4_0
clientIDModeProp = new ConfigurationProperty ("clientIDMode", typeof (ClientIDMode), ClientIDMode.Predictable,
new GenericEnumConverter (typeof (ClientIDMode)), PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
@@ -107,7 +104,6 @@ namespace System.Web.Configuration
new VersionConverter (3, 5, "The value for the property 'controlRenderingCompatibilityVersion' is not valid. The error is: The control rendering compatibility version must not be less than {1}."),
PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
-#endif
properties = new ConfigurationPropertyCollection ();
properties.Add (asyncTimeoutProp);
properties.Add (autoEventWireupProp);
@@ -131,10 +127,8 @@ namespace System.Web.Configuration
properties.Add (userControlBaseTypeProp);
properties.Add (validateRequestProp);
properties.Add (viewStateEncryptionModeProp);
-#if NET_4_0
properties.Add (clientIDModeProp);
properties.Add (controlRenderingCompatibilityVersionProp);
-#endif
}
public PagesSection ()
@@ -297,7 +291,6 @@ namespace System.Web.Configuration
get { return (ViewStateEncryptionMode) base [viewStateEncryptionModeProp]; }
set { base [viewStateEncryptionModeProp] = value; }
}
-#if NET_4_0
[ConfigurationProperty ("clientIDMode", DefaultValue = ClientIDMode.Predictable)]
public ClientIDMode ClientIDMode {
get { return (ClientIDMode) base [clientIDModeProp]; }
@@ -314,7 +307,6 @@ namespace System.Web.Configuration
base [controlRenderingCompatibilityVersionProp] = value;
}
}
-#endif
protected internal override ConfigurationPropertyCollection Properties {
get { return properties; }
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs
index 1a592155341..e7f8aae0d1c 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs
@@ -34,9 +34,7 @@ using System.Configuration;
namespace System.Web.Configuration
{
-#if NET_4_0
[Obsolete ("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public sealed class PassportAuthentication : ConfigurationElement
{
static ConfigurationProperty redirectUrlProp;
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs
index 1490fa3f341..414505f526b 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs
@@ -50,9 +50,7 @@ namespace System.Web.Configuration
internal static IntegerValidator IntFromZeroToMaxValidator = new IntegerValidator (0, Int32.MaxValue);
internal static IntegerValidator IntFromOneToMax_1Validator = new IntegerValidator (1, Int32.MaxValue - 1);
-#if NET_4_0
internal static VersionConverter VersionConverter = new VersionConverter ();
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs
index 5c814b71686..470a10512e6 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs
@@ -54,10 +54,8 @@ namespace System.Web.Configuration
static ConfigurationProperty stateNetworkTimeoutProp;
static ConfigurationProperty timeoutProp;
static ConfigurationProperty useHostingIdentityProp;
-#if NET_4_0
static ConfigurationProperty compressionEnabledProp;
static ConfigurationProperty sqlConnectionRetryIntervalProp;
-#endif
static ConfigurationPropertyCollection properties;
static ConfigurationElementProperty elementProperty;
@@ -91,13 +89,11 @@ namespace System.Web.Configuration
ConfigurationPropertyOptions.None);
useHostingIdentityProp = new ConfigurationProperty ("useHostingIdentity", typeof (bool), true);
-#if NET_4_0
compressionEnabledProp = new ConfigurationProperty ("compressionEnabled", typeof (bool), false);
sqlConnectionRetryIntervalProp = new ConfigurationProperty ("sqlConnectionRetryIntervalProp", typeof (TimeSpan), TimeSpan.FromSeconds (0),
PropertyHelper.TimeSpanSecondsOrInfiniteConverter,
PropertyHelper.PositiveTimeSpanValidator,
ConfigurationPropertyOptions.None);
-#endif
properties = new ConfigurationPropertyCollection ();
properties.Add (allowCustomSqlDatabaseProp);
@@ -115,10 +111,8 @@ namespace System.Web.Configuration
properties.Add (stateNetworkTimeoutProp);
properties.Add (timeoutProp);
properties.Add (useHostingIdentityProp);
-#if NET_4_0
properties.Add (compressionEnabledProp);
properties.Add (sqlConnectionRetryIntervalProp);
-#endif
elementProperty = new ConfigurationElementProperty (new CallbackValidator (typeof (SessionStateSection), ValidateElement));
}
@@ -222,7 +216,6 @@ namespace System.Web.Configuration
set { base[useHostingIdentityProp] = value; }
}
-#if NET_4_0
[ConfigurationPropertyAttribute("compressionEnabled", DefaultValue = false)]
public bool CompressionEnabled {
get { return (bool) base [compressionEnabledProp]; }
@@ -235,7 +228,6 @@ namespace System.Web.Configuration
get { return (TimeSpan) base [sqlConnectionRetryIntervalProp]; }
set { base [sqlConnectionRetryIntervalProp] = value; }
}
-#endif
static void ValidateElement (object o)
{
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
index e69f495b8c9..4492ffb0cc5 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
@@ -135,9 +135,7 @@ namespace System.Web.Configuration
}
[ConfigurationProperty ("mobileControls")]
-#if NET_4_0
[Obsolete ("System.Web.Mobile.dll is obsolete.")]
-#endif
public ConfigurationSection MobileControls {
get { return Sections ["MobileControls"]; }
}
diff --git a/mcs/class/System.Web/System.Web.Mail/MailAttachment.cs b/mcs/class/System.Web/System.Web.Mail/MailAttachment.cs
index 242965407a9..4920153fc02 100644
--- a/mcs/class/System.Web/System.Web.Mail/MailAttachment.cs
+++ b/mcs/class/System.Web/System.Web.Mail/MailAttachment.cs
@@ -34,11 +34,6 @@ using System.Security.Permissions;
namespace System.Web.Mail
{
-#if !NET_4_0
- // CAS
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
[Obsolete ("The recommended alternative is System.Net.Mail.Attachment. http://go.microsoft.com/fwlink/?linkid=14202")]
public class MailAttachment
{
diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
index f5f1a2d1353..8f2f244099c 100644
--- a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
+++ b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
@@ -35,11 +35,6 @@ using System.Text;
namespace System.Web.Mail
{
-#if !NET_4_0
- // CAS
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
[Obsolete ("The recommended alternative is System.Net.Mail.MailMessage. http://go.microsoft.com/fwlink/?linkid=14202")]
public class MailMessage
{
diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs b/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs
index 1cb061e88d0..3085a930752 100644
--- a/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs
+++ b/mcs/class/System.Web/System.Web.Mail/SmtpMail.cs
@@ -38,10 +38,6 @@ namespace System.Web.Mail
{
// CAS
[Obsolete ("The recommended alternative is System.Net.Mail.SmtpClient. http://go.microsoft.com/fwlink/?linkid=14202")]
-#if !NET_4_0
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public class SmtpMail
{
static string smtpServer = "localhost";
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
index 3c5bbe4530b..ab273d4970b 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
@@ -69,7 +69,6 @@ namespace System.Web.Security
"default.aspx",
"index.html",
"index.htm" };
-#if NET_4_0
public static TimeSpan Timeout {
get; private set;
}
@@ -92,7 +91,6 @@ namespace System.Web.Security
if (!String.IsNullOrEmpty (value))
default_url = value;
}
-#endif
public FormsAuthentication ()
{
}
@@ -326,9 +324,7 @@ namespace System.Web.Security
FormsAuthenticationConfiguration config = section.Forms;
cookieName = config.Name;
-#if NET_4_0
Timeout = config.Timeout;
-#endif
timeout = (int)config.Timeout.TotalMinutes;
cookiePath = config.Path;
protection = config.Protection;
@@ -337,18 +333,14 @@ namespace System.Web.Security
cookie_domain = config.Domain;
cookie_mode = config.Cookieless;
cookies_supported = true; /* XXX ? */
-#if NET_4_0
if (!String.IsNullOrEmpty (default_url))
default_url = MapUrl (default_url);
else
-#endif
default_url = MapUrl(config.DefaultUrl);
enable_crossapp_redirects = config.EnableCrossAppRedirects;
-#if NET_4_0
if (!String.IsNullOrEmpty (login_url))
login_url = MapUrl (login_url);
else
-#endif
login_url = MapUrl(config.LoginUrl);
initialized = true;
diff --git a/mcs/class/System.Web/System.Web.Security/FormsIdentity.cs b/mcs/class/System.Web/System.Web.Security/FormsIdentity.cs
index 29323f8065a..f40793ef1f4 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsIdentity.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsIdentity.cs
@@ -36,11 +36,7 @@ namespace System.Web.Security
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[Serializable]
-#if NET_4_0
public
-#else
- public sealed
-#endif
class FormsIdentity : IIdentity
{
FormsAuthenticationTicket ticket;
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs b/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs
index 6f0fcdf17d9..71fddb48a04 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs
@@ -30,9 +30,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public enum MembershipCreateStatus
{
Success,
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs b/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs
index bae2e79c37c..a5f9e31a70e 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs
@@ -34,9 +34,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
[Serializable]
public class MembershipCreateUserException : Exception
{
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipHelper.cs b/mcs/class/System.Web/System.Web.Security/MembershipHelper.cs
index 5595fa17992..b46cc98f22e 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipHelper.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipHelper.cs
@@ -36,9 +36,7 @@ using System.Web.Util;
namespace System.Web.Security
{
sealed class MembershipHelper
-#if NET_4_0
: IMembershipHelper
-#endif
{
internal const int SALT_BYTES = 16;
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs b/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs
index 69c3315d0e7..5bf60eb9080 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs
@@ -34,9 +34,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
[Serializable]
public class MembershipPasswordException : Exception
{
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs b/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs
index ff731a0a8ec..294861808d9 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs
@@ -31,9 +31,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public enum MembershipPasswordFormat
{
Clear = 0,
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs b/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
index 75b8d4ba4bd..068e1c45ccf 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
@@ -37,21 +37,15 @@ using System.Web.Configuration;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public abstract class MembershipProvider : ProviderBase
{
-#if NET_4_0
const string HELPER_TYPE_NAME = "System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
internal static IMembershipHelper Helper {
get { return helper; }
}
static IMembershipHelper helper;
-#else
- static MembershipHelper helper;
-#endif
static readonly object validatingPasswordEvent = new object ();
@@ -63,7 +57,6 @@ namespace System.Web.Security
static MembershipProvider ()
{
-#if NET_4_0
Type type = Type.GetType (HELPER_TYPE_NAME, false);
if (type == null)
return;
@@ -73,9 +66,6 @@ namespace System.Web.Security
} catch {
// ignore
}
-#else
- helper = new MembershipHelper ();
-#endif
}
protected MembershipProvider ()
@@ -120,22 +110,15 @@ namespace System.Web.Security
protected virtual byte [] DecryptPassword (byte [] encodedPassword)
{
-#if NET_4_0
if (helper == null)
throw new PlatformNotSupportedException ("This method is not available.");
-#endif
return helper.DecryptPassword (encodedPassword);
}
protected virtual byte[] EncryptPassword (byte[] password)
{
-#if NET_4_0
return EncryptPassword (password, MembershipPasswordCompatibilityMode.Framework20);
-#else
- return helper.EncryptPassword (password);
-#endif
}
-#if NET_4_0
[MonoTODO ("Discover what actually is 4.0 password compatibility mode.")]
protected virtual byte[] EncryptPassword (byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode)
{
@@ -147,7 +130,6 @@ namespace System.Web.Security
return helper.EncryptPassword (password);
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs b/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
index 71a8a1730fa..be25a051cc7 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
@@ -32,9 +32,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public sealed class MembershipProviderCollection : ProviderCollection
{
public override void Add (ProviderBase provider)
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipUser.cs b/mcs/class/System.Web/System.Web.Security/MembershipUser.cs
index 13a7319cbae..c370f21661b 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipUser.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipUser.cs
@@ -33,9 +33,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
[Serializable]
public class MembershipUser
{
@@ -163,22 +161,14 @@ namespace System.Web.Security
get { return isLockedOut; }
}
-#if NET_4_0
public virtual
-#else
- public
-#endif
bool IsOnline {
get {
int minutes;
-#if NET_4_0
IMembershipHelper helper = MembershipProvider.Helper;
if (helper == null)
throw new PlatformNotSupportedException ("The method is not available.");
minutes = helper.UserIsOnlineTimeWindow;
-#else
- minutes = Membership.UserIsOnlineTimeWindow;
-#endif
return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (minutes);
}
}
@@ -234,14 +224,10 @@ namespace System.Web.Security
MembershipProvider Provider {
get {
MembershipProvider p;
-#if NET_4_0
IMembershipHelper helper = MembershipProvider.Helper;
if (helper == null)
throw new PlatformNotSupportedException ("The method is not available.");
p = helper.Providers [ProviderName];
-#else
- p = Membership.Providers [ProviderName];
-#endif
if (p == null)
throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found.");
return p;
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs b/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs
index 61d486345c3..bbb689fa3eb 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs
@@ -33,9 +33,7 @@ using System.Web.UI;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
[Serializable]
public sealed class MembershipUserCollection : ICollection
{
diff --git a/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs b/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
index 614077aae37..1c475112c66 100644
--- a/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
+++ b/mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
@@ -32,9 +32,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public delegate void MembershipValidatePasswordEventHandler (object sender, ValidatePasswordEventArgs e);
}
diff --git a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs
index df886faa2b7..292e815803f 100644
--- a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs
+++ b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs
@@ -34,9 +34,7 @@ namespace System.Web.Security
{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_4_0
[Obsolete ("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public sealed class PassportAuthenticationEventArgs : EventArgs
{
PassportIdentity identity;
diff --git a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs
index 3cc9e8a7b74..3cad8b56402 100644
--- a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs
+++ b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs
@@ -30,9 +30,7 @@
namespace System.Web.Security
{
-#if NET_4_0
[Obsolete ("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public delegate void PassportAuthenticationEventHandler (object sender,
PassportAuthenticationEventArgs e);
}
diff --git a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs
index 85b91feb244..0fd828f1679 100644
--- a/mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs
+++ b/mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs
@@ -34,9 +34,7 @@ namespace System.Web.Security
{
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_4_0
[Obsolete ("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public sealed class PassportAuthenticationModule : IHttpModule
{
static readonly object authenticateEvent = new object ();
diff --git a/mcs/class/System.Web/System.Web.Security/PassportIdentity.cs b/mcs/class/System.Web/System.Web.Security/PassportIdentity.cs
index fc12602df8b..a68f89bf64d 100644
--- a/mcs/class/System.Web/System.Web.Security/PassportIdentity.cs
+++ b/mcs/class/System.Web/System.Web.Security/PassportIdentity.cs
@@ -37,9 +37,7 @@ namespace System.Web.Security {
[MonoTODO("Not implemented")]
// CAS - no InheritanceDemand here as the class is sealed
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_4_0
[Obsolete ("This type is obsolete. The Passport authentication product is no longer supported and has been superseded by Live ID.")]
-#endif
public sealed class PassportIdentity : IIdentity, IDisposable {
[SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public PassportIdentity ()
diff --git a/mcs/class/System.Web/System.Web.Security/RolePrincipal.cs b/mcs/class/System.Web/System.Web.Security/RolePrincipal.cs
index b210f827476..4e8c3220dfe 100644
--- a/mcs/class/System.Web/System.Web.Security/RolePrincipal.cs
+++ b/mcs/class/System.Web/System.Web.Security/RolePrincipal.cs
@@ -40,11 +40,7 @@ namespace System.Web.Security {
[Serializable]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_4_0
public
-#else
- public sealed
-#endif
class RolePrincipal : IPrincipal {
IIdentity _identity;
diff --git a/mcs/class/System.Web/System.Web.Security/RoleProvider.cs b/mcs/class/System.Web/System.Web.Security/RoleProvider.cs
index d7b9daeda25..ad9079c09fe 100644
--- a/mcs/class/System.Web/System.Web.Security/RoleProvider.cs
+++ b/mcs/class/System.Web/System.Web.Security/RoleProvider.cs
@@ -32,9 +32,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public abstract class RoleProvider : ProviderBase
{
protected RoleProvider ()
diff --git a/mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs b/mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
index c84a9f1132d..cca4e838166 100644
--- a/mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
+++ b/mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
@@ -1049,20 +1049,16 @@ namespace System.Web.Security {
string alg_type = section.HashAlgorithmType;
if (alg_type.Length == 0) {
alg_type = MachineKeySection.Config.Validation.ToString ();
-#if NET_4_0
// support new (4.0) custom algorithms
if (alg_type.StartsWith ("alg:"))
alg_type = alg_type.Substring (4);
-#endif
}
using (HashAlgorithm hash = HashAlgorithm.Create (alg_type)) {
-#if NET_4_0
// for compatibility (with 2.0) we'll allow MD5 and SHA1 not to map to HMACMD5 and HMACSHA1
// but that won't work with new (4.0) algorithms, like HMACSHA256|384|512 or custom, won't work without using the key
KeyedHashAlgorithm kha = (hash as KeyedHashAlgorithm);
if (kha != null)
kha.Key = MachineKeySection.Config.GetValidationKey ();
-#endif
hash.TransformFinalBlock (hashBytes, 0, hashBytes.Length);
return Convert.ToBase64String (hash.Hash);
}
diff --git a/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs b/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
index f311585b849..ea189038e8e 100644
--- a/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
+++ b/mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
@@ -32,9 +32,7 @@ using System.Runtime.CompilerServices;
namespace System.Web.Security
{
-#if NET_4_0
[TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#endif
public sealed class ValidatePasswordEventArgs: EventArgs
{
bool cancel;
diff --git a/mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs b/mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs
index 16802f90831..b1c85a7bb44 100644
--- a/mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs
+++ b/mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs
@@ -333,41 +333,30 @@ namespace System.Web.SessionState
string Serialize (SessionStateItemCollection items)
{
-#if NET_4_0
GZipStream gzip = null;
-#endif
Stream output;
MemoryStream ms = null;
BinaryWriter writer = null;
try {
ms = new MemoryStream ();
-#if NET_4_0
if (sessionConfig.CompressionEnabled)
output = gzip = new GZipStream (ms, CompressionMode.Compress, true);
else
-#endif
output = ms;
writer = new BinaryWriter (output);
if (items != null)
items.Serialize (writer);
-#if NET_4_0
if (gzip != null)
gzip.Close ();
-#endif
writer.Close ();
return Convert.ToBase64String (ms.ToArray ());
} finally {
-#if NET_4_0
if (writer != null)
writer.Dispose ();
if (gzip != null)
gzip.Dispose ();
-#else
- if (writer != null)
- ((IDisposable)writer).Dispose ();
-#endif
if (ms != null)
ms.Dispose ();
}
@@ -378,41 +367,30 @@ namespace System.Web.SessionState
MemoryStream ms = null;
Stream input;
BinaryReader reader = null;
-#if NET_4_0
GZipStream gzip = null;
-#endif
try {
ms = new MemoryStream (Convert.FromBase64String (serializedItems));
var sessionItems = new SessionStateItemCollection ();
if (ms.Length > 0) {
-#if NET_4_0
if (sessionConfig.CompressionEnabled)
input = gzip = new GZipStream (ms, CompressionMode.Decompress, true);
else
-#endif
input = ms;
reader = new BinaryReader (input);
sessionItems = SessionStateItemCollection.Deserialize (reader);
-#if NET_4_0
if (gzip != null)
gzip.Close ();
-#endif
reader.Close ();
}
return new SessionStateStoreData (sessionItems, SessionStateUtility.GetSessionStaticObjects (context), timeout);
} finally {
-#if NET_4_0
if (reader != null)
reader.Dispose ();
if (gzip != null)
gzip.Dispose ();
-#else
- if (reader != null)
- ((IDisposable)reader).Dispose ();
-#endif
if (ms != null)
ms.Dispose ();
}
diff --git a/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs b/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs
index 6c80c75f3ae..2f17b8a6961 100644
--- a/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs
+++ b/mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs
@@ -100,24 +100,18 @@ namespace System.Web.SessionState
MemoryStream stream = null;
BinaryReader reader = null;
Stream input = null;
-#if NET_4_0
GZipStream gzip = null;
-#endif
try {
if (item.CollectionData != null && item.CollectionData.Length > 0) {
stream = new MemoryStream (item.CollectionData);
-#if NET_4_0
if (config.CompressionEnabled)
input = gzip = new GZipStream (stream, CompressionMode.Decompress, true);
else
-#endif
input = stream;
reader = new BinaryReader (input);
items = SessionStateItemCollection.Deserialize (reader);
-#if NET_4_0
if (gzip != null)
gzip.Close ();
-#endif
reader.Close ();
} else
items = new SessionStateItemCollection ();
@@ -130,15 +124,10 @@ namespace System.Web.SessionState
} finally {
if (stream != null)
stream.Dispose ();
-#if NET_4_0
if (reader != null)
reader.Dispose ();
if (gzip != null)
gzip.Dispose ();
-#else
- if (reader != null)
- ((IDisposable)reader).Dispose ();
-#endif
}
return new SessionStateStoreData (items,
@@ -225,26 +214,20 @@ namespace System.Web.SessionState
MemoryStream stream = null;
BinaryWriter writer = null;
Stream output = null;
-#if NET_4_0
GZipStream gzip = null;
-#endif
try {
SessionStateItemCollection items = item.Items as SessionStateItemCollection;
if (items != null && items.Count > 0) {
stream = new MemoryStream ();
-#if NET_4_0
if (config.CompressionEnabled)
output = gzip = new GZipStream (stream, CompressionMode.Compress, true);
else
-#endif
output = stream;
writer = new BinaryWriter (output);
items.Serialize (writer);
-#if NET_4_0
if (gzip != null)
gzip.Close ();
-#endif
writer.Close ();
collection_data = stream.ToArray ();
}
@@ -255,15 +238,10 @@ namespace System.Web.SessionState
throw new HttpException ("Failed to store session data.", ex);
} finally {
-#if NET_4_0
if (writer != null)
writer.Dispose ();
if (gzip != null)
gzip.Dispose ();
-#else
- if (writer != null)
- ((IDisposable)writer).Dispose ();
-#endif
if (stream != null)
stream.Dispose ();
}
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
index 635934c5a4b..495b941099c 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
@@ -265,9 +265,7 @@ namespace System.Web.UI.HtmlControls
if (req != null) {
XhtmlConformanceSection xhtml = WebConfigurationManager.GetSection ("system.web/xhtmlConformance") as XhtmlConformanceSection;
if (xhtml == null || xhtml.Mode != XhtmlConformanceMode.Strict)
-#if NET_4_0
if (RenderingCompatibilityLessThan40)
-#endif
// LAMESPEC: MSDN says the 'name' attribute is rendered only in
// Legacy mode, this is not true.
w.WriteAttribute ("name", Name);
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs
index 1e1773f810d..a890fc10f4b 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs
@@ -39,12 +39,10 @@ namespace System.Web.UI.HtmlControls
[ControlBuilder (typeof(HtmlHeadBuilder))]
public sealed class HtmlHead: HtmlGenericControl, IParserAccessor
{
-#if NET_4_0
string descriptionText;
string keywordsText;
HtmlMeta descriptionMeta;
HtmlMeta keywordsMeta;
-#endif
string titleText;
HtmlTitle title;
//Hashtable metadata;
@@ -79,7 +77,6 @@ namespace System.Web.UI.HtmlControls
writer.Write (titleText);
writer.RenderEndTag ();
}
-#if NET_4_0
if (descriptionMeta == null && descriptionText != null) {
writer.AddAttribute ("name", "description");
writer.AddAttribute ("content", HttpUtility.HtmlAttributeEncode (descriptionText));
@@ -93,7 +90,6 @@ namespace System.Web.UI.HtmlControls
writer.RenderBeginTag (HtmlTextWriterTag.Meta);
writer.RenderEndTag ();
}
-#endif
if (styleSheet != null)
styleSheet.Render (writer);
}
@@ -108,7 +104,6 @@ namespace System.Web.UI.HtmlControls
title = t;
}
-#if NET_4_0
HtmlMeta meta = control as HtmlMeta;
if (meta != null) {
if (String.Compare ("keywords", meta.Name, StringComparison.OrdinalIgnoreCase) == 0)
@@ -116,7 +111,6 @@ namespace System.Web.UI.HtmlControls
else if (String.Compare ("description", meta.Name, StringComparison.OrdinalIgnoreCase) == 0)
descriptionMeta = meta;
}
-#endif
base.AddedControl (control, index);
}
@@ -125,15 +119,12 @@ namespace System.Web.UI.HtmlControls
if (title == control)
title = null;
-#if NET_4_0
if (keywordsMeta == control)
keywordsMeta = null;
else if (descriptionMeta == control)
descriptionMeta = null;
-#endif
base.RemovedControl (control);
}
-#if NET_4_0
public string Description {
get {
if (descriptionMeta != null)
@@ -163,7 +154,6 @@ namespace System.Web.UI.HtmlControls
keywordsText = value;
}
}
-#endif
public IStyleSheet StyleSheet {
get {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs
index 5511381d25a..e255f407852 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs
@@ -126,11 +126,9 @@ namespace System.Web.UI.WebControls
requiresDataBinding = value;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected void ConfirmInitState ()
{
initialized = true;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
index b7d99f28e77..178c576e6b3 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
@@ -262,11 +262,9 @@ namespace System.Web.UI.WebControls
return selectArguments;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
TableStyle TableStyle {
// this will throw an InvalidCasException just like we need
get { return (TableStyle) ControlStyle; }
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
index aa1f49c7121..5f67b35db34 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
@@ -492,11 +492,9 @@ namespace System.Web.UI.WebControls
return weekendDayStyle;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
// Private properties
DateTimeFormatInfo DateInfo {
get {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
index 33a6c84e9f3..8c20dd30505 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
@@ -43,9 +43,7 @@ namespace System.Web.UI.WebControls
[DefaultEvent ("ChangedPassword")]
[Designer ("System.Web.UI.Design.WebControls.ChangePasswordDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public class ChangePassword : CompositeControl, INamingContainer
-#if NET_4_0
, IRenderOuterTable
-#endif
{
static readonly object cancelButtonClickEvent = new object ();
static readonly object changedPasswordEvent = new object ();
@@ -58,9 +56,7 @@ namespace System.Web.UI.WebControls
public static readonly string CancelButtonCommandName = "Cancel";
public static readonly string ChangePasswordButtonCommandName = "ChangePassword";
public static readonly string ContinueButtonCommandName = "Continue";
-#if NET_4_0
bool renderOuterTable = true;
-#endif
Style _cancelButtonStyle = null;
Style _changePasswordButtonStyle = null;
Style _continueButtonStyle = null;
@@ -589,14 +585,12 @@ namespace System.Web.UI.WebControls
get { return ViewState.GetString ("PasswordRequiredErrorMessage", String.Empty); }
set { ViewState ["PasswordRequiredErrorMessage"] = value; }
}
-#if NET_4_0
// LAMESPEC: MSDN claims it's present in 3.5, but it's not
[DefaultValue (true)]
public virtual bool RenderOuterTable {
get { return renderOuterTable; }
set { renderOuterTable = value; }
}
-#endif
[DefaultValue ("")]
[UrlProperty]
[Editor ("System.Web.UI.Design.UrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
@@ -765,9 +759,7 @@ namespace System.Web.UI.WebControls
protected internal override void Render (HtmlTextWriter writer)
{
-#if NET_4_0
VerifyInlinePropertiesNotSet ();
-#endif
for (int i = 0; i < Controls.Count; i++)
if (Controls [i].Visible)
Controls [i].Render (writer);
@@ -1144,9 +1136,7 @@ namespace System.Web.UI.WebControls
class BaseChangePasswordContainer : Control, INamingContainer, INonBindingContainer
{
protected readonly ChangePassword _owner = null;
-#if NET_4_0
bool renderOuterTable;
-#endif
Table _table = null;
TableCell _containerCell = null;
@@ -1156,31 +1146,25 @@ namespace System.Web.UI.WebControls
throw new ArgumentNullException ("owner");
_owner = owner;
-#if NET_4_0
renderOuterTable = _owner.RenderOuterTable;
if (renderOuterTable)
-#endif
InitTable ();
}
public void InstantiateTemplate (ITemplate template)
{
-#if NET_4_0
if (!_owner.RenderOuterTable)
template.InstantiateIn (this);
else
-#endif
template.InstantiateIn (_containerCell);
}
void InitTable ()
{
_table = new Table ();
-#if NET_4_0
string id = _owner.ID;
if (!String.IsNullOrEmpty (id))
-#endif
_table.Attributes.Add ("id", _owner.ID);
_table.CellSpacing = 0;
@@ -1327,7 +1311,6 @@ namespace System.Web.UI.WebControls
{
Table table = new Table ();
table.CellPadding = 0;
-#if NET_4_0
Style ownerStyle = _owner.ControlStyle;
Style tableStyle = table.ControlStyle;
FontInfo ownerFont = ownerStyle.Font;
@@ -1340,7 +1323,6 @@ namespace System.Web.UI.WebControls
tableStyle.ForeColor = ownerForeColor;
ownerStyle.RemoveBit ((int)global::System.Web.UI.WebControls.Style.Styles.ForeColor);
}
-#endif
// Row #0
table.Controls.Add (
CreateRow (new LiteralControl (_owner.ChangePasswordTitleText),
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
index 0169ffa1e7a..905740a1ea9 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
@@ -315,11 +315,9 @@ namespace System.Web.UI.WebControls
bool need_span = ControlStyleCreated && !ControlStyle.IsEmpty;
bool enabled = IsEnabled;
if (!enabled) {
-#if NET_4_0
if (!RenderingCompatibilityLessThan40)
ControlStyle.PrependCssClass (DisabledCssClass);
else
-#endif
w.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
need_span = true;
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
index a68fb9ef388..7cb9ba78c57 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
@@ -95,11 +95,7 @@ namespace System.Web.UI.WebControls
get { return (RepeatLayout) ViewState.GetInt ("RepeatLayout", (int) RepeatLayout.Table); }
set {
bool outOfRange;
-#if NET_4_0
outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
-#else
- outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
-#endif
if (outOfRange)
throw new ArgumentOutOfRangeException ("value");
ViewState ["RepeatLayout"] = value;
@@ -298,14 +294,12 @@ namespace System.Web.UI.WebControls
check_box.Attributes.Clear ();
if (item.HasAttributes)
check_box.Attributes.CopyFrom (item.Attributes);
-#if NET_4_0
if (!RenderingCompatibilityLessThan40) {
var attrs = check_box.InputAttributes;
attrs.Clear ();
attrs.Add ("value", item.Value);
}
-#endif
check_box.RenderControl (writer);
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs b/mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs
index 1564338e100..88614e2a1b4 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs
@@ -38,11 +38,9 @@ namespace System.Web.UI.WebControls
[Designer ("System.Web.UI.Design.WebControls.CompositeControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public abstract class CompositeControl : WebControl, INamingContainer, ICompositeControlDesignerAccessor
{
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected CompositeControl ()
{
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
index 9467ad22756..a94d6a3560a 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
@@ -77,11 +77,7 @@ namespace System.Web.UI.WebControls
{
return new ControlParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext ctx, Control control)
{
if (control == null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs
index ad6e81abf96..be5171213f3 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs
@@ -67,11 +67,7 @@ namespace System.Web.UI.WebControls
{
return new CookieParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext ctx, Control control)
{
if (ctx == null || ctx.Request == null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs
index cbc0cb17bfd..34767143685 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs
@@ -34,9 +34,7 @@ using System.Collections.Specialized;
namespace System.Web.UI.WebControls
{
public class DataKey : IStateManager
-#if NET_4_0
, IEquatable <DataKey>
-#endif
{
IOrderedDictionary keyTable;
string[] keyNames;
@@ -81,7 +79,6 @@ namespace System.Web.UI.WebControls
return readonlyKeyTable;
}
}
-#if NET_4_0
public bool Equals (DataKey other)
{
if (other == null)
@@ -123,7 +120,6 @@ namespace System.Web.UI.WebControls
return true;
}
-#endif
protected virtual void LoadViewState (object savedState)
{
if (savedState is Pair) {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
index 0a27a71c28a..a25879c9090 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
@@ -307,10 +307,8 @@ namespace System.Web.UI.WebControls
return (o == null) ? RepeatLayout.Table : (RepeatLayout) o;
}
set {
-#if NET_4_0
if (value == RepeatLayout.OrderedList || value == RepeatLayout.UnorderedList)
throw new ArgumentOutOfRangeException (String.Format ("DataList does not support the '{0}' layout.", value));
-#endif
ViewState ["RepeatLayout"] = value;
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs
index e476c63c8c6..c2c1bd32a01 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs
@@ -61,11 +61,9 @@ namespace System.Web.UI.WebControls
public virtual ListItemType ItemType {
get { return type; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override Style CreateControlStyle ()
{
return new TableItemStyle (ViewState);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
index 988f58e4039..b007474c550 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
@@ -43,15 +43,11 @@ namespace System.Web.UI.WebControls
[DesignerAttribute ("System.Web.UI.Design.WebControls.DetailsViewDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ControlValuePropertyAttribute ("SelectedValue")]
[DefaultEventAttribute ("PageIndexChanging")]
-#if NET_4_0
[DataKeyProperty ("DataKey")]
-#endif
[AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class DetailsView: CompositeDataBoundControl, ICallbackEventHandler, ICallbackContainer, IDataItemContainer, INamingContainer, IPostBackEventHandler, IPostBackContainer
-#if NET_4_0
, IDataBoundItemControl, IDataBoundControl, IFieldControl
-#endif
{
object dataItem;
@@ -300,7 +296,6 @@ namespace System.Web.UI.WebControls
throw new HttpException (String.Format (unhandledEventExceptionMessage, ID, "ItemUpdating"));
}
-#if NET_4_0
DataBoundControlMode IDataBoundItemControl.Mode {
get {
switch (CurrentMode) {
@@ -332,7 +327,6 @@ namespace System.Web.UI.WebControls
throw new NotImplementedException ();
}
}
-#endif
[WebCategoryAttribute ("Paging")]
[DefaultValueAttribute (false)]
public virtual bool AllowPaging {
@@ -1600,9 +1594,7 @@ namespace System.Web.UI.WebControls
break;
}
}
-#if NET_4_0
public
-#endif
void SetPageIndex (int newIndex)
{
DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
index 1590db5d44d..67580e485bc 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
@@ -81,11 +81,9 @@ namespace System.Web.UI.WebControls
set { base.SelectedIndex = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
#endregion // Public Instance Properties
#region Protected Instance Methods
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
index 33a305d443e..3e6711bb8d4 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
@@ -67,11 +67,7 @@ namespace System.Web.UI.WebControls
{
return new FormParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext ctx, Control control)
{
HttpRequest req = ctx != null ? ctx.Request : null;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs b/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
index 1c40031f0d8..55decb19cab 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
@@ -42,15 +42,11 @@ namespace System.Web.UI.WebControls
[DesignerAttribute ("System.Web.UI.Design.WebControls.FormViewDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ControlValuePropertyAttribute ("SelectedValue")]
[DefaultEventAttribute ("PageIndexChanging")]
-#if NET_4_0
[DataKeyProperty ("DataKey")]
-#endif
[AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class FormView: CompositeDataBoundControl, IDataItemContainer, INamingContainer, IPostBackEventHandler, IPostBackContainer
-#if NET_4_0
, IDataBoundItemControl, IDataBoundControl, IRenderOuterTable
-#endif
{
object dataItem;
@@ -91,9 +87,7 @@ namespace System.Web.UI.WebControls
IOrderedDictionary _keyTable;
DataKey key;
DataKey oldEditValues;
-#if NET_4_0
bool renderOuterTable = true;
-#endif
static readonly object PageIndexChangedEvent = new object();
static readonly object PageIndexChangingEvent = new object();
static readonly object ItemCommandEvent = new object();
@@ -809,7 +803,6 @@ namespace System.Web.UI.WebControls
get;
set;
}
-#if NET_4_0
[DefaultValue (true)]
public virtual bool RenderOuterTable {
get { return renderOuterTable; }
@@ -869,7 +862,6 @@ namespace System.Web.UI.WebControls
return baseProps + ", " + props;
}
-#endif
public virtual bool IsBindableType (Type type)
{
return type.IsPrimitive || type == typeof (string) || type == typeof (DateTime) || type == typeof (Guid) || type == typeof (Decimal);
@@ -1111,9 +1103,7 @@ namespace System.Web.UI.WebControls
}
cell.ColumnSpan = 2;
row.Cells.Add (cell);
-#if NET_4_0
row.RenderJustCellContents = !RenderOuterTable;
-#endif
}
void FillRowDataKey (object dataItem)
@@ -1344,9 +1334,7 @@ namespace System.Web.UI.WebControls
break;
}
}
-#if NET_4_0
public
-#endif
void SetPageIndex (int index)
{
FormViewPageEventArgs args = new FormViewPageEventArgs (index);
@@ -1613,17 +1601,13 @@ namespace System.Web.UI.WebControls
protected internal override void Render (HtmlTextWriter writer)
{
-#if NET_4_0
VerifyInlinePropertiesNotSet ();
if (RenderOuterTable) {
-#endif
PrepareControlHierarchy ();
if (table != null)
table.Render (writer);
-#if NET_4_0
} else if (table != null)
table.RenderChildren (writer);
-#endif
}
PostBackOptions IPostBackContainer.GetPostBackOptions (IButtonControl control)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs b/mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs
index 5ad478a201b..ff8b000baaf 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs
@@ -42,12 +42,10 @@ namespace System.Web.UI.WebControls
int rowIndex;
DataControlRowState rowState;
DataControlRowType rowType;
-#if NET_4_0
internal bool RenderJustCellContents {
get;
set;
}
-#endif
public FormViewRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
{
this.rowIndex = rowIndex;
@@ -78,7 +76,6 @@ namespace System.Web.UI.WebControls
}
return false;
}
-#if NET_4_0
protected internal override void Render (HtmlTextWriter writer)
{
if (!RenderJustCellContents) {
@@ -89,7 +86,6 @@ namespace System.Web.UI.WebControls
foreach (TableCell cell in Cells)
cell.RenderContents (writer);
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs b/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
index 9dee6b68199..8e2695137dc 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
@@ -43,15 +43,11 @@ namespace System.Web.UI.WebControls
[DesignerAttribute ("System.Web.UI.Design.WebControls.GridViewDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
[ControlValuePropertyAttribute ("SelectedValue")]
[DefaultEventAttribute ("SelectedIndexChanged")]
-#if NET_4_0
[DataKeyProperty ("DataKey")]
-#endif
[AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class GridView: CompositeDataBoundControl, ICallbackEventHandler, ICallbackContainer, IPostBackEventHandler, IPostBackContainer, IPersistedSelector
-#if NET_4_0
, IDataKeysControl, IDataBoundListControl, IDataBoundControl, IFieldControl
-#endif
{
Table table;
GridViewRowCollection rows;
@@ -66,9 +62,7 @@ namespace System.Web.UI.WebControls
ITemplate emptyDataTemplate;
PropertyDescriptor[] cachedKeyProperties;
-#if NET_4_0
PropertyDescriptor[] cachedSuffixKeyProperties;
-#endif
// View state
DataControlFieldCollection columns;
PagerSettings pagerSettings;
@@ -81,7 +75,6 @@ namespace System.Web.UI.WebControls
TableItemStyle pagerStyle;
TableItemStyle rowStyle;
TableItemStyle selectedRowStyle;
-#if NET_4_0
TableItemStyle sortedAscendingCellStyle;
TableItemStyle sortedAscendingHeaderStyle;
TableItemStyle sortedDescendingCellStyle;
@@ -89,7 +82,6 @@ namespace System.Web.UI.WebControls
List <DataKey> _dataKeySuffixList;
DataKeyArray rowSuffixKeys;
-#endif
List <DataKey> _dataKeyList;
DataKeyArray keys;
DataKey oldEditValues;
@@ -560,9 +552,7 @@ namespace System.Web.UI.WebControls
}
[BrowsableAttribute(false)]
-#if NET_4_0
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-#endif
public IAutoFieldGenerator ColumnsGenerator {
get;
set;
@@ -592,7 +582,6 @@ namespace System.Web.UI.WebControls
return _dataKeyList;
}
}
-#if NET_4_0
List <DataKey> DataKeySuffixList {
get {
if (_dataKeySuffixList == null)
@@ -601,7 +590,6 @@ namespace System.Web.UI.WebControls
return _dataKeySuffixList;
}
}
-#endif
[BrowsableAttribute (false)]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public virtual DataKeyArray DataKeys {
@@ -1104,7 +1092,6 @@ namespace System.Web.UI.WebControls
RequireBinding ();
}
}
-#if NET_4_0
[TypeConverter (typeof(StringArrayConverter))]
[DefaultValue (null)]
public virtual string[] ClientIDRowSuffix {
@@ -1218,7 +1205,6 @@ namespace System.Web.UI.WebControls
return sortedDescendingHeaderStyle;
}
}
-#endif
public virtual bool IsBindableType (Type type)
{
return type.IsPrimitive || type == typeof (string) || type == typeof (decimal) || type == typeof (DateTime) || type == typeof (Guid);
@@ -1463,24 +1449,18 @@ namespace System.Web.UI.WebControls
Table mainTable = ContainedTable;
List <DataKey> dataKeyList;
string[] dataKeyNames;
-#if NET_4_0
List <DataKey> dataKeySuffixList;
string[] clientIDRowSuffix;
-#endif
if (dataBinding) {
dataKeyList = DataKeyList;
dataKeyNames = DataKeyNames;
-#if NET_4_0
dataKeySuffixList = DataKeySuffixList;
clientIDRowSuffix = ClientIDRowSuffix;
-#endif
} else {
dataKeyList = null;
dataKeyNames = null;
-#if NET_4_0
dataKeySuffixList = null;
clientIDRowSuffix = null;
-#endif
}
while (skip_first || enumerator.MoveNext ()) {
@@ -1516,18 +1496,14 @@ namespace System.Web.UI.WebControls
if (EditIndex == row.RowIndex)
oldEditValues = new DataKey (GetRowValues (row, true, true));
dataKeyList.Add (new DataKey (CreateRowDataKey (row), dataKeyNames));
-#if NET_4_0
dataKeySuffixList.Add (new DataKey (CreateRowSuffixDataKey (row), clientIDRowSuffix));
-#endif
OnRowDataBound (new GridViewRowEventArgs (row));
}
}
if (list.Count == 0) {
-#if NET_4_0
if (ShowHeader && ShowHeaderWhenEmpty)
CreateHeaderRow (mainTable, fields, dataBinding);
-#endif
GridViewRow emptyRow = CreateEmptyrRow (fieldCount);
if (emptyRow != null) {
OnRowCreated (new GridViewRowEventArgs (emptyRow));
@@ -1537,10 +1513,8 @@ namespace System.Web.UI.WebControls
OnRowDataBound (new GridViewRowEventArgs (emptyRow));
}
}
-#if NET_4_0
if (mainTable.Rows.Count == 0)
table = null;
-#endif
return 0;
} else {
GridViewRow footerRow = CreateRow (-1, -1, DataControlRowType.Footer, DataControlRowState.Normal);
@@ -1706,14 +1680,12 @@ namespace System.Web.UI.WebControls
LoadAndCacheProperties (DataKeyNames, dataItem, ref cachedKeyProperties);
return CreateDictionaryFromProperties (cachedKeyProperties, dataItem);
}
-#if NET_4_0
IOrderedDictionary CreateRowSuffixDataKey (GridViewRow row)
{
object dataItem = row.DataItem;
LoadAndCacheProperties (ClientIDRowSuffix, dataItem, ref cachedSuffixKeyProperties);
return CreateDictionaryFromProperties (cachedSuffixKeyProperties, dataItem);
}
-#endif
IOrderedDictionary GetRowValues (GridViewRow row, bool includeReadOnlyFields, bool includePrimaryKey)
{
OrderedDictionary dic = new OrderedDictionary ();
@@ -1813,10 +1785,8 @@ namespace System.Web.UI.WebControls
default:
break;
}
-#if NET_4_0
string sortExpression = SortExpression;
bool haveSorting = !String.IsNullOrEmpty (sortExpression);
-#endif
foreach (TableCell cell in row.Cells) {
DataControlFieldCell fcell = cell as DataControlFieldCell;
if (fcell != null) {
@@ -1832,10 +1802,8 @@ namespace System.Web.UI.WebControls
case DataControlRowType.Header:
if (field.HeaderStyleCreated && !field.HeaderStyle.IsEmpty)
cell.ControlStyle.MergeWith (field.HeaderStyle);
-#if NET_4_0
if (haveSorting)
MergeWithSortingStyle (sortExpression, sortedAscendingHeaderStyle, sortedDescendingHeaderStyle, field, cell);
-#endif
break;
case DataControlRowType.Footer:
if (field.FooterStyleCreated && !field.FooterStyle.IsEmpty)
@@ -1851,17 +1819,14 @@ namespace System.Web.UI.WebControls
}
if (field.ItemStyleCreated && !field.ItemStyle.IsEmpty)
cell.ControlStyle.MergeWith (field.ItemStyle);
-#if NET_4_0
if (haveSorting)
MergeWithSortingStyle (sortExpression, sortedAscendingCellStyle, sortedDescendingCellStyle, field, cell);
-#endif
break;
}
}
}
}
}
-#if NET_4_0
void MergeWithSortingStyle (string sortExpression, TableItemStyle ascending, TableItemStyle descending, DataControlField field, TableCell cell)
{
if (String.Compare (field.SortExpression, sortExpression, StringComparison.OrdinalIgnoreCase) != 0)
@@ -1869,7 +1834,6 @@ namespace System.Web.UI.WebControls
cell.ControlStyle.MergeWith (SortDirection == SortDirection.Ascending ? ascending : descending);
}
-#endif
protected internal override void OnInit (EventArgs e)
{
Page page = Page;
@@ -2035,9 +1999,7 @@ namespace System.Web.UI.WebControls
OnSorted (EventArgs.Empty);
}
-#if NET_4_0
public
-#endif
void SelectRow (int index)
{
GridViewSelectEventArgs args = new GridViewSelectEventArgs (index);
@@ -2048,9 +2010,7 @@ namespace System.Web.UI.WebControls
OnSelectedIndexChanged (EventArgs.Empty);
}
}
-#if NET_4_0
public
-#endif
void SetPageIndex (int newIndex)
{
GridViewPageEventArgs args = new GridViewPageEventArgs (newIndex);
@@ -2063,9 +2023,7 @@ namespace System.Web.UI.WebControls
PageIndex = args.NewPageIndex;
OnPageIndexChanged (EventArgs.Empty);
}
-#if NET_4_0
public
-#endif
void SetEditRow (int index)
{
GridViewEditEventArgs args = new GridViewEditEventArgs (index);
@@ -2193,12 +2151,10 @@ namespace System.Web.UI.WebControls
if (state [8] != null)
((IStateManager) OldEditValues).LoadViewState (state [8]);
pageCount = (int)state [9];
-#if NET_4_0
if (state [10] != null)
ClientIDRowSuffix = (string[]) state [10];
if (state [11] != null)
LoadDataKeyArrayState ((object []) state [11], out rowSuffixKeys);
-#endif
}
protected internal override object SaveControlState ()
@@ -2226,10 +2182,8 @@ namespace System.Web.UI.WebControls
SaveDataKeyArrayState (keys),
(oldEditValues == null ? null : ((IStateManager)oldEditValues).SaveViewState ()),
pageCount,
-#if NET_4_0
ClientIDRowSuffix,
SaveDataKeyArrayState (rowSuffixKeys)
-#endif
};
}
@@ -2281,7 +2235,6 @@ namespace System.Web.UI.WebControls
((IStateManager)editRowStyle).TrackViewState();
if (emptyDataRowStyle != null)
((IStateManager)emptyDataRowStyle).TrackViewState();
-#if NET_4_0
if (sortedAscendingCellStyle != null)
((IStateManager)sortedAscendingCellStyle).TrackViewState ();
@@ -2295,7 +2248,6 @@ namespace System.Web.UI.WebControls
((IStateManager)sortedDescendingHeaderStyle).TrackViewState ();
if (rowSuffixKeys != null)
((IStateManager) rowSuffixKeys).TrackViewState ();
-#endif
if (keys != null)
((IStateManager)keys).TrackViewState();
if (autoFieldProperties != null) {
@@ -2333,12 +2285,10 @@ namespace System.Web.UI.WebControls
(editRowStyle == null ? null : ((IStateManager)editRowStyle).SaveViewState()), // 9
(emptyDataRowStyle == null ? null : ((IStateManager)emptyDataRowStyle).SaveViewState()), // 10
autoFieldsData, // 11
-#if NET_4_0
sortedAscendingCellStyle == null ? null : ((IStateManager)sortedAscendingCellStyle).SaveViewState (), // 12
sortedAscendingHeaderStyle == null ? null : ((IStateManager)sortedAscendingHeaderStyle).SaveViewState (), // 13
sortedDescendingCellStyle == null ? null : ((IStateManager)sortedDescendingCellStyle).SaveViewState (), // 14
sortedDescendingHeaderStyle == null ? null : ((IStateManager)sortedDescendingHeaderStyle).SaveViewState () // 15
-#endif
};
for (int i = states.Length - 1; i >= 0; i--) {
@@ -2391,7 +2341,6 @@ namespace System.Web.UI.WebControls
((IStateManager)EditRowStyle).LoadViewState (states[9]);
if (states[10] != null)
((IStateManager)EmptyDataRowStyle).LoadViewState (states[10]);
-#if NET_4_0
if (states [12] != null)
((IStateManager)sortedAscendingCellStyle).LoadViewState (states [12]);
if (states [13] != null)
@@ -2400,7 +2349,6 @@ namespace System.Web.UI.WebControls
((IStateManager)sortedDescendingCellStyle).LoadViewState (states [14]);
if (states [15] != null)
((IStateManager)sortedDescendingHeaderStyle).LoadViewState (states [15]);
-#endif
}
void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs b/mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs
index 7873e1c0785..b90a4f0b947 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs
@@ -104,13 +104,7 @@ namespace System.Web.UI.WebControls
w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveClientUrl (image_url));
str = Text;
-#if !NET_4_0
- if (!String.IsNullOrEmpty (str))
-#endif
w.AddAttribute (HtmlTextWriterAttribute.Alt, str);
-#if !NET_4_0
- w.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
-#endif
w.RenderBeginTag (HtmlTextWriterTag.Img);
w.RenderEndTag ();
} else
@@ -162,10 +156,8 @@ namespace System.Web.UI.WebControls
Controls.Clear ();
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs b/mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs
index 1a4f8eb4311..85a62d5df94 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs
@@ -33,10 +33,6 @@ using System.Web;
namespace System.Web.UI.WebControls
{
-#if !NET_4_0
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public interface IPersistedSelector
{
DataKey DataKey { get; set; }
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
index 2f346d0621a..19178cf889e 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
@@ -147,11 +147,9 @@ namespace System.Web.UI.WebControls
}
set { ViewState ["GenerateEmptyAlternateText"] = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override void AddAttributesToRender (HtmlTextWriter writer)
{
base.AddAttributesToRender (writer);
@@ -196,10 +194,6 @@ namespace System.Web.UI.WebControls
#if BUG_78875_FIXED
if (Context.Request.Browser.SupportsCss)
#endif
-#if !NET_4_0
- if (BorderWidth.IsEmpty)
- writer.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
-#endif
}
protected internal override void RenderContents (HtmlTextWriter writer)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
index 6cb79f80aa0..d9a0f271921 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
@@ -135,11 +135,9 @@ namespace System.Web.UI.WebControls
get { return AlternateText; }
set { AlternateText = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override void AddAttributesToRender (HtmlTextWriter writer)
{
Page page = Page;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs
index 3b567f19b26..9c5cbd5996d 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs
@@ -154,9 +154,7 @@ namespace System.Web.UI.WebControls
base.Render (writer);
if (spots != null && spots.Count > 0) {
-#if NET_4_0
bool enabled = Enabled;
-#endif
writer.AddAttribute (HtmlTextWriterAttribute.Id, "ImageMap" + ClientID);
writer.AddAttribute (HtmlTextWriterAttribute.Name, "ImageMap" + ClientID);
writer.RenderBeginTag (HtmlTextWriterTag.Map);
@@ -180,14 +178,10 @@ namespace System.Web.UI.WebControls
string target = spot.Target.Length > 0 ? spot.Target : Target;
if (!String.IsNullOrEmpty (target))
writer.AddAttribute (HtmlTextWriterAttribute.Target, target);
-#if NET_4_0
if (enabled) {
-#endif
string navUrl = ResolveClientUrl (spot.NavigateUrl);
writer.AddAttribute (HtmlTextWriterAttribute.Href, navUrl);
-#if NET_4_0
}
-#endif
break;
case HotSpotMode.PostBack:
writer.AddAttribute (HtmlTextWriterAttribute.Href, Page.ClientScript.GetPostBackClientHyperlink (this, n.ToString(), true));
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Label.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Label.cs
index d801a1ba49f..cdf6513928b 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Label.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Label.cs
@@ -72,11 +72,9 @@ namespace System.Web.UI.WebControls
get { return ViewState.GetString ("AssociatedControlID", String.Empty); }
set { ViewState ["AssociatedControlID"] = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override void LoadViewState (object savedState)
{
base.LoadViewState (savedState);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs b/mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
index 2a4361795e1..241934632a0 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
@@ -260,11 +260,9 @@ namespace System.Web.UI.WebControls
get { return ViewState.GetString ("ValidationGroup", String.Empty); }
set { ViewState ["ValidationGroup"] = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
index 51958555846..392a665c57a 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
@@ -45,29 +45,23 @@ namespace System.Web.UI.WebControls {
[DefaultEvent ("Authenticate")]
[Designer ("System.Web.UI.Design.WebControls.LoginDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public class Login : CompositeControl
-#if NET_4_0
, IRenderOuterTable
-#endif
{
#region LoginContainer
// TODO: This class should probably be folded into a generic one with BaseChangePasswordContainer
sealed class LoginContainer : Control
{
readonly Login _owner;
-#if NET_4_0
bool renderOuterTable;
-#endif
Table _table;
TableCell _containerCell;
public LoginContainer (Login owner)
{
_owner = owner;
-#if NET_4_0
renderOuterTable = _owner.RenderOuterTable;
if (renderOuterTable)
-#endif
InitTable ();
}
@@ -88,11 +82,9 @@ namespace System.Web.UI.WebControls {
public void InstantiateTemplate (ITemplate template)
{
-#if NET_4_0
if (!renderOuterTable)
template.InstantiateIn (this);
else
-#endif
template.InstantiateIn (_containerCell);
}
@@ -441,9 +433,7 @@ namespace System.Web.UI.WebControls {
LoginContainer container;
string _password;
-#if NET_4_0
bool renderOuterTable = true;
-#endif
public Login ()
{
}
@@ -886,13 +876,11 @@ namespace System.Web.UI.WebControls {
ViewState ["PasswordRequiredErrorMessage"] = value;
}
}
-#if NET_4_0
[DefaultValue (true)]
public virtual bool RenderOuterTable {
get { return renderOuterTable; }
set { renderOuterTable = value; }
}
-#endif
[DefaultValue (false)]
[Themeable (false)]
public virtual bool RememberMeSet {
@@ -1191,9 +1179,7 @@ namespace System.Web.UI.WebControls {
protected internal override void Render (HtmlTextWriter writer)
{
-#if NET_4_0
VerifyInlinePropertiesNotSet ();
-#endif
// VisibleWhenLoggedIn isn't applicable to the default login page
if (!VisibleWhenLoggedIn && !IsDefaultLoginPage () && IsLoggedIn ())
return;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs b/mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs
index e2f27565139..11a2e49ad90 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs
@@ -59,11 +59,9 @@ namespace System.Web.UI.WebControls {
ViewState ["FormatString"] = value;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected internal override void Render (HtmlTextWriter writer)
{
if (!Anonymous) {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs
index 4f381f6bc9f..912f6c4f557 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs
@@ -84,11 +84,9 @@ namespace System.Web.UI.WebControls
Style staticSelectedLinkStyle;
Style dynamicHoverLinkStyle;
Style staticHoverLinkStyle;
-#if NET_4_0
bool? renderList;
bool includeStyleBlock = true;
MenuRenderingMode renderingMode = MenuRenderingMode.Default;
-#endif
static readonly object MenuItemClickEvent = new object();
static readonly object MenuItemDataBoundEvent = new object();
@@ -128,7 +126,6 @@ namespace System.Web.UI.WebControls
return renderer;
}
}
-#if NET_4_0
bool RenderList {
get {
if (renderList == null) {
@@ -172,7 +169,6 @@ namespace System.Web.UI.WebControls
renderer = CreateRenderer (renderer);
}
}
-#endif
[DefaultValueAttribute (null)]
[PersistenceMode (PersistenceMode.InnerProperty)]
[EditorAttribute ("System.Web.UI.Design.WebControls.MenuBindingsEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
@@ -320,11 +316,7 @@ namespace System.Web.UI.WebControls
if (o != null)
return (Unit)o;
// LAMESPEC: on 4.0 it returns Unit.Empty and on 3.5 16px
-#if NET_4_0
return Unit.Empty;
-#else
- return new Unit (16);
-#endif
}
set {
ViewState["StaticSubMenuIndent"] = value;
@@ -895,7 +887,6 @@ namespace System.Web.UI.WebControls
IMenuRenderer CreateRenderer (IMenuRenderer current)
{
-#if NET_4_0
Type newType = null;
switch (RenderingMode) {
@@ -920,10 +911,6 @@ namespace System.Web.UI.WebControls
if (current == null || current.GetType () != newType)
return Activator.CreateInstance (newType, this) as IMenuRenderer;
-#else
- if (current == null)
- return new MenuTableRenderer (this);
-#endif
return current;
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs b/mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs
index ec11be5a43c..16ff899aa9e 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs
@@ -198,7 +198,6 @@ namespace System.Web.UI.WebControls
get { return ViewState.GetString ("SeparatorImageUrlField", String.Empty); }
set { ViewState ["SeparatorImageUrlField"] = value; }
}
-#if NET_4_0
public override string ToString ()
{
string dm = DataMember;
@@ -207,7 +206,6 @@ namespace System.Web.UI.WebControls
return dm;
}
-#endif
void IStateManager.LoadViewState (object savedState)
{
ViewState.LoadViewState (savedState);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs b/mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs
index ffe73096247..85bc219b9ef 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs
@@ -419,15 +419,11 @@ namespace System.Web.UI.WebControls
if (item.Depth > 0 && !isDynamicItem) {
double value;
-#if NET_4_0
Unit unit = oc.StaticSubMenuIndent;
if (unit == Unit.Empty)
value = 16;
else
value = unit.Value;
-#else
- value = oc.StaticSubMenuIndent.Value;
-#endif
Unit indent = new Unit (value * item.Depth, oc.StaticSubMenuIndent.Type);
writer.AddStyleAttribute (HtmlTextWriterStyle.MarginLeft, indent.ToString ());
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
index a6525f69151..f808807a364 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
@@ -235,11 +235,9 @@ namespace System.Web.UI.WebControls {
ViewState ["ScrollBars"] = value;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override Style CreateControlStyle ()
{
return new PanelStyle (ViewState);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
index 400fd88b017..560acf8c5b0 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
@@ -406,11 +406,7 @@ namespace System.Web.UI.WebControls {
// returns the value of the control that it is bound to, while
// the QueryStringParameter object retrieves the current name/value pair from
// the HttpRequest object.
-#if NET_4_0
protected internal
-#else
- protected
-#endif
virtual object Evaluate (HttpContext context, Control control)
{
return null;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs b/mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs
index 51f0d41d1e4..70a6f89ce05 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs
@@ -43,9 +43,7 @@ namespace System.Web.UI.WebControls
[DefaultEvent ("SendingMail")]
[Designer ("System.Web.UI.Design.WebControls.PasswordRecoveryDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
public class PasswordRecovery : CompositeControl
-#if NET_4_0
, IRenderOuterTable
-#endif
{
static readonly object answerLookupErrorEvent = new object ();
static readonly object sendingMailEvent = new object ();
@@ -55,9 +53,7 @@ namespace System.Web.UI.WebControls
static readonly object verifyingUserEvent = new object ();
public static readonly string SubmitButtonCommandName = "Submit";
-#if NET_4_0
bool renderOuterTable = true;
-#endif
TableItemStyle _failureTextStyle;
TableItemStyle _hyperLinkStyle;
TableItemStyle _instructionTextStyle;
@@ -248,13 +244,11 @@ namespace System.Web.UI.WebControls
get { return ViewState.GetString ("QuestionTitleText", "Identity Confirmation"); }
set { ViewState ["QuestionTitleText"] = value; }
}
-#if NET_4_0
[DefaultValue (true)]
public virtual bool RenderOuterTable {
get { return renderOuterTable; }
set { renderOuterTable = value; }
}
-#endif
[DefaultValue ("")]
[UrlProperty]
[Editor ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
@@ -1006,29 +1000,23 @@ namespace System.Web.UI.WebControls
abstract class BasePasswordRecoveryContainer : Control, INamingContainer
{
protected readonly PasswordRecovery _owner = null;
-#if NET_4_0
bool renderOuterTable;
-#endif
Table _table;
TableCell _containerCell = null;
public BasePasswordRecoveryContainer (PasswordRecovery owner)
{
_owner = owner;
-#if NET_4_0
renderOuterTable = _owner.RenderOuterTable;
if (renderOuterTable)
-#endif
InitTable ();
}
public void InstantiateTemplate (ITemplate template)
{
-#if NET_4_0
if (!renderOuterTable)
template.InstantiateIn (this);
else
-#endif
template.InstantiateIn (_containerCell);
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs
index ab50eac3bba..45b3ad1c6af 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs
@@ -69,11 +69,7 @@ namespace System.Web.UI.WebControls
{
return new ProfileParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext context, Control control)
{
if (context == null || context.Profile == null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs
index 7cef7c1774a..e6813d1eef1 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs
@@ -68,11 +68,7 @@ namespace System.Web.UI.WebControls {
{
return new QueryStringParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext ctx, Control control)
{
if (ctx == null || ctx.Request == null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
index e2dfde75bf9..86ba336d3e4 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
@@ -125,11 +125,7 @@ namespace System.Web.UI.WebControls {
set {
bool outOfRange;
-#if NET_4_0
outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
-#else
- outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
-#endif
if (outOfRange)
throw new ArgumentOutOfRangeException ("The radio buttons layout is not one of the RepeatLayout values.");
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs b/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
index 47b00056839..953d23981ce 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
@@ -42,7 +42,6 @@ namespace System.Web.UI.WebControls {
public void RenderRepeater (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
{
PrintValues (user);
-#if NET_4_0
RepeatLayout layout = RepeatLayout;
bool listLayout = layout == RepeatLayout.OrderedList || layout == RepeatLayout.UnorderedList;
@@ -59,19 +58,14 @@ namespace System.Web.UI.WebControls {
if (cols > 1)
throw new InvalidOperationException ("The UnorderedList and OrderedList layouts do not support multi-column layouts.");
}
-#endif
if (RepeatDirection == RepeatDirection.Vertical) {
-#if NET_4_0
if (listLayout)
RenderList (w, user, controlStyle, baseControl);
else
-#endif
RenderVert (w, user, controlStyle, baseControl);
} else {
-#if NET_4_0
if (listLayout)
throw new InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.");
-#endif
RenderHoriz (w, user, controlStyle, baseControl);
}
}
@@ -80,7 +74,6 @@ namespace System.Web.UI.WebControls {
{
w.Write ("<br />");
}
-#if NET_4_0
void RenderList (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
{
int items = user.RepeatedItemCount;
@@ -99,7 +92,6 @@ namespace System.Web.UI.WebControls {
w.RenderEndTag ();
}
-#endif
void RenderVert (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
{
int itms = user.RepeatedItemCount;
@@ -436,7 +428,6 @@ namespace System.Web.UI.WebControls {
case RepeatLayout.Flow:
c = new Label ();
break;
-#if NET_4_0
case RepeatLayout.OrderedList:
c = new WebControl (HtmlTextWriterTag.Ol);
break;
@@ -444,7 +435,6 @@ namespace System.Web.UI.WebControls {
case RepeatLayout.UnorderedList:
c = new WebControl (HtmlTextWriterTag.Ul);
break;
-#endif
default:
throw new InvalidOperationException (String.Format ("Unsupported RepeatLayout value '{0}'.", RepeatLayout));
}
@@ -498,11 +488,7 @@ namespace System.Web.UI.WebControls {
}
set {
bool outOfRange;
-#if NET_4_0
outOfRange = value < RepeatLayout.Table || value > RepeatLayout.OrderedList;
-#else
- outOfRange = value < RepeatLayout.Table || value > RepeatLayout.Flow;
-#endif
if (outOfRange)
throw new ArgumentOutOfRangeException ();
layout = value;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs b/mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs
index 845f2e2623b..d0ff4c5c7e8 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs
@@ -33,9 +33,7 @@ namespace System.Web.UI.WebControls {
{
Table,
Flow,
-#if NET_4_0
UnorderedList,
OrderedList
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs b/mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs
index e3d69ec7b12..e90afda34ee 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs
@@ -67,11 +67,7 @@ namespace System.Web.UI.WebControls {
{
return new SessionParameter (this);
}
-#if NET_4_0
protected internal
-#else
- protected
-#endif
override object Evaluate (HttpContext ctx, Control control)
{
if (ctx == null || ctx.Session == null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs b/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
index ed015c66270..e27be97b410 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
@@ -240,9 +240,7 @@ namespace System.Web.UI.WebControls {
// LAME SPEC: the event is raised on setting only when the old value is different
// from the new one
string connectionString = String.Empty;
-#if NET_4_0
[MergableProperty (false)]
-#endif
[EditorAttribute ("System.Web.UI.Design.WebControls.SqlDataSourceConnectionStringEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
[DefaultValueAttribute ("")]
public virtual string ConnectionString {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
index ae155611f5a..a8cd3c18aae 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
@@ -723,7 +723,6 @@ namespace System.Web.UI.WebControls {
newClass += cssClass;
CssClass = newClass;
}
-#if NET_4_0
internal void PrependCssClass (string cssClass)
{
if (String.IsNullOrEmpty (cssClass))
@@ -734,7 +733,6 @@ namespace System.Web.UI.WebControls {
cssClass += " ";
CssClass = cssClass + oldClass;
}
-#endif
public void SetDirty ()
{
if (viewstate != null)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Table.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Table.cs
index 7441b06d62a..85605c4d536 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Table.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Table.cs
@@ -176,21 +176,12 @@ namespace System.Web.UI.WebControls {
private TableStyle TableStyle {
get { return (ControlStyle as TableStyle); }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override void AddAttributesToRender (HtmlTextWriter writer)
{
base.AddAttributesToRender (writer);
-#if !NET_4_0
- if (!ControlStyleCreated || TableStyle.IsEmpty) {
- // for some reason border=X seems to be always present
- // and isn't rendered as a style attribute
- writer.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
- }
-#endif
}
protected override ControlCollection CreateControlCollection ()
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs
index 0a9561ab17b..b257a5751a2 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs
@@ -179,11 +179,9 @@ namespace System.Web.UI.WebControls {
}
set { TableItemStyle.Wrap = value; }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
TableItemStyle TableItemStyle {
get { return (ControlStyle as TableItemStyle); }
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs
index f7668a2a227..63191b2bc9e 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs
@@ -102,11 +102,9 @@ namespace System.Web.UI.WebControls {
TableItemStyle TableItemStyle {
get { return (ControlStyle as TableItemStyle); }
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
protected override ControlCollection CreateControlCollection ()
{
return new CellControlCollection (this);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs
index 1d4179df225..8cbe355de06 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs
@@ -155,9 +155,7 @@ namespace System.Web.UI.WebControls {
SetBit ((int) TableStyles.HorizontalAlign);
}
}
-#if NET_4_0
[MonoTODO ("collapse style should be rendered only for browsers which support that.")]
-#endif
public override void AddAttributesToRender (HtmlTextWriter writer, WebControl owner)
{
base.AddAttributesToRender (writer, owner);
@@ -204,20 +202,8 @@ namespace System.Web.UI.WebControls {
writer.AddAttribute (HtmlTextWriterAttribute.Align, "justify", false);
break;
}
-#if NET_4_0
if (g != GridLines.None && BorderWidth.IsEmpty)
writer.AddAttribute (HtmlTextWriterAttribute.Border, "1", false);
-#else
- // border (=0) is always present (and base class doesn't seems to add it)
- // but border is "promoted" to 1 if gridlines are present (with BorderWidth == 0)
- if (g == GridLines.None) {
- writer.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
- } else if (BorderWidth.IsEmpty) {
- writer.AddAttribute (HtmlTextWriterAttribute.Border, "1", false);
- } else {
- writer.AddAttribute (HtmlTextWriterAttribute.Border, BorderWidth.Value.ToString (Helpers.InvariantCulture));
- }
-#endif
}
void Copy (string name, TableStyles s, Style source)
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
index 612e7038a36..1840e3cf479 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
@@ -179,9 +179,7 @@ namespace System.Web.UI.WebControls {
// Why didn't msft just override RenderContents!?
RenderBeginTag (w);
if (TextMode == TextBoxMode.MultiLine) {
-#if NET_4_0
w.WriteLine ();
-#endif
HttpUtility.HtmlEncode (Text, w);
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
index a6a2a3d7648..f0ebcdeb3ea 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
@@ -1389,12 +1389,6 @@ namespace System.Web.UI.WebControls
writer.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0");
writer.RenderBeginTag (HtmlTextWriterTag.Table);
-#if !NET_4_0
- Unit nodeSpacing = GetNodeSpacing (node);
-
- if (nodeSpacing != Unit.Empty && (node.Depth > 0 || node.Index > 0))
- RenderMenuItemSpacing (writer, nodeSpacing);
-#endif
writer.RenderBeginTag (HtmlTextWriterTag.Tr);
// Vertical lines from previous levels
@@ -1493,9 +1487,7 @@ namespace System.Web.UI.WebControls
if (!String.IsNullOrEmpty (imageUrl)) {
writer.RenderBeginTag (HtmlTextWriterTag.Td); // TD
-#if NET_4_0
writer.AddAttribute (HtmlTextWriterAttribute.Tabindex, "-1");
-#endif
BeginNodeTag (writer, node, clientExpand);
writer.AddAttribute (HtmlTextWriterAttribute.Src, imageUrl);
writer.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0");
@@ -1527,13 +1519,9 @@ namespace System.Web.UI.WebControls
if (node.ShowCheckBoxInternal) {
writer.AddAttribute (HtmlTextWriterAttribute.Name, ClientID + "_cs_" + node.Path);
writer.AddAttribute (HtmlTextWriterAttribute.Type, "checkbox", false);
-#if NET_4_0
string str = node.ToolTip;
if (!String.IsNullOrEmpty (str))
writer.AddAttribute (HtmlTextWriterAttribute.Title, str);
-#else
- writer.AddAttribute (HtmlTextWriterAttribute.Title, node.Text);
-#endif
if (node.Checked)
writer.AddAttribute (HtmlTextWriterAttribute.Checked, "checked", false);
writer.RenderBeginTag (HtmlTextWriterTag.Input); // INPUT
@@ -1556,10 +1544,6 @@ namespace System.Web.UI.WebControls
writer.RenderEndTag (); // TD
writer.RenderEndTag (); // TR
-#if !NET_4_0
- if (nodeSpacing != Unit.Empty)
- RenderMenuItemSpacing (writer, nodeSpacing);
-#endif
writer.RenderEndTag (); // TABLE
@@ -1631,9 +1615,6 @@ namespace System.Web.UI.WebControls
void RenderMenuItemSpacing (HtmlTextWriter writer, Unit itemSpacing)
{
-#if !NET_4_0
- writer.AddStyleAttribute (HtmlTextWriterStyle.Height, itemSpacing.ToString ());
-#endif
writer.RenderBeginTag (HtmlTextWriterTag.Tr);
writer.RenderBeginTag (HtmlTextWriterTag.Td);
writer.RenderEndTag ();
@@ -1671,64 +1652,34 @@ namespace System.Web.UI.WebControls
if (Page.Header != null) {
// styles are registered
if (nodeStyle != null) {
-#if NET_4_0
style.PrependCssClass (nodeStyle.RegisteredCssClass);
style.PrependCssClass (nodeStyle.CssClass);
-#else
- style.AddCssClass (nodeStyle.CssClass);
- style.AddCssClass (nodeStyle.RegisteredCssClass);
-#endif
}
if (node.IsLeafNode) {
if (leafNodeStyle != null) {
-#if NET_4_0
style.PrependCssClass (leafNodeStyle.RegisteredCssClass);
style.PrependCssClass (leafNodeStyle.CssClass);
-#else
- style.AddCssClass (leafNodeStyle.CssClass);
- style.AddCssClass (leafNodeStyle.RegisteredCssClass);
-#endif
}
} else if (node.IsRootNode) {
if (rootNodeStyle != null) {
-#if NET_4_0
style.PrependCssClass (rootNodeStyle.RegisteredCssClass);
style.PrependCssClass (rootNodeStyle.CssClass);
-#else
- style.AddCssClass (rootNodeStyle.CssClass);
- style.AddCssClass (rootNodeStyle.RegisteredCssClass);
-#endif
}
} else if (node.IsParentNode) {
if (parentNodeStyle != null) {
-#if NET_4_0
style.AddCssClass (parentNodeStyle.RegisteredCssClass);
style.AddCssClass (parentNodeStyle.CssClass);
-#else
- style.AddCssClass (parentNodeStyle.CssClass);
- style.AddCssClass (parentNodeStyle.RegisteredCssClass);
-#endif
}
}
if (levelStyles != null && levelStyles.Count > level) {
-#if NET_4_0
style.PrependCssClass (levelStyles [level].RegisteredCssClass);
style.PrependCssClass (levelStyles [level].CssClass);
-#else
- style.AddCssClass (levelStyles [level].CssClass);
- style.AddCssClass (levelStyles [level].RegisteredCssClass);
-#endif
}
if (nodeIsSelected) {
-#if NET_4_0
style.AddCssClass (selectedNodeStyle.RegisteredCssClass);
style.AddCssClass (selectedNodeStyle.CssClass);
-#else
- style.AddCssClass (selectedNodeStyle.CssClass);
- style.AddCssClass (selectedNodeStyle.RegisteredCssClass);
-#endif
}
} else {
// styles are not registered
@@ -1760,9 +1711,7 @@ namespace System.Web.UI.WebControls
void AddNodeLinkStyle (HtmlTextWriter writer, TreeNode node, int level, bool nodeIsSelected)
{
Style style = new Style ();
-#if NET_4_0
bool addBorderStyle = false;
-#endif
if (Page.Header != null) {
// styles are registered
style.AddCssClass (ControlLinkStyle.RegisteredCssClass);
@@ -1775,9 +1724,7 @@ namespace System.Web.UI.WebControls
if (levelLinkStyles != null && levelLinkStyles.Count > level) {
style.AddCssClass (levelLinkStyles [level].CssClass);
style.AddCssClass (levelLinkStyles [level].RegisteredCssClass);
-#if NET_4_0
addBorderStyle = true;
-#endif
}
if (node.IsLeafNode) {
@@ -1809,9 +1756,7 @@ namespace System.Web.UI.WebControls
if (levelLinkStyles != null && levelLinkStyles.Count > level) {
style.CopyFrom (levelLinkStyles [level]);
-#if NET_4_0
addBorderStyle = true;
-#endif
}
if (node.IsLeafNode) {
@@ -1830,14 +1775,12 @@ namespace System.Web.UI.WebControls
style.AlwaysRenderTextDecoration = true;
}
-#if NET_4_0
if (addBorderStyle) {
// This appears not to come from any style. Instead, it's added
// whenever a level style is present.
writer.AddStyleAttribute (HtmlTextWriterStyle.BorderStyle, "none");
writer.AddStyleAttribute (HtmlTextWriterStyle.FontSize, "1em");
}
-#endif
style.AddAttributesToRender (writer);
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs
index 99d037ef542..48dd3cd77a1 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs
@@ -151,11 +151,9 @@ namespace System.Web.UI.WebControls {
ViewState["ValidationGroup"] = value;
}
}
-#if NET_4_0
public override bool SupportsDisabledAttribute {
get { return RenderingCompatibilityLessThan40; }
}
-#endif
#endregion // Public Instance Properties
#region Public Instance Methods
@@ -199,7 +197,6 @@ namespace System.Web.UI.WebControls {
else
Page.ClientScript.RegisterExpandoAttribute (controlId, attributeName, attributeValue, encode);
}
-#if NET_4_0
protected internal override void OnInit (EventArgs e)
{
base.OnInit (e);
@@ -209,7 +206,6 @@ namespace System.Web.UI.WebControls {
if (ForeColor == Color.Empty)
ForeColor = Color.Red;
}
-#endif
protected internal
override void OnPreRender(EventArgs e) {
base.OnPreRender (e);
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs b/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
index 8ab3a7ca66f..53718973b24 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
@@ -39,9 +39,7 @@ namespace System.Web.UI.WebControls {
[Themeable (true)]
public class WebControl : Control, IAttributeAccessor
{
-#if NET_4_0
const string DEFAULT_DISABLED_CSS_CLASS = "aspNetDisabled";
-#endif
Style style;
HtmlTextWriterTag tag;
string tag_name;
@@ -49,12 +47,10 @@ namespace System.Web.UI.WebControls {
StateBag attribute_state;
bool enabled;
bool track_enabled_state;
-#if NET_4_0
static WebControl ()
{
DisabledCssClass = DEFAULT_DISABLED_CSS_CLASS;
}
-#endif
public WebControl (HtmlTextWriterTag tag)
{
this.tag = tag;
@@ -407,7 +403,6 @@ namespace System.Web.UI.WebControls {
return true;
}
}
-#if NET_4_0
public static string DisabledCssClass {
get;
set;
@@ -417,7 +412,6 @@ namespace System.Web.UI.WebControls {
public virtual bool SupportsDisabledAttribute {
get { return true; }
}
-#endif
public void ApplyStyle (Style s)
{
if (s != null && !s.IsEmpty)
@@ -506,11 +500,9 @@ namespace System.Web.UI.WebControls {
void RenderDisabled (HtmlTextWriter writer)
{
if (!IsEnabled) {
-#if NET_4_0
if (!SupportsDisabledAttribute)
ControlStyle.PrependCssClass (DisabledCssClass);
else
-#endif
writer.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
}
@@ -518,14 +510,9 @@ namespace System.Web.UI.WebControls {
protected virtual void AddAttributesToRender (HtmlTextWriter writer)
{
-#if NET_4_0
RenderDisabled (writer);
-#endif
if (ID != null)
writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
-#if !NET_4_0
- RenderDisabled (writer);
-#endif
if (AccessKey != string.Empty)
writer.AddAttribute (HtmlTextWriterAttribute.Accesskey, AccessKey);
@@ -578,7 +565,6 @@ namespace System.Web.UI.WebControls {
enabled = ViewState.GetBool ("Enabled", enabled);
}
-#if NET_4_0
internal virtual string InlinePropertiesSet ()
{
var properties = new List <string> ();
@@ -631,7 +617,6 @@ namespace System.Web.UI.WebControls {
);
}
}
-#endif
protected internal
override void Render (HtmlTextWriter writer)
{
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
index 7d3ccd8635b..3cb54bf0dfd 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
@@ -48,12 +48,10 @@ namespace System.Web.UI.WebControls
public static readonly string MoveNextCommandName = "MoveNext";
public static readonly string MovePreviousCommandName = "MovePrevious";
public static readonly string MoveToCommandName = "Move";
-#if NET_4_0
public static readonly string HeaderPlaceholderId = "headerPlaceholder";
public static readonly string NavigationPlaceholderId = "navigationPlaceholder";
public static readonly string SideBarPlaceholderId = "sideBarPlaceholder";
public static readonly string WizardStepPlaceholderId = "wizardStepPlaceholder";
-#endif
protected static readonly string DataListID = "SideBarList";
static readonly string CancelButtonIDShort = "Cancel";
@@ -523,13 +521,11 @@ namespace System.Web.UI.WebControls
ViewState ["HeaderText"] = value;
}
}
-#if NET_4_0
[DefaultValue (null)]
[TemplateContainerAttribute(typeof(Wizard))]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[BrowsableAttribute(false)]
public virtual ITemplate LayoutTemplate { get; set; }
-#endif
[DefaultValueAttribute (null)]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Content)]
[NotifyParentPropertyAttribute (true)]
@@ -888,7 +884,6 @@ namespace System.Web.UI.WebControls
{
CreateControlHierarchy ();
}
-#if NET_4_0
InvalidOperationException MakeLayoutException (string phName, string phID, string condition = null)
{
return new InvalidOperationException (
@@ -976,16 +971,13 @@ namespace System.Web.UI.WebControls
controls.Remove (placeHolder);
controls.AddAt (index, replacement);
}
-#endif
protected virtual void CreateControlHierarchy ()
{
-#if NET_4_0
ITemplate layoutTemplate = LayoutTemplate;
if (layoutTemplate != null) {
CreateControlHierarchy_LayoutTemplate (layoutTemplate);
return;
}
-#endif
styles.Clear ();
wizardTable = new ContainedTable (this);
@@ -1510,21 +1502,15 @@ namespace System.Web.UI.WebControls
protected internal override void Render (HtmlTextWriter writer)
{
PrepareControlHierarchy ();
-#if NET_4_0
if (LayoutTemplate == null)
-#endif
wizardTable.Render (writer);
-#if NET_4_0
else
RenderChildren (writer);
-#endif
}
void PrepareControlHierarchy ()
{
-#if NET_4_0
if (LayoutTemplate == null) {
-#endif
// header
if (!_headerCell.Initialized) {
if (String.IsNullOrEmpty (HeaderText))
@@ -1535,14 +1521,12 @@ namespace System.Web.UI.WebControls
if (ActiveStep.StepType == WizardStepType.Complete)
_headerCell.Parent.Visible = false;
-#if NET_4_0
} else {
WizardStepCollection steps = WizardSteps;
if (steps == null || steps.Count == 0)
return;
}
-#endif
// sidebar
if (stepDatalist != null) {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs b/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
index 9cd0b8481bd..b7409f2d20d 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
@@ -149,13 +149,11 @@ namespace System.Web.UI.WebControls {
string GetDataKey ()
{
-#if NET_4_0
if (String.IsNullOrEmpty (DataFile) && !String.IsNullOrEmpty (Data)) {
string key = CacheKeyContext;
if (!String.IsNullOrEmpty (key))
return key;
}
-#endif
Page page = Page;
string p = page != null ? page.ToString () : "NullPage";
@@ -387,13 +385,11 @@ namespace System.Web.UI.WebControls {
}
}
}
-#if NET_4_0
[DefaultValue ("")]
public virtual string CacheKeyContext {
get { return ViewState.GetString ("CacheKeyContext", String.Empty); }
set { ViewState ["CacheKeyContext"] = value; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
index cd836960f3c..fb6028e0831 100644
--- a/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
@@ -99,7 +99,6 @@ namespace System.Web.UI
internal static List <string> FileDependencies {
get { return dependencies; }
}
-#if NET_4_0
internal override Type DefaultBaseType {
get {
Type ret = PageParser.DefaultApplicationBaseType;
@@ -109,7 +108,6 @@ namespace System.Web.UI
return ret;
}
}
-#endif
internal override string DefaultBaseTypeName {
get { return "System.Web.HttpApplication"; }
}
diff --git a/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs b/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
index 4480d49092c..05b884a1d9e 100644
--- a/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
@@ -101,11 +101,9 @@ namespace System.Web.UI
get { return slidingExpiration; }
set { slidingExpiration = value; }
}
-#if NET_4_0
internal string ProviderName {
get; set;
}
-#endif
internal abstract Control CreateControl ();
public override void Dispose ()
@@ -119,15 +117,9 @@ namespace System.Web.UI
void RetrieveCachedContents ()
{
cacheKey = CreateKey ();
-#if NET_4_0
OutputCacheProvider provider = GetProvider ();
cachedData = provider.Get (cacheKey) as string;
-#else
- Cache cache = HttpRuntime.InternalCache;
- cachedData = cache [cacheKey] as string;
-#endif
}
-#if NET_4_0
OutputCacheProvider GetProvider ()
{
string providerName = ProviderName;
@@ -161,18 +153,8 @@ namespace System.Web.UI
base.InitRecursive (namingContainer);
}
-#else
- protected internal override void OnInit (EventArgs e)
- {
- control = CreateControl ();
- Controls.Add (control);
- }
-#endif
protected internal override void Render (HtmlTextWriter output)
{
-#if !NET_4_0
- RetrieveCachedContents ();
-#endif
if (cachedData != null) {
output.Write (cachedData);
return;
@@ -195,19 +177,12 @@ namespace System.Web.UI
context.Response.SetTextWriter (prev);
output.Write (text);
}
-#if NET_4_0
OutputCacheProvider provider = GetProvider ();
DateTime utcExpire = DateTime.UtcNow.AddSeconds (duration);
provider.Set (cacheKey, text, utcExpire);;
context.InternalCache.Insert (cacheKey, text, dependency, utcExpire.ToLocalTime (),
Cache.NoSlidingExpiration, CacheItemPriority.Normal,
null);
-#else
- context.InternalCache.Insert (cacheKey, text, dependency,
- DateTime.Now.AddSeconds (duration),
- Cache.NoSlidingExpiration,
- CacheItemPriority.Normal, null);
-#endif
}
public ControlCachePolicy CachePolicy
diff --git a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
index 25b89ec47ed..ed29adeda55 100644
--- a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
@@ -641,9 +641,7 @@ namespace System.Web.UI
return;
writer.WriteLine ();
-#if NET_4_0
writer.AddAttribute (HtmlTextWriterAttribute.Class, "aspNetHidden");
-#endif
writer.RenderBeginTag (HtmlTextWriterTag.Div);
int oldIndent = writer.Indent;
writer.Indent = 0;
diff --git a/mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs b/mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs
index c3b23b4a6bd..e45d311f8c9 100644
--- a/mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs
@@ -34,7 +34,6 @@ namespace System.Web.UI
{
sealed class CodeRenderBuilder : CodeBuilder
{
-#if NET_4_0
public bool HtmlEncode {
get; private set;
}
@@ -44,7 +43,6 @@ namespace System.Web.UI
{
this.HtmlEncode = doHtmlEncode;
}
-#endif
public CodeRenderBuilder (string code, bool isAssign, ILocation location)
: base (code, isAssign, location)
diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs
index aebf42cd95b..d50949ac502 100644
--- a/mcs/class/System.Web/System.Web.UI/Control.cs
+++ b/mcs/class/System.Web/System.Web.UI/Control.cs
@@ -49,9 +49,7 @@ using System.Web.UI.Adapters;
using System.Web.UI.WebControls;
using System.Web.Util;
-#if NET_4_0
using System.Web.Routing;
-#endif
namespace System.Web.UI
{
@@ -107,13 +105,11 @@ namespace System.Web.UI
TemplateControl _templateControl;
bool _isChildControlStateCleared;
string _templateSourceDirectory;
-#if NET_4_0
ViewStateMode viewStateMode;
ClientIDMode? clientIDMode;
ClientIDMode? effectiveClientIDMode;
Version renderingCompatibility;
bool? renderingCompatibilityOld;
-#endif
/*************/
int stateMask;
const int ENABLE_VIEWSTATE = 1;
@@ -149,9 +145,7 @@ namespace System.Web.UI
stateMask = ENABLE_VIEWSTATE | VISIBLE | AUTOID | BINDING_CONTAINER | AUTO_EVENT_WIREUP;
if (this is INamingContainer)
stateMask |= IS_NAMING_CONTAINER;
-#if NET_4_0
viewStateMode = ViewStateMode.Inherit;
-#endif
}
ControlAdapter adapter;
@@ -198,9 +192,7 @@ namespace System.Web.UI
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[EditorBrowsable (EditorBrowsableState.Never), Browsable (false)]
-#if NET_4_0
[Bindable (false)]
-#endif
public Control BindingContainer {
get {
Control container = NamingContainer;
@@ -218,16 +210,11 @@ namespace System.Web.UI
get {
if (clientID != null)
return clientID;
-#if NET_4_0
clientID = GetClientID ();
-#else
- clientID = UniqueID2ClientID (UniqueID);
-#endif
stateMask |= ID_SET;
return clientID;
}
}
-#if NET_4_0
[Bindable (false)]
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -455,7 +442,6 @@ namespace System.Web.UI
sb.Append (value.ToString ());
}
}
-#endif
internal string UniqueID2ClientID (string uniqueId)
{
if (String.IsNullOrEmpty (uniqueId))
@@ -527,11 +513,9 @@ namespace System.Web.UI
for (Control control = this; control != null; control = control.Parent) {
if (!control.EnableViewState)
return false;
-#if NET_4_0
ViewStateMode vsm = control.ViewStateMode;
if (vsm != ViewStateMode.Inherit)
return vsm == ViewStateMode.Enabled;
-#endif
}
return true;
@@ -545,9 +529,7 @@ namespace System.Web.UI
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
[WebSysDescription ("The container that this control is part of. The control's name has to be unique within the container.")]
-#if NET_4_0
[Bindable (false)]
-#endif
public virtual Control NamingContainer {
get {
if (_namingContainer == null && _parent != null) {
@@ -582,9 +564,7 @@ namespace System.Web.UI
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[Browsable (false)]
[WebSysDescription ("The parent control of this control.")]
-#if NET_4_0
[Bindable (false)]
-#endif
public virtual Control Parent { //DIT
get { return _parent; }
}
@@ -599,9 +579,7 @@ namespace System.Web.UI
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
-#if NET_4_0
[Bindable (false)]
-#endif
public TemplateControl TemplateControl {
get { return TemplateControlInternal; }
@@ -813,11 +791,7 @@ namespace System.Web.UI
void NullifyUniqueID ()
{
uniqueID = null;
-#if NET_4_0
ClearCachedClientID ();
-#else
- clientID = null;
-#endif
if (!HasControls ())
return;
@@ -1682,11 +1656,7 @@ namespace System.Web.UI
stateMask |= PRERENDERED;
}
-#if NET_4_0
internal virtual
-#else
- internal
-#endif
void InitRecursive (Control namingContainer)
{
#if MONO_TRACE
@@ -2081,7 +2051,6 @@ namespace System.Web.UI
return false;
}
}
-#if NET_4_0
[ThemeableAttribute(false)]
[DefaultValue (ViewStateMode.Inherit)]
public virtual ViewStateMode ViewStateMode {
@@ -2147,6 +2116,5 @@ namespace System.Web.UI
return UniqueID.Substring (idx + 1);
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs b/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
index 5c56bf1a073..f409581ce29 100644
--- a/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
+++ b/mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
@@ -81,7 +81,6 @@ namespace System.Web.UI
bpcc.Duration = value.Minutes;
}
}
-#if NET_4_0
public string ProviderName {
get {
AssertBasePartialCachingControl ();
@@ -93,7 +92,6 @@ namespace System.Web.UI
bpcc.ProviderName = value;
}
}
-#endif
public bool SupportsCaching
{
get {
diff --git a/mcs/class/System.Web/System.Web.UI/KeyedList.cs b/mcs/class/System.Web/System.Web.UI/KeyedList.cs
index 07daeb5f503..384ba52a162 100644
--- a/mcs/class/System.Web/System.Web.UI/KeyedList.cs
+++ b/mcs/class/System.Web/System.Web.UI/KeyedList.cs
@@ -32,9 +32,6 @@ using System.Collections.Specialized;
namespace System.Web.UI
{
class KeyedList : IOrderedDictionary
-#if !NET_4_0
- , IStateManager // why do we implement it at all?
-#endif
{
Hashtable objectTable = new Hashtable ();
@@ -102,37 +99,6 @@ namespace System.Web.UI
{
return new KeyedListEnumerator (objectList);
}
-#if !NET_4_0
- void IStateManager.LoadViewState (object state)
- {
- if (state != null)
- {
- object[] states = (object[]) state;
- if (states[0] != null) {
- objectList = (ArrayList) states[0];
- for (int i = 0; i < objectList.Count; i++)
- {
- DictionaryEntry pair = (DictionaryEntry) objectList[i];
- objectTable.Add (pair.Key, pair.Value);
- }
- }
- }
- }
-
- object IStateManager.SaveViewState ()
- {
- object[] ret = new object[] { objectList };
- if (ret[0] == null)
- return null;
-
- return ret;
- }
-
- void IStateManager.TrackViewState ()
- {
- trackViewState = true;
- }
-#endif
public int Count {
get { return objectList.Count; }
}
@@ -200,13 +166,6 @@ namespace System.Web.UI
get { return this; }
}
-#if !NET_4_0
- bool trackViewState;
-
- bool IStateManager.IsTrackingViewState {
- get { return trackViewState; }
- }
-#endif
int IndexOf (object key)
{
for (int i = 0; i < objectList.Count; i++)
diff --git a/mcs/class/System.Web/System.Web.UI/LosFormatter.cs b/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
index 2c965437f74..4af2e54bd2e 100644
--- a/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
+++ b/mcs/class/System.Web/System.Web.UI/LosFormatter.cs
@@ -75,30 +75,9 @@ namespace System.Web.UI {
{
if (stream == null)
throw new ArgumentNullException ("stream");
-#if NET_4_0
using (StreamReader sr = new StreamReader (stream)) {
return Deserialize (sr.ReadToEnd ());
}
-#else
- long streamLength = -1;
- if (stream.CanSeek)
- streamLength = stream.Length;
- MemoryStream ms = null;
- if (streamLength != -1 && (stream is MemoryStream) && stream.Position == 0) {
- // We save allocating a new stream and reading in this case.
- ms = (MemoryStream) stream;
- } else {
- byte [] bytes = new byte [streamLength >= 0 ? streamLength : 2048];
- ms = new MemoryStream ();
- int n;
- while ((n = stream.Read (bytes, 0, bytes.Length)) > 0)
- ms.Write (bytes, 0, n);
- streamLength = ms.Length;
- }
- string b64 = Encoding.ASCII.GetString (ms.GetBuffer (),
- 0, (int) streamLength);
- return Deserialize (b64);
-#endif
}
public object Deserialize (TextReader input)
@@ -126,10 +105,8 @@ namespace System.Web.UI {
{
if (stream == null)
throw new ArgumentNullException ("stream");
-#if NET_4_0
if (!stream.CanSeek)
throw new NotSupportedException ();
-#endif
string b64 = SerializeToBase64 (value);
byte [] bytes = Encoding.ASCII.GetBytes (b64);
stream.Write (bytes, 0, bytes.Length);
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPage.cs b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
index 2a08d709579..65a30901657 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPage.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
@@ -98,7 +98,6 @@ namespace System.Web.UI
return parentMasterPage;
}
}
-#if NET_4_0
public void InstantiateInContentPlaceHolder (Control contentPlaceHolder, ITemplate template)
{
// .NET compatibility...
@@ -108,7 +107,6 @@ namespace System.Web.UI
if (contentPlaceHolder != null && template != null)
template.InstantiateIn (contentPlaceHolder);
}
-#endif
internal static MasterPage CreateMasterPage (TemplateControl owner, HttpContext context,
string masterPageFile, IDictionary contentTemplateCollection)
{
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectConverter.cs b/mcs/class/System.Web/System.Web.UI/ObjectConverter.cs
index f782cc706a8..80833dbc435 100644
--- a/mcs/class/System.Web/System.Web.UI/ObjectConverter.cs
+++ b/mcs/class/System.Web/System.Web.UI/ObjectConverter.cs
@@ -32,9 +32,6 @@ namespace System.Web.UI
{
[Obsolete ("The recommended alternative is System.Convert and String.Format. http://go.microsoft.com/fwlink/?linkid=14202")]
// CAS - no InheritanceDemand here as the class is sealed
-#if !NET_4_0
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public sealed class ObjectConverter
{
public ObjectConverter ()
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
index 1a8d2b4c084..69cd30decdf 100644
--- a/mcs/class/System.Web/System.Web.UI/Page.cs
+++ b/mcs/class/System.Web/System.Web.UI/Page.cs
@@ -54,9 +54,7 @@ using System.Web.UI.Adapters;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Reflection;
-#if NET_4_0
using System.Web.Routing;
-#endif
namespace System.Web.UI
{
@@ -146,13 +144,11 @@ public partial class Page : TemplateControl, IHttpHandler
string _title;
string _theme;
string _styleSheetTheme;
-#if NET_4_0
string _metaDescription;
string _metaKeywords;
Control _autoPostBackControl;
bool frameworkInitialized;
-#endif
Hashtable items;
bool _maintainScrollPositionOnPostBack;
@@ -183,9 +179,7 @@ public partial class Page : TemplateControl, IHttpHandler
viewStateEncryptionMode = ViewStateEncryptionMode.Auto;
_viewState = true;
}
-#if NET_4_0
this.ViewStateMode = ViewStateMode.Enabled;
-#endif
}
#endregion
@@ -564,7 +558,6 @@ public partial class Page : TemplateControl, IHttpHandler
_pageTheme.SetPage (this);
}
}
-#if NET_4_0
public Control AutoPostBackControl {
get { return _autoPostBackControl; }
set { _autoPostBackControl = value; }
@@ -638,7 +631,6 @@ public partial class Page : TemplateControl, IHttpHandler
htmlHeader.Keywords = value;
}
}
-#endif
[Localizable (true)]
[Bindable (true)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -1191,9 +1183,7 @@ public partial class Page : TemplateControl, IHttpHandler
_appCulture = Thread.CurrentThread.CurrentCulture;
_appUICulture = Thread.CurrentThread.CurrentUICulture;
FrameworkInitialize ();
-#if NET_4_0
frameworkInitialized = true;
-#endif
context.ErrorPage = _errorPage;
try {
@@ -1497,12 +1487,10 @@ public partial class Page : TemplateControl, IHttpHandler
string eventTarget = postdata [postEventSourceID];
IPostBackEventHandler target;
if (String.IsNullOrEmpty (eventTarget)) {
-#if NET_4_0
target = AutoPostBackControl as IPostBackEventHandler;
if (target != null)
RaisePostBackEvent (target, null);
else
-#endif
if (formPostedRequiresRaiseEvent != null)
RaisePostBackEvent (formPostedRequiresRaiseEvent, null);
else
@@ -1511,10 +1499,8 @@ public partial class Page : TemplateControl, IHttpHandler
}
target = FindControl (eventTarget, true) as IPostBackEventHandler;
-#if NET_4_0
if (target == null)
target = AutoPostBackControl as IPostBackEventHandler;
-#endif
if (target == null)
return;
@@ -1690,9 +1676,7 @@ public partial class Page : TemplateControl, IHttpHandler
object viewState = null;
if (EnableViewState
-#if NET_4_0
&& this.ViewStateMode == ViewStateMode.Enabled
-#endif
)
viewState = SaveViewStateRecursive ();
@@ -2047,7 +2031,6 @@ public partial class Page : TemplateControl, IHttpHandler
htmlHeader.Title = _title;
_title = null;
}
-#if NET_4_0
if (_metaDescription != null) {
htmlHeader.Description = _metaDescription;
_metaDescription = null;
@@ -2057,7 +2040,6 @@ public partial class Page : TemplateControl, IHttpHandler
htmlHeader.Keywords = _metaKeywords;
_metaKeywords = null;
}
-#endif
}
[EditorBrowsable (EditorBrowsableState.Never)]
diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs
index f5f4899f059..670eb2dc653 100644
--- a/mcs/class/System.Web/System.Web.UI/PageParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs
@@ -44,13 +44,11 @@ namespace System.Web.UI
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class PageParser : TemplateControlParser
{
-#if NET_4_0
static Type defaultPageBaseType;
static Type defaultApplicationBaseType;
static Type defaultPageParserFilterType;
static Type defaultUserControlBaseType;
static bool enableLongStringsAsResources = true;
-#endif
PagesEnableSessionState enableSessionState = PagesEnableSessionState.True;
bool enableViewStateMac;
bool enableViewStateMacSet;
@@ -67,10 +65,8 @@ namespace System.Web.UI
MainDirectiveAttribute <string> masterPage;
MainDirectiveAttribute <string> title;
MainDirectiveAttribute <string> theme;
-#if NET_4_0
MainDirectiveAttribute <string> metaDescription;
MainDirectiveAttribute <string> metaKeywords;
-#endif
string culture;
string uiculture;
string errorPage;
@@ -85,7 +81,6 @@ namespace System.Web.UI
int maxPageStateFieldLength = -1;
Type previousPageType;
string previousPageVirtualPath;
-#if NET_4_0
public static bool EnableLongStringsAsResources {
get { return enableLongStringsAsResources; }
set {
@@ -134,7 +129,6 @@ namespace System.Web.UI
defaultUserControlBaseType = value;
}
}
-#endif
public PageParser ()
{
LoadConfigDefaults ();
@@ -439,7 +433,6 @@ namespace System.Web.UI
enableViewStateMac = GetBool (atts, "EnableViewStateMac", enableViewStateMac);
enableViewStateMacSet = true;
}
-#if NET_4_0
value = GetString (atts, "MetaDescription", null);
if (value != null) {
if (!BaseParser.IsExpression (value))
@@ -455,7 +448,6 @@ namespace System.Web.UI
else
metaKeywords = new MainDirectiveAttribute <string> (value);
}
-#endif
// Ignored by now
GetString (atts, "SmartNavigation", null);
@@ -566,7 +558,6 @@ namespace System.Web.UI
internal TraceMode TraceMode {
get { return tracemode; }
}
-#if NET_4_0
internal override Type DefaultBaseType {
get {
Type ret = DefaultPageBaseType;
@@ -576,7 +567,6 @@ namespace System.Web.UI
return ret;
}
}
-#endif
internal override string DefaultBaseTypeName {
get { return PagesConfig.PageBaseType; }
}
@@ -616,7 +606,6 @@ namespace System.Web.UI
internal MainDirectiveAttribute <string> Theme {
get { return theme; }
}
-#if NET_4_0
internal MainDirectiveAttribute <string> MetaDescription {
get { return metaDescription; }
}
@@ -624,7 +613,6 @@ namespace System.Web.UI
internal MainDirectiveAttribute <string> MetaKeywords {
get { return metaKeywords; }
}
-#endif
internal string Culture {
get { return culture; }
}
diff --git a/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs b/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
index c92eaa32ff6..0172e635578 100644
--- a/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
+++ b/mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
@@ -81,11 +81,9 @@ namespace System.Web.UI {
public int Duration {
get { return duration; }
}
-#if NET_4_0
public string ProviderName {
get; set;
}
-#endif
public string VaryByParams {
get { return varyByParams; }
}
diff --git a/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs b/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
index 9daea73b4f7..f14b80f0cd7 100644
--- a/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
@@ -61,7 +61,6 @@ namespace System.Web.UI {
{
// this.sqlDependency = sqlDependency;
}
-#if NET_4_0
public StaticPartialCachingControl (string ctrlID, string guid, int duration, string varyByParams,
string varyByControls, string varyByCustom, string sqlDependency,
BuildMethod buildMethod, string providerName)
@@ -69,7 +68,6 @@ namespace System.Web.UI {
{
ProviderName = providerName;
}
-#endif
[MonoTODO("Consider sqlDependency parameter")]
public static void BuildCachedControl (Control parent, string ctrlID, string guid,
int duration, string varyByParams, string varyByControls, string varyByCustom,
@@ -88,7 +86,6 @@ namespace System.Web.UI {
{
BuildCachedControl (parent, ctrlID, guid, duration, varyByParams, varyByControls, varyByCustom, null, buildMethod);
}
-#if NET_4_0
public static void BuildCachedControl (Control parent, string ctrlID, string guid, int duration,
string varyByParams, string varyByControls, string varyByCustom,
string sqlDependency, BuildMethod buildMethod, string providerName)
@@ -98,7 +95,6 @@ namespace System.Web.UI {
if (parent != null)
parent.Controls.Add (ctl);
}
-#endif
internal override Control CreateControl()
{
return buildMethod ();
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
index 55dd1c16cc4..416385013ba 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
@@ -47,9 +47,7 @@ namespace System.Web.UI
bool autoEventWireup = true;
bool enableViewState = true;
CompilationMode compilationMode = CompilationMode.Always;
-#if NET_4_0
ClientIDMode? clientIDMode;
-#endif
TextReader reader;
protected TemplateControlParser ()
@@ -81,7 +79,6 @@ namespace System.Web.UI
}
atts.Remove ("TargetSchema"); // Ignored
-#if NET_4_0
value = GetString (atts, "ClientIDMode", null);
if (!String.IsNullOrEmpty (value)) {
try {
@@ -90,7 +87,6 @@ namespace System.Web.UI
ThrowParseException ("Invalid value of the ClientIDMode attribute.", ex);
}
}
-#endif
base.ProcessMainAttributes (atts);
}
@@ -209,11 +205,9 @@ namespace System.Web.UI
internal CompilationMode CompilationMode {
get { return compilationMode; }
}
-#if NET_4_0
internal ClientIDMode? ClientIDMode {
get { return clientIDMode; }
}
-#endif
internal override TextReader Reader {
get { return reader; }
set { reader = value; }
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
index 99707a3529e..e1439341e60 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
@@ -955,11 +955,9 @@ namespace System.Web.UI {
internal Type PageParserFilterType {
get {
if (pageParserFilterType == null) {
-#if NET_4_0
pageParserFilterType = PageParser.DefaultPageParserFilterType;
if (pageParserFilterType != null)
return pageParserFilterType;
-#endif
string typeName = PagesConfig.PageParserFilterType;
if (String.IsNullOrEmpty (typeName))
return null;
@@ -970,11 +968,7 @@ namespace System.Web.UI {
return pageParserFilterType;
}
}
-#if NET_4_0
internal virtual
-#else
- internal
-#endif
Type DefaultBaseType {
get {
Type type = Type.GetType (DefaultBaseTypeName, true);
diff --git a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
index b93e19fb57a..550781ce7fe 100644
--- a/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/UserControlParser.cs
@@ -40,9 +40,7 @@ namespace System.Web.UI
internal class UserControlParser : TemplateControlParser
{
string masterPage;
-#if NET_4_0
string providerName;
-#endif
internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context)
: this (virtualPath, inputFile, context, null)
{
@@ -139,7 +137,6 @@ namespace System.Web.UI
base.ProcessMainAttributes (atts);
}
-#if NET_4_0
internal override void ProcessOutputCacheAttributes (IDictionary atts)
{
providerName = GetString (atts, "ProviderName", null);
@@ -155,7 +152,6 @@ namespace System.Web.UI
return ret;
}
}
-#endif
internal override string DefaultBaseTypeName {
get { return PagesConfig.UserControlBaseType; }
}
@@ -167,11 +163,9 @@ namespace System.Web.UI
internal string MasterPageFile {
get { return masterPage; }
}
-#if NET_4_0
internal string ProviderName {
get { return providerName; }
}
-#endif
}
}
diff --git a/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs b/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
index 68da3951f2f..2a2800483af 100644
--- a/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
+++ b/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
@@ -41,20 +41,14 @@ using System.Web.Configuration;
namespace System.Web.Util
{
-#if NET_4_0
public
-#endif
class HttpEncoder
{
static char [] hexChars = "0123456789abcdef".ToCharArray ();
static object entitiesLock = new object ();
static SortedDictionary <string, char> entities;
-#if NET_4_0
static Lazy <HttpEncoder> defaultEncoder;
static Lazy <HttpEncoder> currentEncoderLazy;
-#else
- static HttpEncoder defaultEncoder;
-#endif
static HttpEncoder currentEncoder;
static IDictionary <string, char> Entities {
@@ -70,50 +64,33 @@ namespace System.Web.Util
public static HttpEncoder Current {
get {
-#if NET_4_0
if (currentEncoder == null)
currentEncoder = currentEncoderLazy.Value;
-#endif
return currentEncoder;
}
-#if NET_4_0
set {
if (value == null)
throw new ArgumentNullException ("value");
currentEncoder = value;
}
-#endif
}
public static HttpEncoder Default {
get {
-#if NET_4_0
return defaultEncoder.Value;
-#else
- return defaultEncoder;
-#endif
}
}
static HttpEncoder ()
{
-#if NET_4_0
defaultEncoder = new Lazy <HttpEncoder> (() => new HttpEncoder ());
currentEncoderLazy = new Lazy <HttpEncoder> (new Func <HttpEncoder> (GetCustomEncoderFromConfig));
-#else
- defaultEncoder = new HttpEncoder ();
- currentEncoder = defaultEncoder;
-#endif
}
public HttpEncoder ()
{
}
-#if NET_4_0
protected internal virtual
-#else
- internal static
-#endif
void HeaderNameValueEncode (string headerName, string headerValue, out string encodedHeaderName, out string encodedHeaderValue)
{
if (String.IsNullOrEmpty (headerName))
@@ -151,7 +128,6 @@ namespace System.Web.Util
return input;
}
-#if NET_4_0
protected internal virtual void HtmlAttributeEncode (string value, TextWriter output)
{
@@ -208,12 +184,7 @@ namespace System.Web.Util
return Activator.CreateInstance (t, false) as HttpEncoder;
#endif
}
-#endif
-#if NET_4_0
protected internal virtual
-#else
- internal static
-#endif
string UrlPathEncode (string value)
{
if (String.IsNullOrEmpty (value))
@@ -262,9 +233,7 @@ namespace System.Web.Util
for (int i = 0; i < s.Length; i++) {
char c = s [i];
if (c == '&' || c == '"' || c == '<' || c == '>' || c > 159
-#if NET_4_0
|| c == '\''
-#endif
) {
needEncode = true;
break;
@@ -292,11 +261,9 @@ namespace System.Web.Util
case '"' :
output.Append ("&quot;");
break;
-#if NET_4_0
case '\'':
output.Append ("&#39;");
break;
-#endif
case '\uff1c':
output.Append ("&#65308;");
break;
@@ -321,23 +288,13 @@ namespace System.Web.Util
internal static string HtmlAttributeEncode (string s)
{
-#if NET_4_0
if (String.IsNullOrEmpty (s))
return String.Empty;
-#else
- if (s == null)
- return null;
-
- if (s.Length == 0)
- return String.Empty;
-#endif
bool needEncode = false;
for (int i = 0; i < s.Length; i++) {
char c = s [i];
if (c == '&' || c == '"' || c == '<'
-#if NET_4_0
|| c == '\''
-#endif
) {
needEncode = true;
break;
@@ -362,11 +319,9 @@ namespace System.Web.Util
case '<':
output.Append ("&lt;");
break;
-#if NET_4_0
case '\'':
output.Append ("&#39;");
break;
-#endif
default:
output.Append (ch);
break;
@@ -386,9 +341,7 @@ namespace System.Web.Util
if (s.IndexOf ('&') == -1)
return s;
-#if NET_4_0
StringBuilder rawEntity = new StringBuilder ();
-#endif
StringBuilder entity = new StringBuilder ();
StringBuilder output = new StringBuilder ();
int len = s.Length;
@@ -406,9 +359,7 @@ namespace System.Web.Util
if (state == 0) {
if (c == '&') {
entity.Append (c);
-#if NET_4_0
rawEntity.Append (c);
-#endif
state = 1;
} else {
output.Append (c);
@@ -444,9 +395,7 @@ namespace System.Web.Util
state = 3;
}
entity.Append (c);
-#if NET_4_0
rawEntity.Append (c);
-#endif
}
} else if (state == 2) {
entity.Append (c);
@@ -458,17 +407,13 @@ namespace System.Web.Util
output.Append (key);
state = 0;
entity.Length = 0;
-#if NET_4_0
rawEntity.Length = 0;
-#endif
}
} else if (state == 3) {
if (c == ';') {
-#if NET_4_0
if (number == 0)
output.Append (rawEntity.ToString () + ";");
else
-#endif
if (number > 65535) {
output.Append ("&#");
output.Append (number.ToString (Helpers.InvariantCulture));
@@ -478,27 +423,19 @@ namespace System.Web.Util
}
state = 0;
entity.Length = 0;
-#if NET_4_0
rawEntity.Length = 0;
-#endif
have_trailing_digits = false;
} else if (is_hex_value && Uri.IsHexDigit(c)) {
number = number * 16 + Uri.FromHex(c);
have_trailing_digits = true;
-#if NET_4_0
rawEntity.Append (c);
-#endif
} else if (Char.IsDigit (c)) {
number = number * 10 + ((int) c - '0');
have_trailing_digits = true;
-#if NET_4_0
rawEntity.Append (c);
-#endif
} else if (number == 0 && (c == 'x' || c == 'X')) {
is_hex_value = true;
-#if NET_4_0
rawEntity.Append (c);
-#endif
} else {
state = 2;
if (have_trailing_digits) {
@@ -521,9 +458,6 @@ namespace System.Web.Util
internal static bool NotEncoded (char c)
{
return (c == '!' || c == '(' || c == ')' || c == '*' || c == '-' || c == '.' || c == '_'
-#if !NET_4_0
- || c == '\''
-#endif
);
}
diff --git a/mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs b/mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs
index 87f65dab7d9..eb0f1b69d2f 100644
--- a/mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs
+++ b/mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs
@@ -100,12 +100,10 @@ namespace System.Web.Util {
sa = TripleDES.Create ();
break;
default:
-#if NET_4_0
if (name.StartsWith ("alg:")) {
sa = SymmetricAlgorithm.Create (name.Substring (4));
break;
}
-#endif
throw new ConfigurationErrorsException ();
}
return sa;
@@ -126,7 +124,6 @@ namespace System.Web.Util {
case MachineKeyValidation.SHA1:
kha = new HMACSHA1 ();
break;
-#if NET_4_0
case MachineKeyValidation.HMACSHA256:
kha = new HMACSHA256 ();
break;
@@ -142,7 +139,6 @@ namespace System.Web.Util {
if (algo.StartsWith ("alg:"))
kha = KeyedHashAlgorithm.Create (algo.Substring (4));
break;
-#endif
}
return kha;
}
diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs
index ee795721a7f..68c098dcc26 100644
--- a/mcs/class/System.Web/System.Web/HttpApplication.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplication.cs
@@ -843,13 +843,11 @@ namespace System.Web
{
}
-#if NET_4_0
public virtual string GetOutputCacheProviderName (HttpContext context)
{
// LAMESPEC: doesn't throw ProviderException if context is null
return OutputCache.DefaultProviderName;
}
-#endif
public virtual string GetVaryByCustomString (HttpContext context, string custom)
{
@@ -1168,11 +1166,9 @@ namespace System.Web
Delegate eventHandler;
if (stop_processing)
yield return true;
-#if NET_4_0
HttpRequest req = context.Request;
if (req != null)
req.Validate ();
-#endif
context.MapRequestHandlerDone = false;
StartTimer ("BeginRequest");
eventHandler = Events [BeginRequestEvent];
diff --git a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
index d2801b013f0..597379a9bad 100644
--- a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
@@ -371,10 +371,8 @@ namespace System.Web
if (!File.Exists (app_file))
app_file = null;
}
-#if NET_4_0
BuildManager.CallPreStartMethods ();
BuildManager.CompilingTopLevelAssemblies = true;
-#endif
AppResourcesCompiler ac = new AppResourcesCompiler (context);
ac.Compile ();
@@ -413,9 +411,7 @@ namespace System.Web
if (Directory.Exists (app_browsers_path)) {
app_browsers_files = Directory.GetFiles (app_browsers_path, "*.browser");
}
-#if NET_4_0
BuildManager.CompilingTopLevelAssemblies = false;
-#endif
app_type = BuildManager.GetPrecompiledApplicationType ();
if (app_type == null && app_file != null) {
app_type = BuildManager.GetCompiledType ("~/" + Path.GetFileName (app_file));
diff --git a/mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs b/mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs
index 1db9bb5669d..2e025f96be6 100644
--- a/mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs
+++ b/mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs
@@ -38,11 +38,7 @@ namespace System.Web
{
Dictionary <string, bool> encodings;
-#if NET_4_0
public
-#else
- internal
-#endif
HttpCacheVaryByContentEncodings ()
{
encodings = new Dictionary <string, bool> ();
diff --git a/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs b/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
index 460963ff66e..ecac270be4f 100644
--- a/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
+++ b/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
@@ -66,11 +66,7 @@ namespace System.Web
Hashtable fields;
-#if NET_4_0
public
-#else
- internal
-#endif
HttpCacheVaryByHeaders ()
{
/* the field names are meant to be case insensitive */
diff --git a/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs b/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
index f58c2a67448..9d28fbc04bd 100644
--- a/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
+++ b/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
@@ -42,11 +42,7 @@ namespace System.Web
bool ignore_parms;
Hashtable parms;
-#if NET_4_0
public
-#else
- internal
-#endif
HttpCacheVaryByParams ()
{
/* the parameter names are meant to be case insensitive */
diff --git a/mcs/class/System.Web/System.Web/HttpContext.cs b/mcs/class/System.Web/System.Web/HttpContext.cs
index 2f1779e6260..5171412528a 100644
--- a/mcs/class/System.Web/System.Web/HttpContext.cs
+++ b/mcs/class/System.Web/System.Web/HttpContext.cs
@@ -102,9 +102,7 @@ namespace System.Web
WorkerRequest = wr;
request = new HttpRequest (WorkerRequest, this);
response = new HttpResponse (WorkerRequest, this);
-#if NET_4_0
SessionStateBehavior = SessionStateBehavior.Default;
-#endif
}
public HttpContext (HttpRequest request, HttpResponse response)
@@ -113,9 +111,7 @@ namespace System.Web
this.response = response;
this.request.Context = this;
this.response.Context = this;
-#if NET_4_0
SessionStateBehavior = SessionStateBehavior.Default;
-#endif
}
internal bool IsProcessingInclude {
@@ -636,12 +632,10 @@ namespace System.Web
req.QueryStringRaw = queryString;
}
-#if NET_4_0
public void SetSessionStateBehavior (SessionStateBehavior sessionStateBehavior)
{
SessionStateBehavior = sessionStateBehavior;
}
-#endif
#region internals
internal void SetSession (HttpSessionState state)
@@ -683,12 +677,10 @@ namespace System.Web
}
}
-#if NET_4_0
internal SessionStateBehavior SessionStateBehavior {
get;
private set;
}
-#endif
void TimeoutReached(object state) {
HttpRuntime.QueuePendingRequest (false);
diff --git a/mcs/class/System.Web/System.Web/HttpException.cs b/mcs/class/System.Web/System.Web/HttpException.cs
index d4b839f3fdb..a2887fde537 100644
--- a/mcs/class/System.Web/System.Web/HttpException.cs
+++ b/mcs/class/System.Web/System.Web/HttpException.cs
@@ -63,11 +63,7 @@ namespace System.Web
return pageTemplate;
}
}
-#if NET_4_0
public
-#else
- internal
-#endif
int WebEventCode
{
get { return webEventCode; }
diff --git a/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs b/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs
index b015d16ef6e..e04f1cae772 100644
--- a/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs
+++ b/mcs/class/System.Web/System.Web/HttpHeaderCollection.cs
@@ -64,11 +64,7 @@ namespace System.Web
string encName, encValue;
if (HeaderCheckingEnabled) {
-#if NET_4_0
HttpEncoder.Current.HeaderNameValueEncode (name, value, out encName, out encValue);
-#else
- HttpEncoder.HeaderNameValueEncode (name, value, out encName, out encValue);
-#endif
} else {
encName = name;
encValue = value;
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs
index 37b07eb66f1..c0da39bd53a 100755
--- a/mcs/class/System.Web/System.Web/HttpRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpRequest.cs
@@ -45,10 +45,8 @@ using System.Web.UI;
using System.Web.Util;
using System.Globalization;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
using System.Web.Routing;
-#endif
namespace System.Web
{
@@ -112,7 +110,6 @@ namespace System.Web
bool checked_cookies, checked_query_string, checked_form;
static readonly UrlMappingCollection urlMappings;
readonly static char [] queryTrimChars = {'?'};
-#if NET_4_0
bool lazyFormValidation;
bool lazyQueryStringValidation;
bool inputValidationEnabled;
@@ -154,7 +151,6 @@ namespace System.Web
return chars;
}
-#endif
static HttpRequest ()
{
@@ -166,7 +162,6 @@ namespace System.Web
urlMappings = null;
}
-#if NET_4_0
Version validationMode = HttpRuntime.Section.RequestValidationMode;
if (validationMode >= new Version (4, 0)) {
@@ -175,7 +170,6 @@ namespace System.Web
if (!String.IsNullOrEmpty (invalidChars))
RequestPathInvalidCharacters = CharsFromList (invalidChars);
}
-#endif
} catch {
// unlikely to happen
}
@@ -318,12 +312,7 @@ namespace System.Web
public HttpBrowserCapabilities Browser {
get {
if (browser_capabilities == null)
-#if NET_4_0
browser_capabilities = HttpCapabilitiesBase.BrowserCapabilitiesProvider.GetBrowserCapabilities (this);
-#else
- browser_capabilities = (HttpBrowserCapabilities)
- HttpCapabilitiesBase.GetConfigCapabilities (null, this);
-#endif
return browser_capabilities;
}
@@ -466,9 +455,7 @@ namespace System.Web
}
bool needValidation = validate_cookies;
-#if NET_4_0
needValidation |= validateRequestNewMode;
-#endif
if (needValidation && !checked_cookies) {
// Setting this before calling the validator prevents
// possible endless recursion
@@ -489,11 +476,9 @@ namespace System.Web
return FilePath;
}
}
-#if NET_4_0
public string CurrentExecutionFilePathExtension {
get { return global::System.IO.Path.GetExtension (CurrentExecutionFilePath); }
}
-#endif
public string AppRelativeCurrentExecutionFilePath {
get {
return VirtualPathUtility.ToAppRelative (CurrentExecutionFilePath);
@@ -724,7 +709,6 @@ namespace System.Web
public NameValueCollection Form {
get {
NameValueCollection form = FormUnvalidated;
-#if NET_4_0
if (validateRequestNewMode && !checked_form) {
if (!lazyFormValidation) {
// Setting this before calling the validator prevents
@@ -733,7 +717,6 @@ namespace System.Web
ValidateNameValueCollection ("Form", form, RequestValidationSource.Form);
}
} else
-#endif
if (validate_form && !checked_form){
checked_form = true;
ValidateNameValueCollection ("Form", form);
@@ -757,7 +740,6 @@ namespace System.Web
get {
if (headers == null) {
headers = HeadersNoValidation;
-#if NET_4_0
if (validateRequestNewMode) {
RequestValidator validator = RequestValidator.Current;
int validationFailureIndex;
@@ -769,7 +751,6 @@ namespace System.Web
ThrowValidationException ("Headers", hkey, value);
}
}
-#endif
}
return headers;
@@ -982,7 +963,6 @@ namespace System.Web
} catch {}
}
}
-#if NET_4_0
public RequestContext RequestContext {
get {
if (requestContext == null)
@@ -1152,7 +1132,6 @@ namespace System.Web
// TODO: explicitly support the async methods if there is a convenient way of doing it
//
}
-#endif
public Stream InputStream {
get {
if (input_stream == null)
@@ -1227,7 +1206,6 @@ namespace System.Web
get {
if (unescaped_path == null) {
unescaped_path = PathNoValidation;
-#if NET_4_0
if (validateRequestNewMode) {
RequestValidator validator = RequestValidator.Current;
int validationFailureIndex;
@@ -1235,7 +1213,6 @@ namespace System.Web
if (!validator.IsValidRequestString (HttpContext.Current, unescaped_path, RequestValidationSource.Path, null, out validationFailureIndex))
ThrowValidationException ("Path", "Path", unescaped_path);
}
-#endif
}
return unescaped_path;
@@ -1259,7 +1236,6 @@ namespace System.Web
get {
if (path_info == null) {
path_info = PathInfoNoValidation;
-#if NET_4_0
if (validateRequestNewMode) {
RequestValidator validator = RequestValidator.Current;
int validationFailureIndex;
@@ -1267,7 +1243,6 @@ namespace System.Web
if (!validator.IsValidRequestString (HttpContext.Current, path_info, RequestValidationSource.PathInfo, null, out validationFailureIndex))
ThrowValidationException ("PathInfo", "PathInfo", path_info);
}
-#endif
}
return path_info;
@@ -1341,7 +1316,6 @@ namespace System.Web
public NameValueCollection QueryString {
get {
NameValueCollection query_string_nvc = QueryStringUnvalidated;
-#if NET_4_0
if (validateRequestNewMode && !checked_query_string) {
if (!lazyQueryStringValidation) {
// Setting this before calling the validator prevents
@@ -1350,7 +1324,6 @@ namespace System.Web
ValidateNameValueCollection ("QueryString", query_string_nvc, RequestValidationSource.QueryString);
}
} else
-#endif
if (validate_query_string && !checked_query_string) {
// Setting this before calling the validator prevents
// possible endless recursion
@@ -1382,7 +1355,6 @@ namespace System.Web
get {
if (raw_url == null) {
raw_url = RawUrlUnvalidated;
-#if NET_4_0
if (validateRequestNewMode) {
RequestValidator validator = RequestValidator.Current;
int validationFailureIndex;
@@ -1390,7 +1362,6 @@ namespace System.Web
if (!validator.IsValidRequestString (HttpContext.Current, raw_url, RequestValidationSource.RawUrl, null, out validationFailureIndex))
ThrowValidationException ("RawUrl", "RawUrl", raw_url);
}
-#endif
}
return raw_url;
@@ -1671,11 +1642,8 @@ namespace System.Web
validate_cookies = true;
validate_query_string = true;
validate_form = true;
-#if NET_4_0
inputValidationEnabled = true;
-#endif
}
-#if NET_4_0
internal void Validate ()
{
var cfg = HttpRuntime.Section;
@@ -1703,7 +1671,6 @@ namespace System.Web
if (validateRequestNewMode)
ValidateInput ();
}
-#endif
#region internal routines
internal string ClientTarget {
get {
@@ -1766,7 +1733,6 @@ namespace System.Web
string path = UrlComponents.Path;
UrlComponents.Path = path + PathInfo;
}
-#if NET_4_0
internal void SetFormCollection (WebROCollection coll, bool lazyValidation)
{
if (coll == null)
@@ -1782,7 +1748,6 @@ namespace System.Web
query_string_nvc = coll;
lazyQueryStringValidation = lazyValidation;
}
-#endif
// Headers is ReadOnly, so we need this hack for cookie-less sessions.
internal void SetHeader (string name, string value)
{
@@ -1847,7 +1812,6 @@ namespace System.Web
ThrowValidationException (name, key, val);
}
}
-#if NET_4_0
static void ValidateNameValueCollection (string name, NameValueCollection coll, RequestValidationSource source)
{
if (coll == null)
@@ -1875,7 +1839,6 @@ namespace System.Web
{
throw new PlatformNotSupportedException ("This method is not supported.");
}
-#endif
static void ValidateCookieCollection (HttpCookieCollection cookies)
{
if (cookies == null)
@@ -1883,11 +1846,9 @@ namespace System.Web
int size = cookies.Count;
HttpCookie cookie;
-#if NET_4_0
RequestValidator validator = RequestValidator.Current;
int validationFailureIndex;
HttpContext context = HttpContext.Current;
-#endif
bool invalid;
for (int i = 0 ; i < size ; i++) {
@@ -1899,11 +1860,9 @@ namespace System.Web
string name = cookie.Name;
if (!String.IsNullOrEmpty (value)) {
-#if NET_4_0
if (validateRequestNewMode)
invalid = !validator.IsValidRequestString (context, value, RequestValidationSource.Cookies, name, out validationFailureIndex);
else
-#endif
invalid = IsInvalidString (value);
if (invalid)
@@ -1923,7 +1882,6 @@ namespace System.Web
throw new HttpRequestValidationException (msg);
}
-#if NET_4_0
internal static void ValidateString (string key, string value, RequestValidationSource source)
{
if (String.IsNullOrEmpty (value))
@@ -1934,7 +1892,6 @@ namespace System.Web
if (IsInvalidString (value, out ignore))
ThrowValidationException (source.ToString (), key, value);
}
-#endif
internal static bool IsInvalidString (string val)
{
#pragma warning disable 219
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs
index c1215887302..26b3b7d79c5 100644
--- a/mcs/class/System.Web/System.Web/HttpResponse.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponse.cs
@@ -43,9 +43,7 @@ using System.Security.Permissions;
using System.Web.Hosting;
using System.Web.SessionState;
-#if NET_4_0
using System.Web.Routing;
-#endif
namespace System.Web
{
@@ -352,9 +350,7 @@ namespace System.Web
get {
return writer;
}
-#if NET_4_0
set { writer = value; }
-#endif
}
public Stream OutputStream {
@@ -912,7 +908,6 @@ namespace System.Web
{
Redirect (url, endResponse, 302);
}
-#if NET_4_0
public void RedirectPermanent (string url)
{
RedirectPermanent (url, true);
@@ -1000,7 +995,6 @@ namespace System.Web
OutputCache.RemoveFromProvider (path, providerName);
}
-#endif
public static void RemoveOutputCacheItem (string path)
{
if (path == null)
@@ -1012,19 +1006,7 @@ namespace System.Web
if (path [0] != '/')
throw new ArgumentException ("'" + path + "' is not an absolute virtual path.");
-#if NET_4_0
RemoveOutputCacheItem (path, OutputCache.DefaultProviderName);
-#else
- HttpContext context = HttpContext.Current;
- HttpApplication app_instance = context != null ? context.ApplicationInstance : null;
- HttpModuleCollection modules = app_instance != null ? app_instance.Modules : null;
- OutputCacheModule ocm = modules != null ? modules.Get ("OutputCache") as OutputCacheModule : null;
- OutputCacheProvider internalProvider = ocm != null ? ocm.InternalProvider : null;
- if (internalProvider == null)
- return;
-
- internalProvider.Remove (path);
-#endif
}
public void SetCookie (HttpCookie cookie)
@@ -1035,22 +1017,18 @@ namespace System.Web
public void Write (char ch)
{
TextWriter writer = Output;
-#if NET_4_0
// Emulating .NET
if (writer == null)
throw new NullReferenceException (".NET 4.0 emulation. A null value was found where an object was required.");
-#endif
writer.Write (ch);
}
public void Write (object obj)
{
TextWriter writer = Output;
-#if NET_4_0
// Emulating .NET
if (writer == null)
throw new NullReferenceException (".NET 4.0 emulation. A null value was found where an object was required.");
-#endif
if (obj == null)
return;
@@ -1060,22 +1038,18 @@ namespace System.Web
public void Write (string s)
{
TextWriter writer = Output;
-#if NET_4_0
// Emulating .NET
if (writer == null)
throw new NullReferenceException (".NET 4.0 emulation. A null value was found where an object was required.");
-#endif
writer.Write (s);
}
public void Write (char [] buffer, int index, int count)
{
TextWriter writer = Output;
-#if NET_4_0
// Emulating .NET
if (writer == null)
throw new NullReferenceException (".NET 4.0 emulation. A null value was found where an object was required.");
-#endif
writer.Write (buffer, index, count);
}
diff --git a/mcs/class/System.Web/System.Web/HttpResponseHeader.cs b/mcs/class/System.Web/System.Web/HttpResponseHeader.cs
index 9eb9fee8c19..574bbade505 100644
--- a/mcs/class/System.Web/System.Web/HttpResponseHeader.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponseHeader.cs
@@ -43,11 +43,7 @@ namespace System.Web
get { return headerValue; }
set {
string hname, hvalue;
-#if NET_4_0
HttpEncoder.Current.HeaderNameValueEncode (null, value, out hname, out hvalue);
-#else
- HttpEncoder.HeaderNameValueEncode (null, value, out hname, out hvalue);
-#endif
headerValue = hvalue;
}
}
@@ -92,11 +88,7 @@ namespace System.Web
get { return headerName; }
set {
string hname, hvalue;
-#if NET_4_0
HttpEncoder.Current.HeaderNameValueEncode (value, null, out hname, out hvalue);
-#else
- HttpEncoder.HeaderNameValueEncode (value, null, out hname, out hvalue);
-#endif
headerName = hname;
}
}
diff --git a/mcs/class/System.Web/System.Web/HttpUtility.cs b/mcs/class/System.Web/System.Web/HttpUtility.cs
index 71892767469..786956ee9da 100644
--- a/mcs/class/System.Web/System.Web/HttpUtility.cs
+++ b/mcs/class/System.Web/System.Web/HttpUtility.cs
@@ -77,22 +77,13 @@ namespace System.Web {
public static void HtmlAttributeEncode (string s, TextWriter output)
{
if (output == null) {
-#if NET_4_0
throw new ArgumentNullException ("output");
-#else
- throw new NullReferenceException (".NET emulation");
-#endif
}
-#if NET_4_0
HttpEncoder.Current.HtmlAttributeEncode (s, output);
-#else
- output.Write (HttpEncoder.HtmlAttributeEncode (s));
-#endif
}
public static string HtmlAttributeEncode (string s)
{
-#if NET_4_0
if (s == null)
return null;
@@ -100,9 +91,6 @@ namespace System.Web {
HttpEncoder.Current.HtmlAttributeEncode (s, sw);
return sw.ToString ();
}
-#else
- return HttpEncoder.HtmlAttributeEncode (s);
-#endif
}
public static string UrlDecode (string str)
@@ -434,11 +422,7 @@ namespace System.Web {
{
if (bytes == null)
return null;
-#if NET_4_0
return HttpEncoder.Current.UrlEncode (bytes, offset, count);
-#else
- return HttpEncoder.UrlEncodeToBytes (bytes, offset, count);
-#endif
}
public static string UrlEncodeUnicode (string str)
@@ -471,7 +455,6 @@ namespace System.Web {
/// <returns>The decoded text.</returns>
public static string HtmlDecode (string s)
{
-#if NET_4_0
if (s == null)
return null;
@@ -479,9 +462,6 @@ namespace System.Web {
HttpEncoder.Current.HtmlDecode (s, sw);
return sw.ToString ();
}
-#else
- return HttpEncoder.HtmlDecode (s);
-#endif
}
/// <summary>
@@ -492,25 +472,16 @@ namespace System.Web {
public static void HtmlDecode(string s, TextWriter output)
{
if (output == null) {
-#if NET_4_0
throw new ArgumentNullException ("output");
-#else
- throw new NullReferenceException (".NET emulation");
-#endif
}
if (!String.IsNullOrEmpty (s)) {
-#if NET_4_0
HttpEncoder.Current.HtmlDecode (s, output);
-#else
- output.Write (HttpEncoder.HtmlDecode (s));
-#endif
}
}
public static string HtmlEncode (string s)
{
-#if NET_4_0
if (s == null)
return null;
@@ -518,9 +489,6 @@ namespace System.Web {
HttpEncoder.Current.HtmlEncode (s, sw);
return sw.ToString ();
}
-#else
- return HttpEncoder.HtmlEncode (s);
-#endif
}
/// <summary>
@@ -531,22 +499,13 @@ namespace System.Web {
public static void HtmlEncode(string s, TextWriter output)
{
if (output == null) {
-#if NET_4_0
throw new ArgumentNullException ("output");
-#else
- throw new NullReferenceException (".NET emulation");
-#endif
}
if (!String.IsNullOrEmpty (s)) {
-#if NET_4_0
HttpEncoder.Current.HtmlEncode (s, output);
-#else
- output.Write (HttpEncoder.HtmlEncode (s));
-#endif
}
}
-#if NET_4_0
public static string HtmlEncode (object value)
{
if (value == null)
@@ -634,14 +593,9 @@ namespace System.Web {
return sb.ToString ();
}
-#endif
public static string UrlPathEncode (string s)
{
-#if NET_4_0
return HttpEncoder.Current.UrlPathEncode (s);
-#else
- return HttpEncoder.UrlPathEncode (s);
-#endif
}
public static NameValueCollection ParseQueryString (string query)
diff --git a/mcs/class/System.Web/System.Web/IPartitionResolver.cs b/mcs/class/System.Web/System.Web/IPartitionResolver.cs
index 9cf0e042b68..9ac4329fbe7 100644
--- a/mcs/class/System.Web/System.Web/IPartitionResolver.cs
+++ b/mcs/class/System.Web/System.Web/IPartitionResolver.cs
@@ -31,10 +31,6 @@ using System.Security.Permissions;
namespace System.Web
{
-#if !NET_4_0
- [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal),
- AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#endif
public interface IPartitionResolver
{
void Initialize ();
diff --git a/mcs/class/System.XML/System.Xml/DtdProcessing.cs b/mcs/class/System.XML/System.Xml/DtdProcessing.cs
index 1b31f888086..4480c051e74 100644
--- a/mcs/class/System.XML/System.Xml/DtdProcessing.cs
+++ b/mcs/class/System.XML/System.Xml/DtdProcessing.cs
@@ -28,12 +28,10 @@
namespace System.Xml {
-#if NET_4_0
public enum DtdProcessing
{
Prohibit = 0,
Ignore = 1,
Parse = 2
}
-#endif
}
diff --git a/mcs/class/System.XML/System.Xml/NamespaceHandling.cs b/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
index 0b2b0818e3b..2adf034e98d 100644
--- a/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
+++ b/mcs/class/System.XML/System.Xml/NamespaceHandling.cs
@@ -24,11 +24,7 @@
namespace System.Xml {
[Flags]
-#if NET_4_0
public
-#else
- internal
-#endif
enum NamespaceHandling {
Default,
OmitDuplicates = 1,
diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs
index 640ee7b1c69..a73e593c871 100644
--- a/mcs/class/System.XML/System.Xml/XmlConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs
@@ -812,7 +812,6 @@ namespace System.Xml {
#endif
-#if NET_4_0
public static bool IsNCNameChar (char ch)
{
return XmlChar.IsNCNameChar (ch);
@@ -870,6 +869,5 @@ namespace System.Xml {
return content;
throw new XmlException (string.Format ("Invalid XML character was found in the content, at index {0}.", idx));
}
-#endif
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlDocument.cs b/mcs/class/System.XML/System.Xml/XmlDocument.cs
index af1a9c7a1b5..dd130686ef3 100644
--- a/mcs/class/System.XML/System.Xml/XmlDocument.cs
+++ b/mcs/class/System.XML/System.Xml/XmlDocument.cs
@@ -175,11 +175,9 @@ namespace System.Xml
get { return implementation; }
}
-#if NET_4_0
public override string InnerText {
set { throw new InvalidOperationException (); }
}
-#endif
public override string InnerXml {
get {
diff --git a/mcs/class/System.XML/System.Xml/XmlReader.cs b/mcs/class/System.XML/System.Xml/XmlReader.cs
index 4833cbdc293..ef90b40e5d4 100644
--- a/mcs/class/System.XML/System.Xml/XmlReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReader.cs
@@ -109,7 +109,6 @@ namespace System.Xml
get { return AttributeCount > 0; }
}
-#if NET_4_0
public virtual bool HasValue {
get {
switch (NodeType) {
@@ -126,9 +125,6 @@ namespace System.Xml
return false;
}
}
-#else
- public abstract bool HasValue { get; }
-#endif
public abstract bool IsEmptyElement { get; }
@@ -445,11 +441,7 @@ namespace System.Xml
return xvr != null ? xvr : reader;
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose()
-#endif
{
Dispose (true);
}
diff --git a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
index cb029083af5..767d057d1ae 100644
--- a/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
@@ -54,9 +54,7 @@ namespace System.Xml
private XsValidationFlags validationFlags;
private ValidationType validationType;
private XmlResolver xmlResolver;
-#if NET_4_0
private DtdProcessing dtdProcessing;
-#endif
private long maxCharactersFromEntities;
private long maxCharactersInDocument;
@@ -118,7 +116,6 @@ namespace System.Xml
get { return conformance; }
set { conformance = value; }
}
-#if NET_4_0
public DtdProcessing DtdProcessing {
get { return dtdProcessing; }
set {
@@ -126,7 +123,6 @@ namespace System.Xml
prohibitDtd = (value == DtdProcessing.Prohibit);
}
}
-#endif
public long MaxCharactersFromEntities {
get { return maxCharactersFromEntities; }
set { maxCharactersFromEntities = value; }
@@ -163,9 +159,7 @@ namespace System.Xml
set { linePositionOffset = value; }
}
-#if NET_4_0
[ObsoleteAttribute("Use DtdProcessing property instead")]
-#endif
public bool ProhibitDtd {
get { return prohibitDtd; }
set { prohibitDtd = value; }
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader2.cs b/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
index 15d081f8acb..a7c85b8d006 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader2.cs
@@ -253,10 +253,8 @@ namespace System.Xml
get { return entity != null ? ReadState.Interactive : source.ReadState; }
}
-#if NET_4_0
[MonoTODO]
public DtdProcessing DtdProcessing { get; set; }
-#endif
#if !NET_4_5
public override XmlReaderSettings Settings {
diff --git a/mcs/class/System.XML/System.Xml/XmlWriter.cs b/mcs/class/System.XML/System.Xml/XmlWriter.cs
index 0309709cfdc..29d196686eb 100755
--- a/mcs/class/System.XML/System.Xml/XmlWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriter.cs
@@ -189,11 +189,7 @@ namespace System.Xml
Close ();
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose()
-#endif
{
Dispose (false);
}
diff --git a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
index b90079bb6d8..e79b7d366ca 100644
--- a/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
@@ -161,11 +161,7 @@ namespace System.Xml
//set { outputMethod = value; }
}
-#if NET_4_0
public
-#else
- internal
-#endif
NamespaceHandling NamespaceHandling { get; set; }
#if NET_4_5
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs
index 8fb7362f5ec..378cb5e6dca 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs
@@ -21,7 +21,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_0
using System;
namespace System.Xml.Linq
@@ -33,4 +32,3 @@ namespace System.Xml.Linq
OmitDuplicateNamespaces = 1
}
}
-#endif
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs
index f2753fc07cf..18bdeb43ec4 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs
@@ -33,8 +33,6 @@ namespace System.Xml.Linq
{
None = 0,
DisableFormatting = 1,
-#if NET_4_0
OmitDuplicateNamespaces = 2
-#endif
}
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs
index a285e0ab8ba..2b30918ebf1 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs
@@ -196,10 +196,8 @@ namespace System.Xml.Linq
XmlWriterSettings s = new XmlWriterSettings ();
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
-#if NET_4_0
if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces)
s.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
-#endif
using (XmlWriter w = XmlWriter.Create (fileName, s)) {
Save (w);
@@ -216,10 +214,8 @@ namespace System.Xml.Linq
XmlWriterSettings s = new XmlWriterSettings ();
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
-#if NET_4_0
if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces)
s.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
-#endif
using (XmlWriter w = XmlWriter.Create (textWriter, s)) {
Save (w);
}
@@ -268,7 +264,6 @@ namespace System.Xml.Linq
throw new InvalidOperationException ("An element cannot be added before the document type declaration");
}
}
-#if NET_4_0
public void Save (Stream stream)
{
Save (stream, SaveOptions.None);
@@ -287,6 +282,5 @@ namespace System.Xml.Linq
}
}
-#endif
}
}
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index 4fa7889633c..52a8be506e1 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -472,7 +472,6 @@ namespace System.Xml.Linq
}
}
-#if NET_4_0
public static XElement Load (Stream stream)
{
return Load (stream, LoadOptions.None);
@@ -487,7 +486,6 @@ namespace System.Xml.Linq
return LoadCore (r, options);
}
}
-#endif
internal static XElement LoadCore (XmlReader r, LoadOptions options)
{
@@ -554,10 +552,8 @@ namespace System.Xml.Linq
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
-#if NET_4_0
if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces)
s.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
-#endif
using (XmlWriter w = XmlWriter.Create (fileName, s)) {
Save (w);
}
@@ -574,10 +570,8 @@ namespace System.Xml.Linq
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
-#if NET_4_0
if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces)
s.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
-#endif
using (XmlWriter w = XmlWriter.Create (textWriter, s)) {
Save (w);
}
@@ -588,7 +582,6 @@ namespace System.Xml.Linq
WriteTo (writer);
}
-#if NET_4_0
public void Save (Stream stream)
{
Save (stream, SaveOptions.None);
@@ -606,7 +599,6 @@ namespace System.Xml.Linq
Save (writer);
}
}
-#endif
public IEnumerable <XElement> AncestorsAndSelf ()
{
return GetAncestorList (null, true);
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
index e98811ed434..06d3e5df2b3 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
@@ -243,7 +243,6 @@ namespace System.Xml.Linq
return new XNodeReader (this);
}
-#if NET_4_0
public XmlReader CreateReader (ReaderOptions readerOptions)
{
var r = new XNodeReader (this);
@@ -252,7 +251,6 @@ namespace System.Xml.Linq
return r;
}
-#endif
public IEnumerable<XElement> ElementsAfterSelf ()
{
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs
index 95631f1bbaa..076125bd1d1 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs
@@ -47,9 +47,7 @@ namespace System.Xml.Linq
start = node;
}
-#if NET_4_0
internal bool OmitDuplicateNamespaces { get; set; }
-#endif
int IXmlLineInfo.LineNumber {
get {
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs
index 1c45409b4ae..adffc9f8e15 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs
@@ -104,15 +104,12 @@ namespace System.Xml.Linq
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
-#if NET_4_0
if ((options & SaveOptions.OmitDuplicateNamespaces) == SaveOptions.OmitDuplicateNamespaces)
s.NamespaceHandling |= NamespaceHandling.OmitDuplicates;
-#endif
using (XmlWriter w = XmlWriter.Create (textWriter, s))
WriteTo (w);
}
-#if NET_4_0
public void Save (Stream stream)
{
Save (stream, SaveOptions.None);
@@ -130,7 +127,6 @@ namespace System.Xml.Linq
WriteTo (writer);
}
}
-#endif
public override string ToString ()
{
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 88c95c9a905..33e899b42f6 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -179,34 +179,6 @@ namespace Mono.CSharp
mcsOutput = new StringCollection ();
mcsOutMutex = new Mutex ();
-#if !NET_4_0
- /*
- * !:. KLUDGE WARNING .:!
- *
- * When running the 2.0 test suite some assemblies will invoke mcs via
- * CodeDOM and the new mcs process will find the MONO_PATH variable in its
- * environment pointing to the net_2_0 library which will cause the runtime
- * to attempt to load the 2.0 corlib into 4.0 process and thus mcs will
- * fail. At the same time, we must not touch MONO_PATH when running outside
- * the test suite, thus the kludge.
- *
- * !:. KLUDGE WARNING .:!
- */
- if (Environment.GetEnvironmentVariable ("MONO_TESTS_IN_PROGRESS") != null) {
- string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
- if (!String.IsNullOrEmpty (monoPath)) {
- const string basePath = "/class/lib/";
- const string profile = "net_2_0";
- var basePathIndex = monoPath.IndexOf (basePath, StringComparison.Ordinal);
- if (basePathIndex > 0 && basePathIndex + basePath.Length + profile.Length <= monoPath.Length) {
- var currentProfile = monoPath.Substring (basePathIndex + basePath.Length, profile.Length);
- if (currentProfile.Equals (profile, StringComparison.OrdinalIgnoreCase))
- monoPath = monoPath.Replace (basePath + currentProfile, basePath + "net_4_0");
- }
- mcs.StartInfo.EnvironmentVariables ["MONO_PATH"] = monoPath;
- }
- }
-#endif
/*
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
if (monoPath != null)
@@ -370,11 +342,7 @@ namespace Mono.CSharp
string langver;
if (!providerOptions.TryGetValue ("CompilerVersion", out langver))
-#if NET_4_0
langver = "3.5";
-#else
- langver = "2.0";
-#endif
if (langver.Length >= 1 && langver [0] == 'v')
langver = langver.Substring (1);
@@ -392,10 +360,8 @@ namespace Mono.CSharp
#if NET_4_5
args.Append("/sdk:4.5");
-#elif NET_4_0
- args.Append("/sdk:4");
#else
- args.Append("/sdk:2");
+ args.Append("/sdk:4");
#endif
args.Append (" -- ");
diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs b/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
index 030d75428eb..85893419f72 100644
--- a/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
@@ -135,14 +135,12 @@ namespace System.CodeDom.Compiler {
CompilerInfo ci = GetCompilerInfo (language);
return (ci == null) ? null : ci.CreateProvider ();
}
-#if NET_4_0
[ComVisible (false)]
public static CodeDomProvider CreateProvider (string language, IDictionary<string, string> providerOptions)
{
CompilerInfo ci = GetCompilerInfo (language);
return ci == null ? null : ci.CreateProvider (providerOptions);
}
-#endif
#endif
public virtual string CreateValidIdentifier (string value)
diff --git a/mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs b/mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs
index 723252ea94b..d6331ea779f 100644
--- a/mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs
@@ -39,11 +39,7 @@ namespace System.CodeDom.Compiler
[ConfigurationCollection (typeof (Compiler), AddItemName = "compiler", CollectionType = ConfigurationElementCollectionType.BasicMap)]
internal sealed class CompilerCollection : ConfigurationElementCollection
{
-#if NET_4_0
static readonly string defaultCompilerVersion = "3.5";
-#else
- static readonly string defaultCompilerVersion = "2.0";
-#endif
static ConfigurationPropertyCollection properties;
static List <CompilerInfo> compiler_infos;
static Dictionary <string, CompilerInfo> compiler_languages;
diff --git a/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs b/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
index 22a47fa73d5..fa78dd2abb5 100644
--- a/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
@@ -103,9 +103,7 @@ namespace System.CodeDom.Compiler {
return CreateProvider (ProviderOptions);
}
-#if NET_4_0
public
-#endif
CodeDomProvider CreateProvider (IDictionary<string, string> providerOptions)
{
Type providerType = CodeDomProviderType;
diff --git a/mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs b/mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs
index 21be8058ac0..1816d213774 100644
--- a/mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs
@@ -96,9 +96,7 @@ namespace System.CodeDom.Compiler {
}
}
-#if NET_4_0
[Obsolete]
-#endif
public Evidence Evidence {
get { return evidence; }
[SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
diff --git a/mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs b/mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs
index 8ba271fc0fa..dce0a542e89 100644
--- a/mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs
+++ b/mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs
@@ -78,9 +78,7 @@ namespace System.CodeDom.Compiler {
}
}
-#if NET_4_0
[Obsolete]
-#endif
public Evidence Evidence {
get { return evidence; }
[SecurityPermission (SecurityAction.Demand, ControlEvidence = true)]
diff --git a/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs b/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
index 339e63c9aa2..68426f9317d 100644
--- a/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
+++ b/mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
@@ -26,7 +26,6 @@
// Marek Safar (marek.safar@gmail.com)
//
-#if NET_4_0
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
@@ -197,4 +196,3 @@ namespace System.Collections.ObjectModel
}
}
}
-#endif
diff --git a/mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs b/mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
index baa05c038d2..67adb053210 100644
--- a/mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
+++ b/mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
@@ -23,7 +23,6 @@
// Chris Toshok (toshok@novell.com)
// Brian O'Keefe (zer0keefie@gmail.com)
//
-#if NET_4_0
using System.Collections.Specialized;
using System.ComponentModel;
using System.Runtime.CompilerServices;
@@ -84,4 +83,3 @@ namespace System.Collections.ObjectModel
}
}
-#endif
diff --git a/mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs b/mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs
index a0e633556d2..2a32876cf7b 100644
--- a/mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs
+++ b/mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs
@@ -23,7 +23,6 @@
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Runtime.CompilerServices;
namespace System.Collections.Specialized {
@@ -37,4 +36,3 @@ namespace System.Collections.Specialized {
}
}
-#endif
diff --git a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs
index 55d5d1cf4c8..f516b508d69 100644
--- a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs
+++ b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs
@@ -22,7 +22,6 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Runtime.CompilerServices;
namespace System.Collections.Specialized
@@ -40,4 +39,3 @@ namespace System.Collections.Specialized
}
}
-#endif
diff --git a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
index 26d9ee8129e..04597907bee 100644
--- a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
+++ b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
@@ -23,7 +23,6 @@
// Chris Toshok (toshok@ximian.com)
// Brian O'Keefe (zer0keefie@gmail.com)
//
-#if NET_4_0
using System.Runtime.CompilerServices;
namespace System.Collections.Specialized
@@ -216,4 +215,3 @@ namespace System.Collections.Specialized
#endregion
}
}
-#endif
diff --git a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
index 66b3f9e6fc2..250bcbe76e7 100644
--- a/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
+++ b/mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
@@ -22,7 +22,6 @@
// Authors:
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Runtime.CompilerServices;
namespace System.Collections.Specialized
@@ -33,4 +32,3 @@ namespace System.Collections.Specialized
public delegate void NotifyCollectionChangedEventHandler (object sender, NotifyCollectionChangedEventArgs e);
}
-#endif
diff --git a/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs b/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
index fb300c20208..38371caf017 100644
--- a/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
+++ b/mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
@@ -28,7 +28,6 @@
using System;
-#if NET_4_0
namespace System.Diagnostics.CodeAnalysis {
@@ -48,4 +47,3 @@ namespace System.Diagnostics.CodeAnalysis {
}
}
-#endif
diff --git a/mcs/class/System/System.Diagnostics/Debug.cs b/mcs/class/System/System.Diagnostics/Debug.cs
index 6608f60f855..d4aac126e88 100644
--- a/mcs/class/System/System.Diagnostics/Debug.cs
+++ b/mcs/class/System/System.Diagnostics/Debug.cs
@@ -76,7 +76,6 @@ namespace System.Diagnostics {
TraceImpl.Assert (condition, message, detailMessage);
}
-#if NET_4_0
[Conditional ("DEBUG")]
public static void Assert (bool condition, string message,
string detailMessageFormat, params object [] args)
@@ -85,7 +84,6 @@ namespace System.Diagnostics {
message,
string.Format (detailMessageFormat, args));
}
-#endif
[Conditional("DEBUG")]
public static void Close ()
@@ -185,13 +183,11 @@ namespace System.Diagnostics {
TraceImpl.WriteLine (message);
}
-#if NET_4_0
[Conditional("DEBUG")]
public static void WriteLine (string format, params object [] args)
{
TraceImpl.WriteLine (string.Format (format, args));
}
-#endif
[Conditional("DEBUG")]
public static void WriteLine (object value, string category)
diff --git a/mcs/class/System/System.Diagnostics/Stopwatch.cs b/mcs/class/System/System.Diagnostics/Stopwatch.cs
index e5eb6cf682b..4fcd04293bd 100644
--- a/mcs/class/System/System.Diagnostics/Stopwatch.cs
+++ b/mcs/class/System/System.Diagnostics/Stopwatch.cs
@@ -116,14 +116,12 @@ namespace System.Diagnostics
is_running = false;
}
-#if NET_4_0
public void Restart ()
{
started = GetTimestamp ();
elapsed = 0;
is_running = true;
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs b/mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs
index 20897267f6c..8aa429ea3a7 100644
--- a/mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs
+++ b/mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs
@@ -72,13 +72,11 @@ namespace System.Net.Configuration {
get { return (string) base ["targetName"]; }
set { base ["targetName"] = value; }
}
-#if NET_4_0
[ConfigurationPropertyAttribute("enableSsl", DefaultValue = false)]
public bool EnableSsl {
get { return (bool) base ["enableSsl"]; }
set { base ["enableSsl"] = value; }
}
-#endif
protected override ConfigurationPropertyCollection Properties {
// what to do here?
get { return base.Properties; }
diff --git a/mcs/class/System/System.Net.Mail/MailMessage.cs b/mcs/class/System/System.Net.Mail/MailMessage.cs
index 45720eb92a8..81b0c6ac1e5 100644
--- a/mcs/class/System/System.Net.Mail/MailMessage.cs
+++ b/mcs/class/System/System.Net.Mail/MailMessage.cs
@@ -181,28 +181,18 @@ namespace System.Net.Mail {
set { priority = value; }
}
-#if NET_4_0
public
-#else
- internal
-#endif
Encoding HeadersEncoding {
get { return headersEncoding; }
set { headersEncoding = value; }
}
-#if NET_4_0
public
-#else
- internal
-#endif
MailAddressCollection ReplyToList {
get { return replyTo; }
}
-#if NET_4_0
[Obsolete ("Use ReplyToList instead")]
-#endif
public MailAddress ReplyTo {
get {
if (replyTo.Count == 0)
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs
index 81a5a04d1b6..4b5002a7ee0 100644
--- a/mcs/class/System/System.Net.Mail/SmtpClient.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs
@@ -61,9 +61,7 @@ using System.Threading.Tasks;
namespace System.Net.Mail {
public class SmtpClient
-#if NET_4_0
: IDisposable
-#endif
{
#region Fields
@@ -125,9 +123,7 @@ namespace System.Net.Mail {
if (cfg != null) {
this.host = cfg.Network.Host;
this.port = cfg.Network.Port;
-#if NET_4_0
this.enableSsl = cfg.Network.EnableSsl;
-#endif
TargetName = cfg.Network.TargetName;
if (this.TargetName == null)
TargetName = "SMTPSVC/" + (host != null ? host : "");
@@ -174,9 +170,7 @@ namespace System.Net.Mail {
}
#endif
-#if NET_4_0
public
-#endif
string TargetName { get; set; }
public ICredentialsByHost Credentials {
@@ -264,7 +258,6 @@ namespace System.Net.Mail {
#endregion // Events
#region Methods
-#if NET_4_0
public void Dispose ()
{
Dispose (true);
@@ -275,7 +268,6 @@ namespace System.Net.Mail {
{
// TODO: We should close all the connections and abort any async operations here
}
-#endif
private void CheckState ()
{
if (messageInProcess != null)
@@ -706,13 +698,8 @@ namespace System.Net.Mail {
if (message.ReplyToList.Count > 0)
SendHeader ("Reply-To", EncodeAddresses (message.ReplyToList));
-#if NET_4_0
foreach (string s in message.Headers.AllKeys)
SendHeader (s, ContentType.EncodeSubjectRFC2047 (message.Headers [s], message.HeadersEncoding));
-#else
- foreach (string s in message.Headers.AllKeys)
- SendHeader (s, message.Headers [s]);
-#endif
AddPriorityHeader (message);
diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
index c7f6259172d..b9e8ccc05c8 100644
--- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
+++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
@@ -42,9 +42,7 @@ namespace System.Net.Sockets
int in_progress;
internal Socket.Worker Worker;
EndPoint remote_ep;
-#if NET_4_0
public Exception ConnectByNameError { get; internal set; }
-#endif
public event EventHandler<SocketAsyncEventArgs> Completed;
@@ -82,7 +80,6 @@ namespace System.Net.Sockets
public SocketFlags SocketFlags { get; set; }
public object UserToken { get; set; }
internal Socket curSocket;
-#if (NET_2_1 || NET_4_0)
public Socket ConnectSocket {
get {
switch (SocketError) {
@@ -101,7 +98,6 @@ namespace System.Net.Sockets
{
PolicyRestricted = policy;
}
-#endif
public SocketAsyncEventArgs ()
{
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 b44a0611592..f3d2ecc908f 100644
--- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
@@ -1188,11 +1188,7 @@ namespace System.Net.Sockets {
}
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this);
@@ -1589,7 +1585,6 @@ namespace System.Net.Sockets {
bool GetCheckedIPs (SocketAsyncEventArgs e, out IPAddress [] addresses)
{
addresses = null;
-#if NET_4_0
// Connect to the first address that match the host name, like:
// http://blogs.msdn.com/ncl/archive/2009/07/20/new-ncl-features-in-net-4-0-beta-2.aspx
// while skipping entries that do not match the address family
@@ -1601,18 +1596,13 @@ namespace System.Net.Sockets {
e.ConnectByNameError = null;
return false;
}
-#else
- return false; // < NET_4_0 -> use remote endpoint
-#endif
}
bool ConnectAsyncReal (SocketAsyncEventArgs e)
{
bool use_remoteep = true;
-#if NET_4_0
IPAddress [] addresses = null;
use_remoteep = !GetCheckedIPs (e, out addresses);
-#endif
e.curSocket = this;
Worker w = e.Worker;
w.Init (this, e, SocketOperation.Connect);
@@ -1623,7 +1613,6 @@ namespace System.Net.Sockets {
result.EndPoint = e.RemoteEndPoint;
ares = BeginConnect (e.RemoteEndPoint, SocketAsyncEventArgs.Dispatcher, e);
}
-#if NET_4_0
else {
DnsEndPoint dep = (e.RemoteEndPoint as DnsEndPoint);
@@ -1632,7 +1621,6 @@ namespace System.Net.Sockets {
ares = BeginConnect (addresses, dep.Port, SocketAsyncEventArgs.Dispatcher, e);
}
-#endif
if (ares.IsCompleted && ares.CompletedSynchronously) {
((SocketAsyncResult) ares).CheckIfThrowDelayedException ();
return false;
diff --git a/mcs/class/System/System.Net/DnsEndPoint.cs b/mcs/class/System/System.Net/DnsEndPoint.cs
index 7cad18c5b64..a7f119e60b9 100644
--- a/mcs/class/System/System.Net/DnsEndPoint.cs
+++ b/mcs/class/System/System.Net/DnsEndPoint.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Net.Sockets;
@@ -106,4 +105,3 @@ namespace System.Net {
}
}
-#endif
diff --git a/mcs/class/System/System.Net/FileWebResponse.cs b/mcs/class/System/System.Net/FileWebResponse.cs
index 79f878cf591..3d8ca215054 100644
--- a/mcs/class/System/System.Net/FileWebResponse.cs
+++ b/mcs/class/System/System.Net/FileWebResponse.cs
@@ -153,9 +153,7 @@ namespace System.Net
GC.SuppressFinalize (this);
}
-#if NET_4_0
protected override
-#endif
void Dispose (bool disposing)
{
if (this.disposed)
@@ -173,9 +171,7 @@ namespace System.Net
fileStream = null;
if (stream != null)
stream.Close (); // also closes webRequest
-#if NET_4_0
base.Dispose (disposing);
-#endif
}
private void CheckDisposed ()
diff --git a/mcs/class/System/System.Net/HttpListenerRequest.cs b/mcs/class/System/System.Net/HttpListenerRequest.cs
index d1133f9c342..a7d76f19506 100644
--- a/mcs/class/System/System.Net/HttpListenerRequest.cs
+++ b/mcs/class/System/System.Net/HttpListenerRequest.cs
@@ -43,9 +43,7 @@ using System.Globalization;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Text;
-#if NET_4_0
using System.Security.Authentication.ExtendedProtection;
-#endif
#if NET_4_5
using System.Threading.Tasks;
#endif
@@ -53,7 +51,6 @@ using System.Threading.Tasks;
namespace System.Net {
public sealed class HttpListenerRequest
{
-#if NET_4_0
class Context : TransportContext
{
public override ChannelBinding GetChannelBinding (ChannelBindingKind kind)
@@ -61,7 +58,6 @@ namespace System.Net {
throw new NotImplementedException ();
}
}
-#endif
string [] accept_types;
Encoding content_encoding;
@@ -512,7 +508,6 @@ namespace System.Net {
return context.Connection.ClientCertificate;
}
-#if NET_4_0
[MonoTODO]
public string ServiceName {
get {
@@ -525,7 +520,6 @@ namespace System.Net {
return new Context ();
}
}
-#endif
#if NET_4_5
[MonoTODO]
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs
index 91b943ab893..b1afa08a7bb 100644
--- a/mcs/class/System/System.Net/HttpWebRequest.cs
+++ b/mcs/class/System/System.Net/HttpWebRequest.cs
@@ -319,7 +319,6 @@ namespace System.Net
get { return credentials; }
set { credentials = value; }
}
-#if NET_4_0
public DateTime Date {
get {
string date = webHeaders ["Date"];
@@ -334,7 +333,6 @@ namespace System.Net
webHeaders.RemoveAndAdd ("Date", value.ToUniversalTime ().ToString ("r", CultureInfo.InvariantCulture));
}
}
-#endif
#if !NET_2_1
[MonoTODO]
@@ -400,11 +398,7 @@ namespace System.Net
}
}
-#if NET_4_0
public
-#else
- internal
-#endif
string Host {
get {
if (host == null)
@@ -597,7 +591,6 @@ namespace System.Net
internal ServicePoint ServicePointNoLock {
get { return servicePoint; }
}
-#if NET_4_0
public virtual bool SupportsCookieContainer {
get {
// The managed implementation supports the cookie container
@@ -605,7 +598,6 @@ namespace System.Net
return true;
}
}
-#endif
public override int Timeout {
get { return timeout; }
set {
@@ -707,31 +699,19 @@ namespace System.Net
{
AddRange (rangeSpecifier, (long) from, (long) to);
}
-#if NET_4_0
public
-#else
- internal
-#endif
void AddRange (long range)
{
AddRange ("bytes", (long) range);
}
-#if NET_4_0
public
-#else
- internal
-#endif
void AddRange (long from, long to)
{
AddRange ("bytes", from, to);
}
-#if NET_4_0
public
-#else
- internal
-#endif
void AddRange (string rangeSpecifier, long range)
{
if (rangeSpecifier == null)
@@ -757,11 +737,7 @@ namespace System.Net
webHeaders.RemoveAndAdd ("Range", r);
}
-#if NET_4_0
public
-#else
- internal
-#endif
void AddRange (string rangeSpecifier, long from, long to)
{
if (rangeSpecifier == null)
@@ -872,16 +848,11 @@ namespace System.Net
{
if (writeStream == null || writeStream.RequestWritten || !InternalAllowBuffering)
return false;
- #if NET_4_0
if (contentLength < 0 && writeStream.CanWrite == true && writeStream.WriteBufferLength < 0)
return false;
if (contentLength < 0 && writeStream.WriteBufferLength >= 0)
InternalContentLength = writeStream.WriteBufferLength;
- #else
- if (contentLength < 0 && writeStream.CanWrite == true)
- return false;
- #endif
// This will write the POST/PUT if the write stream already has the expected
// amount of bytes in it (ContentLength) (bug #77753) or if the write stream
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index 79e61a43624..b4008299239 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -321,20 +321,11 @@ namespace System.Net
Dispose (true);
}
-#if NET_4_0
protected override void Dispose (bool disposing)
{
this.disposed = true;
base.Dispose (true);
}
-#else
- void Dispose (bool disposing)
- {
- this.disposed = true;
- if (disposing)
- Close ();
- }
-#endif
private void CheckDisposed ()
{
diff --git a/mcs/class/System/System.Net/IPAddress.cs b/mcs/class/System/System.Net/IPAddress.cs
index 92c0f8e6e07..89fb47563b5 100644
--- a/mcs/class/System/System.Net/IPAddress.cs
+++ b/mcs/class/System/System.Net/IPAddress.cs
@@ -333,7 +333,6 @@ namespace System.Net {
}
}
-#if NET_4_0
public bool IsIPv6Teredo {
get {
return m_Family != AddressFamily.InterNetwork &&
@@ -341,7 +340,6 @@ namespace System.Net {
m_Numbers[1] == 0;
}
}
-#endif
public long ScopeId {
get {
diff --git a/mcs/class/System/System.Net/NetworkCredential.cs b/mcs/class/System/System.Net/NetworkCredential.cs
index 271a1fb041b..faba55dd4fe 100644
--- a/mcs/class/System/System.Net/NetworkCredential.cs
+++ b/mcs/class/System/System.Net/NetworkCredential.cs
@@ -41,9 +41,7 @@ namespace System.Net
string password;
string domain;
-#if NET_4_0
SecureString securePassword;
-#endif
// Constructors
public NetworkCredential ()
@@ -62,7 +60,6 @@ namespace System.Net
this.domain = domain;
}
-#if NET_4_0
public NetworkCredential (string userName, SecureString password)
{
this.userName = userName;
@@ -74,7 +71,6 @@ namespace System.Net
{
this.domain = domain;
}
-#endif
// Properties
public string Domain {
@@ -92,7 +88,6 @@ namespace System.Net
set { password = value; }
}
-#if NET_4_0
public SecureString SecurePassword {
get { return securePassword; }
set {
@@ -103,7 +98,6 @@ namespace System.Net
}
}
}
-#endif
public NetworkCredential GetCredential (Uri uri, string authType)
{
diff --git a/mcs/class/System/System.Net/WebRequest.cs b/mcs/class/System/System.Net/WebRequest.cs
index ad85920cfc1..59079da8d24 100644
--- a/mcs/class/System/System.Net/WebRequest.cs
+++ b/mcs/class/System/System.Net/WebRequest.cs
@@ -286,7 +286,6 @@ namespace System.Net
throw new ArgumentNullException ("requestUri");
return GetCreator (requestUri.Scheme).Create (requestUri);
}
-#if NET_4_0
static HttpWebRequest SharedCreateHttp (Uri uri)
{
if (uri.Scheme != "http" && uri.Scheme != "https")
@@ -308,7 +307,6 @@ namespace System.Net
throw new ArgumentNullException ("requestUri");
return SharedCreateHttp (requestUri);
}
-#endif
public virtual Stream EndGetRequestStream (IAsyncResult asyncResult)
{
throw GetMustImplement ();
diff --git a/mcs/class/System/System.Net/WebResponse.cs b/mcs/class/System/System.Net/WebResponse.cs
index bf0b79eec1b..f59b24fc1c3 100644
--- a/mcs/class/System/System.Net/WebResponse.cs
+++ b/mcs/class/System/System.Net/WebResponse.cs
@@ -85,7 +85,6 @@ namespace System.Net
public virtual Uri ResponseUri {
get { throw new NotSupportedException (); }
}
-#if NET_4_0
public virtual bool SupportsHeaders {
get {
@@ -94,7 +93,6 @@ namespace System.Net
return true;
}
}
-#endif
// Methods
public virtual void Close()
@@ -106,26 +104,16 @@ namespace System.Net
{
throw new NotSupportedException ();
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose()
-#endif
{
-#if NET_4_0
Dispose (true);
-#else
- Close ();
-#endif
}
-#if NET_4_0
protected virtual void Dispose (bool disposing)
{
if (disposing)
Close ();
}
-#endif
void ISerializable.GetObjectData
(SerializationInfo serializationInfo,
diff --git a/mcs/class/System/System.Net/WebUtility.cs b/mcs/class/System/System.Net/WebUtility.cs
index 7aec94896c6..2b3a8eefb3f 100644
--- a/mcs/class/System/System.Net/WebUtility.cs
+++ b/mcs/class/System/System.Net/WebUtility.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
using System.Runtime.Serialization;
@@ -89,4 +88,3 @@ namespace System.Net
}
}
}
-#endif
diff --git a/mcs/class/System/System.Runtime.Versioning/FrameworkName.cs b/mcs/class/System/System.Runtime.Versioning/FrameworkName.cs
index e3760877d28..7e546f0b76e 100644
--- a/mcs/class/System/System.Runtime.Versioning/FrameworkName.cs
+++ b/mcs/class/System/System.Runtime.Versioning/FrameworkName.cs
@@ -28,7 +28,6 @@
using System;
using System.Text;
-#if NET_4_0
namespace System.Runtime.Versioning
{
[Serializable]
@@ -230,4 +229,3 @@ namespace System.Runtime.Versioning
}
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs
index f95f575d156..3ebbde92945 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs
@@ -27,7 +27,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_0
using System;
using Microsoft.Win32.SafeHandles;
@@ -48,4 +47,3 @@ namespace System.Security.Authentication.ExtendedProtection
}
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
index bd62e6e8144..ec341ea85e2 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
@@ -27,7 +27,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_0
namespace System.Security.Authentication.ExtendedProtection
{
@@ -38,4 +37,3 @@ namespace System.Security.Authentication.ExtendedProtection
Endpoint
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs
index 3dd7f4b5eb7..357e946c59f 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs
@@ -27,7 +27,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_0
using System;
using System.Collections;
using System.ComponentModel;
@@ -101,4 +100,3 @@ namespace System.Security.Authentication.ExtendedProtection
}
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs
index 63dc57295b6..4e49d3a394d 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs
@@ -27,7 +27,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_0
using System;
using System.ComponentModel;
using System.Globalization;
@@ -49,4 +48,3 @@ namespace System.Security.Authentication.ExtendedProtection
}
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs
index 2baea55e8ab..6fd9e22c291 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs
@@ -27,7 +27,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_0
namespace System.Security.Authentication.ExtendedProtection
{
@@ -38,4 +37,3 @@ namespace System.Security.Authentication.ExtendedProtection
Always
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs
index 5d99a595c46..820116ada53 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs
@@ -27,7 +27,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_0
namespace System.Security.Authentication.ExtendedProtection
{
@@ -37,4 +36,3 @@ namespace System.Security.Authentication.ExtendedProtection
TrustedProxy
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs
index ec038d76bab..9010edfeac2 100644
--- a/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs
+++ b/mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs
@@ -27,7 +27,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_0
using System;
using System.Collections;
@@ -54,4 +53,3 @@ namespace System.Security.Authentication.ExtendedProtection
}
}
-#endif
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
index 229999df718..fdc87776e67 100644
--- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
+++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
@@ -48,9 +48,7 @@ using System.Text;
namespace System.Security.Cryptography.X509Certificates {
-#if NET_4_0
[Serializable]
-#endif
public class X509Certificate2 : X509Certificate {
#if !SECURITY_DEP
// Used in Mono.Security HttpsClientStream
diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs
index fb9c14eead1..f44c3160307 100644
--- a/mcs/class/System/System/Uri.cs
+++ b/mcs/class/System/System/Uri.cs
@@ -337,12 +337,6 @@ namespace System {
}
} else {
path = baseEl.path;
-#if !NET_4_0
- if (relativeEl.query != null) {
- var pathEnd = path.LastIndexOf ('/');
- path = (pathEnd > 0)? path.Substring (0, pathEnd+1) : "";
- }
-#endif
}
if ((path.Length == 0 || path [0] != '/') && baseEl.delimiter == SchemeDelimiter)
@@ -950,10 +944,8 @@ namespace System {
//
public Uri MakeRelativeUri (Uri uri)
{
-#if NET_4_0
if (uri == null)
throw new ArgumentNullException ("uri");
-#endif
if (Host != uri.Host || Scheme != uri.Scheme)
return uri;
@@ -1745,10 +1737,8 @@ namespace System {
public bool IsBaseOf (Uri uri)
{
-#if NET_4_0
if (uri == null)
throw new ArgumentNullException ("uri");
-#endif
return Parser.IsBaseOf (this, uri);
}
@@ -1957,10 +1947,8 @@ namespace System {
result = null;
if ((baseUri == null) || !baseUri.IsAbsoluteUri)
return false;
-#if NET_4_0
if (relativeUri == null)
return false;
-#endif
try {
// FIXME: this should call UriParser.Resolve
result = new Uri (baseUri, relativeUri.OriginalString);
diff --git a/mcs/class/System/System/UriBuilder.cs b/mcs/class/System/System/UriBuilder.cs
index ca28836b77e..3464e0a971a 100644
--- a/mcs/class/System/System/UriBuilder.cs
+++ b/mcs/class/System/System/UriBuilder.cs
@@ -74,10 +74,8 @@ namespace System
public UriBuilder (Uri uri)
{
-#if NET_4_0
if (uri == null)
throw new ArgumentNullException ("uri");
-#endif
Initialize (uri);
}
diff --git a/mcs/class/System/System/UriFormatException.cs b/mcs/class/System/System/UriFormatException.cs
index 1e215c388be..6860619ae40 100644
--- a/mcs/class/System/System/UriFormatException.cs
+++ b/mcs/class/System/System/UriFormatException.cs
@@ -49,12 +49,10 @@ namespace System {
{
}
-#if NET_4_0
public UriFormatException (string textString, Exception e)
: base (textString, e)
{
}
-#endif
protected UriFormatException (SerializationInfo serializationInfo, StreamingContext streamingContext)
: base (serializationInfo, streamingContext)
{
diff --git a/mcs/class/System/System/UriHelper.cs b/mcs/class/System/System/UriHelper.cs
index 397b508dcd8..f1f85372255 100644
--- a/mcs/class/System/System/UriHelper.cs
+++ b/mcs/class/System/System/UriHelper.cs
@@ -247,9 +247,6 @@ namespace System {
if (invalidUnescape
-#if !NET_4_0
- && uriFormat == UriFormat.SafeUnescaped && char.IsControl (x)
-#endif
) {
s.Append (c);
i = iStart;
@@ -277,9 +274,7 @@ namespace System {
return HexEscapeMultiByte (c);
if (isEscaped && (
-#if NET_4_0
(userEscaped && c < 0xFF) ||
-#endif
!NeedToUnescape (c, scheme, component, uriKind, uriFormat, formatFlags))) {
if (IriParsing &&
(c == '<' || c == '>' || c == '^' || c == '{' || c == '|' || c == '}' || c > 0x7F) &&
diff --git a/mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs b/mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs
index af581d199d8..2127c3a3538 100644
--- a/mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs
+++ b/mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs
@@ -25,7 +25,6 @@
// THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Data.Common;
@@ -46,4 +45,3 @@ namespace WebMatrix.Data
}
}
-#endif
diff --git a/mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs b/mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs
index 58a68b57ddf..976ffb7a030 100644
--- a/mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs
+++ b/mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs
@@ -25,7 +25,6 @@
// THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Linq;
@@ -239,4 +238,3 @@ namespace WebMatrix.Data
}
}
-#endif
diff --git a/mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs b/mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs
index ec1b1a0c3ab..c3413af9987 100644
--- a/mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs
+++ b/mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs
@@ -25,7 +25,6 @@
// THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Dynamic;
@@ -149,4 +148,3 @@ namespace WebMatrix.Data
}
}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs b/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
index 2ec5f3be0b4..46a63bcda9f 100644
--- a/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
+++ b/mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
@@ -26,175 +26,8 @@
// Marek Safar (marek.safar@gmail.com)
//
-#if NET_4_0
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (ObservableCollection<>))]
-#else
-
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.ComponentModel;
-
-namespace System.Collections.ObjectModel
-{
- [Serializable]
- public class ObservableCollection<T> : Collection<T>, INotifyCollectionChanged, INotifyPropertyChanged {
- [Serializable]
- sealed class SimpleMonitor : IDisposable {
- private int _busyCount;
-
- public SimpleMonitor()
- {
- }
-
- public void Enter()
- {
- _busyCount++;
- }
-
- public void Dispose()
- {
- _busyCount--;
- }
-
- public bool Busy
- {
- get { return _busyCount > 0; }
- }
- }
-
- private SimpleMonitor _monitor = new SimpleMonitor ();
-
- public ObservableCollection()
- {
- }
-
- public ObservableCollection(IEnumerable<T> collection)
- {
- if (collection == null)
- throw new ArgumentNullException ("collection");
-
- foreach (var item in collection)
- Add (item);
- }
-
- public ObservableCollection(List<T> list)
- : base (list != null ? new List<T> (list) : null)
- {
- }
-
- [field:NonSerialized]
- public virtual event NotifyCollectionChangedEventHandler CollectionChanged;
- [field:NonSerialized]
- protected virtual event PropertyChangedEventHandler PropertyChanged;
-
- event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
- add { this.PropertyChanged += value; }
- remove { this.PropertyChanged -= value; }
- }
-
- protected IDisposable BlockReentrancy ()
- {
- _monitor.Enter ();
- return _monitor;
- }
-
- protected void CheckReentrancy ()
- {
- NotifyCollectionChangedEventHandler eh = CollectionChanged;
-
- // Only have a problem if we have more than one event listener.
- if (_monitor.Busy && eh != null && eh.GetInvocationList ().Length > 1)
- throw new InvalidOperationException ("Cannot modify the collection while reentrancy is blocked.");
- }
-
- protected override void ClearItems ()
- {
- CheckReentrancy ();
-
- base.ClearItems ();
-
- OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Reset));
- OnPropertyChanged (new PropertyChangedEventArgs ("Count"));
- OnPropertyChanged (new PropertyChangedEventArgs ("Item[]"));
- }
-
- protected override void InsertItem (int index, T item)
- {
- CheckReentrancy ();
-
- base.InsertItem (index, item);
-
- OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Add, item, index));
- OnPropertyChanged (new PropertyChangedEventArgs ("Count"));
- OnPropertyChanged (new PropertyChangedEventArgs ("Item[]"));
- }
-
- public void Move (int oldIndex, int newIndex)
- {
- MoveItem (oldIndex, newIndex);
- }
-
- protected virtual void MoveItem (int oldIndex, int newIndex)
- {
- CheckReentrancy ();
-
- T item = Items [oldIndex];
- base.RemoveItem (oldIndex);
- base.InsertItem (newIndex, item);
-
- OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Move, item, newIndex, oldIndex));
- OnPropertyChanged (new PropertyChangedEventArgs ("Item[]"));
- }
-
- protected virtual void OnCollectionChanged (NotifyCollectionChangedEventArgs e)
- {
- NotifyCollectionChangedEventHandler eh = CollectionChanged;
-
- if (eh != null) {
- // Make sure that the invocation is done before the collection changes,
- // Otherwise there's a chance of data corruption.
- using (BlockReentrancy ()) {
- eh (this, e);
- }
- }
- }
-
- protected virtual void OnPropertyChanged (PropertyChangedEventArgs e)
- {
- PropertyChangedEventHandler eh = PropertyChanged;
-
- if (eh != null)
- eh (this, e);
- }
-
- protected override void RemoveItem (int index)
- {
- CheckReentrancy ();
-
- T item = Items [index];
-
- base.RemoveItem (index);
-
- OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Remove, item, index));
- OnPropertyChanged (new PropertyChangedEventArgs ("Count"));
- OnPropertyChanged (new PropertyChangedEventArgs ("Item[]"));
- }
-
- protected override void SetItem (int index, T item)
- {
- CheckReentrancy ();
-
- T oldItem = Items [index];
-
- base.SetItem (index, item);
-
- OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Replace, item, oldItem, index));
- OnPropertyChanged (new PropertyChangedEventArgs ("Item[]"));
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs b/mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
index b88daa26ded..850d7d60519 100644
--- a/mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
+++ b/mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
@@ -24,67 +24,8 @@
// Brian O'Keefe (zer0keefie@gmail.com)
//
-#if NET_4_0
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (ReadOnlyObservableCollection<>))]
-#else
-
-using System.Collections.Specialized;
-using System.ComponentModel;
-
-namespace System.Collections.ObjectModel {
- public class ReadOnlyObservableCollection<T> : ReadOnlyCollection<T>, INotifyCollectionChanged, INotifyPropertyChanged {
-
- public ReadOnlyObservableCollection(ObservableCollection<T> list)
- : base (list)
- {
- ((INotifyPropertyChanged)list).PropertyChanged += SourceCollection_PropertyChanged;
- ((INotifyCollectionChanged)list).CollectionChanged += SourceCollection_CollectionChanged;
- }
-
- protected virtual event NotifyCollectionChangedEventHandler CollectionChanged;
-
- protected virtual event PropertyChangedEventHandler PropertyChanged;
-
- event NotifyCollectionChangedEventHandler INotifyCollectionChanged.CollectionChanged {
- add { this.CollectionChanged += value; }
- remove { this.CollectionChanged -= value; }
- }
-
- event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged {
- add { this.PropertyChanged += value; }
- remove { this.PropertyChanged -= value; }
- }
-
- protected virtual void OnCollectionChanged (NotifyCollectionChangedEventArgs args)
- {
- NotifyCollectionChangedEventHandler eh = CollectionChanged;
-
- if (eh != null)
- eh (this, args);
- }
-
- protected virtual void OnPropertyChanged (PropertyChangedEventArgs args)
- {
- PropertyChangedEventHandler eh = PropertyChanged;
-
- if (eh != null)
- eh (this, args);
- }
-
- private void SourceCollection_CollectionChanged (object sender, NotifyCollectionChangedEventArgs e)
- {
- OnCollectionChanged (e);
- }
-
- private void SourceCollection_PropertyChanged (object sender, PropertyChangedEventArgs e)
- {
- OnPropertyChanged (e);
- }
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs b/mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs
index eac7130d640..a6a2e57f986 100644
--- a/mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs
+++ b/mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs
@@ -23,22 +23,8 @@
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (INotifyCollectionChanged))]
-#else
-
-using System;
-
-namespace System.Collections.Specialized {
-
- public interface INotifyCollectionChanged {
-
- event NotifyCollectionChangedEventHandler CollectionChanged;
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs
index 82ad8cac2eb..f9a24bb59e9 100644
--- a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs
+++ b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs
@@ -23,25 +23,8 @@
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (NotifyCollectionChangedAction))]
-#else
-
-using System;
-
-namespace System.Collections.Specialized {
-
- public enum NotifyCollectionChangedAction {
- Add,
- Remove,
- Replace,
- Move,
- Reset
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
index d82cf717b4f..993f5479618 100644
--- a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
+++ b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
@@ -24,197 +24,8 @@
// Brian O'Keefe (zer0keefie@gmail.com)
//
-#if NET_4_0
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (NotifyCollectionChangedEventArgs))]
-#else
-
-namespace System.Collections.Specialized {
- public class NotifyCollectionChangedEventArgs : EventArgs {
- private NotifyCollectionChangedAction action;
- private IList oldItems, newItems;
- private int oldIndex = -1, newIndex = -1;
-
- #region Constructors
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action)
- {
- this.action = action;
-
- if (action != NotifyCollectionChangedAction.Reset)
- throw new ArgumentException ("This constructor can only be used with the Reset action.", "action");
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList changedItems)
- : this (action, changedItems, -1)
- {
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, object changedItem)
- : this (action, changedItem, -1)
- {
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList newItems, IList oldItems)
- : this (action, newItems, oldItems, -1)
- {
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList changedItems, int startingIndex)
- {
- this.action = action;
-
- if (action == NotifyCollectionChangedAction.Add || action == NotifyCollectionChangedAction.Remove) {
- if (changedItems == null)
- throw new ArgumentNullException ("changedItems");
-
- if (startingIndex < -1)
- throw new ArgumentException ("The value of startingIndex must be -1 or greater.", "startingIndex");
-
- if (action == NotifyCollectionChangedAction.Add)
- InitializeAdd (changedItems, startingIndex);
- else
- InitializeRemove (changedItems, startingIndex);
- } else if (action == NotifyCollectionChangedAction.Reset) {
- if (changedItems != null)
- throw new ArgumentException ("This constructor can only be used with the Reset action if changedItems is null", "changedItems");
-
- if (startingIndex != -1)
- throw new ArgumentException ("This constructor can only be used with the Reset action if startingIndex is -1", "startingIndex");
- } else {
- throw new ArgumentException ("This constructor can only be used with the Reset, Add, or Remove actions.", "action");
- }
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, object changedItem, int index)
- {
- IList changedItems = new object [] { changedItem };
- this.action = action;
-
- if (action == NotifyCollectionChangedAction.Add)
- InitializeAdd (changedItems, index);
- else if (action == NotifyCollectionChangedAction.Remove)
- InitializeRemove (changedItems, index);
- else if (action == NotifyCollectionChangedAction.Reset) {
- if (changedItem != null)
- throw new ArgumentException ("This constructor can only be used with the Reset action if changedItem is null", "changedItem");
-
- if (index != -1)
- throw new ArgumentException ("This constructor can only be used with the Reset action if index is -1", "index");
- } else {
- throw new ArgumentException ("This constructor can only be used with the Reset, Add, or Remove actions.", "action");
- }
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, object newItem, object oldItem)
- : this (action, newItem, oldItem, -1)
- {
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList newItems, IList oldItems, int index)
- {
- this.action = action;
-
- if (action != NotifyCollectionChangedAction.Replace)
- throw new ArgumentException ("This constructor can only be used with the Replace action.", "action");
-
- if (newItems == null)
- throw new ArgumentNullException ("newItems");
-
- if (oldItems == null)
- throw new ArgumentNullException ("oldItems");
-
- this.oldItems = oldItems;
- this.newItems = newItems;
-
- oldIndex = index;
- newIndex = index;
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList changedItems, int index, int oldIndex)
- {
- this.action = action;
-
- if (action != NotifyCollectionChangedAction.Move)
- throw new ArgumentException ("This constructor can only be used with the Move action.", "action");
-
- if (index < -1)
- throw new ArgumentException ("The value of index must be -1 or greater.", "index");
-
- InitializeMove (changedItems, index, oldIndex);
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, object changedItem, int index, int oldIndex)
- : this (action, new object [] { changedItem }, index, oldIndex)
- {
- }
-
- public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, object newItem, object oldItem, int index)
- {
- this.action = action;
-
- if (action != NotifyCollectionChangedAction.Replace)
- throw new ArgumentException ("This constructor can only be used with the Replace action.", "action");
-
- InitializeReplace (new object [] { newItem }, new object [] { oldItem }, index);
- }
-
- #endregion
-
- #region Accessor Properties
-
- public NotifyCollectionChangedAction Action {
- get { return action; }
- }
-
- public IList NewItems {
- get { return newItems; }
- }
-
- public int NewStartingIndex {
- get { return newIndex; }
- }
-
- public IList OldItems {
- get { return oldItems; }
- }
-
- public int OldStartingIndex {
- get { return oldIndex; }
- }
-
- #endregion
-
- #region Initialize Methods
-
- private void InitializeAdd(IList items, int index)
- {
- this.newItems = ArrayList.ReadOnly (items);
- this.newIndex = index;
- }
-
- private void InitializeRemove(IList items, int index)
- {
- this.oldItems = ArrayList.ReadOnly (items);
- this.oldIndex = index;
- }
-
- private void InitializeMove(IList changedItems, int newItemIndex, int oldItemIndex)
- {
- InitializeAdd (changedItems, newItemIndex);
- InitializeRemove (changedItems, oldItemIndex);
- }
-
- private void InitializeReplace(IList addedItems, IList removedItems, int index)
- {
- InitializeAdd (addedItems, index);
- InitializeRemove (removedItems, index);
- }
-
- #endregion
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
index 85e5d909ec4..8fa9fb0fd6b 100644
--- a/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
+++ b/mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
@@ -23,19 +23,8 @@
// Chris Toshok (toshok@ximian.com)
//
-#if NET_4_0
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
[assembly:TypeForwardedTo (typeof (NotifyCollectionChangedEventHandler))]
-#else
-
-using System;
-
-namespace System.Collections.Specialized {
-
- public delegate void NotifyCollectionChangedEventHandler (object sender, NotifyCollectionChangedEventArgs e);
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.cs b/mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.cs
index 07f9c248d86..345be2b99d9 100644
--- a/mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.cs
+++ b/mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.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_0
namespace System.ComponentModel
{
@@ -35,4 +34,3 @@ namespace System.ComponentModel
}
}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs
index 04ce07998b9..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs
@@ -1,33 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Property)]
- public class AmbientAttribute : Attribute {
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs
index dacda058ada..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs
@@ -1,47 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
- public sealed class ConstructorArgumentAttribute : Attribute
- {
- public ConstructorArgumentAttribute (string argumentName)
- {
- this.argumentName = argumentName;
- }
-
- public string ArgumentName {
- get { return argumentName; }
- }
-
- string argumentName;
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs
index 9be1751dd31..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs
@@ -1,50 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class)]
- public sealed class ContentPropertyAttribute : Attribute
- {
- string name;
-
- public ContentPropertyAttribute ()
- {
- }
-
- public ContentPropertyAttribute (string name)
- {
- this.name = name;
- }
-
- public string Name {
- get { return name; }
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs
index 888e90105fd..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs
@@ -1,66 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
- public sealed class ContentWrapperAttribute : Attribute
- {
- public ContentWrapperAttribute (Type contentWrapper)
- {
- this.contentWrapper = contentWrapper;
- }
-
- public Type ContentWrapper {
- get { return contentWrapper; }
- }
-
- public override object TypeId {
- get { return this; }
- }
-
- public override bool Equals (object obj)
- {
- if (obj is ContentWrapperAttribute) {
- if (((ContentWrapperAttribute)obj).ContentWrapper == contentWrapper)
- return true;
- }
-
- return false;
- }
-
- public override int GetHashCode ()
- {
- throw new NotImplementedException ();
- }
-
- Type contentWrapper;
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs b/mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs
index b7a604a48d5..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs
@@ -1,68 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-using System.Globalization;
-
-namespace System.Windows.Markup {
-
- public class DateTimeValueSerializer : ValueSerializer
- {
- public override bool CanConvertFromString (string value, IValueSerializerContext context)
- {
- // seems to return for any value
- return true;
- }
-
- public override bool CanConvertToString (object value, IValueSerializerContext context)
- {
- if (!(value is DateTime))
- throw new ArgumentException ("Can only convert objects of type 'DateTime'");
-
- return true;
- }
-
- public override object ConvertFromString (string value, IValueSerializerContext context)
- {
- if (value == null)
- throw new NotSupportedException ("DateTimeValueSerializer cannot convert from null value.");
- return DateTime.Parse (value);
- }
-
- public override string ConvertToString (object value, IValueSerializerContext context)
- {
- if (value == null)
- throw new NotSupportedException ("Cannot convert null value to string.");
-
- if (!(value is DateTime))
- throw new NotSupportedException ("only objects of type 'DateTime' can be converted.");
-
- return ((DateTime)value).ToString("s", CultureInfo.InvariantCulture);
- }
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs
index 817dca4f033..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs
@@ -1,51 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
- public sealed class DependsOnAttribute : Attribute
- {
- public DependsOnAttribute (string name)
- {
- this.name = name;
- }
-
- public string Name {
- get { return name; }
- }
-
- public override object TypeId {
- get { return this; }
- }
-
- string name;
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs
index 0f6ce9b9375..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs
@@ -1,43 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class)]
- public class DictionaryKeyPropertyAttribute : Attribute {
- public DictionaryKeyPropertyAttribute (string name)
- {
- Name = name;
- }
-
- public string Name {
- get; private set;
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs b/mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs
index 69edc72ee02..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs
@@ -1,37 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- public interface IComponentConnector {
- void Connect (int connectionId, object target);
-
- void InitializeComponent ();
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs b/mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs
index 75e2a5c46fc..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs
@@ -1,38 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- public interface INameScope {
- object FindName (string name);
-
- void RegisterName (string name, object scopedElement);
- void UnregisterName (string name);
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs b/mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs
index 62faad68508..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs
@@ -1,37 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-using System.ComponentModel;
-
-namespace System.Windows.Markup {
-
- public interface IValueSerializerContext : ITypeDescriptorContext, IServiceProvider {
- ValueSerializer GetValueSerializerFor (PropertyDescriptor descriptor);
- ValueSerializer GetValueSerializerFor (Type type);
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs b/mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs
index 9a053d52e13..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs
@@ -1,35 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- public interface IXamlTypeResolver {
- Type Resolve (string qualifiedTypeName);
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs b/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs
index 41264969262..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs
@@ -1,40 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- public abstract class MarkupExtension
- {
- protected MarkupExtension ()
- {
- }
-
- public abstract object ProvideValue (IServiceProvider serviceProvider);
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs
index 975aa4b7f0d..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs
@@ -1,61 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
- public sealed class MarkupExtensionReturnTypeAttribute : Attribute
- {
- public MarkupExtensionReturnTypeAttribute ()
- {
- }
-
- public MarkupExtensionReturnTypeAttribute (Type returnType)
- {
- ReturnType = returnType;
- }
-
- public MarkupExtensionReturnTypeAttribute (Type returnType, Type expressionType)
- {
- ReturnType = returnType;
- ExpressionType = expressionType;
- }
-
- public Type ReturnType {
- get;
- private set;
- }
-
- public Type ExpressionType {
- get;
- private set;
- }
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs
index 8d6b7cd0d8c..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs
@@ -1,56 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class)]
- public class NameScopePropertyAttribute : Attribute {
- public NameScopePropertyAttribute (string name, Type type)
- {
- Name = name;
- Type = type;
- }
-
- public NameScopePropertyAttribute (string name)
- {
- Name = name;
- }
-
- public string Name {
- get;
- private set;
- }
-
- public Type Type {
- get;
- private set;
- }
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs
index 353a9ad1042..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs
@@ -1,46 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Assembly)]
- public sealed class RootNamespaceAttribute : Attribute
- {
- public RootNamespaceAttribute (string nameSpace)
- {
- this.nameSpace = nameSpace;
- }
-
- public string Namespace {
- get { return nameSpace; }
- }
-
- string nameSpace;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs
index 1f0c73823f7..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs
@@ -1,46 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Assembly)]
- public sealed class RuntimeNamePropertyAttribute : Attribute
- {
- public RuntimeNamePropertyAttribute (string name)
- {
- this.name = name;
- }
-
- public string Name {
- get { return name; }
- }
-
- string name;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs
index b486f04607f..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs
@@ -1,36 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
- public sealed class TrimSurroundingWhitespaceAttribute : Attribute
- {
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs
index 1211a935b54..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs
@@ -1,43 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
- [AttributeUsage (AttributeTargets.Class)]
- public class UidDuringInitializationAttribute : Attribute {
- public UidDuringInitializationAttribute (bool usable)
- {
- Usable = usable;
- }
-
- public bool Usable {
- get;
- private set;
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs
index 14078664566..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs
@@ -1,43 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
- [AttributeUsage (AttributeTargets.Class)]
- public class UidPropertyAttribute : Attribute {
- public UidPropertyAttribute (string name)
- {
- Name = name;
- }
-
- public string Name {
- get;
- private set;
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs
index f865ab313b2..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs
@@ -1,43 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Author:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
- [AttributeUsage (AttributeTargets.Class)]
- public class UsableDuringInitializationAttribute : Attribute {
- public UsableDuringInitializationAttribute (bool usable)
- {
- Usable = usable;
- }
-
- public bool Usable {
- get;
- private set;
- }
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs b/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs
index 435499d5f48..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs
@@ -1,171 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2007 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Windows.Converters;
-
-namespace System.Windows.Markup {
-
- // I don't like the idea of hardcoding the types in here, but
- // I'm not sure what else to do about it..
- class DefaultValueSerializerContext : IValueSerializerContext
- {
- public ValueSerializer GetValueSerializerFor (PropertyDescriptor descriptor)
- {
- Attribute attribute = (Attribute)descriptor.Attributes[typeof (ValueSerializerAttribute)];
- if (attribute != null)
- return (ValueSerializer)Activator.CreateInstance (((ValueSerializerAttribute)attribute).ValueSerializerType);
-
- return GetValueSerializerFor (descriptor.PropertyType);
- }
-
- public ValueSerializer GetValueSerializerFor (Type type)
- {
- Attribute attribute = (Attribute)TypeDescriptor.GetAttributes (type)[typeof (ValueSerializerAttribute)];
- if (attribute != null)
- return (ValueSerializer)Activator.CreateInstance (((ValueSerializerAttribute)attribute).ValueSerializerType);
-
- if (typeof (DateTime).IsAssignableFrom (type))
- return new DateTimeValueSerializer();
- else if (typeof (Int32Rect).IsAssignableFrom (type))
- return new Int32RectValueSerializer ();
- else if (typeof (Point).IsAssignableFrom (type))
- return new PointValueSerializer ();
- else if (typeof (Rect).IsAssignableFrom (type))
- return new RectValueSerializer ();
- else if (typeof (Size).IsAssignableFrom (type))
- return new SizeValueSerializer ();
- else if (typeof (Vector).IsAssignableFrom (type))
- return new VectorValueSerializer ();
- else
- return null;
- }
-
- public void OnComponentChanged ()
- {
- }
-
- public bool OnComponentChanging ()
- {
- return false;
- }
-
- public IContainer Container {
- get { return null; }
- }
-
- public object Instance {
- get { return null; }
- }
-
- public PropertyDescriptor PropertyDescriptor {
- get { return null; }
- }
-
- public object GetService (Type serviceType)
- {
- return null;
- }
- }
-
- public abstract class ValueSerializer
- {
- protected ValueSerializer ()
- {
- }
-
- public virtual bool CanConvertFromString (string value, IValueSerializerContext context)
- {
- throw new NotImplementedException ();
- }
-
- public virtual bool CanConvertToString (object value, IValueSerializerContext context)
- {
- throw new NotImplementedException ();
- }
-
- public virtual object ConvertFromString (string value, IValueSerializerContext context)
- {
- throw new NotImplementedException ();
- }
-
- public virtual string ConvertToString (object value, IValueSerializerContext context)
- {
- throw new NotImplementedException ();
- }
-
- protected Exception GetConvertFromException (object value)
- {
- throw new NotImplementedException ();
- }
-
- protected Exception GetConvertToException (object value, Type destinationType)
- {
- throw new NotImplementedException ();
- }
-
- public virtual IEnumerable<Type> TypeReferences (object value, IValueSerializerContext context)
- {
- throw new NotImplementedException ();
- }
-
- public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor)
- {
- DefaultValueSerializerContext defaultContext = new DefaultValueSerializerContext();
- return defaultContext.GetValueSerializerFor (descriptor);
- }
-
- public static ValueSerializer GetSerializerFor (Type type)
- {
- DefaultValueSerializerContext defaultContext = new DefaultValueSerializerContext();
- return defaultContext.GetValueSerializerFor (type);
- }
-
- public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor, IValueSerializerContext context)
- {
- ValueSerializer s = context.GetValueSerializerFor (descriptor);
- if (s == null) {
- DefaultValueSerializerContext defaultContext = new DefaultValueSerializerContext();
- s = defaultContext.GetValueSerializerFor (descriptor);
- }
- return s;
- }
-
- public static ValueSerializer GetSerializerFor (Type type, IValueSerializerContext context)
- {
- ValueSerializer s = context.GetValueSerializerFor (type);
- if (s == null) {
- DefaultValueSerializerContext defaultContext = new DefaultValueSerializerContext();
- s = defaultContext.GetValueSerializerFor (type);
- }
- return s;
- }
- }
-
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs
index 7f3fd9047f8..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs
@@ -1,60 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class |
- AttributeTargets.Struct |
- AttributeTargets.Enum |
- AttributeTargets.Method |
- AttributeTargets.Property |
- AttributeTargets.Interface, AllowMultiple = false, Inherited = true)]
- public sealed class ValueSerializerAttribute : Attribute
- {
- public ValueSerializerAttribute (string valueSerializerTypeName)
- {
- valueSerializerType = Type.GetType (valueSerializerTypeName);
- }
-
- public ValueSerializerAttribute (Type valueSerializerType)
- {
- this.valueSerializerType = valueSerializerType;
- }
-
- public Type ValueSerializerType {
- get { return valueSerializerType; }
- }
-
- public string ValueSerializerTypeName {
- get { return valueSerializerType.Name; }
- }
-
- Type valueSerializerType;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs
index a5b9206d59e..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs
@@ -1,36 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
- public sealed class WhitespaceSignificantCollectionAttribute : Attribute
- {
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs
index 777be0e40b9..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs
@@ -1,46 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)]
- public sealed class XmlLangPropertyAttribute : Attribute
- {
- public XmlLangPropertyAttribute (string name)
- {
- this.name = name;
- }
-
- public string Name {
- get { return name; }
- }
-
- string name;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs
index 52b94269728..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs
@@ -1,52 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- public sealed class XmlnsCompatibleWithAttribute : Attribute
- {
- public XmlnsCompatibleWithAttribute (string oldNamespace, string newNamespace)
- {
- this.oldNamespace = oldNamespace;
- this.newNamespace = newNamespace;
- }
-
- public string NewNamespace {
- get { return newNamespace; }
- }
-
- public string OldNamespace {
- get { return oldNamespace; }
- }
-
- string newNamespace;
- string oldNamespace;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs
index 15512eaf47a..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs
@@ -1,58 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- public sealed class XmlnsDefinitionAttribute : Attribute
- {
- public XmlnsDefinitionAttribute (string xmlNamespace, string clrNamespace)
- {
- this.xmlNamespace = xmlNamespace;
- this.clrNamespace = clrNamespace;
- }
-
- public string AssemblyName {
- get { return assemblyName; }
- set { assemblyName = value; }
- }
-
- public string ClrNamespace {
- get { return clrNamespace; }
- }
-
- public string XmlNamespace {
- get { return xmlNamespace; }
- }
-
- string xmlNamespace;
- string clrNamespace;
- string assemblyName;
- }
-}
-#endif
diff --git a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs
index eccd70a0833..e69de29bb2d 100644
--- a/mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs
+++ b/mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs
@@ -1,52 +0,0 @@
-#if !NET_4_0
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2008 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-
-using System;
-
-namespace System.Windows.Markup {
-
- [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- public sealed class XmlnsPrefixAttribute : Attribute
- {
- public XmlnsPrefixAttribute (string xmlNamespace, string prefix)
- {
- this.xmlNamespace = xmlNamespace;
- this.prefix = prefix;
- }
-
- public string Prefix {
- get { return prefix; }
- }
-
- public string XmlNamespace {
- get { return xmlNamespace; }
- }
-
- string prefix;
- string xmlNamespace;
- }
-}
-#endif
diff --git a/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs b/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs
index e340b9e8857..e83eddc8e81 100644
--- a/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs
+++ b/mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
using System.Runtime.InteropServices;
@@ -53,5 +52,4 @@ namespace Microsoft.Win32.SafeHandles {
static extern int RegCloseKey (IntPtr keyHandle);
}
}
-#endif
diff --git a/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
index 31a4dc68140..b4ad9f294c3 100644
--- a/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
+++ b/mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
@@ -61,11 +61,9 @@ namespace Microsoft.Win32 {
void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind);
-#if NET_4_0
RegistryKey CreateSubKey (RegistryKey rkey, string keyname, RegistryOptions options);
RegistryKey FromHandle (SafeRegistryHandle handle);
IntPtr GetHandle (RegistryKey key);
-#endif
}
}
diff --git a/mcs/class/corlib/Microsoft.Win32/Registry.cs b/mcs/class/corlib/Microsoft.Win32/Registry.cs
index 9b6ef1aa220..778ccf34afc 100644
--- a/mcs/class/corlib/Microsoft.Win32/Registry.cs
+++ b/mcs/class/corlib/Microsoft.Win32/Registry.cs
@@ -46,9 +46,7 @@ namespace Microsoft.Win32
public static readonly RegistryKey CurrentUser = new RegistryKey (
RegistryHive.CurrentUser);
-#if NET_4_0
[Obsolete ("Use PerformanceData instead")]
-#endif
public static readonly RegistryKey DynData = new RegistryKey (
RegistryHive.DynData);
public static readonly RegistryKey LocalMachine = new RegistryKey (
diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs b/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
index 2d742a6ee93..7f0ffea0426 100644
--- a/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
+++ b/mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
@@ -55,9 +55,7 @@ namespace Microsoft.Win32
// RegistryKey object
//
object handle;
-#if NET_4_0
SafeRegistryHandle safe_handle;
-#endif
object hive; // the RegistryHive if the key represents a base key
readonly string qname; // the fully qualified registry key name
@@ -110,11 +108,7 @@ namespace Microsoft.Win32
/// Dispose of registry key object. Close the
/// key if it's still open.
/// </summary>
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
GC.SuppressFinalize (this);
Close ();
@@ -163,9 +157,7 @@ namespace Microsoft.Win32
RegistryApi.Close (this);
handle = null;
-#if NET_4_0
safe_handle = null;
-#endif
}
@@ -192,7 +184,6 @@ namespace Microsoft.Win32
}
}
-#if NET_4_0
[ComVisible (false)]
[MonoTODO ("Not implemented in Unix")]
public SafeRegistryHandle Handle {
@@ -215,7 +206,6 @@ namespace Microsoft.Win32
return RegistryView.Default;
}
}
-#endif
/// <summary>
@@ -341,7 +331,6 @@ namespace Microsoft.Win32
return CreateSubKey (subkey);
}
-#if NET_4_0
[ComVisible (false)]
[MonoLimitation ("permissionCheck is ignored in Mono")]
public RegistryKey CreateSubKey (string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options)
@@ -363,7 +352,6 @@ namespace Microsoft.Win32
{
return CreateSubKey (subkey, permissionCheck, registryOptions);
}
-#endif
/// <summary>
@@ -415,9 +403,7 @@ namespace Microsoft.Win32
DeleteSubKeyTree (subkey, true);
}
-#if NET_4_0
public
-#endif
void DeleteSubKeyTree (string subkey, bool throwOnMissingSubKey)
{
// Note: this is done by deleting sub-nodes recursively.
@@ -501,7 +487,6 @@ namespace Microsoft.Win32
return RegistryApi.GetValueNames (this);
}
-#if NET_4_0
[ComVisible (false)]
[SecurityPermission (SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
[MonoTODO ("Not implemented on unix")]
@@ -520,7 +505,6 @@ namespace Microsoft.Win32
{
return FromHandle (handle);
}
-#endif
[MonoTODO ("Not implemented on unix")]
@@ -531,7 +515,6 @@ namespace Microsoft.Win32
return RegistryApi.OpenRemoteBaseKey (hKey, machineName);
}
-#if NET_4_0
[ComVisible (false)]
[MonoTODO ("Not implemented on unix")]
public static RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName, RegistryView view)
@@ -564,7 +547,6 @@ namespace Microsoft.Win32
throw new ArgumentException ("hKey");
}
-#endif
[ComVisible (false)]
public RegistryKey OpenSubKey (string name, RegistryKeyPermissionCheck permissionCheck)
diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs b/mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs
index d7621356bae..b7994b32571 100644
--- a/mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs
+++ b/mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs
@@ -23,7 +23,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
namespace Microsoft.Win32 {
@@ -35,5 +34,4 @@ namespace Microsoft.Win32 {
}
}
-#endif
diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs b/mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
index e94e1f21033..38f5c23026e 100644
--- a/mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
+++ b/mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
@@ -40,9 +40,7 @@ namespace Microsoft.Win32
DWord,
MultiString = 7,
QWord = 11,
-#if NET_4_0
None = -1
-#endif
}
}
diff --git a/mcs/class/corlib/Microsoft.Win32/RegistryView.cs b/mcs/class/corlib/Microsoft.Win32/RegistryView.cs
index 96e9c51c358..645b5c3eb43 100644
--- a/mcs/class/corlib/Microsoft.Win32/RegistryView.cs
+++ b/mcs/class/corlib/Microsoft.Win32/RegistryView.cs
@@ -23,7 +23,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
namespace Microsoft.Win32 {
@@ -35,5 +34,4 @@ namespace Microsoft.Win32 {
}
}
-#endif
diff --git a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
index 1cb4c39eacd..968346caad8 100644
--- a/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
+++ b/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
@@ -819,12 +819,10 @@ namespace Microsoft.Win32 {
return CreateSubKey (rkey, keyname, true);
}
-#if NET_4_0
public RegistryKey CreateSubKey (RegistryKey rkey, string keyname, RegistryOptions options)
{
return CreateSubKey (rkey, keyname, true, options == RegistryOptions.Volatile);
}
-#endif
public RegistryKey OpenRemoteBaseKey (RegistryHive hKey, string machineName)
{
@@ -848,12 +846,10 @@ namespace Microsoft.Win32 {
return result;
}
-#if NET_4_0
public RegistryKey FromHandle (SafeRegistryHandle handle)
{
throw new NotImplementedException ();
}
-#endif
public void Flush (RegistryKey rkey)
{
@@ -991,12 +987,10 @@ namespace Microsoft.Win32 {
return RegistryValueKind.Unknown;
}
-#if NET_4_0
public IntPtr GetHandle (RegistryKey key)
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
index a3108ec2b99..c5335ffd0e9 100644
--- a/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
+++ b/mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
@@ -443,19 +443,16 @@ namespace Microsoft.Win32
{
if (!IsHandleValid (rkey))
return;
-#if NET_4_0
SafeRegistryHandle safe_handle = rkey.Handle;
if (safe_handle != null) {
// closes the unmanaged pointer for us.
safe_handle.Close ();
return;
}
-#endif
IntPtr handle = GetHandle (rkey);
RegCloseKey (handle);
}
-#if NET_4_0
public RegistryKey FromHandle (SafeRegistryHandle handle)
{
// At this point we can't tell whether the key is writable
@@ -463,7 +460,6 @@ namespace Microsoft.Win32
// .Net seems to do.
return new RegistryKey (handle.DangerousGetHandle (), String.Empty, true);
}
-#endif
public RegistryKey CreateSubKey (RegistryKey rkey, string keyName)
{
@@ -485,7 +481,6 @@ namespace Microsoft.Win32
true);
}
-#if NET_4_0
public RegistryKey CreateSubKey (RegistryKey rkey, string keyName, RegistryOptions options)
{
IntPtr handle = GetHandle (rkey);
@@ -504,7 +499,6 @@ namespace Microsoft.Win32
return new RegistryKey (subKeyHandle, CombineName (rkey, keyName),
true);
}
-#endif
public void DeleteKey (RegistryKey rkey, string keyName, bool shouldThrowWhenKeyMissing)
{
diff --git a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs
index 6ca6e8e6fc5..71f11a58a33 100644
--- a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.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_0
using System;
using System.Threading;
@@ -150,4 +149,3 @@ namespace System.Collections.Concurrent.Partitioners
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.cs b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.cs
index 79bb2f4dc94..554cef9661a 100644
--- a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.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_0
using System;
using System.Threading;
@@ -117,4 +116,3 @@ namespace System.Collections.Concurrent.Partitioners
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs
index 954324c6715..8e9748a04af 100644
--- a/mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.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_0
using System;
using System.Threading;
@@ -118,4 +117,3 @@ namespace System.Collections.Concurrent.Partitioners
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
index 8098cdbc582..a53b99d0078 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -462,4 +461,3 @@ namespace System.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs
index 783a367537c..0d0ba10e3ed 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -337,4 +336,3 @@ namespace System.Collections.Concurrent
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
index 958fc615359..7d55859dc64 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -248,4 +247,3 @@ namespace System.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs
index b9195722a09..8cf28b4d462 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -279,5 +278,4 @@ namespace System.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs b/mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs
index 4f991e28974..b91d8f505b9 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Collections;
using System.Collections.Generic;
@@ -37,4 +36,3 @@ namespace System.Collections.Concurrent
void CopyTo (T[] array, int index);
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.cs b/mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.cs
index b1368dd7571..5a47fb5dafb 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.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_0
using System;
using System.Collections.Generic;
@@ -141,4 +140,3 @@ namespace System.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs b/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
index 9f4f72ab50b..6542b3fe038 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/Partitioner.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_0
using System;
using System.Collections.Generic;
@@ -133,4 +132,3 @@ namespace System.Collections.Concurrent
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs b/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs
index 193e439a31e..b5bc700adef 100644
--- a/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs
+++ b/mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0 || INSIDE_SYSTEM_WEB
using System;
using System.Threading;
@@ -476,33 +475,5 @@ namespace System.Collections.Concurrent
}
}
-#if INSIDE_SYSTEM_WEB && !NET_4_0
- internal struct SpinWait
- {
- // The number of step until SpinOnce yield on multicore machine
- const int step = 10;
- const int maxTime = 200;
- static readonly bool isSingleCpu = (Environment.ProcessorCount == 1);
-
- int ntime;
-
- public void SpinOnce ()
- {
- ntime += 1;
-
- if (isSingleCpu) {
- // On a single-CPU system, spinning does no good
- Thread.Sleep (0);
- } else {
- if (ntime % step == 0)
- Thread.Sleep (0);
- else
- // Multi-CPU system might be hyper-threaded, let other thread run
- Thread.SpinWait (Math.Min (ntime, maxTime) << 1);
- }
- }
- }
-#endif
}
-#endif
diff --git a/mcs/class/corlib/System.Collections.Generic/IComparer.cs b/mcs/class/corlib/System.Collections.Generic/IComparer.cs
index b589da6c31b..f975c97fc4a 100644
--- a/mcs/class/corlib/System.Collections.Generic/IComparer.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IComparer.cs
@@ -36,11 +36,7 @@ using System.Runtime.InteropServices;
namespace System.Collections.Generic
{
-#if NET_4_0
public interface IComparer<in T>
-#else
- public interface IComparer<T>
-#endif
{
int Compare (T x, T y);
}
diff --git a/mcs/class/corlib/System.Collections.Generic/IEnumerable.cs b/mcs/class/corlib/System.Collections.Generic/IEnumerable.cs
index a4025cff885..8e268c9aa45 100644
--- a/mcs/class/corlib/System.Collections.Generic/IEnumerable.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IEnumerable.cs
@@ -37,11 +37,7 @@ using System.Runtime.InteropServices;
namespace System.Collections.Generic
{
-#if NET_4_0
public interface IEnumerable<out T> : IEnumerable
-#else
- public interface IEnumerable<T> : IEnumerable
-#endif
{
new IEnumerator<T> GetEnumerator ();
}
diff --git a/mcs/class/corlib/System.Collections.Generic/IEnumerator.cs b/mcs/class/corlib/System.Collections.Generic/IEnumerator.cs
index 355dcd2a3be..8bc27f81a34 100644
--- a/mcs/class/corlib/System.Collections.Generic/IEnumerator.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IEnumerator.cs
@@ -37,11 +37,7 @@ using System.Runtime.InteropServices;
namespace System.Collections.Generic
{
-#if NET_4_0
public interface IEnumerator<out T> : IDisposable, IEnumerator
-#else
- public interface IEnumerator<T> : IDisposable, IEnumerator
-#endif
{
new T Current {
get;
diff --git a/mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs b/mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs
index 5a1a093be37..9ec6cba4e46 100644
--- a/mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs
+++ b/mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs
@@ -36,11 +36,7 @@ using System.Runtime.InteropServices;
namespace System.Collections.Generic
{
-#if NET_4_0
public interface IEqualityComparer<in T>
-#else
- public interface IEqualityComparer<T>
-#endif
{
bool Equals (T x, T y);
int GetHashCode (T obj);
diff --git a/mcs/class/corlib/System.Collections/IStructuralComparable.cs b/mcs/class/corlib/System.Collections/IStructuralComparable.cs
index 3df02b5a41b..b41670c14d9 100644
--- a/mcs/class/corlib/System.Collections/IStructuralComparable.cs
+++ b/mcs/class/corlib/System.Collections/IStructuralComparable.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -37,4 +36,3 @@ namespace System.Collections
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections/IStructuralEquatable.cs b/mcs/class/corlib/System.Collections/IStructuralEquatable.cs
index cc4177395e0..ff071ec17e4 100644
--- a/mcs/class/corlib/System.Collections/IStructuralEquatable.cs
+++ b/mcs/class/corlib/System.Collections/IStructuralEquatable.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -39,4 +38,3 @@ namespace System.Collections
}
}
-#endif
diff --git a/mcs/class/corlib/System.Collections/StructuralComparisons.cs b/mcs/class/corlib/System.Collections/StructuralComparisons.cs
index 9ce2574ebb1..84c69ef9d0f 100644
--- a/mcs/class/corlib/System.Collections/StructuralComparisons.cs
+++ b/mcs/class/corlib/System.Collections/StructuralComparisons.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Collections
{
@@ -78,4 +77,3 @@ namespace System.Collections
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs b/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
index 0caa12dab1e..350fbcf2759 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Text;
@@ -139,4 +138,3 @@ namespace System.Diagnostics.Contracts.Internal
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs b/mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs
index 67d7dc0c914..d9cb5ea8c12 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections.Generic;
@@ -39,11 +38,7 @@ namespace System.Diagnostics.Contracts
{
public static class Contract
{
-#if NET_4_0
public
-#else
- internal
-#endif
static event EventHandler<ContractFailedEventArgs> ContractFailed;
// Used in test
@@ -279,4 +274,3 @@ namespace System.Diagnostics.Contracts
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.cs
index ac0e891e683..1edc36c8f63 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("DEBUG")]
@@ -44,4 +43,3 @@ namespace System.Diagnostics.Contracts {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.cs
index 757d1cbec8d..a2d241c4e0a 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("CONTRACTS_FULL")]
@@ -43,4 +42,3 @@ namespace System.Diagnostics.Contracts {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs
index ebf94402f9c..9b98c959cfa 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -55,4 +54,3 @@ namespace System.Diagnostics.Contracts {
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs
index 92ee520a5de..5b70637b7ed 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Runtime.ConstrainedExecution;
@@ -65,4 +64,3 @@ namespace System.Diagnostics.Contracts {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs
index 671932511bf..c2a51ce1765 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs
@@ -30,11 +30,7 @@ using System;
namespace System.Diagnostics.Contracts {
-#if NET_4_0
public
-#else
- internal
-#endif
enum ContractFailureKind {
Precondition,
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs
index b3cfa275eaf..67fe12f6555 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("CONTRACTS_FULL")]
@@ -36,5 +35,4 @@ namespace System.Diagnostics.Contracts {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs
index a542650f02d..a22f9ee1927 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("CONTRACTS_FULL")]
@@ -43,4 +42,3 @@ namespace System.Diagnostics.Contracts {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs
index 66435b28367..c8fbf3ff24c 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[AttributeUsage (AttributeTargets.Assembly)]
@@ -33,5 +32,4 @@ namespace System.Diagnostics.Contracts {
public ContractReferenceAssemblyAttribute () {}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs
index a6887206d4d..41c690f44b4 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("CONTRACTS_FULL")]
@@ -34,5 +33,4 @@ namespace System.Diagnostics.Contracts {
public ContractRuntimeIgnoredAttribute() {}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs
index fea4bda234e..c660e8a814d 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -43,4 +42,3 @@ namespace System.Diagnostics.Contracts {
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.cs
index 9a61629883c..c1e72a632cb 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.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_0
using System;
namespace System.Diagnostics.Contracts {
[Conditional ("CONTRACTS_FULL")]
@@ -43,5 +42,4 @@ namespace System.Diagnostics.Contracts {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs b/mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs
index b2602b25968..84ab86913c0 100644
--- a/mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs
+++ b/mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -39,4 +38,3 @@ namespace System.Diagnostics.Contracts
}
}
-#endif
diff --git a/mcs/class/corlib/System.Diagnostics/Debugger.cs b/mcs/class/corlib/System.Diagnostics/Debugger.cs
index 9e0fdd00b67..90b27cb9eb0 100644
--- a/mcs/class/corlib/System.Diagnostics/Debugger.cs
+++ b/mcs/class/corlib/System.Diagnostics/Debugger.cs
@@ -104,15 +104,11 @@ namespace System.Diagnostics
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public static extern void Log(int level, string category, string message);
-#if NET_4_0
public static void NotifyOfCrossThreadDependency ()
{
}
-#endif
-#if NET_4_0
[ObsoleteAttribute("Call the static methods directly on this type", true)]
-#endif
public Debugger()
{
}
diff --git a/mcs/class/corlib/System.Globalization/CultureInfo.cs b/mcs/class/corlib/System.Globalization/CultureInfo.cs
index 81eff7c6d80..9be308de78d 100644
--- a/mcs/class/corlib/System.Globalization/CultureInfo.cs
+++ b/mcs/class/corlib/System.Globalization/CultureInfo.cs
@@ -484,14 +484,6 @@ namespace System.Globalization
internal void CheckNeutral ()
{
-#if !NET_4_0
- if (IsNeutralCulture) {
- throw new NotSupportedException ("Culture \"" + m_name + "\" is " +
- "a neutral culture. It can not be used in formatting " +
- "and parsing and therefore cannot be set as the thread's " +
- "current culture.");
- }
-#endif
}
public virtual NumberFormatInfo NumberFormat {
@@ -673,11 +665,7 @@ namespace System.Globalization
// Be careful not to cause recursive CultureInfo initialization
//
var msg = string.Format (InvariantCulture, "Culture ID {0} (0x{1}) is not a supported culture.", culture.ToString (InvariantCulture), culture.ToString ("X4", InvariantCulture));
-#if NET_4_0
throw new CultureNotFoundException ("culture", msg);
-#else
- throw new ArgumentException (msg, "culture");
-#endif
}
}
@@ -1022,11 +1010,7 @@ namespace System.Globalization
static Exception CreateNotFoundException (string name)
{
-#if NET_4_0
return new CultureNotFoundException ("name", "Culture name " + name + " is not supported.");
-#else
- return new ArgumentException ("Culture name " + name + " is not supported.", "name");
-#endif
}
#if NET_4_5
diff --git a/mcs/class/corlib/System.Globalization/CultureNotFoundException.cs b/mcs/class/corlib/System.Globalization/CultureNotFoundException.cs
index 642410e7b8e..5eddc76636e 100644
--- a/mcs/class/corlib/System.Globalization/CultureNotFoundException.cs
+++ b/mcs/class/corlib/System.Globalization/CultureNotFoundException.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_0
using System;
using System.Runtime.InteropServices;
@@ -118,5 +117,4 @@ namespace System.Globalization {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Globalization/CultureTypes.cs b/mcs/class/corlib/System.Globalization/CultureTypes.cs
index 2b13ee397ab..4c610c22ba1 100644
--- a/mcs/class/corlib/System.Globalization/CultureTypes.cs
+++ b/mcs/class/corlib/System.Globalization/CultureTypes.cs
@@ -48,13 +48,9 @@ namespace System.Globalization {
AllCultures = 7,
UserCustomCulture = 8,
ReplacementCultures = 16,
-#if NET_4_0
[Obsolete]
-#endif
WindowsOnlyCultures = 32,
-#if NET_4_0
[Obsolete]
-#endif
FrameworkCultures = 64,
} // CultureTypes
diff --git a/mcs/class/corlib/System.Globalization/TimeSpanStyles.cs b/mcs/class/corlib/System.Globalization/TimeSpanStyles.cs
index 25482a4b5fd..cb24371d042 100644
--- a/mcs/class/corlib/System.Globalization/TimeSpanStyles.cs
+++ b/mcs/class/corlib/System.Globalization/TimeSpanStyles.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_0
using System;
@@ -37,5 +36,4 @@ namespace System.Globalization {
AssumeNegative
}
}
-#endif
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs
index ce8e6058a77..884b00cd894 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs
@@ -81,9 +81,7 @@ namespace System.IO.IsolatedStorage {
}
[CLSCompliant (false)]
-#if NET_4_0
[Obsolete]
-#endif
public virtual ulong CurrentSize {
get {
throw new InvalidOperationException (
@@ -104,9 +102,7 @@ namespace System.IO.IsolatedStorage {
}
[CLSCompliant (false)]
-#if NET_4_0
[Obsolete]
-#endif
public virtual ulong MaximumSize {
get {
throw new InvalidOperationException (
@@ -118,7 +114,6 @@ namespace System.IO.IsolatedStorage {
get { return storage_scope; }
}
-#if NET_4_0
[ComVisible (false)]
public virtual long AvailableFreeSpace {
get {
@@ -139,7 +134,6 @@ namespace System.IO.IsolatedStorage {
throw new InvalidOperationException ("This property is not defined for this store.");
}
}
-#endif
protected virtual char SeparatorExternal {
get { return System.IO.Path.DirectorySeparatorChar; }
@@ -182,12 +176,10 @@ namespace System.IO.IsolatedStorage {
}
public abstract void Remove ();
-#if NET_4_0
[ComVisible (false)]
public virtual bool IncreaseQuotaTo (long newQuotaSize)
{
return false;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
index 48e98f516ea..935bd6c890c 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
@@ -57,10 +57,8 @@ namespace System.IO.IsolatedStorage {
private static readonly Mutex mutex = new Mutex ();
#endif
-#if NET_4_0
private bool closed;
private bool disposed;
-#endif
public static IEnumerator GetEnumerator (IsolatedStorageScope scope)
{
@@ -279,13 +277,11 @@ namespace System.IO.IsolatedStorage {
return storageFile;
}
-#if NET_4_0
[ComVisible (false)]
public static IsolatedStorageFile GetUserStoreForSite ()
{
throw new NotSupportedException ();
}
-#endif
public static void Remove (IsolatedStorageScope scope)
{
@@ -441,17 +437,13 @@ namespace System.IO.IsolatedStorage {
}
[CLSCompliant(false)]
-#if NET_4_0
[Obsolete]
-#endif
public override ulong CurrentSize {
get { return GetDirectorySize (directory); }
}
[CLSCompliant(false)]
-#if NET_4_0
[Obsolete]
-#endif
public override ulong MaximumSize {
// return an ulong but default is signed long
get {
@@ -504,7 +496,6 @@ namespace System.IO.IsolatedStorage {
get { return directory.FullName; }
}
-#if NET_4_0
[ComVisible (false)]
public override long AvailableFreeSpace {
get {
@@ -554,15 +545,12 @@ namespace System.IO.IsolatedStorage {
return disposed;
}
}
-#endif
// methods
public void Close ()
{
-#if NET_4_0
closed = true;
-#endif
}
public void CreateDirectory (string dir)
@@ -572,11 +560,7 @@ namespace System.IO.IsolatedStorage {
if (dir.IndexOfAny (Path.PathSeparatorChars) < 0) {
if (directory.GetFiles (dir).Length > 0)
-#if NET_4_0
throw new IsolatedStorageException ("Unable to create directory.");
-#else
- throw new IOException (Locale.GetText ("Directory name already exists as a file."));
-#endif
directory.CreateSubdirectory (dir);
} else {
string[] dirs = dir.Split (Path.PathSeparatorChars, StringSplitOptions.RemoveEmptyEntries);
@@ -584,18 +568,12 @@ namespace System.IO.IsolatedStorage {
for (int i = 0; i < dirs.Length; i++) {
if (dinfo.GetFiles (dirs [i]).Length > 0)
-#if NET_4_0
throw new IsolatedStorageException ("Unable to create directory.");
-#else
- throw new IOException (Locale.GetText (
- "Part of the directory name already exists as a file."));
-#endif
dinfo = dinfo.CreateSubdirectory (dirs [i]);
}
}
}
-#if NET_4_0
[ComVisible (false)]
public void CopyFile (string sourceFileName, string destinationFileName)
{
@@ -641,7 +619,6 @@ namespace System.IO.IsolatedStorage {
{
return new IsolatedStorageFileStream (path, FileMode.Create, FileAccess.ReadWrite, FileShare.None, this);
}
-#endif
public void DeleteDirectory (string dir)
{
@@ -676,15 +653,12 @@ namespace System.IO.IsolatedStorage {
public void Dispose ()
{
-#if NET_4_0
// Dispose may be calling Close, but we are not sure
disposed = true;
-#endif
// nothing to dispose, anyway we want to please the tools
GC.SuppressFinalize (this);
}
-#if NET_4_0
[ComVisible (false)]
public bool DirectoryExists (string path)
{
@@ -765,16 +739,13 @@ namespace System.IO.IsolatedStorage {
return Directory.GetLastWriteTime (full_path);
}
-#endif
public string[] GetDirectoryNames (string searchPattern)
{
if (searchPattern == null)
throw new ArgumentNullException ("searchPattern");
-#if NET_4_0
if (searchPattern.Contains (".."))
throw new ArgumentException ("Search pattern cannot contain '..' to move up directories.", "searchPattern");
-#endif
// note: IsolatedStorageFile accept a "dir/file" pattern which is not allowed by DirectoryInfo
// so we need to split them to get the right results
@@ -807,13 +778,11 @@ namespace System.IO.IsolatedStorage {
return GetNames (adi);
}
-#if NET_4_0
[ComVisible (false)]
public string [] GetDirectoryNames ()
{
return GetDirectoryNames ("*");
}
-#endif
private string[] GetNames (FileSystemInfo[] afsi)
{
@@ -827,10 +796,8 @@ namespace System.IO.IsolatedStorage {
{
if (searchPattern == null)
throw new ArgumentNullException ("searchPattern");
-#if NET_4_0
if (searchPattern.Contains (".."))
throw new ArgumentException ("Search pattern cannot contain '..' to move up directories.", "searchPattern");
-#endif
// note: IsolatedStorageFile accept a "dir/file" pattern which is not allowed by DirectoryInfo
// so we need to split them to get the right results
@@ -854,7 +821,6 @@ namespace System.IO.IsolatedStorage {
return GetNames (afi);
}
-#if NET_4_0
[ComVisible (false)]
public string [] GetFileNames ()
{
@@ -953,13 +919,10 @@ namespace System.IO.IsolatedStorage {
{
return new IsolatedStorageFileStream (path, mode, access, share, this);
}
-#endif
public override void Remove ()
{
-#if NET_4_0
CheckOpen (false);
-#endif
try {
directory.Delete (true);
} catch {
@@ -979,7 +942,6 @@ namespace System.IO.IsolatedStorage {
}
// internal stuff
-#if NET_4_0
void CheckOpen ()
{
CheckOpen (true);
@@ -999,7 +961,6 @@ namespace System.IO.IsolatedStorage {
{
return Path.GetFullPath (path).StartsWith (directory.FullName);
}
-#endif
#if !MOBILE
private string GetNameFromIdentity (object identity)
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
index dd87843174e..0da2a8ef8c6 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
@@ -64,12 +64,10 @@ namespace System.IO.IsolatedStorage {
#endif
}
-#if NET_4_0
if (isf.IsDisposed)
throw new ObjectDisposedException ("IsolatedStorageFile");
if (isf.IsClosed)
throw new InvalidOperationException ("Storage needs to be open for this operation.");
-#endif
// ensure that the _root_ isolated storage can be (and is) created.
FileInfo fi = new FileInfo (isf.Root);
@@ -212,12 +210,10 @@ namespace System.IO.IsolatedStorage {
base.Flush ();
}
-#if NET_4_0
public override void Flush (bool flushToDisk)
{
base.Flush (flushToDisk);
}
-#endif
public override int Read (byte[] buffer, int offset, int count)
{
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs
index 0d3b391fbc6..7dbb214d671 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.IO.IsolatedStorage
{
public enum IsolatedStorageSecurityOptions
@@ -35,5 +34,4 @@ namespace System.IO.IsolatedStorage
}
}
-#endif
diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs
index 285b70e331e..3bacddecaed 100644
--- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs
+++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs
@@ -28,7 +28,6 @@
using System.Security;
-#if NET_4_0
namespace System.IO.IsolatedStorage
{
@@ -65,5 +64,4 @@ namespace System.IO.IsolatedStorage
}
}
-#endif
diff --git a/mcs/class/corlib/System.IO/BinaryReader.cs b/mcs/class/corlib/System.IO/BinaryReader.cs
index d7b92b38541..ad24f8ca8c5 100644
--- a/mcs/class/corlib/System.IO/BinaryReader.cs
+++ b/mcs/class/corlib/System.IO/BinaryReader.cs
@@ -117,11 +117,7 @@ namespace System.IO {
charBuffer = null;
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose()
-#endif
{
Dispose (true);
}
diff --git a/mcs/class/corlib/System.IO/BinaryWriter.cs b/mcs/class/corlib/System.IO/BinaryWriter.cs
index be47858d480..bab371824c0 100644
--- a/mcs/class/corlib/System.IO/BinaryWriter.cs
+++ b/mcs/class/corlib/System.IO/BinaryWriter.cs
@@ -100,11 +100,7 @@ namespace System.IO {
Dispose (true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose()
-#endif
{
Dispose (true);
}
diff --git a/mcs/class/corlib/System.IO/Directory.cs b/mcs/class/corlib/System.IO/Directory.cs
index 64d5b7dbb76..f263eeb1cc9 100644
--- a/mcs/class/corlib/System.IO/Directory.cs
+++ b/mcs/class/corlib/System.IO/Directory.cs
@@ -498,7 +498,6 @@ namespace System.IO
return result;
}
-#if NET_4_0
public static string[] GetFileSystemEntries (string path, string searchPattern, SearchOption searchOption)
{
// Take the simple way home:
@@ -632,7 +631,6 @@ namespace System.IO
return EnumerateKind (path, "*", SearchOption.TopDirectoryOnly, FileAttributes.Normal | FileAttributes.Directory);
}
-#endif
public static DirectorySecurity GetAccessControl (string path, AccessControlSections includeSections)
{
diff --git a/mcs/class/corlib/System.IO/DirectoryInfo.cs b/mcs/class/corlib/System.IO/DirectoryInfo.cs
index 09ed552f62e..8289c288c20 100644
--- a/mcs/class/corlib/System.IO/DirectoryInfo.cs
+++ b/mcs/class/corlib/System.IO/DirectoryInfo.cs
@@ -204,9 +204,7 @@ namespace System.IO {
return GetFileSystemInfos (searchPattern, SearchOption.TopDirectoryOnly);
}
-#if NET_4_0
public
-#endif
FileSystemInfo [] GetFileSystemInfos (string searchPattern, SearchOption searchOption)
{
if (searchPattern == null)
@@ -356,7 +354,6 @@ namespace System.IO {
Directory.SetAccessControl (FullPath, directorySecurity);
}
-#if NET_4_0
public IEnumerable<DirectoryInfo> EnumerateDirectories ()
{
@@ -462,6 +459,5 @@ namespace System.IO {
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs
index 79486b165a8..de1758611c9 100644
--- a/mcs/class/corlib/System.IO/File.cs
+++ b/mcs/class/corlib/System.IO/File.cs
@@ -616,7 +616,6 @@ namespace System.IO
throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
}
-#if NET_4_0
public static IEnumerable<string> ReadLines (string path)
{
return ReadLines (File.OpenText (path));
@@ -689,6 +688,5 @@ namespace System.IO
w.WriteLine (line);
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs
index 62be3c834f4..8c6fa0cc6a1 100644
--- a/mcs/class/corlib/System.IO/FileStream.cs
+++ b/mcs/class/corlib/System.IO/FileStream.cs
@@ -826,7 +826,6 @@ namespace System.IO
FlushBuffer ();
}
-#if NET_4_0
public virtual void Flush (bool flushToDisk)
{
FlushBuffer ();
@@ -837,7 +836,6 @@ namespace System.IO
MonoIO.Flush (handle, out error);
}
}
-#endif
public virtual void Lock (long position, long length)
{
diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs
index 3ea8cfe0069..660c08f2731 100644
--- a/mcs/class/corlib/System.IO/Path.cs
+++ b/mcs/class/corlib/System.IO/Path.cs
@@ -776,11 +776,7 @@ namespace System.IO {
return String.Compare (subset, slast, path, slast, subset.Length - slast) == 0;
}
-#if NET_4_0
public
-#else
- internal
-#endif
static string Combine (params string [] paths)
{
if (paths == null)
@@ -821,11 +817,7 @@ namespace System.IO {
return ret.ToString ();
}
-#if NET_4_0
public
-#else
- internal
-#endif
static string Combine (string path1, string path2, string path3)
{
if (path1 == null)
@@ -840,11 +832,7 @@ namespace System.IO {
return Combine (new string [] { path1, path2, path3 });
}
-#if NET_4_0
public
-#else
- internal
-#endif
static string Combine (string path1, string path2, string path3, string path4)
{
if (path1 == null)
diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs
index 303795ed912..79f67371deb 100644
--- a/mcs/class/corlib/System.IO/Stream.cs
+++ b/mcs/class/corlib/System.IO/Stream.cs
@@ -240,7 +240,6 @@ namespace System.IO
}
}
-#if NET_4_0
public void CopyTo (Stream destination)
{
CopyTo (destination, 16*1024);
@@ -269,7 +268,6 @@ namespace System.IO
protected virtual void ObjectInvariant ()
{
}
-#endif
#if NET_4_5
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs
index 8b9f52da931..feb7b4abc7f 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Runtime.InteropServices;
@@ -476,4 +475,3 @@ namespace System.IO
}
}
-#endif
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
index 3c5bf402f1c..dc8801f5e18 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
@@ -49,9 +49,7 @@ namespace System.IO
IntPtr initial_pointer;
long initial_position;
long current_position;
-#if NET_4_0
SafeBuffer safebuffer;
-#endif
#if NET_4_5
Task<int> read_task;
#endif
@@ -77,7 +75,6 @@ namespace System.IO
Initialize (pointer, length, capacity, access);
}
-#if NET_4_0
public UnmanagedMemoryStream (SafeBuffer buffer, long offset, long length) :
this (buffer, offset, length, FileAccess.Read)
{
@@ -88,7 +85,6 @@ namespace System.IO
closed = true;
Initialize (buffer, offset, length, access);
}
-#endif
#endregion
#region Properties
@@ -146,10 +142,8 @@ namespace System.IO
[CLSCompliantAttribute (false)]
public unsafe byte* PositionPointer {
get {
-#if NET_4_0
if (safebuffer != null)
throw new NotSupportedException ("Not supported when using SafeBuffer");
-#endif
if (closed)
throw new ObjectDisposedException("The stream is closed");
if (current_position >= length)
@@ -158,10 +152,8 @@ namespace System.IO
return (byte *) initial_pointer + current_position;
}
set {
-#if NET_4_0
if (safebuffer != null)
throw new NotSupportedException ("Not supported when using SafeBuffer");
-#endif
if (closed)
throw new ObjectDisposedException("The stream is closed");
@@ -195,7 +187,6 @@ namespace System.IO
return 0;
int progress = current_position + count < length ? count : (int) (length - current_position);
-#if NET_4_0
if (safebuffer != null) {
unsafe {
byte *ptr = null;
@@ -208,7 +199,6 @@ namespace System.IO
}
}
} else
-#endif
{
Marshal.Copy (new IntPtr (initial_pointer.ToInt64 () + current_position), buffer, offset, progress);
}
@@ -257,7 +247,6 @@ namespace System.IO
if (current_position >= length)
return (-1);
-#if NET_4_0
if (safebuffer != null) {
unsafe {
byte *ptr = null;
@@ -270,7 +259,6 @@ namespace System.IO
}
}
} else
-#endif
{
return (int) Marshal.ReadByte(initial_pointer, (int) current_position++);
}
@@ -306,10 +294,8 @@ namespace System.IO
public override void SetLength (long value)
{
-#if NET_4_0
if (safebuffer != null)
throw new NotSupportedException ("Not supported when using SafeBuffer");
-#endif
if (closed)
throw new ObjectDisposedException("The stream is closed");
if (value < 0)
@@ -372,7 +358,6 @@ namespace System.IO
if (fileaccess == FileAccess.Read)
throw new NotSupportedException ("Stream does not support writing.");
-#if NET_4_0
if (safebuffer != null) {
unsafe {
byte *dest = null;
@@ -388,7 +373,6 @@ namespace System.IO
}
}
} else
-#endif
{
unsafe {
fixed (byte *src = buffer) {
@@ -438,7 +422,6 @@ namespace System.IO
if (fileaccess == FileAccess.Read)
throw new NotSupportedException("Stream does not support writing.");
-#if NET_4_0
if (safebuffer != null) {
unsafe {
byte *dest = null;
@@ -452,7 +435,6 @@ namespace System.IO
}
}
} else
-#endif
{
unsafe {
byte *dest = (byte *) initial_pointer + (int) current_position++;
@@ -490,7 +472,6 @@ namespace System.IO
closed = false;
}
-#if NET_4_0
protected void Initialize (SafeBuffer buffer, long offset, long length, FileAccess access)
{
if (buffer == null)
@@ -520,7 +501,6 @@ namespace System.IO
current_position = offset;
closed = false;
}
-#endif
#endregion
}
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
index 6a8e4908edf..80864bc8351 100644
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
@@ -785,9 +785,7 @@ namespace System.Reflection.Emit
internal bool IsRun {
get {
return access == (uint)AssemblyBuilderAccess.Run || access == (uint)AssemblyBuilderAccess.RunAndSave
-#if NET_4_0
|| access == (uint)AssemblyBuilderAccess.RunAndCollect
-#endif
;
}
@@ -1078,7 +1076,6 @@ namespace System.Reflection.Emit
throw new NotImplementedException ();
}
-#if NET_4_0
public override Type GetType (string name, bool throwOnError, bool ignoreCase)
{
if (name == null)
@@ -1198,7 +1195,6 @@ namespace System.Reflection.Emit
public override string FullName {
get { return base.FullName; }
}
-#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
index 55cc465e044..3d1bdf15283 100644
--- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
@@ -41,9 +41,7 @@ namespace System.Reflection.Emit
Save = 2,
RunAndSave = 3,
ReflectionOnly = 6,
-#if NET_4_0
RunAndCollect = 9
-#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
index aa0f78a235c..05b0bec63be 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
@@ -179,9 +179,7 @@ namespace System.Reflection.Emit {
}
}
-#if NET_4_0
[Obsolete]
-#endif
public Type ReturnType {
get {
return null;
diff --git a/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs b/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
index a3be40abcae..85a622a7eba 100644
--- a/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
@@ -85,12 +85,10 @@ namespace System.Reflection.Emit {
throw new NotImplementedException ();
}
-#if NET_4_0
[MonoTODO]
public int GetTokenFor (RuntimeFieldHandle field, RuntimeTypeHandle contextType) {
throw new NotImplementedException ();
}
-#endif
public void SetCode (byte[] code, int maxStackSize) {
if (code == null)
diff --git a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
index 240bc7297e7..eecc6b33ab2 100644
--- a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
@@ -166,12 +166,10 @@ namespace System.Reflection.Emit {
return res;
}
-#if NET_4_0
public override Type GetEnumUnderlyingType ()
{
return _underlyingType;
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void setup_enum_type (Type t);
diff --git a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
index a4cfc9ca4fd..06241b7baa1 100644
--- a/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
@@ -106,11 +106,7 @@ namespace System.Reflection.Emit
protected override TypeAttributes GetAttributeFlagsImpl ()
{
-#if NET_4_0
return TypeAttributes.Public;
-#else
- throw not_supported ();
-#endif
}
protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr,
diff --git a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
index bc8b2538378..44fa9d56321 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
@@ -1038,11 +1038,7 @@ namespace System.Reflection.Emit {
return ig.code_len;
}
-#if NET_4_0
public
-#else
- internal
-#endif
virtual int ILOffset {
get { return code_len; }
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
index d5f8c1407b5..37489061aeb 100644
--- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
@@ -679,11 +679,9 @@ namespace System.Reflection.Emit
throw new NotImplementedException ();
}
-#if NET_4_0
public override ParameterInfo ReturnParameter {
get { return base.ReturnParameter; }
}
-#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
index 32aa0b81fbe..e5326dc08f6 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -821,7 +821,6 @@ namespace System.Reflection.Emit {
throw new NotImplementedException ();
}
-#if NET_4_0
public override Assembly Assembly {
get { return assemblyb; }
}
@@ -961,7 +960,6 @@ namespace System.Reflection.Emit {
return base.MetadataToken;
}
}
-#endif
}
internal class ModuleBuilderTokenGenerator : TokenGenerator {
diff --git a/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs b/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs
index d56f96256c0..924eb674e15 100644
--- a/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs
@@ -132,7 +132,6 @@ namespace System.Reflection.Emit {
throw new NotImplementedException ();
}
-#if NET_4_0
[MonoTODO("Not implemented")]
public static SignatureHelper GetPropertySigHelper (Module mod,
CallingConventions callingConvention,
@@ -145,7 +144,6 @@ namespace System.Reflection.Emit {
{
throw new NotImplementedException ();
}
-#endif
//
// Grows the given array, and returns the index where the element
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index 15e2f8a9757..253b2bb39f7 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -683,12 +683,10 @@ namespace System.Reflection.Emit
return DefineProperty (name, attributes, 0, returnType, null, null, parameterTypes, null, null);
}
-#if NET_4_0
public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes)
{
return DefineProperty (name, attributes, callingConvention, returnType , null, null, parameterTypes, null, null);
}
-#endif
public PropertyBuilder DefineProperty (string name, PropertyAttributes attributes, Type returnType, Type[] returnTypeRequiredCustomModifiers, Type[] returnTypeOptionalCustomModifiers, Type[] parameterTypes, Type[][] parameterTypeRequiredCustomModifiers, Type[][] parameterTypeOptionalCustomModifiers)
{
diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs
index 1a744b8ab5c..9428605ace9 100644
--- a/mcs/class/corlib/System.Reflection/Assembly.cs
+++ b/mcs/class/corlib/System.Reflection/Assembly.cs
@@ -51,10 +51,8 @@ namespace System.Reflection {
[StructLayout (LayoutKind.Sequential)]
#if MOBILE
public partial class Assembly : ICustomAttributeProvider {
-#elif NET_4_0
- public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
#else
- public partial class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
+ public abstract class Assembly : ICustomAttributeProvider, _Assembly, IEvidenceFactory, ISerializable {
#endif
internal class ResolveEventHolder {
public event ModuleResolveEventHandler ModuleResolve;
@@ -79,11 +77,7 @@ namespace System.Reflection {
private bool fromByteArray;
private string assemblyName;
-#if NET_4_0
protected
-#else
- internal
-#endif
Assembly ()
{
resolve_event_holder = new ResolveEventHolder ();
@@ -478,9 +472,7 @@ namespace System.Reflection {
return LoadFrom (assemblyFile, false);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly LoadFrom (String assemblyFile, Evidence securityEvidence)
{
Assembly a = LoadFrom (assemblyFile, false);
@@ -493,9 +485,7 @@ namespace System.Reflection {
return a;
}
-#if NET_4_0
[Obsolete]
-#endif
[MonoTODO("This overload is not currently implemented")]
// FIXME: What are we missing?
public static Assembly LoadFrom (String assemblyFile, Evidence securityEvidence, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
@@ -503,24 +493,18 @@ namespace System.Reflection {
throw new NotImplementedException ();
}
-#if NET_4_0
[MonoTODO]
public static Assembly LoadFrom (String assemblyFile, byte [] hashValue, AssemblyHashAlgorithm hashAlgorithm)
{
throw new NotImplementedException ();
}
-#endif
-#if NET_4_0
public static Assembly UnsafeLoadFrom (String assemblyFile)
{
return LoadFrom (assemblyFile);
}
-#endif
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly LoadFile (String path, Evidence securityEvidence)
{
if (path == null)
@@ -541,9 +525,7 @@ namespace System.Reflection {
return AppDomain.CurrentDomain.Load (assemblyString);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (String assemblyString, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load (assemblyString, assemblySecurity);
@@ -554,9 +536,7 @@ namespace System.Reflection {
return AppDomain.CurrentDomain.Load (assemblyRef);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
{
return AppDomain.CurrentDomain.Load (assemblyRef, assemblySecurity);
@@ -572,22 +552,18 @@ namespace System.Reflection {
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
}
-#if NET_4_0
[Obsolete]
-#endif
public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore,
Evidence securityEvidence)
{
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore, securityEvidence);
}
-#if NET_4_0
[MonoLimitation ("Argument securityContextSource is ignored")]
public static Assembly Load (byte [] rawAssembly, byte [] rawSymbolStore, SecurityContextSource securityContextSource)
{
return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
}
-#endif
public static Assembly ReflectionOnlyLoad (byte[] rawAssembly)
{
@@ -621,9 +597,7 @@ namespace System.Reflection {
[MonoTODO ("Not implemented")]
public
-#if NET_4_0
virtual
-#endif
Module LoadModule (string moduleName, byte [] rawModule, byte [] rawSymbolStore)
{
throw new NotImplementedException ();
@@ -676,9 +650,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
Object CreateInstance (String typeName, Boolean ignoreCase,
BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture,
@@ -755,9 +727,7 @@ namespace System.Reflection {
[MonoTODO ("Currently it always returns zero")]
[ComVisible (false)]
public
-#if NET_4_0
virtual
-#endif
long HostContext {
get { return 0; }
}
@@ -875,7 +845,6 @@ namespace System.Reflection {
}
}
-#if NET_4_0
public virtual PermissionSet PermissionSet {
get { return this.GrantedPermissionSet; }
}
@@ -883,11 +852,9 @@ namespace System.Reflection {
public virtual SecurityRuleSet SecurityRuleSet {
get { throw CreateNIE (); }
}
-#endif
#endif
-#if NET_4_0
static Exception CreateNIE ()
{
return new NotImplementedException ("Derived classes must implement it");
@@ -968,7 +935,6 @@ namespace System.Reflection {
return true;
return !left.Equals (right);
}
-#endif
#if NET_4_5
public virtual IEnumerable<TypeInfo> DefinedTypes {
diff --git a/mcs/class/corlib/System.Reflection/ConstructorInfo.cs b/mcs/class/corlib/System.Reflection/ConstructorInfo.cs
index fd81dcb1b39..65237fe796f 100644
--- a/mcs/class/corlib/System.Reflection/ConstructorInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ConstructorInfo.cs
@@ -114,7 +114,6 @@ namespace System.Reflection {
}
#endif
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -142,7 +141,6 @@ namespace System.Reflection {
return true;
return !left.Equals (right);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeData.cs b/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
index 615bf7de8ac..4a5918281f4 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeData.cs
@@ -37,11 +37,7 @@ namespace System.Reflection {
[ComVisible (true)]
[Serializable]
-#if NET_4_0
public
-#else
- public sealed
-#endif
class CustomAttributeData {
class LazyCAttrData {
internal Assembly assembly;
@@ -55,11 +51,9 @@ namespace System.Reflection {
LazyCAttrData lazyData;
-#if NET_4_0
protected CustomAttributeData ()
{
}
-#endif
internal CustomAttributeData (ConstructorInfo ctorInfo, Assembly assembly, IntPtr data, uint data_length)
{
@@ -91,9 +85,7 @@ namespace System.Reflection {
[ComVisible (true)]
public
-#if NET_4_0
virtual
-#endif
ConstructorInfo Constructor {
get {
return ctorInfo;
@@ -102,9 +94,7 @@ namespace System.Reflection {
[ComVisible (true)]
public
-#if NET_4_0
virtual
-#endif
IList<CustomAttributeTypedArgument> ConstructorArguments {
get {
ResolveArguments ();
@@ -113,9 +103,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
IList<CustomAttributeNamedArgument> NamedArguments {
get {
ResolveArguments ();
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs b/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
index ecee7719de4..446aa5d0379 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
@@ -38,22 +38,18 @@ namespace System.Reflection {
CustomAttributeTypedArgument typedArgument;
MemberInfo memberInfo;
-#if NET_4_0
public
-#endif
CustomAttributeNamedArgument (MemberInfo memberInfo, object value)
{
this.memberInfo = memberInfo;
this.typedArgument = (CustomAttributeTypedArgument) value;
}
-#if NET_4_0
public CustomAttributeNamedArgument (MemberInfo memberInfo, CustomAttributeTypedArgument typedArgument)
{
this.memberInfo = memberInfo;
this.typedArgument = typedArgument;
}
-#endif
public MemberInfo MemberInfo {
get {
diff --git a/mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs b/mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs
index c73e32c9a94..88b551dcc1d 100644
--- a/mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs
+++ b/mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs
@@ -40,9 +40,7 @@ namespace System.Reflection {
Type argumentType;
object value;
-#if NET_4_0
public
-#endif
CustomAttributeTypedArgument (Type argumentType, object value)
{
if (argumentType == null)
@@ -63,7 +61,6 @@ namespace System.Reflection {
}
}
-#if NET_4_0
public CustomAttributeTypedArgument (object value)
{
if (value == null)
@@ -72,7 +69,6 @@ namespace System.Reflection {
this.argumentType = value.GetType ();
this.value = value;
}
-#endif
public Type ArgumentType {
get {
diff --git a/mcs/class/corlib/System.Reflection/EventInfo.cs b/mcs/class/corlib/System.Reflection/EventInfo.cs
index 696e9aa0d40..6c965d38382 100644
--- a/mcs/class/corlib/System.Reflection/EventInfo.cs
+++ b/mcs/class/corlib/System.Reflection/EventInfo.cs
@@ -47,9 +47,7 @@ namespace System.Reflection {
public abstract EventAttributes Attributes {get;}
public
-#if NET_4_0
virtual
-#endif
Type EventHandlerType {
get {
ParameterInfo[] p;
@@ -68,9 +66,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
bool IsMulticast {get {return true;}}
public bool IsSpecialName {get {return (Attributes & EventAttributes.SpecialName ) != 0;}}
public override MemberTypes MemberType {
@@ -84,9 +80,7 @@ namespace System.Reflection {
[DebuggerHidden]
[DebuggerStepThrough]
public
-#if NET_4_0
virtual
-#endif
void AddEventHandler (object target, Delegate handler)
{
// this optimization cause problems with full AOT
@@ -142,9 +136,7 @@ namespace System.Reflection {
[DebuggerHidden]
[DebuggerStepThrough]
public
-#if NET_4_0
virtual
-#endif
void RemoveEventHandler (object target, Delegate handler)
{
MethodInfo remove = GetRemoveMethod ();
@@ -154,7 +146,6 @@ namespace System.Reflection {
remove.Invoke (target, new object [] {handler});
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -182,7 +173,6 @@ namespace System.Reflection {
return true;
return !left.Equals (right);
}
-#endif
#if !MOBILE
void _EventInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs b/mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs
index ed94d54b17a..d108d1e4153 100644
--- a/mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs
+++ b/mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs
@@ -35,11 +35,7 @@ namespace System.Reflection {
[ComVisible (true)]
[StructLayout (LayoutKind.Sequential)]
-#if NET_4_0
public
-#else
- public sealed
-#endif
class ExceptionHandlingClause {
#region Sync with reflection.h
internal Type catch_type;
@@ -51,18 +47,12 @@ namespace System.Reflection {
internal int handler_length;
#endregion
-#if NET_4_0
protected
-#else
- internal
-#endif
ExceptionHandlingClause () {
}
public
-#if NET_4_0
virtual
-#endif
Type CatchType {
get {
return catch_type;
@@ -70,9 +60,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int FilterOffset {
get {
return filter_offset;
@@ -80,9 +68,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
ExceptionHandlingClauseOptions Flags {
get {
return flags;
@@ -90,9 +76,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int HandlerLength {
get {
return handler_length;
@@ -100,9 +84,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int HandlerOffset {
get {
return handler_offset;
@@ -110,9 +92,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int TryLength {
get {
return try_length;
@@ -120,9 +100,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int TryOffset {
get {
return try_offset;
diff --git a/mcs/class/corlib/System.Reflection/FieldInfo.cs b/mcs/class/corlib/System.Reflection/FieldInfo.cs
index 06ea3e8e70c..5838902b2ac 100644
--- a/mcs/class/corlib/System.Reflection/FieldInfo.cs
+++ b/mcs/class/corlib/System.Reflection/FieldInfo.cs
@@ -247,7 +247,6 @@ namespace System.Reflection {
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -293,7 +292,6 @@ namespace System.Reflection {
throw new NotImplementedException ();
}
}
-#endif
#if !MOBILE
void _FieldInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Reflection/LocalVariableInfo.cs b/mcs/class/corlib/System.Reflection/LocalVariableInfo.cs
index d39d3828100..5bd024b8708 100644
--- a/mcs/class/corlib/System.Reflection/LocalVariableInfo.cs
+++ b/mcs/class/corlib/System.Reflection/LocalVariableInfo.cs
@@ -41,11 +41,7 @@ namespace System.Reflection {
internal ushort position;
#endregion
-#if NET_4_0
protected
-#else
- internal
-#endif
LocalVariableInfo () {
}
diff --git a/mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs b/mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs
index a0f5f3713a2..5dd9301c577 100644
--- a/mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs
@@ -44,11 +44,7 @@ namespace System.Reflection
{
}
-#if NET_4_0
public
-#else
- internal
-#endif
ManifestResourceInfo (Assembly containingAssembly, string containingFileName, ResourceLocation resourceLocation)
{
_assembly = containingAssembly;
diff --git a/mcs/class/corlib/System.Reflection/MemberInfo.cs b/mcs/class/corlib/System.Reflection/MemberInfo.cs
index 89e2a3fcd29..4b250ba253d 100644
--- a/mcs/class/corlib/System.Reflection/MemberInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MemberInfo.cs
@@ -82,7 +82,6 @@ namespace System.Reflection {
get;
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -114,7 +113,6 @@ namespace System.Reflection {
public virtual IList<CustomAttributeData> GetCustomAttributesData () {
throw new NotImplementedException ();
}
-#endif
#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
diff --git a/mcs/class/corlib/System.Reflection/MethodBase.cs b/mcs/class/corlib/System.Reflection/MethodBase.cs
index d0fa181629f..011a2832af5 100644
--- a/mcs/class/corlib/System.Reflection/MethodBase.cs
+++ b/mcs/class/corlib/System.Reflection/MethodBase.cs
@@ -242,7 +242,6 @@ namespace System.Reflection {
throw new NotSupportedException ();
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -288,7 +287,6 @@ namespace System.Reflection {
throw new NotImplementedException ();
}
}
-#endif
#if NET_4_5
public virtual MethodImplAttributes MethodImplementationFlags {
diff --git a/mcs/class/corlib/System.Reflection/MethodBody.cs b/mcs/class/corlib/System.Reflection/MethodBody.cs
index ae2a8cd15b7..9cc5ca040de 100644
--- a/mcs/class/corlib/System.Reflection/MethodBody.cs
+++ b/mcs/class/corlib/System.Reflection/MethodBody.cs
@@ -37,9 +37,6 @@ namespace System.Reflection {
[ComVisible (true)]
[StructLayout (LayoutKind.Sequential)]
public
-#if !NET_4_0
- sealed
-#endif
class MethodBody {
#pragma warning disable 649
#region Sync with reflection.h
@@ -52,18 +49,12 @@ namespace System.Reflection {
#endregion
#pragma warning restore 649
-#if NET_4_0
protected
-#else
- internal
-#endif
MethodBody () {
}
public
-#if NET_4_0
virtual
-#endif
IList<ExceptionHandlingClause> ExceptionHandlingClauses {
get {
return Array.AsReadOnly<ExceptionHandlingClause> (clauses);
@@ -71,9 +62,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
IList<LocalVariableInfo> LocalVariables {
get {
return Array.AsReadOnly<LocalVariableInfo> (locals);
@@ -81,9 +70,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
bool InitLocals {
get {
return init_locals;
@@ -91,9 +78,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
int LocalSignatureMetadataToken {
get {
return sig_token;
@@ -102,9 +87,7 @@ namespace System.Reflection {
public
-#if NET_4_0
virtual
-#endif
int MaxStackSize {
get {
return max_stack;
@@ -112,9 +95,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
virtual
-#endif
byte[] GetILAsByteArray () {
return il;
}
diff --git a/mcs/class/corlib/System.Reflection/MethodInfo.cs b/mcs/class/corlib/System.Reflection/MethodInfo.cs
index 74f96f55428..b63d5887788 100644
--- a/mcs/class/corlib/System.Reflection/MethodInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MethodInfo.cs
@@ -107,25 +107,6 @@ namespace System.Reflection {
return Type.EmptyTypes;
}
-#if !NET_4_0
- public override bool IsGenericMethod {
- get {
- return false;
- }
- }
-
- public override bool IsGenericMethodDefinition {
- get {
- return false;
- }
- }
-
- public override bool ContainsGenericParameters {
- get {
- return false;
- }
- }
-#endif
public virtual ParameterInfo ReturnParameter {
get {
@@ -133,7 +114,6 @@ namespace System.Reflection {
}
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -161,7 +141,6 @@ namespace System.Reflection {
return true;
return !left.Equals (right);
}
-#endif
#if NET_4_5
public virtual Delegate CreateDelegate (Type delegateType)
diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs
index c2f6e1f0ec5..1c2c3e998e4 100644
--- a/mcs/class/corlib/System.Reflection/Module.cs
+++ b/mcs/class/corlib/System.Reflection/Module.cs
@@ -50,10 +50,8 @@ namespace System.Reflection {
[StructLayout (LayoutKind.Sequential)]
#if MOBILE
public abstract class Module : ISerializable, ICustomAttributeProvider {
-#elif NET_4_0
- public abstract class Module : ISerializable, ICustomAttributeProvider, _Module {
#else
- public partial class Module : ISerializable, ICustomAttributeProvider, _Module {
+ public abstract class Module : ISerializable, ICustomAttributeProvider, _Module {
#endif
public static readonly TypeFilter FilterTypeName = new TypeFilter (filter_by_type_name);
public static readonly TypeFilter FilterTypeNameIgnoreCase = new TypeFilter (filter_by_type_name_ignore_case);
@@ -71,11 +69,7 @@ namespace System.Reflection {
const BindingFlags defaultBindingFlags =
BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
-#if NET_4_0
protected
-#else
- internal
-#endif
Module () {
}
@@ -288,7 +282,6 @@ namespace System.Reflection {
}
#endif
-#if NET_4_0
public override bool Equals (object o)
{
return o == (object) this;
@@ -317,9 +310,7 @@ namespace System.Reflection {
return !left.Equals (right);
}
-#endif
-#if NET_4_0
public virtual Assembly Assembly {
get { throw CreateNIE (); }
@@ -454,7 +445,6 @@ namespace System.Reflection {
{
throw CreateNIE ();
}
-#endif
#if NET_4_5
public virtual IEnumerable<CustomAttributeData> CustomAttributes {
diff --git a/mcs/class/corlib/System.Reflection/MonoAssembly.cs b/mcs/class/corlib/System.Reflection/MonoAssembly.cs
index fedff328ce7..80eb4c79d76 100644
--- a/mcs/class/corlib/System.Reflection/MonoAssembly.cs
+++ b/mcs/class/corlib/System.Reflection/MonoAssembly.cs
@@ -37,19 +37,13 @@ using System.Collections.Generic;
namespace System.Reflection {
-#if NET_4_0
[ComVisible (true)]
[ComDefaultInterfaceAttribute (typeof (_Assembly))]
[Serializable]
[ClassInterface(ClassInterfaceType.None)]
class MonoAssembly : Assembly {
-#else
- public partial class Assembly {
-#endif
public
-#if NET_4_0
override
-#endif
Type GetType (string name, bool throwOnError, bool ignoreCase)
{
Type res;
@@ -59,20 +53,11 @@ namespace System.Reflection {
throw new ArgumentException ("name", "Name cannot be empty");
res = InternalGetType (null, name, throwOnError, ignoreCase);
-#if !NET_4_0 && !FULL_AOT_RUNTIME
- if (res is TypeBuilder) {
- if (throwOnError)
- throw new TypeLoadException (string.Format ("Could not load type '{0}' from assembly '{1}'", name, this));
- return null;
- }
-#endif
return res;
}
public
-#if NET_4_0
override
-#endif
Module GetModule (String name)
{
if (name == null)
@@ -90,17 +75,13 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
AssemblyName[] GetReferencedAssemblies () {
return GetReferencedAssemblies (this);
}
public
-#if NET_4_0
override
-#endif
Module[] GetModules (bool getResourceModules) {
Module[] modules = GetModulesInternal ();
@@ -117,27 +98,21 @@ namespace System.Reflection {
[MonoTODO ("Always returns the same as GetModules")]
public
-#if NET_4_0
override
-#endif
Module[] GetLoadedModules (bool getResourceModules)
{
return GetModules (getResourceModules);
}
public
-#if NET_4_0
override
-#endif
Assembly GetSatelliteAssembly (CultureInfo culture)
{
return GetSatelliteAssembly (culture, null, true);
}
public
-#if NET_4_0
override
-#endif
Assembly GetSatelliteAssembly (CultureInfo culture, Version version)
{
return GetSatelliteAssembly (culture, version, true);
@@ -146,9 +121,7 @@ namespace System.Reflection {
//FIXME remove GetManifestModule under v4, it's a v2 artifact
[ComVisible (false)]
public
-#if NET_4_0
override
-#endif
Module ManifestModule {
get {
return GetManifestModule ();
@@ -156,9 +129,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
bool GlobalAssemblyCache {
get {
return get_global_assembly_cache ();
diff --git a/mcs/class/corlib/System.Reflection/MonoEvent.cs b/mcs/class/corlib/System.Reflection/MonoEvent.cs
index 4a83f4b88ce..4f354d0a6f7 100644
--- a/mcs/class/corlib/System.Reflection/MonoEvent.cs
+++ b/mcs/class/corlib/System.Reflection/MonoEvent.cs
@@ -165,10 +165,8 @@ namespace System.Reflection {
ToString(), MemberTypes.Event);
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/MonoField.cs b/mcs/class/corlib/System.Reflection/MonoField.cs
index 7fe23e6b737..e374e517662 100644
--- a/mcs/class/corlib/System.Reflection/MonoField.cs
+++ b/mcs/class/corlib/System.Reflection/MonoField.cs
@@ -175,11 +175,9 @@ namespace System.Reflection {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public override extern object GetRawConstantValue ();
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
void CheckGeneric () {
if (DeclaringType.ContainsGenericParameters)
diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs
index 68dd9fb8873..928e1269b0f 100644
--- a/mcs/class/corlib/System.Reflection/MonoMethod.cs
+++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs
@@ -441,11 +441,9 @@ namespace System.Reflection {
return GetMethodBody (mhandle);
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
}
[Serializable()]
@@ -631,10 +629,8 @@ namespace System.Reflection {
MemberInfoSerializationHolder.Serialize ( info, Name, ReflectedType, ToString(), MemberTypes.Constructor);
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/MonoModule.cs b/mcs/class/corlib/System.Reflection/MonoModule.cs
index f5498565260..19c756a0d65 100644
--- a/mcs/class/corlib/System.Reflection/MonoModule.cs
+++ b/mcs/class/corlib/System.Reflection/MonoModule.cs
@@ -38,28 +38,20 @@ using System.Security.Permissions;
namespace System.Reflection {
-#if NET_4_0
[ComVisible (true)]
[ComDefaultInterfaceAttribute (typeof (_Module))]
[Serializable]
[ClassInterface(ClassInterfaceType.None)]
class MonoModule : Module {
-#else
- public partial class Module {
-#endif
public
-#if NET_4_0
override
-#endif
Assembly Assembly {
get { return assembly; }
}
public
-#if NET_4_0
override
-#endif
// Note: we do not ask for PathDiscovery because no path is returned here.
// However MS Fx requires it (see FDBK23572 for details).
string Name {
@@ -67,17 +59,13 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
string ScopeName {
get { return scopename; }
}
public
-#if NET_4_0
override
-#endif
int MDStreamVersion {
get {
if (_impl == IntPtr.Zero)
@@ -87,20 +75,14 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
Guid ModuleVersionId {
get {
return GetModuleVersionId ();
}
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
string FullyQualifiedName {
get {
#if !NET_2_1
@@ -113,19 +95,13 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
bool IsResource()
{
return is_resource;
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
Type[] FindTypes(TypeFilter filter, object filterCriteria)
{
var filtered = new List<Type> ();
@@ -136,31 +112,19 @@ namespace System.Reflection {
return filtered.ToArray ();
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
object[] GetCustomAttributes(bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes (this, inherit);
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
object[] GetCustomAttributes(Type attributeType, bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
FieldInfo GetField (string name, BindingFlags bindingAttr)
{
if (IsResource ())
@@ -170,11 +134,7 @@ namespace System.Reflection {
return (globalType != null) ? globalType.GetField (name, bindingAttr) : null;
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
FieldInfo[] GetFields (BindingFlags bindingFlags)
{
if (IsResource ())
@@ -184,20 +144,12 @@ namespace System.Reflection {
return (globalType != null) ? globalType.GetFields (bindingFlags) : new FieldInfo [0];
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
int MetadataToken {
get { return get_MetadataToken (this); }
}
protected
-#if NET_4_0
override
-#else
- virtual
-#endif
MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
if (IsResource ())
@@ -212,9 +164,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
MethodInfo[] GetMethods (BindingFlags bindingFlags) {
if (IsResource ())
return new MethodInfo [0];
@@ -223,20 +173,12 @@ namespace System.Reflection {
return (globalType != null) ? globalType.GetMethods (bindingFlags) : new MethodInfo [0];
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
void GetPEKind (out PortableExecutableKinds peKind, out ImageFileMachine machine) {
ModuleHandle.GetPEKind (out peKind, out machine);
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
Type GetType(string className, bool throwOnError, bool ignoreCase)
{
if (className == null)
@@ -246,20 +188,14 @@ namespace System.Reflection {
return assembly.InternalGetType (this, className, throwOnError, ignoreCase);
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
bool IsDefined (Type attributeType, bool inherit)
{
return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
}
public
-#if NET_4_0
override
-#endif
FieldInfo ResolveField (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
ResolveTokenError error;
@@ -271,9 +207,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
MemberInfo ResolveMember (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
ResolveTokenError error;
@@ -286,9 +220,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
MethodBase ResolveMethod (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
ResolveTokenError error;
@@ -300,9 +232,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
string ResolveString (int metadataToken) {
ResolveTokenError error;
@@ -314,9 +244,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
Type ResolveType (int metadataToken, Type [] genericTypeArguments, Type [] genericMethodArguments) {
ResolveTokenError error;
@@ -328,9 +256,7 @@ namespace System.Reflection {
}
public
-#if NET_4_0
override
-#endif
byte[] ResolveSignature (int metadataToken) {
ResolveTokenError error;
@@ -344,9 +270,7 @@ namespace System.Reflection {
#if !NET_2_1
public
-#if NET_4_0
override
-#endif
X509Certificate GetSignerCertificate ()
{
try {
@@ -358,20 +282,14 @@ namespace System.Reflection {
}
#endif
-#if NET_4_0
public override
-#else
- public virtual
-#endif
Type[] GetTypes()
{
return InternalGetTypes ();
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
index ce4fdda324c..afa1a399abb 100644
--- a/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
@@ -38,23 +38,15 @@ using System.Text;
namespace System.Reflection
{
-#if NET_4_0
[ComVisible (true)]
[ComDefaultInterfaceAttribute (typeof (_ParameterInfo))]
[Serializable]
[ClassInterfaceAttribute (ClassInterfaceType.None)]
[StructLayout (LayoutKind.Sequential)]
class MonoParameterInfo : ParameterInfo {
-#else
- public partial class ParameterInfo {
-#endif
#if !FULL_AOT_RUNTIME
-#if NET_4_0
internal MonoParameterInfo (ParameterBuilder pb, Type type, MemberInfo member, int position) {
-#else
- internal ParameterInfo (ParameterBuilder pb, Type type, MemberInfo member, int position) {
-#endif
this.ClassImpl = type;
this.MemberImpl = member;
if (pb != null) {
@@ -70,11 +62,7 @@ namespace System.Reflection
#endif
/*FIXME this constructor looks very broken in the position parameter*/
-#if NET_4_0
internal MonoParameterInfo (ParameterInfo pinfo, Type type, MemberInfo member, int position) {
-#else
- internal ParameterInfo (ParameterInfo pinfo, Type type, MemberInfo member, int position) {
-#endif
this.ClassImpl = type;
this.MemberImpl = member;
if (pinfo != null) {
@@ -88,11 +76,7 @@ namespace System.Reflection
}
}
-#if NET_4_0
internal MonoParameterInfo (ParameterInfo pinfo, MemberInfo member) {
-#else
- internal ParameterInfo (ParameterInfo pinfo, MemberInfo member) {
-#endif
this.ClassImpl = pinfo.ParameterType;
this.MemberImpl = member;
this.NameImpl = pinfo.Name;
@@ -103,11 +87,7 @@ namespace System.Reflection
}
/* to build a ParameterInfo for the return type of a method */
-#if NET_4_0
internal MonoParameterInfo (Type type, MemberInfo member, MarshalAsAttribute marshalAs) {
-#else
- internal ParameterInfo (Type type, MemberInfo member, MarshalAsAttribute marshalAs) {
-#endif
this.ClassImpl = type;
this.MemberImpl = member;
this.NameImpl = "";
@@ -116,11 +96,7 @@ namespace System.Reflection
this.marshalAs = marshalAs;
}
-#if NET_4_0
public override
-#else
- public virtual
-#endif
object DefaultValue {
get {
if (ClassImpl == typeof (Decimal)) {
@@ -138,11 +114,7 @@ namespace System.Reflection
}
}
-#if NET_4_0
public override
-#else
- public
-#endif
object RawDefaultValue {
get {
/*FIXME right now DefaultValue doesn't throw for reflection-only assemblies. Change this once the former is fixed.*/
@@ -151,9 +123,7 @@ namespace System.Reflection
}
public
-#if NET_4_0
override
-#endif
int MetadataToken {
get {
if (MemberImpl is PropertyInfo) {
@@ -172,22 +142,14 @@ namespace System.Reflection
public
-#if NET_4_0
override
-#else
- virtual
-#endif
object[] GetCustomAttributes (bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes (this, inherit);
}
public
-#if NET_4_0
override
-#else
- virtual
-#endif
object[] GetCustomAttributes (Type attributeType, bool inherit)
{
return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
@@ -195,28 +157,18 @@ namespace System.Reflection
public
-#if NET_4_0
override
-#else
- virtual
-#endif
bool IsDefined( Type attributeType, bool inherit) {
return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
public
-#if NET_4_0
override
-#else
- virtual
-#endif
Type[] GetOptionalCustomModifiers () {
Type[] types = GetTypeModifiers (true);
if (types == null)
@@ -225,11 +177,7 @@ namespace System.Reflection
}
public
-#if NET_4_0
override
-#else
- virtual
-#endif
Type[] GetRequiredCustomModifiers () {
Type[] types = GetTypeModifiers (false);
if (types == null)
diff --git a/mcs/class/corlib/System.Reflection/MonoProperty.cs b/mcs/class/corlib/System.Reflection/MonoProperty.cs
index 24dcf8b7470..162ee87d1e6 100644
--- a/mcs/class/corlib/System.Reflection/MonoProperty.cs
+++ b/mcs/class/corlib/System.Reflection/MonoProperty.cs
@@ -410,10 +410,8 @@ namespace System.Reflection {
ToString(), MemberTypes.Property);
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
index 466ae0f70b5..7627635ee95 100644
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -50,9 +50,7 @@ namespace System.Reflection
, _ParameterInfo
#endif
-#if NET_4_0
, IObjectReference
-#endif
{
protected Type ClassImpl;
protected object DefaultValueImpl;
@@ -227,7 +225,6 @@ namespace System.Reflection
}
#endif
-#if NET_4_0
public virtual object DefaultValue {
get { throw new NotImplementedException (); }
}
@@ -270,44 +267,27 @@ namespace System.Reflection
public virtual IList<CustomAttributeData> GetCustomAttributesData () {
throw new NotImplementedException ();
}
-#endif
#if !FULL_AOT_RUNTIME
internal static ParameterInfo New (ParameterBuilder pb, Type type, MemberInfo member, int position)
{
-#if NET_4_0
return new MonoParameterInfo (pb, type, member, position);
-#else
- return new ParameterInfo (pb, type, member, position);
-#endif
}
#endif
internal static ParameterInfo New (ParameterInfo pinfo, Type type, MemberInfo member, int position)
{
-#if NET_4_0
return new MonoParameterInfo (pinfo, type, member, position);
-#else
- return new ParameterInfo (pinfo, type, member, position);
-#endif
}
internal static ParameterInfo New (ParameterInfo pinfo, MemberInfo member)
{
-#if NET_4_0
return new MonoParameterInfo (pinfo, member);
-#else
- return new ParameterInfo (pinfo, member);
-#endif
}
internal static ParameterInfo New (Type type, MemberInfo member, MarshalAsAttribute marshalAs)
{
-#if NET_4_0
return new MonoParameterInfo (type, member, marshalAs);
-#else
- return new ParameterInfo (type, member, marshalAs);
-#endif
}
}
}
diff --git a/mcs/class/corlib/System.Reflection/PropertyInfo.cs b/mcs/class/corlib/System.Reflection/PropertyInfo.cs
index 6675d2e6c69..a2780089c78 100644
--- a/mcs/class/corlib/System.Reflection/PropertyInfo.cs
+++ b/mcs/class/corlib/System.Reflection/PropertyInfo.cs
@@ -147,7 +147,6 @@ namespace System.Reflection {
throw CreateNIE ();
}
-#if NET_4_0
public override bool Equals (object obj)
{
return obj == (object) this;
@@ -175,7 +174,6 @@ namespace System.Reflection {
return true;
return !left.Equals (right);
}
-#endif
#if !MOBILE
void _PropertyInfo.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
diff --git a/mcs/class/corlib/System.Resources/ResourceManager.cs b/mcs/class/corlib/System.Resources/ResourceManager.cs
index 961f8679819..3dff4e43921 100644
--- a/mcs/class/corlib/System.Resources/ResourceManager.cs
+++ b/mcs/class/corlib/System.Resources/ResourceManager.cs
@@ -53,9 +53,7 @@ namespace System.Resources
protected string BaseNameField;
protected Assembly MainAssembly;
// Maps cultures to ResourceSet objects
-#if NET_4_0
[Obsolete ("Use InternalGetResourceSet instead.")]
-#endif
protected Hashtable ResourceSets;
private bool ignoreCase;
diff --git a/mcs/class/corlib/System.Resources/ResourceReader.cs b/mcs/class/corlib/System.Resources/ResourceReader.cs
index ae5f679ff28..f73a8f8683d 100644
--- a/mcs/class/corlib/System.Resources/ResourceReader.cs
+++ b/mcs/class/corlib/System.Resources/ResourceReader.cs
@@ -477,11 +477,7 @@ namespace System.Resources
Dispose(true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose(true);
}
diff --git a/mcs/class/corlib/System.Resources/ResourceWriter.cs b/mcs/class/corlib/System.Resources/ResourceWriter.cs
index 024cab9d5b5..f54476d78a4 100644
--- a/mcs/class/corlib/System.Resources/ResourceWriter.cs
+++ b/mcs/class/corlib/System.Resources/ResourceWriter.cs
@@ -55,7 +55,6 @@ namespace System.Resources
}
}
-#if NET_4_0
class StreamWrapper
{
public readonly bool CloseAfterWrite;
@@ -67,7 +66,6 @@ namespace System.Resources
CloseAfterWrite = closeAfterWrite;
}
}
-#endif
SortedList resources = new SortedList (StringComparer.OrdinalIgnoreCase);
Stream stream;
@@ -91,7 +89,6 @@ namespace System.Resources
FileAccess.Write);
}
-#if NET_4_0
Func <Type, string> type_name_converter;
public Func<Type, string> TypeNameConverter {
@@ -102,7 +99,6 @@ namespace System.Resources
type_name_converter = value;
}
}
-#endif
public void AddResource (string name, byte[] value)
{
@@ -124,7 +120,6 @@ namespace System.Resources
throw new InvalidOperationException ("The resource writer has already been closed and cannot be edited");
if (resources[name] != null)
throw new ArgumentException ("Resource already present: " + name);
-#if NET_4_0
if (value is Stream) {
Stream stream = value as Stream;
if (!stream.CanSeek)
@@ -133,7 +128,6 @@ namespace System.Resources
if (!(value is MemoryStream)) // We already support MemoryStream
value = new StreamWrapper (stream, false);
}
-#endif
resources.Add(name, value);
}
@@ -150,7 +144,6 @@ namespace System.Resources
resources.Add(name, value);
}
-#if NET_4_0
public void AddResource (string name, Stream value)
{
// It seems .Net adds this overload just to make the api complete,
@@ -177,7 +170,6 @@ namespace System.Resources
resources.Add (name, new StreamWrapper (value, true));
}
-#endif
public void Close ()
{
@@ -239,7 +231,6 @@ namespace System.Resources
BinaryWriter resman = new BinaryWriter (resman_stream,
Encoding.UTF8);
-#if NET_4_0
string type_name = null;
if (type_name_converter != null)
type_name = type_name_converter (typeof (ResourceReader));
@@ -247,9 +238,6 @@ namespace System.Resources
type_name = typeof (ResourceReader).AssemblyQualifiedName;
resman.Write (type_name);
-#else
- resman.Write (typeof (ResourceReader).AssemblyQualifiedName);
-#endif
resman.Write (typeof (RuntimeResourceSet).FullName);
/* Only space for 32 bits of header len in the
@@ -326,10 +314,8 @@ namespace System.Resources
break;
if (type == typeof (MemoryStream))
break;
-#if NET_4_0
if (type == typeof (StreamWrapper))
break;
-#endif
if (type==typeof(byte[]))
break;
@@ -397,7 +383,6 @@ namespace System.Resources
byte [] data = ((MemoryStream) res_enum.Value).ToArray ();
res_data.Write ((uint) data.Length);
res_data.Write (data, 0, data.Length);
-#if NET_4_0
} else if (type == typeof (StreamWrapper)) {
StreamWrapper sw = (StreamWrapper) res_enum.Value;
sw.Stream.Position = 0;
@@ -409,7 +394,6 @@ namespace System.Resources
if (sw.CloseAfterWrite)
sw.Stream.Close ();
-#endif
} else {
/* non-intrinsic types are
* serialized
@@ -480,7 +464,6 @@ namespace System.Resources
resources = null;
}
-#if NET_4_0
byte [] ReadStream (Stream stream)
{
byte [] buff = new byte [stream.Length];
@@ -499,7 +482,6 @@ namespace System.Resources
return buff;
}
-#endif
// looks like it is (similar to) DJB hash
int GetHash (string name)
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
index b1af3ff9e62..436a3636925 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
@@ -221,4 +220,3 @@ namespace System.Runtime.CompilerServices
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
index 3f6230d0b8b..b87a7a5b05e 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
@@ -25,7 +25,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Runtime.InteropServices;
@@ -57,5 +56,4 @@ namespace System.Runtime.CompilerServices {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs b/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
index bdd8e8d9bf8..925de6dbfd4 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
@@ -88,7 +88,6 @@ namespace System.Runtime.CompilerServices
RunClassConstructor (type.Value);
}
-#if NET_4_0
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern bool SufficientExecutionStack ();
@@ -99,7 +98,6 @@ namespace System.Runtime.CompilerServices
return;
throw new InsufficientExecutionStackException ();
}
-#endif
[MonoTODO("Currently a no-op")]
public static void ExecuteCodeWithGuaranteedCleanup (TryCode code, CleanupCode backoutCode, Object userData)
diff --git a/mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs b/mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
index a8c01953172..a2a496cf187 100644
--- a/mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.CompilerServices
{
@@ -46,4 +45,3 @@ namespace System.Runtime.CompilerServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs b/mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs
index f287001e779..928c529ed30 100644
--- a/mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs
+++ b/mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.ExceptionServices
{
@@ -47,4 +46,3 @@ namespace System.Runtime.ExceptionServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs b/mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
index e57d58f58bd..adfe8f60912 100644
--- a/mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.ExceptionServices
{
@@ -39,4 +38,3 @@ namespace System.Runtime.ExceptionServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs b/mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs
index 6c84da5da5e..4f7ccec15e8 100644
--- a/mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs
+++ b/mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs
@@ -34,9 +34,7 @@ namespace System.Runtime.Hosting {
[Serializable]
[ComVisible (true)]
public sealed class ActivationArguments
-#if NET_4_0
: EvidenceBase
-#endif
{
private ActivationContext _context;
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs
index af66426e6f2..5f392b89793 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs
@@ -20,12 +20,10 @@ namespace System.Runtime.InteropServices
_value = value;
}
-#if NET_4_0
public BStrWrapper (object value)
{
_value = (string)value;
}
-#endif
public string WrappedObject { get { return _value; } }
}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs b/mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs
index e43d5aaaf87..d2808208368 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs
@@ -65,11 +65,7 @@ namespace System.Runtime.InteropServices
return Path.GetDirectoryName (typeof (int).Assembly.Location);
}
-#if NET_4_0
[SecuritySafeCritical]
-#else
- [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
-#endif
public static string GetSystemVersion ()
{
return "v" + Environment.Version.Major + "." + Environment.Version.Minor + "." + Environment.Version.Build;
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs b/mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs
index 5d6737272ff..00394976245 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.IO;
@@ -163,4 +162,3 @@ namespace System.Runtime.InteropServices
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs
index 96228240441..94e66d9aa38 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.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_0
using System;
@@ -56,4 +55,3 @@ namespace System.Runtime.InteropServices {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs
index e3a9f1a74c5..7c5d62aae85 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs
@@ -49,9 +49,7 @@ namespace System.Runtime.InteropServices
ImportAsX86 = 256,
ReflectionOnlyLoading = 4096,
SerializableValueClasses = 32,
-#if NET_4_0
NoDefineVersionResource = 8192
-#endif
}
}
#endif
diff --git a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs
index f3379290e4c..12e96c54bc0 100644
--- a/mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs
@@ -53,9 +53,7 @@ namespace System.Runtime.Remoting.Lifetime {
_sponsorshipTimeout = TimeSpan.FromMinutes (2);
}
-#if NET_4_0
[Obsolete("Call the static methods directly on this type instead", true)]
-#endif
public LifetimeServices ()
{
}
diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
index 804806536ff..4005fa8a135 100644
--- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
+++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
@@ -52,11 +52,7 @@ using System.Runtime.Serialization.Formatters;
namespace System.Runtime.Remoting
{
[System.Runtime.InteropServices.ComVisible (true)]
-#if NET_4_0
static
-#else
- sealed
-#endif
public class RemotingServices
{
// Holds the identities of the objects, using uri as index
@@ -95,9 +91,6 @@ namespace System.Runtime.Remoting
FieldSetterMethod = typeof(object).GetMethod ("FieldSetter", BindingFlags.NonPublic|BindingFlags.Instance);
FieldGetterMethod = typeof(object).GetMethod ("FieldGetter", BindingFlags.NonPublic|BindingFlags.Instance);
}
-#if !NET_4_0
- private RemotingServices () {}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static object InternalExecute (MethodBase method, Object obj,
diff --git a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
index 9d3c42bbd19..d88fd2975eb 100644
--- a/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
@@ -52,7 +52,6 @@ namespace System.Runtime.Serialization.Formatters.Binary
return true;
}
-#if NET_4_0
public void BindToName (string assemblyName, string typeName)
{
if (assemblyName != null)
@@ -60,7 +59,6 @@ namespace System.Runtime.Serialization.Formatters.Binary
if (typeName != null)
InstanceTypeName = typeName;
}
-#endif
public abstract bool RequiresTypes { get; }
}
@@ -229,9 +227,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
StreamingContext _context;
FormatterAssemblyStyle _assemblyFormat;
FormatterTypeStyle _typeFormat;
-#if NET_4_0
SerializationBinder _binder;
-#endif
byte[] arrayBuffer;
int ArrayBufferLength = 4096;
SerializationObjectManager _manager;
@@ -255,9 +251,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
_assemblyFormat = formatter.AssemblyFormat;
_typeFormat = formatter.TypeFormat;
_manager = new SerializationObjectManager (formatter.Context);
-#if NET_4_0
_binder = formatter.Binder;
-#endif
}
public void WriteObjectGraph (BinaryWriter writer, object obj, Header[] headers)
@@ -373,12 +367,10 @@ namespace System.Runtime.Serialization.Formatters.Binary
private void GetObjectData (object obj, out TypeMetadata metadata, out object data)
{
Type instanceType = obj.GetType();
-#if NET_4_0
string binderAssemblyName = null;
string binderTypeName = null;
if (_binder != null)
_binder.BindToName (instanceType, out binderAssemblyName, out binderTypeName);
-#endif
// Check if the formatter has a surrogate selector, if it does,
// check if the surrogate selector handles objects of the given type.
@@ -391,10 +383,8 @@ namespace System.Runtime.Serialization.Formatters.Binary
SerializationInfo info = new SerializationInfo (instanceType, new FormatterConverter ());
surrogate.GetObjectData (obj, info, _context);
metadata = new SerializableTypeMetadata (instanceType, info);
-#if NET_4_0
if (_binder != null)
metadata.BindToName (binderAssemblyName, binderTypeName);
-#endif
data = info;
return;
@@ -414,10 +404,8 @@ namespace System.Runtime.Serialization.Formatters.Binary
SerializationInfo info = new SerializationInfo (instanceType, new FormatterConverter ());
ser.GetObjectData (info, _context);
metadata = new SerializableTypeMetadata (instanceType, info);
-#if NET_4_0
if (_binder != null)
metadata.BindToName (binderAssemblyName, binderTypeName);
-#endif
data = info;
}
@@ -429,10 +417,8 @@ namespace System.Runtime.Serialization.Formatters.Binary
// Don't cache metadata info when the Context property is not null sice
// we can't control the number of possible contexts in this case
metadata = new MemberTypeMetadata (instanceType, _context);
-#if NET_4_0
if (_binder != null)
metadata.BindToName (binderAssemblyName, binderTypeName);
-#endif
return;
}
@@ -456,10 +442,8 @@ namespace System.Runtime.Serialization.Formatters.Binary
if (metadata == null) {
metadata = CreateMemberTypeMetadata (instanceType);
-#if NET_4_0
if (_binder != null)
metadata.BindToName (binderAssemblyName, binderTypeName);
-#endif
}
typesTable [instanceType] = metadata;
diff --git a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
index f8171915a41..4e9338b2f59 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
@@ -215,7 +215,6 @@ namespace System.Runtime.Serialization
return GetUninitializedObject (type);
}
-#if NET_4_0
// This method was introduced in .Net due to a bug serializing objects with circular references
// which we don't appear to have, so we just return the same object.
// See http://support.microsoft.com/kb/927495/en-us/ in case of doubt.
@@ -224,6 +223,5 @@ namespace System.Runtime.Serialization
{
return innerSurrogate;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs b/mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs
index 998d03d593d..d5e636fe40d 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.Serialization {
@@ -35,4 +34,3 @@ namespace System.Runtime.Serialization {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs b/mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs
index 06344ee6a7f..79d6679abe0 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.Serialization {
@@ -49,4 +48,3 @@ namespace System.Runtime.Serialization {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs b/mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs
index f91c311ea33..a047d81a597 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs
@@ -43,12 +43,10 @@ namespace System.Runtime.Serialization
public abstract Type BindToType (string assemblyName, string typeName);
-#if NET_4_0
public virtual void BindToName (Type serializedType, out string assemblyName, out string typeName)
{
assemblyName = null;
typeName = null;
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs b/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
index d5125d3ddad..0437329c1f4 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
@@ -46,11 +46,9 @@ namespace System.Runtime.Serialization
string assemblyName; // the assembly being serialized
string fullTypeName; // the type being serialized.
-#if NET_4_0
Type objectType;
bool isAssemblyNameSetExplicit;
bool isFullTypeNameSetExplicit;
-#endif
IFormatterConverter converter;
@@ -60,9 +58,7 @@ namespace System.Runtime.Serialization
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
converter = new FormatterConverter ();
-#if NET_4_0
objectType = type;
-#endif
}
/* used by the runtime */
@@ -73,9 +69,7 @@ namespace System.Runtime.Serialization
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
converter = new FormatterConverter ();
-#if NET_4_0
objectType = type;
-#endif
for (int i = 0; i < len; i++) {
serialized.Add (data [i].Name, data [i]);
@@ -96,9 +90,7 @@ namespace System.Runtime.Serialization
this.converter = converter;
assemblyName = type.Assembly.FullName;
fullTypeName = type.FullName;
-#if NET_4_0
objectType = type;
-#endif
}
// Properties
@@ -110,9 +102,7 @@ namespace System.Runtime.Serialization
if (value == null)
throw new ArgumentNullException ("Argument is null.");
assemblyName = value;
-#if NET_4_0
isAssemblyNameSetExplicit = true;
-#endif
}
}
@@ -124,9 +114,7 @@ namespace System.Runtime.Serialization
if ( value == null)
throw new ArgumentNullException ("Argument is null.");
fullTypeName = value;
-#if NET_4_0
isFullTypeNameSetExplicit = true;
-#endif
}
}
@@ -135,7 +123,6 @@ namespace System.Runtime.Serialization
get { return serialized.Count; }
}
-#if NET_4_0
public bool IsAssemblyNameSetExplicit {
get {
return isAssemblyNameSetExplicit;
@@ -153,7 +140,6 @@ namespace System.Runtime.Serialization
return objectType;
}
}
-#endif
// Methods
public void AddValue (string name, object value, Type type)
@@ -201,11 +187,9 @@ namespace System.Runtime.Serialization
fullTypeName = type.FullName;
assemblyName = type.Assembly.FullName;
-#if NET_4_0
objectType = type;
isAssemblyNameSetExplicit = false;
isFullTypeNameSetExplicit = false;
-#endif
}
public SerializationInfoEnumerator GetEnumerator ()
diff --git a/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs b/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
index 557c6f4bdfd..d0c5f6227f1 100644
--- a/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.Versioning
{
@@ -50,4 +49,3 @@ namespace System.Runtime.Versioning
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs b/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs
index df843aeff87..70c0bbb037e 100644
--- a/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Runtime.Versioning
{
@@ -40,4 +39,3 @@ namespace System.Runtime.Versioning
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs b/mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs
index e0d906ca46c..a8f8c8f53f4 100644
--- a/mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs
@@ -27,7 +27,6 @@
//
using System;
-#if NET_4_0
namespace System.Runtime.Versioning
{
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
@@ -50,4 +49,3 @@ namespace System.Runtime.Versioning
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.cs b/mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.cs
index d8f0db17403..6ee17559d9c 100644
--- a/mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.cs
+++ b/mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.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_0
using System;
namespace System.Runtime
@@ -44,4 +43,3 @@ namespace System.Runtime
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs b/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs
index cdf75e3b00f..f0458f87458 100644
--- a/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs
+++ b/mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs
@@ -29,7 +29,6 @@
using System;
using System.Runtime.InteropServices;
-#if NET_4_0
namespace System.Runtime {
@@ -54,5 +53,4 @@ namespace System.Runtime {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs b/mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs
index 9550f8b782d..c4f83a7345e 100644
--- a/mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs
@@ -21,7 +21,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_0
using System;
using System.Security.Principal;
@@ -66,5 +65,4 @@ namespace System.Security.AccessControl
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs b/mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs
index 4d6c71c0dec..d621d725a1d 100644
--- a/mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs
@@ -21,7 +21,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_0
using System;
using System.Security.Principal;
@@ -66,5 +65,4 @@ namespace System.Security.AccessControl
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
index a875b7864ae..038fc71b8ee 100644
--- a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
@@ -33,9 +33,7 @@ using System.Collections.Generic;
using System.Security.Principal;
using System.Runtime.InteropServices;
using System.Threading;
-#if NET_4_0
using System.Runtime.ExceptionServices;
-#endif
namespace System.Security.AccessControl
{
@@ -352,9 +350,7 @@ namespace System.Security.AccessControl
}
[MonoTODO]
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
protected virtual void Persist (bool enableOwnershipPrivilege, string name, AccessControlSections includeSections)
{
throw new NotImplementedException ();
diff --git a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs
index 8d930093fde..4bed60fc3b9 100644
--- a/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs
+++ b/mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Runtime.InteropServices;
using System.Security.Principal;
@@ -189,5 +188,4 @@ namespace System.Security.AccessControl
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
index 8ca0307c4dc..f1c27f3309d 100644
--- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
+++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
@@ -376,11 +376,9 @@ namespace System.Security.Cryptography.X509Certificates {
return sb.ToString ();
}
-#if NET_4_0
protected static string FormatDate (DateTime date)
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
index 47ce386ebd8..5f1591d4854 100644
--- a/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
@@ -65,11 +65,7 @@ namespace System.Security.Cryptography {
get;
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
@@ -80,13 +76,9 @@ namespace System.Security.Cryptography {
Dispose (false);
}
-#if NET_4_0
protected virtual void Dispose (bool disposing)
{
}
-#else
- protected abstract void Dispose (bool disposing);
-#endif
public abstract void FromXmlString (string xmlString);
public abstract string ToXmlString (bool includePrivateParameters);
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs
index 777017de589..e359b1ab196 100644
--- a/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs
@@ -67,11 +67,7 @@ namespace System.Security.Cryptography {
get { return 0; }
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
index fb04371d255..74e4d73a1f7 100644
--- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
@@ -222,7 +222,6 @@ public partial class CryptoConfig {
// new (2.0) X509 Chain
private const string nameX509Chain = "X509Chain";
private const string defaultX509Chain = defaultNamespace + "X509Certificates.X509Chain, " + Consts.AssemblySystem;
-#if NET_4_0
// AES
const string system_core_assembly = ", System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
const string nameAES_1 = "AES";
@@ -273,7 +272,6 @@ public partial class CryptoConfig {
// SHA512 provider
const string nameSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider";
const string defaultSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider" + system_core_assembly;
-#endif
static CryptoConfig ()
{
// lock(this) is bad
@@ -393,7 +391,6 @@ public partial class CryptoConfig {
unresolved_algorithms.Add (oidX509EnhancedKeyUsage, nameX509EnhancedKeyUsage);
// note: the default X.509Chain can also be created this way
unresolved_algorithms.Add (nameX509Chain, defaultX509Chain);
-#if NET_4_0
unresolved_algorithms.Add (nameAES_1, defaultAES_1);
unresolved_algorithms.Add (nameAES_2, defaultAES_1);
unresolved_algorithms.Add (nameAESManaged_1, defaultAESManaged);
@@ -415,7 +412,6 @@ public partial class CryptoConfig {
unresolved_algorithms.Add (nameSHA384Provider, defaultSHA384Provider);
unresolved_algorithms.Add (nameSHA512Cng, defaultSHA512Cng);
unresolved_algorithms.Add (nameSHA512Provider, defaultSHA512Provider);
-#endif
Dictionary<string,string> oid = new Dictionary<string, string> (StringComparer.OrdinalIgnoreCase);
// comments here are to match with MS implementation (but not with doc)
@@ -531,7 +527,6 @@ public partial class CryptoConfig {
return result;
}
-#if NET_4_0
[MonoLimitation ("nothing is FIPS certified so it never make sense to restrict to this (empty) subset")]
public static bool AllowOnlyFipsAlgorithms {
get { return false; }
@@ -564,7 +559,6 @@ public partial class CryptoConfig {
oids [oid] = name;
}
}
-#endif
class CryptoHandler: SmallXmlParser.IContentHandler {
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
index 0a57ad272e5..5b79db673f3 100644
--- a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
@@ -357,11 +357,9 @@ namespace System.Security.Cryptography {
}
}
-#if NET_4_0
public bool HasFlushedFinalBlock {
get { return _flushedFinalBlock; }
}
-#endif
#if NET_4_5
public override Task FlushAsync (CancellationToken cancellationToken)
diff --git a/mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs b/mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs
index 220ad2a8f22..bb40c751b45 100644
--- a/mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs
@@ -43,9 +43,7 @@ namespace System.Security.Cryptography {
UseArchivableKey = 16,
UseNonExportableKey = 4,
UseUserProtectedKey = 32,
-#if NET_4_0
CreateEphemeralKey = 128
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs
index 2d782fba475..5c986fe6d16 100644
--- a/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs
@@ -31,11 +31,7 @@ using System.Runtime.InteropServices;
namespace System.Security.Cryptography {
[ComVisible (true)]
-#if NET_4_0
public abstract class DeriveBytes : IDisposable {
-#else
- public abstract class DeriveBytes {
-#endif
protected DeriveBytes ()
{
}
@@ -44,7 +40,6 @@ namespace System.Security.Cryptography {
public abstract void Reset ();
-#if NET_4_0
private bool m_disposed;
public void Dispose ()
@@ -61,6 +56,5 @@ namespace System.Security.Cryptography {
m_disposed = true;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs b/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs
index bf4150c57d1..b23967ea8a4 100644
--- a/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs
@@ -88,11 +88,7 @@ namespace System.Security.Cryptography {
Dispose (true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
diff --git a/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs
index 07074f8aef3..e8404f23021 100644
--- a/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs
@@ -157,11 +157,7 @@ namespace System.Security.Cryptography {
get { return 1; }
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
diff --git a/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
index 80a1dbeead1..57d80eafba0 100644
--- a/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
@@ -110,7 +110,6 @@ public class PasswordDeriveBytes : DeriveBytes {
}
}
-#if NET_4_0
protected override void Dispose (bool disposing)
{
// zeroize buffer
@@ -125,7 +124,6 @@ public class PasswordDeriveBytes : DeriveBytes {
}
base.Dispose (disposing);
}
-#endif
private void Prepare (string strPassword, byte[] rgbSalt, string strHashName, int iterations)
{
diff --git a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
index f70ac329846..29e40efbadf 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
@@ -146,11 +146,9 @@ namespace System.Security.Cryptography {
}
}
-#if NET_4_0
protected override void Dispose (bool disposing)
{
base.Dispose (disposing);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
index d367997770d..d66e2f93a24 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
@@ -35,9 +35,7 @@ namespace System.Security.Cryptography {
[ComVisible (true)]
#endif
public abstract class RandomNumberGenerator
-#if NET_4_0
: IDisposable
-#endif
{
protected RandomNumberGenerator ()
@@ -71,7 +69,6 @@ namespace System.Security.Cryptography {
#endif
-#if NET_4_0
public void Dispose ()
{
Dispose (true);
@@ -79,6 +76,5 @@ namespace System.Security.Cryptography {
protected virtual void Dispose (bool disposing)
{}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs b/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs
index bb92272029f..98e8dd30661 100644
--- a/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs
@@ -187,7 +187,6 @@ namespace System.Security.Cryptography {
_pos = 0;
_f = 0;
}
-#if NET_4_0
protected override void Dispose (bool disposing)
{
Array.Clear (_buffer, 0, _buffer.Length);
@@ -195,7 +194,6 @@ namespace System.Security.Cryptography {
_hmac.Clear ();
base.Dispose (disposing);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs b/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
index 6910f112aae..ed731f8d494 100644
--- a/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
@@ -77,11 +77,7 @@ namespace System.Security.Cryptography {
{
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
_st.Clear ();
}
diff --git a/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs b/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
index ba713e8c6e5..4c011664804 100644
--- a/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
@@ -53,11 +53,7 @@ namespace System.Security.Cryptography {
PaddingValue = PaddingMode.PKCS7;
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
diff --git a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
index b862ed03cc5..ddf4394b667 100644
--- a/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
@@ -145,11 +145,7 @@ namespace System.Security.Cryptography {
Dispose (true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
diff --git a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs
index 849a0865b55..68d85e81064 100644
--- a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs
+++ b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs
@@ -73,9 +73,7 @@ namespace System.Security.Permissions {
}
}
-#if NET_4_0
[Obsolete]
-#endif
public bool ReflectionEmit
{
get { return reflectionEmit; }
diff --git a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
index f2d65498c31..438c65e0944 100644
--- a/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
+++ b/mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
@@ -45,14 +45,10 @@ namespace System.Security.Permissions {
TypeInformation = 0x00000001,
MemberAccess = 0x00000002,
-#if NET_4_0
[Obsolete]
-#endif
ReflectionEmit = 0x4,
-#if NET_4_0
[Obsolete]
-#endif
AllFlags = TypeInformation | MemberAccess | ReflectionEmit,
[ComVisible (false)]
diff --git a/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs b/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs
index f45abac05ea..94d14df749a 100644
--- a/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs
+++ b/mcs/class/corlib/System.Security.Permissions/SecurityAction.cs
@@ -43,24 +43,16 @@ namespace System.Security.Permissions {
public enum SecurityAction {
Demand = 2,
Assert = 3,
-#if NET_4_0
[Obsolete ("This requests should not be used")]
-#endif
Deny = 4,
PermitOnly = 5,
LinkDemand = 6,
InheritanceDemand = 7,
-#if NET_4_0
[Obsolete ("This requests should not be used")]
-#endif
RequestMinimum = 8,
-#if NET_4_0
[Obsolete ("This requests should not be used")]
-#endif
RequestOptional = 9,
-#if NET_4_0
[Obsolete ("This requests should not be used")]
-#endif
RequestRefuse = 10,
}
}
diff --git a/mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs b/mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs
index 55a8e7f1d35..af447942b6d 100644
--- a/mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs
+++ b/mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs
@@ -40,9 +40,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class ApplicationDirectory :
-#if NET_4_0
EvidenceBase,
-#endif
IBuiltInEvidence {
private string directory;
diff --git a/mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs b/mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs
index a73f5daabc1..702cd0bcdc9 100644
--- a/mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs
+++ b/mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs
@@ -40,9 +40,7 @@ namespace System.Security.Policy
[Serializable]
[ComVisible (true)]
public sealed class ApplicationTrust :
-#if NET_4_0
EvidenceBase,
-#endif
ISecurityEncodable {
private ApplicationIdentity _appid;
@@ -65,11 +63,7 @@ namespace System.Security.Policy
_appid = applicationIdentity;
}
-#if NET_4_0
public
-#else
- internal
-#endif
ApplicationTrust (PermissionSet defaultGrantSet, IEnumerable<StrongName> fullTrustAssemblies)
{
if (defaultGrantSet == null)
@@ -205,13 +199,11 @@ namespace System.Security.Policy
return se;
}
-#if NET_4_0
public IList<StrongName> FullTrustAssemblies {
get {
return fullTrustAssemblies;
}
}
-#endif
// internal stuff
diff --git a/mcs/class/corlib/System.Security.Policy/Evidence.cs b/mcs/class/corlib/System.Security.Policy/Evidence.cs
index 366593159ca..db004052e61 100644
--- a/mcs/class/corlib/System.Security.Policy/Evidence.cs
+++ b/mcs/class/corlib/System.Security.Policy/Evidence.cs
@@ -61,9 +61,7 @@ namespace System.Security.Policy {
Merge (evidence);
}
-#if NET_4_0
[Obsolete]
-#endif
public Evidence (object[] hostEvidence, object[] assemblyEvidence)
{
if (null != hostEvidence)
@@ -76,9 +74,7 @@ namespace System.Security.Policy {
// Public Properties
//
-#if NET_4_0
[Obsolete]
-#endif
public int Count {
get {
int count = 0;
@@ -130,17 +126,13 @@ namespace System.Security.Policy {
// Public Methods
//
-#if NET_4_0
[Obsolete]
-#endif
public void AddAssembly (object id)
{
AssemblyEvidenceList.Add (id);
}
-#if NET_4_0
[Obsolete]
-#endif
public void AddHost (object id)
{
if (_locked && SecurityManager.SecurityEnabled) {
@@ -158,9 +150,7 @@ namespace System.Security.Policy {
assemblyEvidenceList.Clear ();
}
-#if NET_4_0
[Obsolete]
-#endif
public void CopyTo (Array array, int index)
{
int hc = 0;
@@ -173,51 +163,8 @@ namespace System.Security.Policy {
assemblyEvidenceList.CopyTo (array, index + hc);
}
-#if !NET_4_0
- [ComVisible (false)]
- public override bool Equals (object obj)
- {
- if (obj == null)
- return false;
- Evidence e = (obj as Evidence);
- if (e == null)
- return false;
-
- if (HostEvidenceList.Count != e.HostEvidenceList.Count)
- return false;
- if (AssemblyEvidenceList.Count != e.AssemblyEvidenceList.Count)
- return false;
-
- for (int i = 0; i < hostEvidenceList.Count; i++) {
- bool found = false;
- for (int j = 0; j < e.hostEvidenceList.Count; i++) {
- if (hostEvidenceList [i].Equals (e.hostEvidenceList [j])) {
- found = true;
- break;
- }
- }
- if (!found)
- return false;
- }
- for (int i = 0; i < assemblyEvidenceList.Count; i++) {
- bool found = false;
- for (int j = 0; j < e.assemblyEvidenceList.Count; i++) {
- if (assemblyEvidenceList [i].Equals (e.assemblyEvidenceList [j])) {
- found = true;
- break;
- }
- }
- if (!found)
- return false;
- }
-
- return true;
- }
-#endif
-#if NET_4_0
[Obsolete]
-#endif
public IEnumerator GetEnumerator ()
{
IEnumerator he = null;
@@ -234,23 +181,6 @@ namespace System.Security.Policy {
return AssemblyEvidenceList.GetEnumerator ();
}
-#if !NET_4_0
- [ComVisible (false)]
- public override int GetHashCode ()
- {
- int _hashCode = 0;
- if (hostEvidenceList != null) {
- for (int i = 0; i < hostEvidenceList.Count; i++)
- _hashCode ^= hostEvidenceList [i].GetHashCode ();
- }
- if (assemblyEvidenceList != null) {
- for (int i = 0; i < assemblyEvidenceList.Count; i++)
- _hashCode ^= assemblyEvidenceList [i].GetHashCode ();
- }
-
- return _hashCode;
- }
-#endif
public IEnumerator GetHostEnumerator ()
{
return HostEvidenceList.GetEnumerator ();
diff --git a/mcs/class/corlib/System.Security.Policy/EvidenceBase.cs b/mcs/class/corlib/System.Security.Policy/EvidenceBase.cs
index f4251697aa4..95e10031946 100644
--- a/mcs/class/corlib/System.Security.Policy/EvidenceBase.cs
+++ b/mcs/class/corlib/System.Security.Policy/EvidenceBase.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System.Security.Permissions;
@@ -44,4 +43,3 @@ namespace System.Security.Policy
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security.Policy/Gac.cs b/mcs/class/corlib/System.Security.Policy/Gac.cs
index d5cae7f5aa9..47c4478101d 100644
--- a/mcs/class/corlib/System.Security.Policy/Gac.cs
+++ b/mcs/class/corlib/System.Security.Policy/Gac.cs
@@ -35,9 +35,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class GacInstalled :
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
public GacInstalled ()
diff --git a/mcs/class/corlib/System.Security.Policy/Hash.cs b/mcs/class/corlib/System.Security.Policy/Hash.cs
index c0923df1472..df720ea81d6 100644
--- a/mcs/class/corlib/System.Security.Policy/Hash.cs
+++ b/mcs/class/corlib/System.Security.Policy/Hash.cs
@@ -42,9 +42,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class Hash :
-#if NET_4_0
EvidenceBase,
-#endif
ISerializable, IBuiltInEvidence {
private Assembly assembly;
diff --git a/mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs b/mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs
index 484bfd394b9..2b8e80792f7 100644
--- a/mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs
+++ b/mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs
@@ -35,9 +35,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class PermissionRequestEvidence :
-#if NET_4_0
EvidenceBase,
-#endif
IBuiltInEvidence {
private PermissionSet requested, optional, denied;
diff --git a/mcs/class/corlib/System.Security.Policy/Publisher.cs b/mcs/class/corlib/System.Security.Policy/Publisher.cs
index d473e98d59a..827505d4558 100644
--- a/mcs/class/corlib/System.Security.Policy/Publisher.cs
+++ b/mcs/class/corlib/System.Security.Policy/Publisher.cs
@@ -36,9 +36,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class Publisher :
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
private X509Certificate m_cert;
diff --git a/mcs/class/corlib/System.Security.Policy/Site.cs b/mcs/class/corlib/System.Security.Policy/Site.cs
index 6cef12ef808..0c79eb82279 100644
--- a/mcs/class/corlib/System.Security.Policy/Site.cs
+++ b/mcs/class/corlib/System.Security.Policy/Site.cs
@@ -40,9 +40,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class Site:
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
internal string origin_site;
diff --git a/mcs/class/corlib/System.Security.Policy/StrongName.cs b/mcs/class/corlib/System.Security.Policy/StrongName.cs
index 940e5c3f04d..977eac06868 100644
--- a/mcs/class/corlib/System.Security.Policy/StrongName.cs
+++ b/mcs/class/corlib/System.Security.Policy/StrongName.cs
@@ -35,9 +35,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class StrongName :
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
private StrongNamePublicKeyBlob publickey;
diff --git a/mcs/class/corlib/System.Security.Policy/Url.cs b/mcs/class/corlib/System.Security.Policy/Url.cs
index 2f421b635cd..fe17e55568f 100644
--- a/mcs/class/corlib/System.Security.Policy/Url.cs
+++ b/mcs/class/corlib/System.Security.Policy/Url.cs
@@ -40,9 +40,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class Url :
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
private string origin_url;
diff --git a/mcs/class/corlib/System.Security.Policy/Zone.cs b/mcs/class/corlib/System.Security.Policy/Zone.cs
index 33d406c0178..b65d55460d4 100644
--- a/mcs/class/corlib/System.Security.Policy/Zone.cs
+++ b/mcs/class/corlib/System.Security.Policy/Zone.cs
@@ -40,9 +40,7 @@ namespace System.Security.Policy {
[Serializable]
[ComVisible (true)]
public sealed class Zone :
-#if NET_4_0
EvidenceBase,
-#endif
IIdentityPermissionFactory, IBuiltInEvidence {
private SecurityZone zone;
diff --git a/mcs/class/corlib/System.Security/SecureString.cs b/mcs/class/corlib/System.Security/SecureString.cs
index 60ab898d281..765f61981df 100644
--- a/mcs/class/corlib/System.Security/SecureString.cs
+++ b/mcs/class/corlib/System.Security/SecureString.cs
@@ -33,9 +33,7 @@ using System.Runtime.InteropServices;
using System.Runtime.ConstrainedExecution;
using System.Security.Cryptography;
using System.Security.Permissions;
-#if NET_4_0
using System.Runtime.ExceptionServices;
-#endif
namespace System.Security {
@@ -91,9 +89,7 @@ namespace System.Security {
}
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void AppendChar (char c)
{
if (disposed)
@@ -150,9 +146,7 @@ namespace System.Security {
length = 0;
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void InsertAt (int index, char c)
{
if (disposed)
@@ -194,9 +188,7 @@ namespace System.Security {
read_only = true;
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void RemoveAt (int index)
{
if (disposed)
@@ -218,9 +210,7 @@ namespace System.Security {
}
}
-#if NET_4_0
[HandleProcessCorruptedStateExceptions]
-#endif
public void SetAt (int index, char c)
{
if (disposed)
diff --git a/mcs/class/corlib/System.Security/SecurityContext.cs b/mcs/class/corlib/System.Security/SecurityContext.cs
index 71f1f50ad1f..7d3f942fc8c 100644
--- a/mcs/class/corlib/System.Security/SecurityContext.cs
+++ b/mcs/class/corlib/System.Security/SecurityContext.cs
@@ -34,9 +34,7 @@ using System.Threading;
namespace System.Security {
public sealed class SecurityContext
-#if NET_4_0
: IDisposable
-#endif
{
private bool _capture;
private IntPtr _winid;
@@ -89,11 +87,9 @@ namespace System.Security {
return capture;
}
-#if NET_4_0
public void Dispose ()
{
}
-#endif
// internal stuff
diff --git a/mcs/class/corlib/System.Security/SecurityContextSource.cs b/mcs/class/corlib/System.Security/SecurityContextSource.cs
index d2b39e7c655..b3cc24bd1fd 100644
--- a/mcs/class/corlib/System.Security/SecurityContextSource.cs
+++ b/mcs/class/corlib/System.Security/SecurityContextSource.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Security {
@@ -36,4 +35,3 @@ namespace System.Security {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs b/mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs
index 41d816a2461..ed01b54abde 100644
--- a/mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs
+++ b/mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs
@@ -43,17 +43,10 @@ namespace System.Security {
#else
[MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
-#if NET_4_0
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method |
AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate,
AllowMultiple=false, Inherited=false)]
-#else
- [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct |
- AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event |
- AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate,
- AllowMultiple=false, Inherited=false)]
-#endif
public sealed class SecurityCriticalAttribute : Attribute {
private SecurityCriticalScope _scope;
@@ -78,9 +71,7 @@ namespace System.Security {
}
}
-#if NET_4_0
[Obsolete]
-#endif
public SecurityCriticalScope Scope {
get { return _scope; }
}
diff --git a/mcs/class/corlib/System.Security/SecurityCriticalScope.cs b/mcs/class/corlib/System.Security/SecurityCriticalScope.cs
index 3bdf3cfdda7..37be1619946 100644
--- a/mcs/class/corlib/System.Security/SecurityCriticalScope.cs
+++ b/mcs/class/corlib/System.Security/SecurityCriticalScope.cs
@@ -28,9 +28,7 @@
namespace System.Security {
-#if NET_4_0
[Obsolete]
-#endif
public enum SecurityCriticalScope {
Explicit,
Everything
diff --git a/mcs/class/corlib/System.Security/SecurityManager.cs b/mcs/class/corlib/System.Security/SecurityManager.cs
index 39320b1c4d7..d8a3e72dafb 100644
--- a/mcs/class/corlib/System.Security/SecurityManager.cs
+++ b/mcs/class/corlib/System.Security/SecurityManager.cs
@@ -70,9 +70,7 @@ namespace System.Security {
// properties
-#if NET_4_0
[Obsolete]
-#endif
extern public static bool CheckExecutionRights {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
get;
@@ -117,9 +115,7 @@ namespace System.Security {
origin = new ArrayList ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static bool IsGranted (IPermission perm)
{
if (perm == null)
@@ -220,9 +216,7 @@ namespace System.Security {
return null;
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromFile (string path, PolicyLevelType type)
{
@@ -240,9 +234,7 @@ namespace System.Security {
return pl;
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
{
@@ -260,18 +252,14 @@ namespace System.Security {
return pl;
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static IEnumerator PolicyHierarchy ()
{
return Hierarchy;
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolvePolicy (Evidence evidence)
{
// no evidence, no permission
@@ -293,9 +281,7 @@ namespace System.Security {
return ps;
}
-#if NET_4_0
[Obsolete]
-#endif
[MonoTODO ("(2.0) more tests are needed")]
public static PermissionSet ResolvePolicy (Evidence[] evidences)
{
@@ -312,9 +298,7 @@ namespace System.Security {
return ps;
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolveSystemPolicy (Evidence evidence)
{
// no evidence, no permission
@@ -338,9 +322,7 @@ namespace System.Security {
static private SecurityPermission _execution = new SecurityPermission (SecurityPermissionFlag.Execution);
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolvePolicy (Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied)
{
PermissionSet resolved = ResolvePolicy (evidence);
@@ -375,9 +357,7 @@ namespace System.Security {
return resolved;
}
-#if NET_4_0
[Obsolete]
-#endif
public static IEnumerator ResolvePolicyGroups (Evidence evidence)
{
if (evidence == null)
@@ -394,9 +374,7 @@ namespace System.Security {
return al.GetEnumerator ();
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicy ()
{
@@ -407,9 +385,7 @@ namespace System.Security {
}
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicyLevel (PolicyLevel level)
{
@@ -787,7 +763,6 @@ namespace System.Security {
}
#pragma warning restore 169
-#if NET_4_0
public static PermissionSet GetStandardSandbox (Evidence evidence)
{
if (evidence == null)
@@ -800,7 +775,6 @@ namespace System.Security {
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security/SecurityManager_mobile.cs b/mcs/class/corlib/System.Security/SecurityManager_mobile.cs
index b808dc55ac4..a9f6b3f2043 100644
--- a/mcs/class/corlib/System.Security/SecurityManager_mobile.cs
+++ b/mcs/class/corlib/System.Security/SecurityManager_mobile.cs
@@ -55,9 +55,7 @@ namespace System.Security {
// properties
-#if NET_4_0
[Obsolete]
-#endif
public static bool CheckExecutionRights {
get { return false; }
set { ; }
@@ -91,93 +89,71 @@ namespace System.Security {
origin = new ArrayList ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static bool IsGranted (IPermission perm)
{
return true;
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromFile (string path, PolicyLevelType type)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static IEnumerator PolicyHierarchy ()
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolvePolicy (Evidence evidence)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolvePolicy (Evidence[] evidences)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolveSystemPolicy (Evidence evidence)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static PermissionSet ResolvePolicy (Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
public static IEnumerator ResolvePolicyGroups (Evidence evidence)
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicy ()
{
throw new NotSupportedException ();
}
-#if NET_4_0
[Obsolete]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicyLevel (PolicyLevel level)
{
@@ -231,7 +207,6 @@ namespace System.Security {
throw new NotSupportedException ();
}
-#if NET_4_0
public static PermissionSet GetStandardSandbox (Evidence evidence)
{
if (evidence == null)
@@ -244,7 +219,6 @@ namespace System.Security {
{
throw new NotImplementedException ();
}
-#endif
}
}
diff --git a/mcs/class/corlib/System.Security/SecurityRuleSet.cs b/mcs/class/corlib/System.Security/SecurityRuleSet.cs
index c74d00552ff..f67e35c0173 100644
--- a/mcs/class/corlib/System.Security/SecurityRuleSet.cs
+++ b/mcs/class/corlib/System.Security/SecurityRuleSet.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Security {
@@ -38,4 +37,3 @@ namespace System.Security {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Security/SecurityRulesAttribute.cs b/mcs/class/corlib/System.Security/SecurityRulesAttribute.cs
index d923d11dbd3..b6ed53fb918 100644
--- a/mcs/class/corlib/System.Security/SecurityRulesAttribute.cs
+++ b/mcs/class/corlib/System.Security/SecurityRulesAttribute.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Security {
@@ -44,4 +43,3 @@ namespace System.Security {
}
}
-#endif
diff --git a/mcs/class/corlib/System.Text/StringBuilder.cs b/mcs/class/corlib/System.Text/StringBuilder.cs
index 45f0a3419f3..dd18b62f5ba 100644
--- a/mcs/class/corlib/System.Text/StringBuilder.cs
+++ b/mcs/class/corlib/System.Text/StringBuilder.cs
@@ -505,13 +505,11 @@ namespace System.Text {
return this;
}
-#if NET_4_0
public StringBuilder Clear ()
{
Length = 0;
return this;
}
-#endif
[ComVisible (false)]
public StringBuilder AppendLine ()
diff --git a/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs b/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
index 7c471baf7c0..a972e9ee244 100644
--- a/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/CyclicDeque.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_0
using System;
using System.Collections.Generic;
@@ -216,4 +215,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.cs b/mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.cs
index 2e13164a512..51d1c2d28f2 100644
--- a/mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.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_0
using System;
using System.Collections.Generic;
@@ -48,4 +47,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs
index 9a9aadd06c6..68e209f9663 100644
--- a/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/IScheduler.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
using System.Collections.Generic;
@@ -37,4 +36,3 @@ namespace System.Threading.Tasks
void PulseAll ();
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Parallel.cs b/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
index f509feacd02..6b3d2638b75 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Parallel.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
@@ -746,4 +745,3 @@ namespace System.Threading.Tasks
#endregion
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs b/mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs
index b432ea5688c..73eef72f019 100644
--- a/mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.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_0
using System;
namespace System.Threading.Tasks
@@ -48,4 +47,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs b/mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs
index e5606d5f115..e0d309f1641 100644
--- a/mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -94,4 +93,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs b/mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs
index 6bc0b6bc1cb..42861efb917 100644
--- a/mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/ParallelOptions.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_0
using System;
using System.Threading;
@@ -58,4 +57,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/PopResult.cs b/mcs/class/corlib/System.Threading.Tasks/PopResult.cs
index 68bcf1f0a35..c8197b82d4a 100644
--- a/mcs/class/corlib/System.Threading.Tasks/PopResult.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/PopResult.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_0
using System;
using System.Collections.Generic;
@@ -46,4 +45,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs b/mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs
index c8a7b3319a5..4753936d768 100644
--- a/mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.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_0
using System;
using System.Threading;
@@ -87,4 +86,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.cs
index 18382055ba5..cea07339f9d 100644
--- a/mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.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_0
using System;
using System.Threading;
@@ -77,4 +76,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 7ca9a591a0c..fe1517a819c 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs
@@ -28,7 +28,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -1418,4 +1417,3 @@ namespace System.Threading.Tasks
#endregion
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
index 72a486f7a80..0f68ff499d9 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
using System.Threading;
@@ -502,4 +501,3 @@ namespace System.Threading.Tasks
public abstract void Invoke (Task owner, object state, Task context);
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs
index 1fc5d1a7a1c..30176924c0f 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Runtime.Serialization;
@@ -63,4 +62,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs
index 6746907e908..2830c87f3f5 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
using System;
using System.Threading;
@@ -77,4 +76,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs
index f0bc902310e..9df569342c2 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.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_0
using System;
using System.Collections.Generic;
@@ -128,4 +127,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs b/mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs
index 8277fc1b76c..d10135a133c 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
namespace System.Threading.Tasks
{
@@ -48,4 +47,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
index e33cb8fb3b1..c85be489819 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
@@ -27,7 +27,6 @@
//
//
-#if NET_4_0
using System.Collections.Generic;
@@ -398,4 +397,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 58fc82dc5c0..0b5a390e682 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
namespace System.Threading.Tasks
@@ -48,4 +47,3 @@ namespace System.Threading.Tasks
ExecuteSynchronously = 0x80000,
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs b/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
index e5105f6ac1c..47944f94349 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
@@ -27,7 +27,6 @@
//
//
-#if NET_4_0
namespace System.Threading.Tasks
{
@@ -44,4 +43,3 @@ namespace System.Threading.Tasks
#endif
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskDebuggerView.cs b/mcs/class/corlib/System.Threading.Tasks/TaskDebuggerView.cs
index 6f424b93832..943f97a9c55 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskDebuggerView.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskDebuggerView.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Diagnostics;
@@ -83,4 +82,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs b/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
index c20fbdafd38..f3cc9c14ae7 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
@@ -28,7 +28,6 @@
//
//
-#if NET_4_0
using System;
using System.Collections.Concurrent;
@@ -88,4 +87,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs b/mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs
index 8654a5f037e..ed0f2a02fc8 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs
@@ -28,7 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System.Threading.Tasks
{
@@ -94,4 +93,3 @@ namespace System.Threading.Tasks
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
index a558c622c5e..183d8c2572c 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskFactory.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_0
namespace System.Threading.Tasks
{
@@ -659,4 +658,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs b/mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs
index e8ce5276346..36b5d9fdf7b 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.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_0
namespace System.Threading.Tasks
{
@@ -479,4 +478,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs
index a4031c0a50d..9096f717f69 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskScheduler.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_0
using System.Collections.Generic;
using System.Diagnostics;
@@ -164,4 +163,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs b/mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs
index 9d94b223d6a..4d0bd75ca46 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
using System.Runtime.Serialization;
@@ -61,4 +60,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs b/mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs
index 853afad3736..fda07a845cd 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TaskStatus.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_0
using System;
namespace System.Threading.Tasks
@@ -41,4 +40,3 @@ namespace System.Threading.Tasks
Faulted
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task_T.cs b/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
index d336909db9d..ac7d740e9ce 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task_T.cs
@@ -27,7 +27,6 @@
//
//
-#if NET_4_0
using System.Runtime.CompilerServices;
@@ -338,4 +337,3 @@ namespace System.Threading.Tasks
#endif
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
index a584a174c8d..b3995a0cc01 100644
--- a/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
@@ -29,7 +29,6 @@
//
//
-#if NET_4_0
using System.Collections.Generic;
@@ -79,4 +78,3 @@ namespace System.Threading.Tasks
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs b/mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs
index 2db34db8c83..5fd1ce05a55 100644
--- a/mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.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_0
using System;
namespace System.Threading.Tasks
@@ -58,5 +57,4 @@ namespace System.Threading.Tasks
}
}
-#endif
//
diff --git a/mcs/class/corlib/System.Threading/AsyncFlowControl.cs b/mcs/class/corlib/System.Threading/AsyncFlowControl.cs
index cdd93735955..43aee69d6f5 100644
--- a/mcs/class/corlib/System.Threading/AsyncFlowControl.cs
+++ b/mcs/class/corlib/System.Threading/AsyncFlowControl.cs
@@ -65,11 +65,7 @@ namespace System.Threading {
_t = null;
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
if (_t != null) {
Undo ();
diff --git a/mcs/class/corlib/System.Threading/CancellationToken.cs b/mcs/class/corlib/System.Threading/CancellationToken.cs
index 82c7094ef64..4336cac133b 100644
--- a/mcs/class/corlib/System.Threading/CancellationToken.cs
+++ b/mcs/class/corlib/System.Threading/CancellationToken.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_0
using System;
using System.Threading;
@@ -139,4 +138,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
index 54fe237c793..0d0e3fbfe90 100644
--- a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
+++ b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.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_0
using System;
namespace System.Threading
@@ -76,4 +75,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs b/mcs/class/corlib/System.Threading/CancellationTokenSource.cs
index a80524928da..5321a06ac0b 100644
--- a/mcs/class/corlib/System.Threading/CancellationTokenSource.cs
+++ b/mcs/class/corlib/System.Threading/CancellationTokenSource.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_0
using System.Collections.Generic;
using System.Collections.Concurrent;
@@ -319,4 +318,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/CompressedStack.cs b/mcs/class/corlib/System.Threading/CompressedStack.cs
index 9a41f26be27..e440ba068b7 100644
--- a/mcs/class/corlib/System.Threading/CompressedStack.cs
+++ b/mcs/class/corlib/System.Threading/CompressedStack.cs
@@ -76,12 +76,7 @@ namespace System.Threading {
// NOTE: This method doesn't show in the class library status page because
// it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
// But it's there!
-#if NET_4_0
[SecurityCritical]
-#else
- [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
- [StrongNameIdentityPermission (SecurityAction.LinkDemand, PublicKey="00000000000000000400000000000000")]
-#endif
static public CompressedStack GetCompressedStack ()
{
// Note: CompressedStack.GetCompressedStack doesn't return null
@@ -101,22 +96,14 @@ namespace System.Threading {
}
[MonoTODO ("incomplete")]
-#if NET_4_0
[SecurityCritical]
-#else
- [ReflectionPermission (SecurityAction.Demand, MemberAccess = true)]
-#endif
public void GetObjectData (SerializationInfo info, StreamingContext context)
{
if (info == null)
throw new ArgumentNullException ("info");
}
-#if NET_4_0
[SecurityCritical]
-#else
- [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
-#endif
static public void Run (CompressedStack compressedStack, ContextCallback callback, object state)
{
if (compressedStack == null)
diff --git a/mcs/class/corlib/System.Threading/CountdownEvent.cs b/mcs/class/corlib/System.Threading/CountdownEvent.cs
index ceffc45a523..489c1e2ad7c 100644
--- a/mcs/class/corlib/System.Threading/CountdownEvent.cs
+++ b/mcs/class/corlib/System.Threading/CountdownEvent.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
namespace System.Threading
{
@@ -208,4 +207,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/ExecutionContext.cs b/mcs/class/corlib/System.Threading/ExecutionContext.cs
index f312223e02e..d8336f28e33 100644
--- a/mcs/class/corlib/System.Threading/ExecutionContext.cs
+++ b/mcs/class/corlib/System.Threading/ExecutionContext.cs
@@ -39,9 +39,7 @@ using System.Collections.Generic;
namespace System.Threading {
[Serializable]
public sealed partial class ExecutionContext : ISerializable
-#if NET_4_0
, IDisposable
-#endif
{
internal struct Switcher
{
@@ -152,7 +150,6 @@ namespace System.Threading {
return new ExecutionContext (this);
}
-#if NET_4_0
public void Dispose ()
{
#if !MOBILE
@@ -160,7 +157,6 @@ namespace System.Threading {
_sc.Dispose ();
#endif
}
-#endif
[MonoTODO]
[ReflectionPermission (SecurityAction.Demand, MemberAccess = true)]
diff --git a/mcs/class/corlib/System.Threading/LazyInitializer.cs b/mcs/class/corlib/System.Threading/LazyInitializer.cs
index 4802aa3e45c..193aca5613b 100644
--- a/mcs/class/corlib/System.Threading/LazyInitializer.cs
+++ b/mcs/class/corlib/System.Threading/LazyInitializer.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_0
namespace System.Threading
{
@@ -86,4 +85,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs b/mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs
index e8213063200..6f58597a66d 100644
--- a/mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs
+++ b/mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -40,4 +39,3 @@ namespace System.Threading
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/LockRecursionException.cs b/mcs/class/corlib/System.Threading/LockRecursionException.cs
index f7a2bb8865f..8a4f4bb8d12 100644
--- a/mcs/class/corlib/System.Threading/LockRecursionException.cs
+++ b/mcs/class/corlib/System.Threading/LockRecursionException.cs
@@ -27,7 +27,6 @@
*/
-#if NET_4_0
using System;
using System.Runtime.Serialization;
@@ -63,4 +62,3 @@ namespace System.Threading
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs b/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
index a34370d460b..225c6065e90 100644
--- a/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
+++ b/mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
@@ -26,7 +26,6 @@
//
//
-#if NET_4_0
namespace System.Threading
{
@@ -268,4 +267,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/Monitor.cs b/mcs/class/corlib/System.Threading/Monitor.cs
index 8b2d4dca9cd..a227b683da4 100644
--- a/mcs/class/corlib/System.Threading/Monitor.cs
+++ b/mcs/class/corlib/System.Threading/Monitor.cs
@@ -189,7 +189,6 @@ namespace System.Threading
}
}
-#if NET_4_0
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static void try_enter_with_atomic_var (object obj, int millisecondsTimeout, ref bool lockTaken);
@@ -224,7 +223,6 @@ namespace System.Threading
try_enter_with_atomic_var (obj, millisecondsTimeout, ref lockTaken);
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static bool Monitor_test_owner (object obj);
diff --git a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
index db91e6d070d..93024f2165e 100644
--- a/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
+++ b/mcs/class/corlib/System.Threading/SemaphoreSlim.cs
@@ -28,7 +28,6 @@ using System.Diagnostics;
using System.Threading.Tasks;
#endif
-#if NET_4_0
namespace System.Threading
{
[System.Diagnostics.DebuggerDisplayAttribute ("Current Count = {currCount}")]
@@ -223,4 +222,3 @@ namespace System.Threading
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/SpinLock.cs b/mcs/class/corlib/System.Threading/SpinLock.cs
index f9cad7e56cd..28bb1527340 100644
--- a/mcs/class/corlib/System.Threading/SpinLock.cs
+++ b/mcs/class/corlib/System.Threading/SpinLock.cs
@@ -23,7 +23,6 @@
//
//
-#if NET_4_0
using System;
using System.Collections.Concurrent;
@@ -196,4 +195,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/SpinWait.cs b/mcs/class/corlib/System.Threading/SpinWait.cs
index 136836746cc..5afcdf1bbcb 100644
--- a/mcs/class/corlib/System.Threading/SpinWait.cs
+++ b/mcs/class/corlib/System.Threading/SpinWait.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
namespace System.Threading
@@ -96,4 +95,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index 985c8613d8a..ae58ef4ba7f 100644
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -406,12 +406,10 @@ namespace System.Threading {
ResetAbort_internal ();
}
-#if NET_4_0
[HostProtectionAttribute (SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)]
[MethodImplAttribute(MethodImplOptions.InternalCall)]
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public extern static bool Yield ();
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
diff --git a/mcs/class/corlib/System.Threading/ThreadLocal.cs b/mcs/class/corlib/System.Threading/ThreadLocal.cs
index 67501fcfdad..ac9ed8cddf9 100644
--- a/mcs/class/corlib/System.Threading/ThreadLocal.cs
+++ b/mcs/class/corlib/System.Threading/ThreadLocal.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_0
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
@@ -168,4 +167,3 @@ namespace System.Threading
}
}
-#endif
diff --git a/mcs/class/corlib/System.Threading/WaitHandle.cs b/mcs/class/corlib/System.Threading/WaitHandle.cs
index 85092532362..5558efad52f 100644
--- a/mcs/class/corlib/System.Threading/WaitHandle.cs
+++ b/mcs/class/corlib/System.Threading/WaitHandle.cs
@@ -239,11 +239,7 @@ namespace System.Threading
Dispose(true);
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
Close ();
}
diff --git a/mcs/class/corlib/System.Threading/Watch.cs b/mcs/class/corlib/System.Threading/Watch.cs
index ab75eb9ab95..ef19461d0bc 100644
--- a/mcs/class/corlib/System.Threading/Watch.cs
+++ b/mcs/class/corlib/System.Threading/Watch.cs
@@ -22,7 +22,6 @@
//
//
-#if NET_4_0
using System;
namespace System.Threading
@@ -60,4 +59,3 @@ namespace System.Threading
}
}
}
-#endif
diff --git a/mcs/class/corlib/System/Action.cs b/mcs/class/corlib/System/Action.cs
index 0ed90a1a3b7..438f7fc31d2 100644
--- a/mcs/class/corlib/System/Action.cs
+++ b/mcs/class/corlib/System/Action.cs
@@ -31,10 +31,9 @@ using System.Runtime.CompilerServices;
namespace System
{
-#if NET_4_0
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate void Action ();
@@ -43,21 +42,21 @@ namespace System
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate void Action <in T1, in T2> (T1 arg1, T2 arg2);
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate void Action <in T1, in T2, in T3> (T1 arg1, T2 arg2, T3 arg3);
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate void Action <in T1, in T2, in T3, in T4> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
@@ -66,10 +65,4 @@ namespace System
public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
public delegate void Action <in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-#else
- public delegate void Action <T> (T obj);
-
- // Used internally
- delegate void Action <T1, T2, T3> (T1 arg1, T2 arg2, T3 arg3);
-#endif
}
diff --git a/mcs/class/corlib/System/Activator.cs b/mcs/class/corlib/System/Activator.cs
index 5c9ceb18d9f..1e6d26c92fc 100644
--- a/mcs/class/corlib/System/Activator.cs
+++ b/mcs/class/corlib/System/Activator.cs
@@ -100,9 +100,7 @@ namespace System
activationAttributes, null);
}
-#if NET_4_0
[Obsolete]
-#endif
public static ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object [] args,
CultureInfo culture, object [] activationAttributes,
@@ -137,9 +135,7 @@ namespace System
activationAttributes, null);
}
-#if NET_4_0
[Obsolete]
-#endif
public static ObjectHandle CreateInstance (string assemblyName, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object [] args,
CultureInfo culture, object [] activationAttributes, Evidence securityInfo)
@@ -176,9 +172,7 @@ namespace System
}
-#if NET_4_0
[Obsolete]
-#endif
public static ObjectHandle CreateInstanceFrom (AppDomain domain, string assemblyFile, string typeName,
bool ignoreCase, BindingFlags bindingAttr, Binder binder,
object [] args, CultureInfo culture,
@@ -198,9 +192,7 @@ namespace System
return domain.CreateInstance (assemblyName, typeName);
}
-#if NET_4_0
[Obsolete]
-#endif
public static ObjectHandle CreateInstance (AppDomain domain, string assemblyName, string typeName,
bool ignoreCase, BindingFlags bindingAttr, Binder binder,
object [] args, CultureInfo culture,
@@ -391,7 +383,6 @@ namespace System
throw new NotImplementedException ();
}
-#if NET_4_0
public static ObjectHandle CreateInstance (string assemblyName, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object [] args,
CultureInfo culture, object [] activationAttributes)
@@ -442,6 +433,5 @@ namespace System
return domain.CreateInstanceFrom (assemblyFile, typeName, ignoreCase, bindingAttr, binder, args, culture, activationAttributes);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/AggregateException.cs b/mcs/class/corlib/System/AggregateException.cs
index ec99bc190cf..7a2d1f4a21e 100644
--- a/mcs/class/corlib/System/AggregateException.cs
+++ b/mcs/class/corlib/System/AggregateException.cs
@@ -27,7 +27,6 @@
//
//
-#if NET_4_0
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
@@ -168,4 +167,3 @@ namespace System
}
}
}
-#endif
diff --git a/mcs/class/corlib/System/AppDomain.cs b/mcs/class/corlib/System/AppDomain.cs
index 2293f444e4d..d6db872bcf7 100644
--- a/mcs/class/corlib/System/AppDomain.cs
+++ b/mcs/class/corlib/System/AppDomain.cs
@@ -246,11 +246,9 @@ namespace System {
get { return (PermissionSet)_granted; }
}
-#if NET_4_0
public PermissionSet PermissionSet {
get { return (PermissionSet)_granted ?? (PermissionSet)(_granted = new PermissionSet (PermissionState.Unrestricted)); }
}
-#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern AppDomain getCurDomain ();
@@ -342,9 +340,7 @@ namespace System {
return Activator.CreateInstance (assemblyName, typeName, activationAttributes);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public ObjectHandle CreateInstance (string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr,
Binder binder, object[] args, CultureInfo culture, object[] activationAttributes,
Evidence securityAttributes)
@@ -368,9 +364,7 @@ namespace System {
return (oh != null) ? oh.Unwrap () : null;
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public object CreateInstanceAndUnwrap (string assemblyName, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture,
object[] activationAttributes, Evidence securityAttributes)
@@ -380,7 +374,6 @@ namespace System {
return (oh != null) ? oh.Unwrap () : null;
}
-#if NET_4_0
public ObjectHandle CreateInstance (string assemblyName, string typeName, bool ignoreCase, BindingFlags bindingAttr,
Binder binder, object[] args, CultureInfo culture, object[] activationAttributes)
{
@@ -419,7 +412,6 @@ namespace System {
return (oh != null) ? oh.Unwrap () : null;
}
-#endif
public ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName)
{
@@ -437,9 +429,7 @@ namespace System {
return Activator.CreateInstanceFrom (assemblyFile, typeName, activationAttributes);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public ObjectHandle CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture,
object[] activationAttributes, Evidence securityAttributes)
@@ -463,9 +453,7 @@ namespace System {
return (oh != null) ? oh.Unwrap () : null;
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public object CreateInstanceFromAndUnwrap (string assemblyName, string typeName, bool ignoreCase,
BindingFlags bindingAttr, Binder binder, object[] args,
CultureInfo culture, object[] activationAttributes,
@@ -483,9 +471,7 @@ namespace System {
return DefineDynamicAssembly (name, access, null, null, null, null, null, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, Evidence evidence)
{
return DefineDynamicAssembly (name, access, null, evidence, null, null, null, false);
@@ -496,18 +482,14 @@ namespace System {
return DefineDynamicAssembly (name, access, dir, null, null, null, null, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir,
Evidence evidence)
{
return DefineDynamicAssembly (name, access, dir, evidence, null, null, null, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access,
PermissionSet requiredPermissions,
PermissionSet optionalPermissions,
@@ -517,9 +499,7 @@ namespace System {
refusedPermissions, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, Evidence evidence,
PermissionSet requiredPermissions,
PermissionSet optionalPermissions,
@@ -529,9 +509,7 @@ namespace System {
refusedPermissions, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir,
PermissionSet requiredPermissions,
PermissionSet optionalPermissions,
@@ -541,9 +519,7 @@ namespace System {
refusedPermissions, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir,
Evidence evidence,
PermissionSet requiredPermissions,
@@ -554,9 +530,7 @@ namespace System {
refusedPermissions, false);
}
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir,
Evidence evidence,
PermissionSet requiredPermissions,
@@ -575,9 +549,7 @@ namespace System {
}
// NET 3.5 method
-#if NET_4_0
[Obsolete ("Declarative security for assembly level is no longer enforced")]
-#endif
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir,
Evidence evidence,
PermissionSet requiredPermissions,
@@ -598,7 +570,6 @@ namespace System {
return DefineDynamicAssembly (name, access, null, null, null, null, null, false, assemblyAttributes);
}
-#if NET_4_0
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, bool isSynchronized, IEnumerable<CustomAttributeBuilder> assemblyAttributes)
{
return DefineDynamicAssembly (name, access, dir, null, null, null, null, isSynchronized, assemblyAttributes);
@@ -609,7 +580,6 @@ namespace System {
{
return DefineDynamicAssembly (name, access, assemblyAttributes);
}
-#endif
internal AssemblyBuilder DefineInternalDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access)
{
@@ -632,26 +602,20 @@ namespace System {
return ExecuteAssembly (assemblyFile, (Evidence)null, null);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssembly (string assemblyFile, Evidence assemblySecurity)
{
return ExecuteAssembly (assemblyFile, assemblySecurity, null);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssembly (string assemblyFile, Evidence assemblySecurity, string[] args)
{
Assembly a = Assembly.LoadFrom (assemblyFile, assemblySecurity);
return ExecuteAssemblyInternal (a, args);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssembly (string assemblyFile, Evidence assemblySecurity, string[] args, byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
{
Assembly a = Assembly.LoadFrom (assemblyFile, assemblySecurity, hashValue, hashAlgorithm);
@@ -659,7 +623,6 @@ namespace System {
}
-#if NET_4_0
public int ExecuteAssembly (string assemblyFile, string[] args)
{
Assembly a = Assembly.LoadFrom (assemblyFile, null);
@@ -671,7 +634,6 @@ namespace System {
Assembly a = Assembly.LoadFrom (assemblyFile, null, hashValue, hashAlgorithm);
return ExecuteAssemblyInternal (a, args);
}
-#endif
int ExecuteAssemblyInternal (Assembly a, string[] args)
{
@@ -723,9 +685,7 @@ namespace System {
return result;
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
{
if (assemblyRef == null)
@@ -782,9 +742,7 @@ namespace System {
return Load (assemblyString, null, false);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public Assembly Load (string assemblyString, Evidence assemblySecurity)
{
return Load (assemblyString, assemblySecurity, false);
@@ -817,9 +775,7 @@ namespace System {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern Assembly LoadAssemblyRaw (byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence, bool refonly);
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public Assembly Load (byte[] rawAssembly, byte[] rawSymbolStore, Evidence securityEvidence)
{
return Load (rawAssembly, rawSymbolStore, securityEvidence, false);
@@ -834,9 +790,7 @@ namespace System {
assembly.FromByteArray = true;
return assembly;
}
-#if NET_4_0
[Obsolete ("AppDomain policy levels are obsolete")]
-#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public void SetAppDomainPolicy (PolicyLevel domainPolicy)
{
@@ -1338,11 +1292,7 @@ namespace System {
foreach (Delegate eh in invocation_list) {
ResolveEventHandler handler = (ResolveEventHandler) eh;
-#if NET_4_0
Assembly assembly = handler (this, new ResolveEventArgs (name, requesting));
-#else
- Assembly assembly = handler (this, new ResolveEventArgs (name));
-#endif
if (assembly != null)
return assembly;
}
@@ -1415,7 +1365,6 @@ namespace System {
public event EventHandler<FirstChanceExceptionEventArgs> FirstChanceException;
#endif
-#if NET_4_0
[MonoTODO]
public bool IsHomogenous {
get { return true; }
@@ -1425,7 +1374,6 @@ namespace System {
public bool IsFullyTrusted {
get { return true; }
}
-#endif
#pragma warning disable 649
#if !MOBILE
@@ -1500,17 +1448,13 @@ namespace System {
return ExecuteAssemblyByName (assemblyName, (Evidence)null, null);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssemblyByName (string assemblyName, Evidence assemblySecurity)
{
return ExecuteAssemblyByName (assemblyName, assemblySecurity, null);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssemblyByName (string assemblyName, Evidence assemblySecurity, params string[] args)
{
Assembly a = Assembly.Load (assemblyName, assemblySecurity);
@@ -1518,9 +1462,7 @@ namespace System {
return ExecuteAssemblyInternal (a, args);
}
-#if NET_4_0
[Obsolete ("Use an overload that does not take an Evidence parameter")]
-#endif
public int ExecuteAssemblyByName (AssemblyName assemblyName, Evidence assemblySecurity, params string[] args)
{
Assembly a = Assembly.Load (assemblyName, assemblySecurity);
@@ -1528,7 +1470,6 @@ namespace System {
return ExecuteAssemblyInternal (a, args);
}
-#if NET_4_0
public int ExecuteAssemblyByName (string assemblyName, params string[] args)
{
Assembly a = Assembly.Load (assemblyName, null);
@@ -1542,7 +1483,6 @@ namespace System {
return ExecuteAssemblyInternal (a, args);
}
-#endif
public bool IsDefaultAppDomain ()
{
@@ -1577,7 +1517,6 @@ namespace System {
}
#endif
-#if NET_4_0
List<string> compatibility_switch;
public bool? IsCompatibilitySwitchSet (string value)
@@ -1621,6 +1560,5 @@ namespace System {
public TimeSpan MonitoringTotalProcessorTime {
get { throw new NotImplementedException (); }
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs
index 519b8d1a09a..d0ad692056c 100644
--- a/mcs/class/corlib/System/Array.cs
+++ b/mcs/class/corlib/System/Array.cs
@@ -50,9 +50,7 @@ namespace System
[ComVisible (true)]
// FIXME: We are doing way to many double/triple exception checks for the overloaded functions"
public abstract class Array : ICloneable, ICollection, IList, IEnumerable
-#if NET_4_0
, IStructuralComparable, IStructuralEquatable
-#endif
{
// Constructor
private Array ()
@@ -455,7 +453,6 @@ namespace System
return new SimpleEnumerator (this);
}
-#if NET_4_0
int IStructuralComparable.CompareTo (object other, IComparer comparer)
{
if (other == null)
@@ -514,7 +511,6 @@ namespace System
hash = ((hash << 7) + hash) ^ comparer.GetHashCode (GetValueImpl (i));
return hash;
}
-#endif
[ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
public int GetUpperBound (int dimension)
diff --git a/mcs/class/corlib/System/Char.cs b/mcs/class/corlib/System/Char.cs
index 3261e516c68..4d9b6e3b393 100644
--- a/mcs/class/corlib/System/Char.cs
+++ b/mcs/class/corlib/System/Char.cs
@@ -77,11 +77,7 @@ namespace System
// categories are available, 0xff otherwise.
private readonly static byte category_check_pair;
-#if NET_4_0
private const int CategoryDataVersion = 4;
-#else
- private const int CategoryDataVersion = 2;
-#endif
[MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.InternalCall)]
private unsafe static extern void GetDataTablePointers (int category_data_version,
diff --git a/mcs/class/corlib/System/CharEnumerator.cs b/mcs/class/corlib/System/CharEnumerator.cs
index 16e2cc3029b..9327b72a892 100644
--- a/mcs/class/corlib/System/CharEnumerator.cs
+++ b/mcs/class/corlib/System/CharEnumerator.cs
@@ -70,11 +70,7 @@ namespace System
}
}
-#if NET_4_0
public void Dispose ()
-#else
- void IDisposable.Dispose ()
-#endif
{
// nop
}
diff --git a/mcs/class/corlib/System/Comparison.cs b/mcs/class/corlib/System/Comparison.cs
index 7bedcdcabc6..f15ba11b37c 100644
--- a/mcs/class/corlib/System/Comparison.cs
+++ b/mcs/class/corlib/System/Comparison.cs
@@ -29,10 +29,6 @@
namespace System
{
-#if NET_4_0
public delegate int Comparison <in T> (T x, T y);
-#else
- public delegate int Comparison <T> (T x, T y);
-#endif
}
diff --git a/mcs/class/corlib/System/ContextMarshalException.cs b/mcs/class/corlib/System/ContextMarshalException.cs
index 1ec7e8a694b..52871f1a089 100644
--- a/mcs/class/corlib/System/ContextMarshalException.cs
+++ b/mcs/class/corlib/System/ContextMarshalException.cs
@@ -38,9 +38,6 @@ namespace System
{
[Serializable]
[ComVisible (true)]
-#if !NET_4_0
- [Obsolete ("this type is obsoleted in 2.0 profile")]
-#endif
public class ContextMarshalException : SystemException
{
const int Result = unchecked ((int)0x80131504);
diff --git a/mcs/class/corlib/System/Converter.cs b/mcs/class/corlib/System/Converter.cs
index b152a708eef..07e56188ea3 100644
--- a/mcs/class/corlib/System/Converter.cs
+++ b/mcs/class/corlib/System/Converter.cs
@@ -29,9 +29,5 @@
namespace System
{
-#if NET_4_0
public delegate TOutput Converter <in TInput, out TOutput> (TInput input);
-#else
- public delegate TOutput Converter <TInput, TOutput> (TInput input);
-#endif
}
diff --git a/mcs/class/corlib/System/Decimal.cs b/mcs/class/corlib/System/Decimal.cs
index 54ac8dea8ae..c4e3c8f5da5 100644
--- a/mcs/class/corlib/System/Decimal.cs
+++ b/mcs/class/corlib/System/Decimal.cs
@@ -53,9 +53,7 @@ namespace System
[Serializable]
[System.Runtime.InteropServices.ComVisible (true)]
public struct Decimal: IFormattable, IConvertible, IComparable, IComparable<Decimal>, IEquatable <Decimal>
-#if NET_4_0
, IDeserializationCallback
-#endif
{
public const decimal MinValue = -79228162514264337593543950335m;
public const decimal MaxValue = 79228162514264337593543950335m;
@@ -1355,11 +1353,9 @@ namespace System
return ToString ("G", provider);
}
-#if NET_4_0
void IDeserializationCallback.OnDeserialization(object sender)
{
}
-#endif
#if !MSTEST
[MethodImplAttribute(MethodImplOptions.InternalCall)]
diff --git a/mcs/class/corlib/System/Double.cs b/mcs/class/corlib/System/Double.cs
index 860eee2dee1..4fbc2ac79c3 100644
--- a/mcs/class/corlib/System/Double.cs
+++ b/mcs/class/corlib/System/Double.cs
@@ -139,7 +139,6 @@ namespace System {
return (*((long*)&d)).GetHashCode ();
}
-#if NET_4_0
public static bool operator==(double left, double right)
{
return left == right;
@@ -169,7 +168,6 @@ namespace System {
{
return left <= right;
}
-#endif
public static bool IsInfinity (double d)
{
diff --git a/mcs/class/corlib/System/Enum.cs b/mcs/class/corlib/System/Enum.cs
index 341da41c15e..4fe5eaa5d5f 100644
--- a/mcs/class/corlib/System/Enum.cs
+++ b/mcs/class/corlib/System/Enum.cs
@@ -681,7 +681,6 @@ namespace System
return true;
}
-#if NET_4_0
public static bool TryParse<TEnum> (string value, out TEnum result) where TEnum : struct
{
return TryParse (value, false, out result);
@@ -704,7 +703,6 @@ namespace System
return Parse (tenum_type, value, ignoreCase, out result);
}
-#endif
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern int compare_value_to (object other);
@@ -1061,7 +1059,6 @@ namespace System
"\"x\",\"F\",\"f\",\"D\" or \"d\".");
}
-#if NET_4_0
public bool HasFlag (Enum flag)
{
var val = get_value ();
@@ -1070,6 +1067,5 @@ namespace System
return ((mvalue & fvalue) == fvalue);
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs
index d0a91ed3997..d3847e55142 100644
--- a/mcs/class/corlib/System/Environment.cs
+++ b/mcs/class/corlib/System/Environment.cs
@@ -85,10 +85,7 @@ namespace System {
ProgramFiles = 0x26,
MyPictures = 0x27,
CommonProgramFiles = 0x2b,
-#if NET_4_0
MyVideos = 0x0e,
-#endif
-#if NET_4_0
NetworkShortcuts = 0x13,
Fonts = 0x14,
CommonStartMenu = 0x16,
@@ -112,14 +109,9 @@ namespace System {
LocalizedResources = 0x39,
CommonOemLinks = 0x3a,
CDBurning = 0x3b,
-#endif
}
-#if NET_4_0
public
-#else
- internal
-#endif
enum SpecialFolderOption {
None = 0,
DoNotVerify = 0x4000,
@@ -489,9 +481,7 @@ namespace System {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static string GetWindowsFolderPath (int folder);
-#if NET_4_0
public
-#endif
static string GetFolderPath(SpecialFolder folder, SpecialFolderOption option)
{
SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
@@ -608,11 +598,8 @@ namespace System {
case SpecialFolder.Templates:
return ReadXdgUserDir (config, home, "XDG_TEMPLATES_DIR", "Templates");
-#if NET_4_0
case SpecialFolder.MyVideos:
return ReadXdgUserDir (config, home, "XDG_VIDEOS_DIR", "Videos");
-#endif
-#if NET_4_0
case SpecialFolder.CommonTemplates:
return "/usr/share/templates";
case SpecialFolder.Fonts:
@@ -620,7 +607,6 @@ namespace System {
return Path.Combine (home, "Library", "Fonts");
return Path.Combine (home, ".fonts");
-#endif
// these simply dont exist on Linux
// The spec says if a folder doesnt exist, we
// should return ""
@@ -642,11 +628,9 @@ namespace System {
else
return String.Empty;
-#if NET_4_0
// #2873
case SpecialFolder.UserProfile:
return home;
-#endif
case SpecialFolder.Programs:
case SpecialFolder.SendTo:
@@ -657,7 +641,6 @@ namespace System {
case SpecialFolder.Recent:
case SpecialFolder.CommonProgramFiles:
case SpecialFolder.System:
-#if NET_4_0
case SpecialFolder.NetworkShortcuts:
case SpecialFolder.CommonStartMenu:
case SpecialFolder.CommonPrograms:
@@ -678,7 +661,6 @@ namespace System {
case SpecialFolder.LocalizedResources:
case SpecialFolder.CommonOemLinks:
case SpecialFolder.CDBurning:
-#endif
return String.Empty;
// This is where data common to all users goes
case SpecialFolder.CommonApplicationData:
@@ -831,15 +813,12 @@ namespace System {
throw new NotImplementedException ();
}
-#if NET_4_0
[SecurityCritical]
public static void FailFast (string message, Exception exception)
{
throw new NotImplementedException ();
}
-#endif
-#if NET_4_0
public static bool Is64BitOperatingSystem {
get { return IntPtr.Size == 8; } // FIXME: is this good enough?
}
@@ -847,13 +826,8 @@ namespace System {
public static int SystemPageSize {
get { return GetPageSize (); }
}
-#endif
-#if NET_4_0
public
-#else
- internal
-#endif
static bool Is64BitProcess {
get { return IntPtr.Size == 8; }
}
diff --git a/mcs/class/corlib/System/Exception.cs b/mcs/class/corlib/System/Exception.cs
index 5ccf4bd494b..e7df399c6f7 100644
--- a/mcs/class/corlib/System/Exception.cs
+++ b/mcs/class/corlib/System/Exception.cs
@@ -159,7 +159,6 @@ namespace System
}
}
-#if NET_4_0
[MonoTODO]
protected event EventHandler<SafeSerializationEventArgs> SerializeObjectState {
add {
@@ -167,7 +166,6 @@ namespace System
remove {
}
}
-#endif
public virtual string Source {
get {
diff --git a/mcs/class/corlib/System/ExecutionEngineException.cs b/mcs/class/corlib/System/ExecutionEngineException.cs
index f23140d9594..7abf6be3d0f 100644
--- a/mcs/class/corlib/System/ExecutionEngineException.cs
+++ b/mcs/class/corlib/System/ExecutionEngineException.cs
@@ -35,9 +35,7 @@ using System.Runtime.InteropServices;
namespace System
{
-#if NET_4_0
[Obsolete]
-#endif
[Serializable]
[ComVisible (true)]
public sealed class ExecutionEngineException : SystemException
diff --git a/mcs/class/corlib/System/Funcs.cs b/mcs/class/corlib/System/Funcs.cs
index a4e07f40c5c..df011e8cea8 100644
--- a/mcs/class/corlib/System/Funcs.cs
+++ b/mcs/class/corlib/System/Funcs.cs
@@ -29,38 +29,37 @@ using System.Runtime.CompilerServices;
namespace System {
-#if NET_4_0
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate TResult Func<out TResult> ();
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate TResult Func<in T, out TResult> (T arg);
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate TResult Func<in T1, in T2, out TResult> (T1 arg1, T2 arg2);
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate TResult Func<in T1, in T2, in T3, out TResult> (T1 arg1, T2 arg2, T3 arg3);
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
public delegate TResult Func<in T1, in T2, in T3, in T4, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4);
@@ -69,8 +68,4 @@ namespace System {
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, out TResult> (T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8);
-#else
- // Used internally
- delegate TResult Func<T1, T2, T3, TResult> (T1 arg1, T2 arg2, T3 arg3);
-#endif
}
diff --git a/mcs/class/corlib/System/GC.cs b/mcs/class/corlib/System/GC.cs
index dbd9314c4ed..1b1a5d4f587 100644
--- a/mcs/class/corlib/System/GC.cs
+++ b/mcs/class/corlib/System/GC.cs
@@ -112,7 +112,6 @@ namespace System
RecordPressure (-bytesAllocated);
}
-#if NET_4_0
[PermissionSetAttribute (SecurityAction.LinkDemand, Name = "FullTrust")]
[MonoTODO]
public static GCNotificationStatus WaitForFullGCApproach () {
@@ -150,9 +149,7 @@ namespace System
public static void CancelFullGCNotification () {
throw new NotImplementedException ();
}
-#endif
-#if NET_4_0
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static void register_ephemeron_array (Ephemeron[] array);
@@ -160,6 +157,5 @@ namespace System
extern static object get_ephemeron_tombstone ();
internal static readonly object EPHEMERON_TOMBSTONE = get_ephemeron_tombstone ();
-#endif
}
}
diff --git a/mcs/class/corlib/System/Guid.cs b/mcs/class/corlib/System/Guid.cs
index 4581e772c12..630f54b8daa 100644
--- a/mcs/class/corlib/System/Guid.cs
+++ b/mcs/class/corlib/System/Guid.cs
@@ -750,7 +750,6 @@ namespace System {
return !( a.Equals (b) );
}
-#if NET_4_0
public static Guid Parse (string input)
{
if (input == null)
@@ -798,7 +797,6 @@ namespace System {
var parser = new GuidParser (input);
return parser.Parse (ParseFormat (format), out result);
}
-#endif
static Format ParseFormat (string format)
{
@@ -818,19 +816,13 @@ namespace System {
case 'P':
case 'p':
return Format.P;
-#if NET_4_0
case 'X':
case 'x':
return Format.X;
-#endif
}
throw new FormatException (
-#if NET_4_0
"Format String can be only one of \"D\", \"d\", \"N\", \"n\", \"P\", \"p\", \"B\", \"b\", \"X\" or \"x\""
-#else
- "Format String can be only one of \"D\", \"d\", \"N\", \"n\", \"P\", \"p\", \"B\" or \"b\""
-#endif
);
}
}
diff --git a/mcs/class/corlib/System/IComparable.cs b/mcs/class/corlib/System/IComparable.cs
index 08cc1aa326e..c5330021b0e 100644
--- a/mcs/class/corlib/System/IComparable.cs
+++ b/mcs/class/corlib/System/IComparable.cs
@@ -39,13 +39,7 @@ namespace System {
int CompareTo (object obj);
}
-#if NET_4_0
public interface IComparable <in T> {
int CompareTo (T other);
}
-#else
- public interface IComparable <T> {
- int CompareTo (T other);
- }
-#endif
}
diff --git a/mcs/class/corlib/System/IObservable.cs b/mcs/class/corlib/System/IObservable.cs
index 677bdf38728..5274dbb30cd 100644
--- a/mcs/class/corlib/System/IObservable.cs
+++ b/mcs/class/corlib/System/IObservable.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System
{
@@ -36,4 +35,3 @@ namespace System
}
}
-#endif
diff --git a/mcs/class/corlib/System/IObserver.cs b/mcs/class/corlib/System/IObserver.cs
index 2201e067483..f6aaf6bb320 100644
--- a/mcs/class/corlib/System/IObserver.cs
+++ b/mcs/class/corlib/System/IObserver.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
namespace System
{
@@ -38,4 +37,3 @@ namespace System
}
}
-#endif
diff --git a/mcs/class/corlib/System/InsufficientExecutionStackException.cs b/mcs/class/corlib/System/InsufficientExecutionStackException.cs
index 6a7706b92d5..e41677ad12a 100644
--- a/mcs/class/corlib/System/InsufficientExecutionStackException.cs
+++ b/mcs/class/corlib/System/InsufficientExecutionStackException.cs
@@ -25,7 +25,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -51,5 +50,4 @@ namespace System {
}
}
-#endif
diff --git a/mcs/class/corlib/System/IntPtr.cs b/mcs/class/corlib/System/IntPtr.cs
index 20c06387df1..e594d49bbb9 100644
--- a/mcs/class/corlib/System/IntPtr.cs
+++ b/mcs/class/corlib/System/IntPtr.cs
@@ -200,7 +200,6 @@ namespace System
return value.m_value;
}
-#if NET_4_0
[ReliabilityContract (Consistency.MayCorruptInstance, Cer.MayFail)]
public static IntPtr Add (IntPtr pointer, int offset)
{
@@ -224,12 +223,5 @@ namespace System
{
return (IntPtr) (unchecked (((byte *) pointer) - offset));
}
-#else
- /* Needed by Marshal.cs */
- internal static IntPtr Add (IntPtr pointer, int offset)
- {
- return (IntPtr) (unchecked (((byte *) pointer) + offset));
- }
-#endif
}
}
diff --git a/mcs/class/corlib/System/InvalidTimeZoneException.cs b/mcs/class/corlib/System/InvalidTimeZoneException.cs
index 7beb2d4982c..27dd66a92a5 100644
--- a/mcs/class/corlib/System/InvalidTimeZoneException.cs
+++ b/mcs/class/corlib/System/InvalidTimeZoneException.cs
@@ -31,12 +31,10 @@ namespace System
[Serializable]
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
-#if NET_4_0
public
-#endif
class InvalidTimeZoneException : Exception
{
public InvalidTimeZoneException () : base ()
diff --git a/mcs/class/corlib/System/Lazy.cs b/mcs/class/corlib/System/Lazy.cs
index 64726938348..0b99056a361 100644
--- a/mcs/class/corlib/System/Lazy.cs
+++ b/mcs/class/corlib/System/Lazy.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Runtime.Serialization;
@@ -195,4 +194,3 @@ namespace System
}
}
-#endif
diff --git a/mcs/class/corlib/System/MonoType.cs b/mcs/class/corlib/System/MonoType.cs
index 4bce62bd679..85ba2449491 100644
--- a/mcs/class/corlib/System/MonoType.cs
+++ b/mcs/class/corlib/System/MonoType.cs
@@ -682,7 +682,6 @@ namespace System
return res;
}
-#if NET_4_0
public override IList<CustomAttributeData> GetCustomAttributesData () {
return CustomAttributeData.GetCustomAttributes (this);
}
@@ -694,7 +693,6 @@ namespace System
return Enum.GetValues (this);
}
-#endif
static MethodBase CheckMethodSecurity (MethodBase mb)
{
@@ -714,7 +712,6 @@ namespace System
#endif
}
-#if NET_4_0
//seclevel { transparent = 0, safe-critical = 1, critical = 2}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern int get_core_clr_security_level ();
@@ -739,7 +736,6 @@ namespace System
return GetStructLayoutAttribute ();
}
}
-#endif
internal override bool IsUserType {
get {
diff --git a/mcs/class/corlib/System/OperationCanceledException.cs b/mcs/class/corlib/System/OperationCanceledException.cs
index 7532041aad6..6849961a076 100644
--- a/mcs/class/corlib/System/OperationCanceledException.cs
+++ b/mcs/class/corlib/System/OperationCanceledException.cs
@@ -38,9 +38,7 @@ namespace System
public class OperationCanceledException : SystemException
{
const int Result = unchecked ((int)0x8013153b);
-#if NET_4_0
CancellationToken? token;
-#endif
// Constructors
public OperationCanceledException ()
@@ -66,7 +64,6 @@ namespace System
{
}
-#if NET_4_0
public OperationCanceledException (CancellationToken token)
: this ()
{
@@ -92,6 +89,5 @@ namespace System
return token.Value;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Predicate.cs b/mcs/class/corlib/System/Predicate.cs
index 595cf8a1730..66086b0a9bb 100644
--- a/mcs/class/corlib/System/Predicate.cs
+++ b/mcs/class/corlib/System/Predicate.cs
@@ -29,10 +29,6 @@
namespace System
{
-#if NET_4_0
public delegate bool Predicate <in T> (T obj);
-#else
- public delegate bool Predicate <T> (T obj);
-#endif
}
diff --git a/mcs/class/corlib/System/ResolveEventArgs.cs b/mcs/class/corlib/System/ResolveEventArgs.cs
index 6dd03c5d9b3..98ca78e261f 100644
--- a/mcs/class/corlib/System/ResolveEventArgs.cs
+++ b/mcs/class/corlib/System/ResolveEventArgs.cs
@@ -38,21 +38,17 @@ namespace System
public class ResolveEventArgs : EventArgs
{
private string m_Name;
-#if NET_4_0
private Assembly m_Requesting;
-#endif
public ResolveEventArgs (string name)
{
m_Name = name;
}
-#if NET_4_0
public ResolveEventArgs (string name, Assembly requestingAssembly) {
this.m_Name = name;
this.m_Requesting = requestingAssembly;
}
-#endif
public string Name {
get {
@@ -60,12 +56,10 @@ namespace System
}
}
-#if NET_4_0
public Assembly RequestingAssembly {
get {
return m_Requesting;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Single.cs b/mcs/class/corlib/System/Single.cs
index de0f7c4ea1a..5edf40d490b 100644
--- a/mcs/class/corlib/System/Single.cs
+++ b/mcs/class/corlib/System/Single.cs
@@ -143,7 +143,6 @@ namespace System
return *((int*)&f);
}
-#if NET_4_0
public static bool operator==(float left, float right)
{
return left == right;
@@ -173,7 +172,6 @@ namespace System
{
return left <= right;
}
-#endif
public static bool IsInfinity (float f)
{
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index 65e460647ca..0ff8030fec4 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -312,22 +312,9 @@ namespace System
}
// .NET 2.0 compatibility only
-#if !NET_4_0 && !MOBILE
- static readonly char[] WhiteChars = {
- (char) 0x9, (char) 0xA, (char) 0xB, (char) 0xC, (char) 0xD,
- (char) 0x85, (char) 0x1680, (char) 0x2028, (char) 0x2029,
- (char) 0x20, (char) 0xA0, (char) 0x2000, (char) 0x2001, (char) 0x2002, (char) 0x2003, (char) 0x2004,
- (char) 0x2005, (char) 0x2006, (char) 0x2007, (char) 0x2008, (char) 0x2009, (char) 0x200A, (char) 0x200B,
- (char) 0x3000, (char) 0xFEFF
- };
-#endif
unsafe string[] SplitByCharacters (char[] sep, int count, bool removeEmpty)
{
-#if !NET_4_0 && !MOBILE
- if (sep == null || sep.Length == 0)
- sep = WhiteChars;
-#endif
int[] split_points = null;
int total_points = 0;
@@ -539,7 +526,6 @@ namespace System
unsafe int FindNotWhiteSpace (int pos, int target, int change)
{
-#if NET_4_0
fixed (char* src = this) {
while (pos != target) {
if (!char.IsWhiteSpace (src[pos]))
@@ -548,25 +534,6 @@ namespace System
pos += change;
}
}
-#else
- while (pos != target) {
- char c = this[pos];
- if (c < 0x85) {
- if (c != 0x20) {
- if (c < 0x9 || c > 0xD)
- return pos;
- }
- }
- else {
- if (c != 0xA0 && c != 0xFEFF && c != 0x3000) {
- if (c != 0x85 && c != 0x1680 && c != 0x2028 && c != 0x2029)
- if (c < 0x2000 || c > 0x200B)
- return pos;
- }
- }
- pos += change;
- }
-#endif
return pos;
}
@@ -2405,11 +2372,7 @@ namespace System
return InternalIsInterned (str);
}
-#if NET_4_0
public static string Join (string separator, params string [] value)
-#else
- public static string Join (string separator, string [] value)
-#endif
{
if (value == null)
throw new ArgumentNullException ("value");
@@ -2710,7 +2673,6 @@ namespace System
}
}
-#if NET_4_0
[ComVisible(false)]
public static string Concat (IEnumerable<string> values)
{
@@ -2798,9 +2760,6 @@ namespace System
}
public static bool IsNullOrWhiteSpace (string value)
-#else
- internal static bool IsNullOrWhiteSpace (string value)
-#endif
{
if ((value == null) || (value.Length == 0))
return true;
diff --git a/mcs/class/corlib/System/TimeSpan.cs b/mcs/class/corlib/System/TimeSpan.cs
index f6937ef3ca2..a16b77ab82d 100644
--- a/mcs/class/corlib/System/TimeSpan.cs
+++ b/mcs/class/corlib/System/TimeSpan.cs
@@ -41,9 +41,7 @@ namespace System
[Serializable]
[System.Runtime.InteropServices.ComVisible (true)]
public struct TimeSpan : IComparable, IComparable<TimeSpan>, IEquatable <TimeSpan>
-#if NET_4_0
, IFormattable
-#endif
{
#if MONOTOUCH
static TimeSpan () {
@@ -361,7 +359,6 @@ namespace System
return p.Execute (true, out result);
}
-#if NET_4_0
public static TimeSpan Parse (string input, IFormatProvider formatProvider)
{
if (input == null)
@@ -483,7 +480,6 @@ namespace System
return false;
}
-#endif
public TimeSpan Subtract (TimeSpan ts)
{
@@ -528,7 +524,6 @@ namespace System
return sb.ToString ();
}
-#if NET_4_0
public string ToString (string format)
{
return ToString (format, null);
@@ -691,7 +686,6 @@ namespace System
return sb.ToString ();
}
-#endif
public static TimeSpan operator + (TimeSpan t1, TimeSpan t2)
{
@@ -756,7 +750,6 @@ namespace System
private int _cur = 0;
private int _length;
ParseError parse_error;
-#if NET_4_0
bool parsed_ticks;
NumberFormatInfo number_format;
int parsed_numbers_count;
@@ -766,18 +759,14 @@ namespace System
public bool AllMembersRequired;
public bool CultureSensitive = true;
public bool UseColonAsDaySeparator = true;
-#endif
public Parser (string src)
{
_src = src;
_length = _src.Length;
-#if NET_4_0
number_format = GetNumberFormatInfo (null);
-#endif
}
-#if NET_4_0
// Reset state data, so we can execute another parse over the input.
void Reset ()
{
@@ -803,7 +792,6 @@ namespace System
return format;
}
-#endif
public bool AtEnd {
get {
@@ -843,7 +831,6 @@ namespace System
return res;
}
-#if NET_4_0
// Used for custom formats parsing, where we may need to declare how
// many digits we expect, as well as the maximum allowed.
private int ParseIntExact (int digit_count, int max_digit_count)
@@ -869,7 +856,6 @@ namespace System
return (int)res;
}
-#endif
// Parse simple int value
private int ParseInt (bool optional)
@@ -892,15 +878,12 @@ namespace System
if (!optional && (count == 0))
SetParseError (ParseError.Format);
-#if NET_4_0
if (count > 0)
parsed_numbers_count++;
-#endif
return (int)res;
}
-#if NET_4_0
// This behaves pretty much like ParseOptDot, but we need to have it
// as a separated routine for both days and decimal separators.
private bool ParseOptDaysSeparator ()
@@ -958,7 +941,6 @@ namespace System
return false;
}
-#endif
// Parse optional dot
private bool ParseOptDot ()
{
@@ -999,17 +981,14 @@ namespace System
if (!digitseen)
SetParseError (ParseError.Format);
-#if NET_4_0
else if (!AtEnd && Char.IsDigit (_src, _cur))
SetParseError (ParseError.Overflow);
parsed_ticks = true;
-#endif
return res;
}
-#if NET_4_0
// Used by custom formats parsing
// digits_count = 0 for digits up to max_digits_count (optional), and other value to
// force a precise number of digits.
@@ -1032,7 +1011,6 @@ namespace System
return res;
}
-#endif
void SetParseError (ParseError error)
{
@@ -1043,19 +1021,11 @@ namespace System
parse_error = error;
}
-#if NET_4_0
bool CheckParseSuccess (bool tryParse)
-#else
- bool CheckParseSuccess (int hours, int minutes, int seconds, bool tryParse)
-#endif
{
// We always report the first error, but for 2.0 we need to give a higher
// precence to per-element overflow (as opposed to int32 overflow).
-#if NET_4_0
if (parse_error == ParseError.Overflow) {
-#else
- if (parse_error == ParseError.Overflow || hours > 23 || minutes > 59 || seconds > 59) {
-#endif
if (tryParse)
return false;
throw new OverflowException (
@@ -1072,7 +1042,6 @@ namespace System
return true;
}
-#if NET_4_0
// We are using a different parse approach in 4.0, due to some changes in the behaviour
// of the parse routines.
// The input string is documented as:
@@ -1190,73 +1159,7 @@ namespace System
result = new TimeSpan (t);
return true;
}
-#else
- public bool Execute (bool tryParse, out TimeSpan result)
- {
- bool sign;
- int days;
- int hours = 0;
- int minutes;
- int seconds;
- long ticks;
-
- result = TimeSpan.Zero;
-
- // documented as...
- // Parse [ws][-][dd.]hh:mm:ss[.ff][ws]
- // ... but not entirely true as an lonely
- // integer will be parsed as a number of days
- ParseWhiteSpace ();
- sign = ParseSign ();
- days = ParseInt (false);
- if (ParseOptDot ()) {
- hours = ParseInt (true);
- }
- else if (!AtEnd) {
- hours = days;
- days = 0;
- }
- ParseColon(false);
- int p = _cur;
- minutes = ParseInt (true);
- seconds = 0;
- if (p < _cur) {
- ParseColon (true);
- seconds = ParseInt (true);
- }
-
- if ( ParseOptDot () ) {
- ticks = ParseTicks ();
- }
- else {
- ticks = 0;
- }
- ParseWhiteSpace ();
-
- if (!AtEnd)
- SetParseError (ParseError.Format);
-
- if (!CheckParseSuccess (hours, minutes, seconds, tryParse))
- return false;
-
- long t;
- if (!TimeSpan.CalculateTicks (days, hours, minutes, seconds, 0, false, out t))
- return false;
-
- try {
- t = checked ((sign) ? (-t - ticks) : (t + ticks));
- } catch (OverflowException) {
- if (tryParse)
- return false;
- throw;
- }
-
- result = new TimeSpan (t);
- return true;
- }
-#endif
-#if NET_4_0
public bool ExecuteWithFormat (string format, TimeSpanStyles style, bool tryParse, out TimeSpan result)
{
int days, hours, minutes, seconds;
@@ -1361,9 +1264,7 @@ namespace System
result = new TimeSpan (t);
return true;
}
-#endif
}
-#if NET_4_0
enum FormatElementType
{
Days,
@@ -1546,7 +1447,6 @@ namespace System
return null;
}
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/TimeZoneNotFoundException.cs b/mcs/class/corlib/System/TimeZoneNotFoundException.cs
index 643b82104b3..1333d971c82 100644
--- a/mcs/class/corlib/System/TimeZoneNotFoundException.cs
+++ b/mcs/class/corlib/System/TimeZoneNotFoundException.cs
@@ -32,12 +32,10 @@ namespace System
[Serializable]
#if MOBILE
[TypeForwardedFrom (Consts.AssemblySystem_Core)]
-#elif NET_4_0
+#else
[TypeForwardedFrom (Consts.AssemblySystemCore_3_5)]
#endif
-#if NET_4_0
public
-#endif
class TimeZoneNotFoundException : Exception
{
public TimeZoneNotFoundException () : base ()
diff --git a/mcs/class/corlib/System/Tuple.cs b/mcs/class/corlib/System/Tuple.cs
index c22d3ef2030..6a5951ed02d 100644
--- a/mcs/class/corlib/System/Tuple.cs
+++ b/mcs/class/corlib/System/Tuple.cs
@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
@@ -112,4 +111,3 @@ namespace System
}
}
-#endif
diff --git a/mcs/class/corlib/System/Tuples.cs b/mcs/class/corlib/System/Tuples.cs
index a9631dbbdaf..24a39b69d51 100644
--- a/mcs/class/corlib/System/Tuples.cs
+++ b/mcs/class/corlib/System/Tuples.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_4_0
using System;
using System.Collections;
@@ -873,7 +872,6 @@ namespace System
}
-#endif
#if FALSE
diff --git a/mcs/class/corlib/System/Type.cs b/mcs/class/corlib/System/Type.cs
index efc542caa6f..f99b7c0d594 100644
--- a/mcs/class/corlib/System/Type.cs
+++ b/mcs/class/corlib/System/Type.cs
@@ -247,9 +247,7 @@ namespace System {
}
public
-#if NET_4_0
virtual
-#endif
bool IsEnum {
get {
return IsSubclassOf (typeof (Enum));
@@ -353,9 +351,7 @@ namespace System {
}
public
-#if NET_4_0
virtual
-#endif
bool IsSerializable {
get {
if ((Attributes & TypeAttributes.Serializable) != 0)
@@ -443,20 +439,9 @@ namespace System {
public override bool Equals (object o)
{
-#if NET_4_0
return Equals (o as Type);
-#else
- if (o == this)
- return true;
-
- Type me = UnderlyingSystemType;
- if (me == null)
- return false;
- return me.EqualsInternal (o as Type);
-#endif
}
-#if NET_4_0
public virtual bool Equals (Type o)
{
if ((object)o == (object)this)
@@ -474,21 +459,6 @@ namespace System {
return true;
return me.EqualsInternal (o);
}
-#else
- public bool Equals (Type o)
- {
-
- if (o == this)
- return true;
- if (o == null)
- return false;
- Type me = UnderlyingSystemType;
- if (me == null)
- return false;
- return me.EqualsInternal (o.UnderlyingSystemType);
- }
-#endif
-#if NET_4_0
[MonoTODO ("Implement it properly once 4.0 impl details are known.")]
public static bool operator == (Type left, Type right)
{
@@ -587,7 +557,6 @@ namespace System {
{
get { throw CreateNIE (); }
}
-#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern bool EqualsInternal (Type type);
@@ -644,9 +613,7 @@ namespace System {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal extern static TypeCode GetTypeCodeInternal (Type type);
-#if NET_4_0
protected virtual
-#endif
TypeCode GetTypeCodeImpl () {
Type type = this;
if (type is MonoType)
@@ -1595,11 +1562,7 @@ namespace System {
public virtual StructLayoutAttribute StructLayoutAttribute {
get {
-#if NET_4_0
throw new NotSupportedException ();
-#else
- return GetStructLayoutAttribute ();
-#endif
}
}
@@ -1658,12 +1621,10 @@ namespace System {
}
-#if NET_4_0
public virtual bool IsEquivalentTo (Type other)
{
return this == other;
}
-#endif
/*
* Return whenever this object is an instance of a user defined subclass
diff --git a/mcs/class/corlib/System/TypeAccessException.cs b/mcs/class/corlib/System/TypeAccessException.cs
index 7a1418e3dad..13a2bbe0fed 100644
--- a/mcs/class/corlib/System/TypeAccessException.cs
+++ b/mcs/class/corlib/System/TypeAccessException.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_0
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
@@ -62,5 +61,4 @@ namespace System
}
}
}
-#endif
diff --git a/mcs/class/corlib/System/TypeSpec.cs b/mcs/class/corlib/System/TypeSpec.cs
index a3d4af2a590..d525dc13fe1 100644
--- a/mcs/class/corlib/System/TypeSpec.cs
+++ b/mcs/class/corlib/System/TypeSpec.cs
@@ -31,7 +31,6 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
-#if NET_4_0
namespace System {
internal class ArraySpec
{
@@ -374,5 +373,4 @@ namespace System {
}
}
}
-#endif
diff --git a/mcs/class/corlib/System/UIntPtr.cs b/mcs/class/corlib/System/UIntPtr.cs
index a412044619c..1070563aca0 100644
--- a/mcs/class/corlib/System/UIntPtr.cs
+++ b/mcs/class/corlib/System/UIntPtr.cs
@@ -162,7 +162,6 @@ namespace System
get { return sizeof (void*); }
}
-#if NET_4_0
public static UIntPtr Add (UIntPtr pointer, int offset)
{
return (UIntPtr) (unchecked (((byte *) pointer) + offset));
@@ -182,6 +181,5 @@ namespace System
{
return (UIntPtr) (unchecked (((byte *) pointer) - offset));
}
-#endif
}
}
diff --git a/mcs/class/corlib/System/Version.cs b/mcs/class/corlib/System/Version.cs
index 9c828c524ff..ae750fb7ce8 100644
--- a/mcs/class/corlib/System/Version.cs
+++ b/mcs/class/corlib/System/Version.cs
@@ -306,7 +306,6 @@ namespace System {
return v1.CompareTo (v2) <= 0;
}
-#if BOOSTRAP_NET_4_0 || NET_4_0
public static Version Parse (string input)
{
// Exactly the same as calling Version(string) .ctor
@@ -354,7 +353,6 @@ namespace System {
return true;
}
-#endif
// a very gentle way to construct a Version object which takes
// the first four numbers in a string as the version
diff --git a/mcs/class/corlib/System/_AppDomain.cs b/mcs/class/corlib/System/_AppDomain.cs
index 7bf3ed2109d..37c71de14bf 100644
--- a/mcs/class/corlib/System/_AppDomain.cs
+++ b/mcs/class/corlib/System/_AppDomain.cs
@@ -105,9 +105,6 @@ namespace System
object GetData (string name);
int GetHashCode();
-#if !NET_4_0
- [SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
-#endif
object GetLifetimeService ();
Type GetType ();