[bcl] Remove NET_4_0 defines from class libs.
authorZoltan Varga <vargaz@gmail.com>
Tue, 13 Jan 2015 21:06:31 +0000 (16:06 -0500)
committerZoltan Varga <vargaz@gmail.com>
Tue, 13 Jan 2015 21:06:31 +0000 (16:06 -0500)
760 files changed:
mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/AssemblyInfo.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/SplitContainer.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Engine.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildErrorEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildFinishedEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStartedEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildStatusEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildWarningEventArgs.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ICancelableTask.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/IForwardingLogger.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/INodeLogger.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/ITaskItem2.cs
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/WriteCodeFragment.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskItem.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
mcs/class/Mono.Data.Sqlite/Assembly/AssemblyInfo.cs
mcs/class/Mono.Parallel/Mono.Collections.Concurrent/ConcurrentSkipList.cs
mcs/class/Mono.Parallel/Mono.Threading/CSnzi.cs
mcs/class/Mono.Parallel/Mono.Threading/ReaderWriterLockSlimmer.cs
mcs/class/Mono.Parallel/Mono.Threading/Snzi.cs
mcs/class/Mono.Parallel/Mono.Threading/SpinLockWrapper.cs
mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
mcs/class/PEAPI/Metadata.cs
mcs/class/System.Core/Assembly/AssemblyInfo.cs
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.cs
mcs/class/System.Core/System.Collections.Generic/HashSet.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileAccess.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileOptions.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileRights.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFileSecurity.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewAccessor.cs
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedViewStream.cs
mcs/class/System.Core/System.Linq.Expressions/ExpressionVisitor.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryBaseNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryCastNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryChildNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryConcatNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryDefaultEmptyNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryGroupByNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryHeadWorkerNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryJoinNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryMuxNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOptionNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderByNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderGuardNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryOrderedStreamNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryReverseNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectManyNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySelectNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QuerySetNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStartNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryStreamNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryWhereNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/QueryZipNode.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/SetInclusion.cs
mcs/class/System.Core/System.Linq.Parallel.QueryNodes/WrapHelper.cs
mcs/class/System.Core/System.Linq.Parallel/AggregationList.cs
mcs/class/System.Core/System.Linq.Parallel/ConcurrentGrouping.cs
mcs/class/System.Core/System.Linq.Parallel/ConcurrentLookup.cs
mcs/class/System.Core/System.Linq.Parallel/INodeVisitor.cs
mcs/class/System.Core/System.Linq.Parallel/IVisitableNode.cs
mcs/class/System.Core/System.Linq.Parallel/OrderingEnumerator.cs
mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
mcs/class/System.Core/System.Linq.Parallel/ParallelPartitioner.cs
mcs/class/System.Core/System.Linq.Parallel/ParallelQueryEnumerator.cs
mcs/class/System.Core/System.Linq.Parallel/ParallelQuickSort.cs
mcs/class/System.Core/System.Linq.Parallel/QueryCheckerVisitor.cs
mcs/class/System.Core/System.Linq.Parallel/QueryIsOrderedVisitor.cs
mcs/class/System.Core/System.Linq.Parallel/QueryOptions.cs
mcs/class/System.Core/System.Linq.Parallel/RangeList.cs
mcs/class/System.Core/System.Linq.Parallel/RepeatList.cs
mcs/class/System.Core/System.Linq.Parallel/ReverseList.cs
mcs/class/System.Core/System.Linq.Parallel/StripPartitioner.cs
mcs/class/System.Core/System.Linq.Parallel/TemporaryArea.cs
mcs/class/System.Core/System.Linq/Enumerable.cs
mcs/class/System.Core/System.Linq/EnumerableExecutor.cs
mcs/class/System.Core/System.Linq/EnumerableExecutor_T.cs
mcs/class/System.Core/System.Linq/EnumerableQuery.cs
mcs/class/System.Core/System.Linq/EnumerableQuery_T.cs
mcs/class/System.Core/System.Linq/IGrouping.cs
mcs/class/System.Core/System.Linq/IOrderedQueryable_T.cs
mcs/class/System.Core/System.Linq/IQueryable_T.cs
mcs/class/System.Core/System.Linq/OrderedParallelQuery.cs
mcs/class/System.Core/System.Linq/ParallelEnumerable.cs
mcs/class/System.Core/System.Linq/ParallelExecutionMode.cs
mcs/class/System.Core/System.Linq/ParallelMergeOptions.cs
mcs/class/System.Core/System.Linq/ParallelQuery.cs
mcs/class/System.Core/System.Linq/Queryable.cs
mcs/class/System.Core/System.Runtime.CompilerServices/DynamicAttribute.cs
mcs/class/System.Core/System.Runtime.CompilerServices/StrongBox_T.cs
mcs/class/System.Core/System.Security.Cryptography/Aes.cs
mcs/class/System.Core/System.Threading.Tasks/TaskExtensions.cs
mcs/class/System.Core/System.Threading/LockRecursionException.cs
mcs/class/System.Core/System.Threading/ReaderWriterLockSlimExtensions.cs
mcs/class/System.Core/System/Actions.cs
mcs/class/System.Core/System/Funcs.cs
mcs/class/System.Core/System/InvalidTimeZoneException.cs
mcs/class/System.Core/System/TimeZoneInfo.AdjustmentRule.cs
mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
mcs/class/System.Core/System/TimeZoneInfo.TransitionTime.cs
mcs/class/System.Core/System/TimeZoneInfo.cs
mcs/class/System.Core/System/TimeZoneNotFoundException.cs
mcs/class/System.Data.Services.Client/Assembly/AssemblyInfo.cs
mcs/class/System.Data.Services/System.Data.Services/DataService.cs
mcs/class/System.Data.Services/System.Data.Services/ExpandSegment.cs
mcs/class/System.Data.Services/System.Data.Services/ProcessRequestArgs.cs
mcs/class/System.Json.Microsoft/System.Json/JsonPrimitive.cs
mcs/class/System.Net/Assembly/AssemblyInfo.cs
mcs/class/System.Net/Assembly/TypeForwarders.cs
mcs/class/System.Runtime.Serialization/Assembly/AssemblyInfo.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractResolver.cs
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
mcs/class/System.Security/System.Security.Cryptography.X509Certificates/X509Certificate2UI.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementChannelEndpointElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/AnnouncementEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ContractTypeNameElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryClientSettingsElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryVersionConverter.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DynamicEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/EndpointDiscoveryElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/FindCriteriaElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ScopeElementCollection.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/ServiceDiscoveryElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpTransportSettingsElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebHttpEndpointElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointCollectionElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Configuration/WebScriptEndpointElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpBehavior.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebHttpEndpoint.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebScriptEndpoint.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Description/WebServiceEndpoint.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Dispatcher/WebMessageFormatter.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationElementExtension.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel.Activation/ServiceHostFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/BinaryMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpCookieContainerBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpTransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/IHttpCookieContainer.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TextMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ChannelEndpointElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ConfigUtil.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/DiagnosticSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndToEndTracingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/EndpointCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ExtensionsSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/HttpTransportSecurityElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/MessageLoggingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/NamedServiceModelExtensionCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ProtocolMappingSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceBehaviorElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceEndpointElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceMetadataEndpointElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelSectionGroup.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointCollectionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpoint.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataEndpoint.cs
mcs/class/System.ServiceModel/System.ServiceModel.Diagnostics/MessageLoggingSettings.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpBinding_4_5.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel/BasicHttpsBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/HttpTransportSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel/InstanceContext.cs
mcs/class/System.ServiceModel/System.ServiceModel/NetTcpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/NetTcpSecurity.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostingEnvironment.cs
mcs/class/System.ServiceModel/System.ServiceModel/SpnEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/TcpTransportSecurity.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
mcs/class/System.Web.Abstractions/Assembly/AssemblyInfo.cs
mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpApplicationStateWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpBrowserCapabilitiesWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpCachePolicyWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpContextBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpContextWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpFileCollectionWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpPostedFileWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpRequestBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpRequestWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpResponseBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpResponseWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpServerUtilityWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpSessionStateWrapper.cs
mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionBase.cs
mcs/class/System.Web.Abstractions/System.Web/HttpStaticObjectsCollectionWrapper.cs
mcs/class/System.Web.ApplicationServices/Assembly/AssemblyInfo.cs
mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewDataItem.cs
mcs/class/System.Web.Extensions/System.Web.UI.WebControls/ListViewItem.cs
mcs/class/System.Web.Extensions/System.Web.UI/CompositeScriptReference.cs
mcs/class/System.Web.Extensions/System.Web.UI/ScriptReference.cs
mcs/class/System.Web.Extensions/System.Web.UI/ScriptReferenceBase.cs
mcs/class/System.Web.Routing/Assembly/AssemblyInfo.cs
mcs/class/System.Web.Routing/System.Web.Routing/HttpMethodConstraint.cs
mcs/class/System.Web.Routing/System.Web.Routing/IRouteConstraint.cs
mcs/class/System.Web.Routing/System.Web.Routing/IRouteHandler.cs
mcs/class/System.Web.Routing/System.Web.Routing/RequestContext.cs
mcs/class/System.Web.Routing/System.Web.Routing/Route.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteBase.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteCollection.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteData.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteDirection.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteTable.cs
mcs/class/System.Web.Routing/System.Web.Routing/RouteValueDictionary.cs
mcs/class/System.Web.Routing/System.Web.Routing/StopRoutingHandler.cs
mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingHandler.cs
mcs/class/System.Web.Routing/System.Web.Routing/UrlRoutingModule.cs
mcs/class/System.Web.Routing/System.Web.Routing/VirtualPathData.cs
mcs/class/System.Web/Assembly/AssemblyInfo.cs
mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
mcs/class/System.Web/System.Web.Caching/CachedVaryBy.cs
mcs/class/System.Web/System.Web.Caching/OutputCacheModule.cs
mcs/class/System.Web/System.Web.Caching/OutputCacheProvider.cs
mcs/class/System.Web/System.Web.Caching/SqlCacheDependency.cs
mcs/class/System.Web/System.Web.Compilation/AppResourcesAssemblyBuilder.cs
mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
mcs/class/System.Web/System.Web.Compilation/AspParser.cs
mcs/class/System.Web/System.Web.Compilation/BuildManager.cs
mcs/class/System.Web/System.Web.Compilation/BuildProvider.cs
mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs
mcs/class/System.Web/System.Web.Compilation/TagType.cs
mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs
mcs/class/System.Web/System.Web.Compilation/UserControlCompiler.cs
mcs/class/System.Web/System.Web.Configuration_2.0/AuthenticationSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/BuildProviderCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/HttpCapabilitiesBase.cs
mcs/class/System.Web/System.Web.Configuration_2.0/HttpRuntimeSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeySection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidation.cs
mcs/class/System.Web/System.Web.Configuration_2.0/MachineKeyValidationConverter.cs
mcs/class/System.Web/System.Web.Configuration_2.0/OutputCacheSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/PagesSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/PassportAuthentication.cs
mcs/class/System.Web/System.Web.Configuration_2.0/PropertyHelper.cs
mcs/class/System.Web/System.Web.Configuration_2.0/SessionStateSection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
mcs/class/System.Web/System.Web.Mail/MailAttachment.cs
mcs/class/System.Web/System.Web.Mail/MailMessage.cs
mcs/class/System.Web/System.Web.Mail/SmtpMail.cs
mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
mcs/class/System.Web/System.Web.Security/FormsIdentity.cs
mcs/class/System.Web/System.Web.Security/MembershipCreateStatus.cs
mcs/class/System.Web/System.Web.Security/MembershipCreateUserException.cs
mcs/class/System.Web/System.Web.Security/MembershipHelper.cs
mcs/class/System.Web/System.Web.Security/MembershipPasswordException.cs
mcs/class/System.Web/System.Web.Security/MembershipPasswordFormat.cs
mcs/class/System.Web/System.Web.Security/MembershipProvider.cs
mcs/class/System.Web/System.Web.Security/MembershipProviderCollection.cs
mcs/class/System.Web/System.Web.Security/MembershipUser.cs
mcs/class/System.Web/System.Web.Security/MembershipUserCollection.cs
mcs/class/System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventArgs.cs
mcs/class/System.Web/System.Web.Security/PassportAuthenticationEventHandler.cs
mcs/class/System.Web/System.Web.Security/PassportAuthenticationModule.cs
mcs/class/System.Web/System.Web.Security/PassportIdentity.cs
mcs/class/System.Web/System.Web.Security/RolePrincipal.cs
mcs/class/System.Web/System.Web.Security/RoleProvider.cs
mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
mcs/class/System.Web/System.Web.SessionState_2.0/SessionSQLServerHandler.cs
mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateServerHandler.cs
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlHead.cs
mcs/class/System.Web/System.Web.UI.WebControls/BaseDataBoundControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/BaseDataList.cs
mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
mcs/class/System.Web/System.Web.UI.WebControls/ChangePassword.cs
mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/CheckBoxList.cs
mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataListItem.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
mcs/class/System.Web/System.Web.UI.WebControls/DropDownList.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs
mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs
mcs/class/System.Web/System.Web.UI.WebControls/IPersistedSelector.cs
mcs/class/System.Web/System.Web.UI.WebControls/Image.cs
mcs/class/System.Web/System.Web.UI.WebControls/ImageButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/ImageMap.cs
mcs/class/System.Web/System.Web.UI.WebControls/Label.cs
mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/Login.cs
mcs/class/System.Web/System.Web.UI.WebControls/LoginName.cs
mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBinding.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuTableRenderer.cs
mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/PasswordRecovery.cs
mcs/class/System.Web/System.Web.UI.WebControls/ProfileParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
mcs/class/System.Web/System.Web.UI.WebControls/RepeatLayout.cs
mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
mcs/class/System.Web/System.Web.UI.WebControls/Table.cs
mcs/class/System.Web/System.Web.UI.WebControls/TableCell.cs
mcs/class/System.Web/System.Web.UI.WebControls/TableRow.cs
mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs
mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
mcs/class/System.Web/System.Web.UI.WebControls/ValidationSummary.cs
mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
mcs/class/System.Web/System.Web.UI.WebControls/XmlDataSource.cs
mcs/class/System.Web/System.Web.UI/ApplicationFileParser.cs
mcs/class/System.Web/System.Web.UI/BasePartialCachingControl.cs
mcs/class/System.Web/System.Web.UI/ClientScriptManager.cs
mcs/class/System.Web/System.Web.UI/CodeRenderBuilder.cs
mcs/class/System.Web/System.Web.UI/Control.cs
mcs/class/System.Web/System.Web.UI/ControlCachePolicy.cs
mcs/class/System.Web/System.Web.UI/KeyedList.cs
mcs/class/System.Web/System.Web.UI/LosFormatter.cs
mcs/class/System.Web/System.Web.UI/MasterPage.cs
mcs/class/System.Web/System.Web.UI/ObjectConverter.cs
mcs/class/System.Web/System.Web.UI/Page.cs
mcs/class/System.Web/System.Web.UI/PageParser.cs
mcs/class/System.Web/System.Web.UI/PartialCachingAttribute.cs
mcs/class/System.Web/System.Web.UI/StaticPartialCachingControl.cs
mcs/class/System.Web/System.Web.UI/TemplateControlParser.cs
mcs/class/System.Web/System.Web.UI/TemplateParser.cs
mcs/class/System.Web/System.Web.UI/UserControlParser.cs
mcs/class/System.Web/System.Web.Util/HttpEncoder.cs
mcs/class/System.Web/System.Web.Util/MachineKeySectionUtils.cs
mcs/class/System.Web/System.Web/HttpApplication.cs
mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
mcs/class/System.Web/System.Web/HttpCacheVaryByContentEncodings.cs
mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
mcs/class/System.Web/System.Web/HttpContext.cs
mcs/class/System.Web/System.Web/HttpException.cs
mcs/class/System.Web/System.Web/HttpHeaderCollection.cs
mcs/class/System.Web/System.Web/HttpRequest.cs
mcs/class/System.Web/System.Web/HttpResponse.cs
mcs/class/System.Web/System.Web/HttpResponseHeader.cs
mcs/class/System.Web/System.Web/HttpUtility.cs
mcs/class/System.Web/System.Web/IPartitionResolver.cs
mcs/class/System.XML/System.Xml/DtdProcessing.cs
mcs/class/System.XML/System.Xml/NamespaceHandling.cs
mcs/class/System.XML/System.Xml/XmlConvert.cs
mcs/class/System.XML/System.Xml/XmlDocument.cs
mcs/class/System.XML/System.Xml/XmlReader.cs
mcs/class/System.XML/System.Xml/XmlReaderSettings.cs
mcs/class/System.XML/System.Xml/XmlTextReader2.cs
mcs/class/System.XML/System.Xml/XmlWriter.cs
mcs/class/System.XML/System.Xml/XmlWriterSettings.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/ReaderOptions.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/SaveOptions.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/XNode.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/XNodeReader.cs
mcs/class/System.Xml.Linq/System.Xml.Linq/XStreamingElement.cs
mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
mcs/class/System/System.CodeDom.Compiler/CodeDomProvider.cs
mcs/class/System/System.CodeDom.Compiler/CompilerCollection.cs
mcs/class/System/System.CodeDom.Compiler/CompilerInfo.cs
mcs/class/System/System.CodeDom.Compiler/CompilerParameters.cs
mcs/class/System/System.CodeDom.Compiler/CompilerResults.cs
mcs/class/System/System.Collections.ObjectModel/ObservableCollection.cs
mcs/class/System/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
mcs/class/System/System.Collections.Specialized/INotifyCollectionChanged.cs
mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedAction.cs
mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
mcs/class/System/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
mcs/class/System/System.Diagnostics.CodeAnalysis/ExcludeFromCodeCoverageAttribute.cs
mcs/class/System/System.Diagnostics/Debug.cs
mcs/class/System/System.Diagnostics/Stopwatch.cs
mcs/class/System/System.Net.Configuration/SmtpNetworkElement.cs
mcs/class/System/System.Net.Mail/MailMessage.cs
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
mcs/class/System/System.Net.Sockets/Socket_2_1.cs
mcs/class/System/System.Net/DnsEndPoint.cs
mcs/class/System/System.Net/FileWebResponse.cs
mcs/class/System/System.Net/HttpListenerRequest.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/HttpWebResponse.cs
mcs/class/System/System.Net/IPAddress.cs
mcs/class/System/System.Net/NetworkCredential.cs
mcs/class/System/System.Net/WebRequest.cs
mcs/class/System/System.Net/WebResponse.cs
mcs/class/System/System.Net/WebUtility.cs
mcs/class/System/System.Runtime.Versioning/FrameworkName.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBinding.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ChannelBindingKind.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicy.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ExtendedProtectionPolicyTypeConverter.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/PolicyEnforcement.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ProtectionScenario.cs
mcs/class/System/System.Security.Authentication.ExtendedProtection/ServiceNameCollection.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs
mcs/class/System/System/Uri.cs
mcs/class/System/System/UriBuilder.cs
mcs/class/System/System/UriFormatException.cs
mcs/class/System/System/UriHelper.cs
mcs/class/WebMatrix.Data/WebMatrix.Data/ConnectionEventArgs.cs
mcs/class/WebMatrix.Data/WebMatrix.Data/Database.cs
mcs/class/WebMatrix.Data/WebMatrix.Data/DynamicRecord.cs
mcs/class/WindowsBase/System.Collections.ObjectModel/ObservableCollection.cs
mcs/class/WindowsBase/System.Collections.ObjectModel/ReadOnlyObservableCollection.cs
mcs/class/WindowsBase/System.Collections.Specialized/INotifyCollectionChanged.cs
mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedAction.cs
mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventArgs.cs
mcs/class/WindowsBase/System.Collections.Specialized/NotifyCollectionChangedEventHandler.cs
mcs/class/WindowsBase/System.ComponentModel/IEditableCollectionViewAddNewItem.cs
mcs/class/WindowsBase/System.Windows.Markup/AmbientAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/ConstructorArgumentAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/ContentPropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/ContentWrapperAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/DateTimeValueSerializer.cs
mcs/class/WindowsBase/System.Windows.Markup/DependsOnAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/IComponentConnector.cs
mcs/class/WindowsBase/System.Windows.Markup/INameScope.cs
mcs/class/WindowsBase/System.Windows.Markup/IValueSerializerContext.cs
mcs/class/WindowsBase/System.Windows.Markup/IXamlTypeResolver.cs
mcs/class/WindowsBase/System.Windows.Markup/MarkupExtension.cs
mcs/class/WindowsBase/System.Windows.Markup/MarkupExtensionReturnTypeAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/NameScopePropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/RootNamespaceAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/RuntimeNamePropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/UidDuringInitializationAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/UidPropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/UsableDuringInitializationAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/ValueSerializer.cs
mcs/class/WindowsBase/System.Windows.Markup/ValueSerializerAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/XmlLangPropertyAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/XmlnsDefinitionAttribute.cs
mcs/class/WindowsBase/System.Windows.Markup/XmlnsPrefixAttribute.cs
mcs/class/corlib/Microsoft.Win32.SafeHandles/SafeRegistryHandle.cs
mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Registry.cs
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
mcs/class/corlib/Microsoft.Win32/RegistryOptions.cs
mcs/class/corlib/Microsoft.Win32/RegistryValueKind.cs
mcs/class/corlib/Microsoft.Win32/RegistryView.cs
mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs
mcs/class/corlib/System.Collections.Concurrent.Partitioners/EnumerablePartitioner.cs
mcs/class/corlib/System.Collections.Concurrent.Partitioners/ListPartitioner.cs
mcs/class/corlib/System.Collections.Concurrent.Partitioners/UserRangePartitioner.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentOrderedList.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentStack.cs
mcs/class/corlib/System.Collections.Concurrent/IProducerConsumerCollection.cs
mcs/class/corlib/System.Collections.Concurrent/OrderablePartitioner.cs
mcs/class/corlib/System.Collections.Concurrent/Partitioner.cs
mcs/class/corlib/System.Collections.Concurrent/SplitOrderedList.cs
mcs/class/corlib/System.Collections.Generic/IComparer.cs
mcs/class/corlib/System.Collections.Generic/IEnumerable.cs
mcs/class/corlib/System.Collections.Generic/IEnumerator.cs
mcs/class/corlib/System.Collections.Generic/IEqualityComparer.cs
mcs/class/corlib/System.Collections/IStructuralComparable.cs
mcs/class/corlib/System.Collections/IStructuralEquatable.cs
mcs/class/corlib/System.Collections/StructuralComparisons.cs
mcs/class/corlib/System.Diagnostics.Contracts.Internal/ContractHelper.cs
mcs/class/corlib/System.Diagnostics.Contracts/Contract.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractClassAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractClassForAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractException.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractFailedEventArgs.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractFailureKind.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractInvariantMethodAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractPublicPropertyNameAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractReferenceAssemblyAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractRuntimeIgnoredAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractShouldAssertException.cs
mcs/class/corlib/System.Diagnostics.Contracts/ContractVerificationAttribute.cs
mcs/class/corlib/System.Diagnostics.Contracts/PureAttribute.cs
mcs/class/corlib/System.Diagnostics/Debugger.cs
mcs/class/corlib/System.Globalization/CultureInfo.cs
mcs/class/corlib/System.Globalization/CultureNotFoundException.cs
mcs/class/corlib/System.Globalization/CultureTypes.cs
mcs/class/corlib/System.Globalization/TimeSpanStyles.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorage.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityOptions.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageSecurityState.cs
mcs/class/corlib/System.IO/BinaryReader.cs
mcs/class/corlib/System.IO/BinaryWriter.cs
mcs/class/corlib/System.IO/Directory.cs
mcs/class/corlib/System.IO/DirectoryInfo.cs
mcs/class/corlib/System.IO/File.cs
mcs/class/corlib/System.IO/FileStream.cs
mcs/class/corlib/System.IO/Path.cs
mcs/class/corlib/System.IO/Stream.cs
mcs/class/corlib/System.IO/UnmanagedMemoryAccessor.cs
mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
mcs/class/corlib/System.Reflection.Emit/DynamicILInfo.cs
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
mcs/class/corlib/System.Reflection.Emit/GenericTypeParameterBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ILGenerator.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
mcs/class/corlib/System.Reflection.Emit/SignatureHelper.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Reflection/ConstructorInfo.cs
mcs/class/corlib/System.Reflection/CustomAttributeData.cs
mcs/class/corlib/System.Reflection/CustomAttributeNamedArgument.cs
mcs/class/corlib/System.Reflection/CustomAttributeTypedArgument.cs
mcs/class/corlib/System.Reflection/EventInfo.cs
mcs/class/corlib/System.Reflection/ExceptionHandlingClause.cs
mcs/class/corlib/System.Reflection/FieldInfo.cs
mcs/class/corlib/System.Reflection/LocalVariableInfo.cs
mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs
mcs/class/corlib/System.Reflection/MemberInfo.cs
mcs/class/corlib/System.Reflection/MethodBase.cs
mcs/class/corlib/System.Reflection/MethodBody.cs
mcs/class/corlib/System.Reflection/MethodInfo.cs
mcs/class/corlib/System.Reflection/Module.cs
mcs/class/corlib/System.Reflection/MonoAssembly.cs
mcs/class/corlib/System.Reflection/MonoEvent.cs
mcs/class/corlib/System.Reflection/MonoField.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System.Reflection/MonoModule.cs
mcs/class/corlib/System.Reflection/MonoParameterInfo.cs
mcs/class/corlib/System.Reflection/MonoProperty.cs
mcs/class/corlib/System.Reflection/ParameterInfo.cs
mcs/class/corlib/System.Reflection/PropertyInfo.cs
mcs/class/corlib/System.Resources/ResourceManager.cs
mcs/class/corlib/System.Resources/ResourceReader.cs
mcs/class/corlib/System.Resources/ResourceWriter.cs
mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs
mcs/class/corlib/System.Runtime.CompilerServices/ReferenceAssemblyAttribute.cs
mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs
mcs/class/corlib/System.Runtime.CompilerServices/TypeForwardedFromAttribute.cs
mcs/class/corlib/System.Runtime.ExceptionServices/FirstChanceExceptionEventArgs.cs
mcs/class/corlib/System.Runtime.ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
mcs/class/corlib/System.Runtime.Hosting/ActivationArguments.cs
mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs
mcs/class/corlib/System.Runtime.InteropServices/RuntimeEnvironment.cs
mcs/class/corlib/System.Runtime.InteropServices/SafeBuffer.cs
mcs/class/corlib/System.Runtime.InteropServices/TypeIdentifierAttribute.cs
mcs/class/corlib/System.Runtime.InteropServices/TypeLibImporterFlags.cs
mcs/class/corlib/System.Runtime.Remoting.Lifetime/LifetimeServices.cs
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
mcs/class/corlib/System.Runtime.Serialization/ISafeSerializationData.cs
mcs/class/corlib/System.Runtime.Serialization/SafeSerializationEventArgs.cs
mcs/class/corlib/System.Runtime.Serialization/SerializationBinder.cs
mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
mcs/class/corlib/System.Runtime.Versioning/ComponentGuaranteesOptions.cs
mcs/class/corlib/System.Runtime.Versioning/TargetFrameworkAttribute.cs
mcs/class/corlib/System.Runtime/AssemblyTargetedPatchBandAttribute.cs
mcs/class/corlib/System.Runtime/TargetedPatchingOptOutAttribute.cs
mcs/class/corlib/System.Security.AccessControl/AccessRule_T.cs
mcs/class/corlib/System.Security.AccessControl/AuditRule_T.cs
mcs/class/corlib/System.Security.AccessControl/ObjectSecurity.cs
mcs/class/corlib/System.Security.AccessControl/ObjectSecurity_T.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
mcs/class/corlib/System.Security.Cryptography/AsymmetricAlgorithm.cs
mcs/class/corlib/System.Security.Cryptography/CryptoAPITransform.cs
mcs/class/corlib/System.Security.Cryptography/CryptoConfig.cs
mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs
mcs/class/corlib/System.Security.Cryptography/CspProviderFlags.cs
mcs/class/corlib/System.Security.Cryptography/DeriveBytes.cs
mcs/class/corlib/System.Security.Cryptography/FromBase64Transform.cs
mcs/class/corlib/System.Security.Cryptography/HashAlgorithm.cs
mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs
mcs/class/corlib/System.Security.Cryptography/RNGCryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/RandomNumberGenerator.cs
mcs/class/corlib/System.Security.Cryptography/Rfc2898DeriveBytes.cs
mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs
mcs/class/corlib/System.Security.Cryptography/SymmetricAlgorithm.cs
mcs/class/corlib/System.Security.Cryptography/ToBase64Transform.cs
mcs/class/corlib/System.Security.Permissions/ReflectionPermissionAttribute.cs
mcs/class/corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
mcs/class/corlib/System.Security.Permissions/SecurityAction.cs
mcs/class/corlib/System.Security.Policy/ApplicationDirectory.cs
mcs/class/corlib/System.Security.Policy/ApplicationTrust.cs
mcs/class/corlib/System.Security.Policy/Evidence.cs
mcs/class/corlib/System.Security.Policy/EvidenceBase.cs
mcs/class/corlib/System.Security.Policy/Gac.cs
mcs/class/corlib/System.Security.Policy/Hash.cs
mcs/class/corlib/System.Security.Policy/PermissionRequestEvidence.cs
mcs/class/corlib/System.Security.Policy/Publisher.cs
mcs/class/corlib/System.Security.Policy/Site.cs
mcs/class/corlib/System.Security.Policy/StrongName.cs
mcs/class/corlib/System.Security.Policy/Url.cs
mcs/class/corlib/System.Security.Policy/Zone.cs
mcs/class/corlib/System.Security/SecureString.cs
mcs/class/corlib/System.Security/SecurityContext.cs
mcs/class/corlib/System.Security/SecurityContextSource.cs
mcs/class/corlib/System.Security/SecurityCriticalAttribute.cs
mcs/class/corlib/System.Security/SecurityCriticalScope.cs
mcs/class/corlib/System.Security/SecurityManager.cs
mcs/class/corlib/System.Security/SecurityManager_mobile.cs
mcs/class/corlib/System.Security/SecurityRuleSet.cs
mcs/class/corlib/System.Security/SecurityRulesAttribute.cs
mcs/class/corlib/System.Text/StringBuilder.cs
mcs/class/corlib/System.Threading.Tasks/CyclicDeque.cs
mcs/class/corlib/System.Threading.Tasks/IConcurrentDeque.cs
mcs/class/corlib/System.Threading.Tasks/IScheduler.cs
mcs/class/corlib/System.Threading.Tasks/Parallel.cs
mcs/class/corlib/System.Threading.Tasks/ParallelLoopResult.cs
mcs/class/corlib/System.Threading.Tasks/ParallelLoopState.cs
mcs/class/corlib/System.Threading.Tasks/ParallelOptions.cs
mcs/class/corlib/System.Threading.Tasks/PopResult.cs
mcs/class/corlib/System.Threading.Tasks/SimpleConcurrentBag.cs
mcs/class/corlib/System.Threading.Tasks/SynchronizationContextScheduler.cs
mcs/class/corlib/System.Threading.Tasks/Task.cs
mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs
mcs/class/corlib/System.Threading.Tasks/TaskCanceledException.cs
mcs/class/corlib/System.Threading.Tasks/TaskCompletionQueue.cs
mcs/class/corlib/System.Threading.Tasks/TaskCompletionSource.cs
mcs/class/corlib/System.Threading.Tasks/TaskConstants.cs
mcs/class/corlib/System.Threading.Tasks/TaskContinuation.cs
mcs/class/corlib/System.Threading.Tasks/TaskContinuationOptions.cs
mcs/class/corlib/System.Threading.Tasks/TaskCreationOptions.cs
mcs/class/corlib/System.Threading.Tasks/TaskDebuggerView.cs
mcs/class/corlib/System.Threading.Tasks/TaskExceptionSlot.cs
mcs/class/corlib/System.Threading.Tasks/TaskExtensionsImpl.cs
mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs
mcs/class/corlib/System.Threading.Tasks/TaskFactory_T.cs
mcs/class/corlib/System.Threading.Tasks/TaskScheduler.cs
mcs/class/corlib/System.Threading.Tasks/TaskSchedulerException.cs
mcs/class/corlib/System.Threading.Tasks/TaskStatus.cs
mcs/class/corlib/System.Threading.Tasks/Task_T.cs
mcs/class/corlib/System.Threading.Tasks/TpScheduler.cs
mcs/class/corlib/System.Threading.Tasks/UnobservedTaskExceptionEventArgs.cs
mcs/class/corlib/System.Threading/AsyncFlowControl.cs
mcs/class/corlib/System.Threading/CancellationToken.cs
mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
mcs/class/corlib/System.Threading/CancellationTokenSource.cs
mcs/class/corlib/System.Threading/CompressedStack.cs
mcs/class/corlib/System.Threading/CountdownEvent.cs
mcs/class/corlib/System.Threading/ExecutionContext.cs
mcs/class/corlib/System.Threading/LazyInitializer.cs
mcs/class/corlib/System.Threading/LazyThreadSafetyMode.cs
mcs/class/corlib/System.Threading/LockRecursionException.cs
mcs/class/corlib/System.Threading/ManualResetEventSlim.cs
mcs/class/corlib/System.Threading/Monitor.cs
mcs/class/corlib/System.Threading/SemaphoreSlim.cs
mcs/class/corlib/System.Threading/SpinLock.cs
mcs/class/corlib/System.Threading/SpinWait.cs
mcs/class/corlib/System.Threading/Thread.cs
mcs/class/corlib/System.Threading/ThreadLocal.cs
mcs/class/corlib/System.Threading/WaitHandle.cs
mcs/class/corlib/System.Threading/Watch.cs
mcs/class/corlib/System/Action.cs
mcs/class/corlib/System/Activator.cs
mcs/class/corlib/System/AggregateException.cs
mcs/class/corlib/System/AppDomain.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/Char.cs
mcs/class/corlib/System/CharEnumerator.cs
mcs/class/corlib/System/Comparison.cs
mcs/class/corlib/System/ContextMarshalException.cs
mcs/class/corlib/System/Converter.cs
mcs/class/corlib/System/Decimal.cs
mcs/class/corlib/System/Double.cs
mcs/class/corlib/System/Enum.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/Exception.cs
mcs/class/corlib/System/ExecutionEngineException.cs
mcs/class/corlib/System/Funcs.cs
mcs/class/corlib/System/GC.cs
mcs/class/corlib/System/Guid.cs
mcs/class/corlib/System/IComparable.cs
mcs/class/corlib/System/IObservable.cs
mcs/class/corlib/System/IObserver.cs
mcs/class/corlib/System/InsufficientExecutionStackException.cs
mcs/class/corlib/System/IntPtr.cs
mcs/class/corlib/System/InvalidTimeZoneException.cs
mcs/class/corlib/System/Lazy.cs
mcs/class/corlib/System/MonoType.cs
mcs/class/corlib/System/OperationCanceledException.cs
mcs/class/corlib/System/Predicate.cs
mcs/class/corlib/System/ResolveEventArgs.cs
mcs/class/corlib/System/Single.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/TimeSpan.cs
mcs/class/corlib/System/TimeZoneNotFoundException.cs
mcs/class/corlib/System/Tuple.cs
mcs/class/corlib/System/Tuples.cs
mcs/class/corlib/System/Type.cs
mcs/class/corlib/System/TypeAccessException.cs
mcs/class/corlib/System/TypeSpec.cs
mcs/class/corlib/System/UIntPtr.cs
mcs/class/corlib/System/Version.cs
mcs/class/corlib/System/_AppDomain.cs

index c51d63c78a5b5512b7c395a5ccb09a8b39857726..e61769c1e8662836a9903d304b42cdc982d3aea8 100644 (file)
@@ -48,11 +48,7 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyTrademark("")]\r
 [assembly: AssemblyCulture("")]\r
 \r
-#if NET_4_0\r
 [assembly: AssemblyVersion("4.84.0.0")]\r
-#else\r
-[assembly: AssemblyVersion("2.84.0.0")]\r
-#endif\r
 \r
 [assembly: AssemblyDelaySign(true)]\r
 [assembly: AssemblyKeyFile("SharpZipLib.pub")]\r
index 38dda5712a884a48bcefbb9e75df88e08f4766cc..a27ce51eb8634ced21862072e9b1547ea8334b0e 100644 (file)
@@ -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)
                {
index 0d776b9fbb25151d8cb566099d2e858ff4d0fe9e..d0dcf340a7d98d96556d940e2d8248a17170a7c5 100644 (file)
@@ -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);
index ea0d322b3a652a3b8103a025fe8eb9f58869c79e..31a72d2b341623a764163f9aee948fc07d344197 100644 (file)
@@ -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 {
index b4d996faa9c370a67b58cdcb4a7b112494f7a685..14d026ff973124ead2e06fd5e98318941fb93a78 100644 (file)
@@ -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;
                }
 
index 065dc4c77bc490dc2cb67624f455d3d9b9c48196..097fd8b284420f5c5a837c7ad3e1987c684491db 100644 (file)
@@ -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)
index 630cb4a46e17d3041591275fc7f4b78c67cfda71..21008a5ee6b606806244548a1dc534ccdc2b0e19 100644 (file)
@@ -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; }
index a6e27f24b054ac32e2c8eb778d0b9deb9f47071d..44e2ac5905d401873e5f606f0f7caac709347449 100644 (file)
@@ -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
 
        }
 }
index 20566ffe215bd30b2575b4dd0403602e101eea88..b2e337403795708b9a7a0fd6352f72d99929f98e 100644 (file)
@@ -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 {
index 4655d80e0f7c3970eb5d7be6f05eac5eca5ff985..d0cb357dc9db75177e44ea51d06d0ef86f63f588 100644 (file)
@@ -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 {
index e6497b0f3d058dc9c573c09f8dcd2299f7fa4b77..1ca70e2fbe2a7b3b75e9129e9f2f80e5818a8c94 100644 (file)
@@ -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
        }
 }
 
index c0b5b3c05266f7fdf172ba35c6c3056dfae418c4..9d2612e7463139d738369dbf1fe812a882234f13 100644 (file)
@@ -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
        }
 }
 
index a928e6187b7560ae897731deb949fe679d92fa56..b959fa8d3664cdc9905593f4b54593dc7593e029 100644 (file)
@@ -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
        }
 }
index 10923776c8393c2c718f9ce9f10be20265d5972e..d4d7370179eb1446c48a988810bc31e3b2097d51 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 using System;
 
 namespace Microsoft.Build.Framework
@@ -10,4 +9,3 @@ namespace Microsoft.Build.Framework
        }
 }
 
-#endif
index 4b08961e0fcd67d6dd2d9ba4fcf1ea488e2dbe20..dd2e62b7739e627db26921713ad6acdf9e28217c 100644 (file)
@@ -1,6 +1,5 @@
 using System;
 
-#if NET_4_0
 
 namespace Microsoft.Build.Framework
 {
@@ -11,5 +10,4 @@ namespace Microsoft.Build.Framework
        }
 }
 
-#endif
 
index 3fe741d436ee140d3f8fbd0e8ba33b5682cc6985..3da4baa5c1dffd67eac5fa70c92217de7c51b633 100644 (file)
@@ -27,7 +27,6 @@
 //
 
 
-#if NET_4_0
 
 using System;
 using System.Collections;
@@ -41,4 +40,3 @@ namespace Microsoft.Build.Framework
        }
 }
 
-#endif
index b9d882c62e9239bdf8c652f44f6cce6b77a06372..1fa2e084219e9a4092d96497b4bb28638d363133 100644 (file)
@@ -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
index 26a0306278ac6355ab904dfd71ce316a735e5522..33a9af67dc6318db4696a9423858f482e0652820 100644 (file)
@@ -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
index dab39dd9841edbee7015ea4eb64df36d6a2ef778..2102d41c3f32708d5536d74f87741b8fb7acc8d9 100644 (file)
@@ -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
index ebabe1103afd8d413941eb427dcbd3da292c73f0..07a5db8f5ecac2606961b0a68e5d04895f9c243b 100644 (file)
 ///// 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
index 06b04b2670caab0922c550dc1946059571470c88..ec58c1eaf8b62cac0b08e4a5397f3669e525883d 100644 (file)
@@ -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)
index cfcc2d65892d11ade52ddf8ae604b85f010c16e0..fe1f00bfa5f46861467f6c1d89c198df635b5679 100644 (file)
@@ -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]
index 3ab6979ef9a0af4ed6a55cf04f6c7b3eb97f8ee2..699e33899b9dec7107fe98ea933ac7a4d457123b 100644 (file)
@@ -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]
index a8ad35c8e69edb70109783b23ea35a81116d2001..b74e26ab43eb365ea8c2f8fae31138aa8dd3041c 100644 (file)
@@ -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
index 5a40c8e0c1ec4bdcec506fc628d05fde656eee88..a4fa05f915892dfd090be3fcbb01980aa3d2bfb1 100644 (file)
@@ -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; }
 
index 23e7e2c3c7f8ebb93d7f87c1649f50c77dc12756..e89b877d179975133bd7b83293c219effd58c9d7 100644 (file)
 // 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
index 7358d9604b607487c6d05b55d2e263f7b7440242..bc3a5fbd15e28492432797d72828bc09af43db7f 100644 (file)
@@ -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
                        }
                }
 
index 55724e0e7774709c4d5e7fc8fd5f83c3958f532e..2afcfe6716188ce4cc9b77e71d0c4119cc93ebf4 100644 (file)
@@ -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
index d15d7943fc0bc868e9ec3f8e19ffd4512c2d5fca..6eb9193bbc904f473886118766d5236dad7a8a12 100644 (file)
@@ -328,11 +328,7 @@ namespace Microsoft.Build.Utilities
                        }
                }
 
-#if NET_4_0
                public
-#else
-               protected
-#endif
                void AppendTextUnquoted (string textToAppend)
                {
                        commandLine.Append (textToAppend);
index 0a894e7b0f6a36eda8cf3856ff61e2d4f4986e7c..959647f9593e7d264f484f981032a3ebd35554b9 100644 (file)
@@ -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
        }
 }
index c287842987b1db5589c6762e5656b893c414c7d7..2d2de50cd9e6d8c4d73ab42bade65cbea2c89ff2 100644 (file)
@@ -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; }
index 736b8ad0c4a4ad76cbccd18e642c8fc600b70315..62778aeab2a894ea97ea95b57b052dbe76ed2c54 100644 (file)
@@ -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)
index df15d1a84690426514bc23b4a411342b9b6a873b..3bbb97dda66e6df7a096a56b3ba4239814868bbd 100644 (file)
@@ -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 {
index 60ccbe37bde67cffc80d065984522b6351688169..d7d761f3a95e8ce8d85e48f17833a6ba8da77520 100644 (file)
@@ -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
index 19b444ebd39e40afb797f44f270c32cec75089b0..a1c13b6fbd98cfd10d8014f56b260c86a9c53dc5 100644 (file)
@@ -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
index 07b7ff28ba5950db6cf8b44fdd9685efa5c2813b..cc21c209b67ec597de7c776910e22f90cd3fbaf5 100644 (file)
@@ -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
index ad9abd19f51ab3b89aeede0e5368b34f950f7776..6692ad565cc628c72231c63f00415f354e0e6b07 100644 (file)
@@ -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
index 71200f3405070f37c705d82cd58137b088802b45..509b02e7a069f8ad6243ba6056bc54186d6f51ee 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -140,4 +139,3 @@ namespace Mono.Threading
        }
 }
 
-#endif
index 3be91f2f03622f18496fcf04f10e4396187fad14..97acdf9f88a27d2c6610cd363c60141c9aec9b6c 100644 (file)
@@ -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
index 38efde695acc0ae6abd034a8c2ecd307082a63c5..ff4d3f75ddaf6baf42cac9c234582f9ae313249f 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -48,4 +47,3 @@ namespace Mono.Threading
                }
        }
 }
-#endif
index 6d78fc9d38632340661a6579bf218a64c5f7a7d2..91d8034467b3999864d70f1e01c493a60303b75e 100644 (file)
@@ -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;
                        }
 
index 55af156cb6d54c3e5f524050c1e8da6146d214bd..1e08ff38590bddf4950a8e3c9b03d0d8f2586051 100644 (file)
@@ -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'};
index 3b5cf8d1d24dd0aa5d2eba7688903a9295825fd5..9ce9f12959792d226eb5e13f841e4667e12ee2af 100644 (file)
@@ -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
index 73f12afc504a0aaea142992804e9cb6eb5c2ecb6..f165f3f62796abe4f1b545373fa8790efda7696f 100644 (file)
@@ -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
index a146fd9002379272a51617de921f214143b5714f..6b6f3d1d73a3fc353987faf160ef227faeafbe8c 100644 (file)
@@ -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);
index feaaa5ab98493990f371a852f448aaddf549e297..5bd03a9fe3b3b9e4ed5b3b679eaee3f1872b1692 100644 (file)
@@ -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
index eaf4473c727aec18836dbec7b92c54b4ec7a1e9f..95fb9d757c617ad31b174792e3259e546bbcfe1f 100644 (file)
@@ -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
 
index ced4a161b2dd272c975f61defd4aa3147554e8ca..f60d81a6f102ff28dcb66a2d2365af4fde7fc38a 100644 (file)
@@ -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
index 517ed6cbf80e7293ebfedf5b3ce341fa9a0c55a6..68c0f32f00bc03ff7121472f32317ca847ac8913 100644 (file)
@@ -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
index e74c10edfa45b3d55715b862efcf80c300b764bc..e9bd968b646dba4ca303a43b055a8de799e70bf1 100644 (file)
@@ -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
index c66acdb55c6cd6fd24bbbb9de684bd0bccd59141..783aa9142fbbc18bd8d8adc57259b592eea12cec 100644 (file)
@@ -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
index 651e2d0d262449e04229a281fd4bd3ff86ba26ef..58f933ae7921fdaea243b1a09a993d0dde7db64e 100644 (file)
@@ -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
index 9950ac8e018cce9ddf77eeaede297b10d6520f4e..b79455944f0324e90e3c3774afc344c25068e84d 100644 (file)
 // 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
index 37cc578c3168c35e032dede542fc1d42fc752c6e..0caa593f5ca624332eef9b4f4c8849fbfa5835ab 100644 (file)
@@ -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
index 4dbb49b23b43f776ca7cfdc1ee647ce91c7056ed..4065313d22a518d288be59e3fcf98f7fc52ebe85 100644 (file)
@@ -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
index 646d7e76715c5dcac09b6c163e4d9c00131c0987..b4cbeb5b54086d02b8df91250349418638038357 100644 (file)
@@ -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
index e09dfbf9543e143e154145ba89f3cfad81328d24..d7ae545c43b9f2c90bc2236964c5dff06fbd9f0f 100644 (file)
@@ -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
index c3b766eaa2a5121f9c1b947bbd249f6fd5ca669f..5050abf761ba49410bb49cccbccf1ec93f22cbf1 100644 (file)
@@ -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
index 55bd421f0fab7ff1ae8563ee8b4832cf0f96bd9d..c5ac99f772b132165f5308a90c7c1d6ed2bd17bc 100644 (file)
@@ -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
index adec857c2d5d64a9996977573e935604742868ed..8e3f09a29c48e23131a5532e99c9afa0fd06ed78 100644 (file)
@@ -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
index 79ed83eb11cc5400c7cac2c21eb452a7a3469194..60bbef4e885564e0dde5d03b64e526b81d500539 100644 (file)
@@ -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
index 4a320c78935eed7e7be979c04ef372f8e58effb3..96eedc285065c93b4eee7ee2b5a95d8f82cf4e8c 100644 (file)
@@ -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
index a6c713e26b8b9ba59fd2d77ae68c38e2b29d697a..902da86f6d60ce623fa95b1cd3f3380f9473bf16 100644 (file)
@@ -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
index d3b7caeeb9be0938344f0d6cb07e8e9af6db505a..bacf7701e7b069403eba348770b4bd378a1b2158 100644 (file)
@@ -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
index 4b4b75daf3f67236ca3aaa7ca33dbaeaf4e2b11d..d495090fba16dd3695a357f6f09104d536303dc5 100644 (file)
@@ -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
index 388ae95251779beff491ee8adf7d50f5113bdd3f..e9719402ecfe81fdf82b7e73b936037e1405c90c 100644 (file)
@@ -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
index c7128658a430a3621df2781cde7b09688330230e..8956ddbb15662bca0efb7510968318adb0357fbf 100644 (file)
@@ -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
index 815cb5fc9f630ee47af3f3d92d0dae330c17f07c..bfec9e8579d42081b464cedbdb5215705497f149 100644 (file)
@@ -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
index 78ffd83af200065b894cc93828549d74da5930cb..71c315446c6b1268761371211091a990a8353533 100644 (file)
@@ -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
index 7e3d18be23284badef30c686438d264e53cf4e57..ba5a10b457f02bbb1802640739a6fb8476192ee5 100644 (file)
@@ -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
index 31b70ff5a6650b7aa3eaecdfb6b00d759f756e00..07a509c399991ddf39dbda2b49009213e528c8d6 100644 (file)
@@ -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
index cd1700f33e05b4fdaf54fb9e7324756a75fc955f..118a9f02d6586868468439e94a9612955b8613da 100644 (file)
@@ -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
index 8d9c9ad7f5fe383781fa113b9455d5777b61e1d3..d76f3f981fde0d07e3f96da743f1c55f1000662f 100644 (file)
@@ -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
index 9b9b475ac6807aa71047e8b93ff111d998d485d8..2aa4edcb44037ccae2a38055fda1b8b96e8dd87a 100644 (file)
@@ -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
index 5f974c99df25704e4735ee65e2303ffd761ecc21..68450ad4db3a2a384d22e962d1047eee0f8cfce6 100644 (file)
@@ -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
index b3239e4165fd4ea3c2dc806199774ea640f769c0..dbd137c44bd9a1ff53c37ba44cf86c143ae995d3 100644 (file)
@@ -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
index 0d403ed3a4c8688a1468012e94ad08b0e90769fc..ef0a2d1b910c228cbff1f14f99036d35b3661a63 100644 (file)
@@ -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
index 3864b48a5310e6ce18cc7d468f26aff7c3cff97b..d0063ba691d4a742661ae163698b113d6e4987ea 100644 (file)
@@ -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
index 6795cf02190384ee8b6e3cd317d4ac181dfe88e5..fbd4f02bee4ee27e7ad4181a69be29986b72a7be 100644 (file)
@@ -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
index 5b68a4425a5919342c4995a2f84b924e94a47f7a..c1e608cabbf7c4227ab145b2ee0852d77290cd93 100644 (file)
@@ -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
index 013dc53598a27f71103203b7b63e39b01c9d44a0..8ad81c4139a0ea61553c19fe325aa017df14f600 100644 (file)
@@ -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
index 6012f7904937ae426aeb08f2035a959fe89673a1..48d5fa546c531c549cc02beef08e975fbb08e420 100644 (file)
@@ -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
index 85996ef89beb4d84fae2abbbfa6db0153074fbd0..d34cccdb1c15315ce934b8aa701bd1664aec14cb 100644 (file)
@@ -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
index e9bf2f8b4e2b3c127dd38d3670d47d3336a80b96..d4bcae6b588455e59835343f0219b42fdf70600a 100644 (file)
@@ -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
index a3d17520c621a196870207279f454957e72c2565..9b9fc91edd21743293bcec0e1e5c83280cd6c482 100644 (file)
@@ -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
index cb46dcc86aed7a10eba8370528dcb89a34cf89e9..b1fa13f774e720b6c4c9e31786f03145dd7aa02f 100644 (file)
@@ -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
index 1bf8f6b3cc671ca4b6bdba9ebb215c73b54ccc1f..770951eacf81eebb22a9ef7c8c2dbb6b84fe20ee 100644 (file)
@@ -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
index 01cab21f68eddda7c890fa44c29cccae4900daff..5de8f5d35c48f2f36bd650bae70af83c5fa6a5dd 100644 (file)
@@ -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
index 7ca9a8586d3edca94fcf833e8ff9e133ef6f2c60..d481fa04934c9aa168cc9715339a3129e2ba49b5 100644 (file)
@@ -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
index dc533d750343d52824c0d3ae1c27359cf2e6133b..fb1c48be8f9fc63fe252c4979b3214e24fa9fbe0 100644 (file)
@@ -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
index e2c99d2ed57e249dc417efd9a004de38fcc0fb87..45c2f852762c5f6ceef1ff70b94af9a8e5e8fecc 100644 (file)
@@ -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
index 909de501bda294746b1f09c93f8f4a58086051c7..b7687d38e3e1ac33b72852d7f0dc426c779e651f 100644 (file)
@@ -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
index 8b4c41210c96d6f819e020e4f869127b25113cc6..efe9792839d928ac23542a0967e4a48420d95b0a 100644 (file)
@@ -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
index b8be6abc055c541ce38e60a69ed1a5a4853f7482..423f036b32c17e942ce25d7887b4c71a3bb79ed2 100644 (file)
@@ -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
index 157b53c8be37a1a82d57c585c710975749a28eee..7bd031f567fe69d2f4b8e3642587fa89b84d3053 100644 (file)
@@ -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
 
index 7d7b16abbf04c8c908eb6c3cba9ecd67ea7bc09d..f97ed482815171f7565137f52de7cfa146efcc1b 100644 (file)
@@ -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
index 8558f095f1f74cdb031b8f9dbbacb58619c3fe36..403bf985a7c981b66c02435623014651101f3a1e 100644 (file)
@@ -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
index 3ead6e60bad64ecbab461fbaaf67bcda882f216c..b57cf63fefbe86830c4a3e10752ec26adcce474b 100644 (file)
@@ -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
index b5e2bce9280f0377f37181351d94ad230a75c248..d7c7c6d5b4636bdedfb3d587d25f9648d6a9b775 100644 (file)
@@ -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
index e08aa64e6d28f1848ffbee06f3d0818fa84efb8d..de6267a531853e2f59841cfed61407d5e7dec837 100644 (file)
 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; }
        }
index 9c81bfd853f96e46a7cea31f51dc09369edf5cf9..d2ae730245ba174e8986f9ee9f4599b99e14e69d 100644 (file)
 //
 
 namespace System.Linq {
-#if NET_4_0
        public interface IOrderedQueryable<out T> : IOrderedQueryable, IQueryable<T>
-#else
-       public interface IOrderedQueryable<T> : IOrderedQueryable, IQueryable<T>
-#endif
        {
        }
 }
index 2a2cda926249d92597dfa0fff8c14d318ef70294..320864d600ddd2d235b6ed8fbf23ba16f3a18151 100644 (file)
@@ -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
        {
        }
 }
index 842555c4c4b77ce44bd69bc969ee80bf19bd7420..59da18cca0cd057780dc79dbe7200ec2797165df 100644 (file)
@@ -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
index 44b45c35820b330db69ccb304de3651155699521..1a93bd3e927dc658fe402483e8a26e97df94dc20 100644 (file)
@@ -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
index 7b6687cfd749c90878d9b1cf6de81f45dab86af9..1e284e08da154ec3a7bc04a4f73e0f97a34b0798 100644 (file)
@@ -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
index 5b0399de7a31541a2efe3432751a0978907d2252..697570911411a91d72746ea87a277e07fe73ea71 100644 (file)
@@ -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
index c5ea95e41b04eee69cc640a60da115bb4dd74402..38a5c87a5e0fdc7c4afd8b74deffd8c2ee58bf5f 100644 (file)
@@ -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
index b2fedba0c2fc353e5f41cacb429a88eb9625aa7e..35fd70e3e251fa78c995538325c34ef1ec01c8ca 100644 (file)
@@ -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
        }
 }
index 2d9f7e078476423523d387d28a798230b1f3888d..5fa5cdf7db9b4af24fe7257debba6e98943e89e9 100644 (file)
@@ -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
index 877501e8d327b731eb788186d2e4c010b0eed860..998ac275ea758f3004b83c1b4b2a09c71a104744 100644 (file)
@@ -32,11 +32,9 @@ namespace System.Runtime.CompilerServices {
 
                public T Value;
 
-#if NET_4_0
                public StrongBox ()
                {
                }
-#endif
 
                public StrongBox (T value)
                {
index 09fa19da0f8558a50199b8f3323927e033f44707..87d73047843bb78cafde2f746dea07534d470476 100644 (file)
@@ -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
index 4206c53de1c19369aa4c10e028cd7f9f750e7a9c..7ef2584833e9a74a90505f659c87cb6bc069c622 100644 (file)
@@ -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
index 974f7373bde7c647459b53f90ee895ff7d5d35f5..34a37208d73e987eb5bb947ccef0d70339d9a590 100644 (file)
  * 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
index 18d6f6ef886750fdf138611a1a22ac84d1b96dce..d504f45ca9dbe4d6937203678316c5ca59d22e61 100644 (file)
@@ -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
index 3768e244bc89e794605354850f9bc494ad09084a..88fecb30a5453f3c110160d0d5b879d3a4e7e846 100644 (file)
 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 
 }
index dcb6e33ab13b84fa837a876fe5d9de7b7e08f72f..26e42ec5362757030180eb5e63d4398a23d99b17 100644 (file)
@@ -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
 }
index e2182cf5ced84755546d9b360154e04028977c85..9f6c22720bba65b0d82041fffa3fb4bb4761dfbd 100644 (file)
  * 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
index 37f21464dcfc9067d489e354a70b857907755364..0947ef42d1e644359f7b94422db2df2da1a9ca42 100644 (file)
@@ -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, 
index 3a7da39ec7fe52baad83a1d0c5543e9a3658787c..39de73194795ee65c104c25b971a2fa301607e52 100644 (file)
@@ -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)
index 719bb9d51f382c4be9c8277ac17126df2ec8502c..d1651dc09a941d0494012f38c450b8fd8f0249cf 100644 (file)
@@ -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);
index 5db5889419aaeda7f2a3e4e77378f9213b0aaade..df093f8cb8f5bba0d2b5bb8120d98eb0b5d17bc7 100644 (file)
@@ -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);
index 2364e937ca0cb336e64f3b34d9e0218d08a4da71..4ce2ff206d2cb7411c437917a1ac14e56cee9352 100644 (file)
  * 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
index be6cfea5b22d2ff49e4390adb93b07cdfb4d857c..b5d9b925392f6108a7404fc3842136b1784ade37 100644 (file)
@@ -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
index 73c3ddbaa3de7aae9694fc576c12ad55da991ed9..2ba11a69dd22e69adca14bff125e7139e69d21e6 100644 (file)
@@ -36,9 +36,7 @@ namespace System.Data.Services {
        [AspNetCompatibilityRequirements (RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]\r
        public class DataService<T> : IRequestHandler\r
        {\r
-#if NET_4_0\r
                DataServiceProcessingPipeline processingPipeline;\r
-#endif\r
                public void AttachHost (IDataServiceHost host)\r
                {\r
                        if (host == null)\r
@@ -63,7 +61,6 @@ namespace System.Data.Services {
                protected T CurrentDataSource {\r
                        get; private set;\r
                }\r
-#if NET_4_0\r
                public DataServiceProcessingPipeline ProcessingPipeline {\r
                        get {\r
                                if (processingPipeline == null)\r
@@ -71,7 +68,6 @@ namespace System.Data.Services {
                                return processingPipeline;\r
                        }\r
                }\r
-#endif\r
                protected virtual T CreateDataSource()\r
                {\r
                        throw new NotImplementedException();\r
index a5914259a543b75130709dcb3cc9949b9a151e79..bdceab73df7a03430c25acf2b1014f5d0a9a8085 100644 (file)
@@ -30,9 +30,7 @@ using System.Diagnostics;
 using System.Collections.Generic;\r
 using System.Linq;\r
 using System.Linq.Expressions;\r
-#if NET_4_0\r
 using System.Data.Services.Providers;\r
-#endif\r
 \r
 namespace System.Data.Services\r
 {\r
@@ -47,13 +45,11 @@ namespace System.Data.Services
                        this.Name = name;\r
                        this.Filter = filter;\r
                }\r
-#if NET_4_0\r
                public ResourceProperty ExpandedProperty {\r
                        get {\r
                                throw new NotImplementedException ();\r
                        }\r
                }\r
-#endif\r
                public string Name {\r
                        get;\r
                        private set;\r
index cdd042c34a66c86a02afe89abbc2eecdfb7b961e..606aca5553bf5c6f7be38677f9497aa623d112fb 100644 (file)
@@ -30,11 +30,9 @@ namespace System.Data.Services
 {\r
        public sealed class ProcessRequestArgs\r
        {\r
-#if NET_4_0\r
                public DataServiceOperationContext OperationContext {\r
                        get; private set;\r
                }\r
-#endif\r
                public bool IsBatchOperation {\r
                        get; private set;\r
                }\r
index 6d5cc7c520f50791b881e2558b804b0f4131c4c0..edd07bce34e3a7b3349e005fc1a15fdc5c7a0863 100644 (file)
@@ -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))
index 85396e8a834042befd20497011b2d7936817093b..249f6ebf8f6b561c09b00998194bddeaefe6526c 100644 (file)
@@ -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
index d219ffb4a1274df7c7a27d7ca76d2a01f380dfb8..01f563043b87c6a504650e1f54ff224e4ef09cf5 100644 (file)
@@ -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
index 856052858a337a268808ae65b7266e3d1f95afa0..fd73dc6f690275316ad53ae6e08f92d0efd7228d 100644 (file)
@@ -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)]
index 60a3e66ba28aaed8b581745c85311112ef9f32ca..5a6dc28902801cc26735e7330b8647f5aec00eba 100644 (file)
@@ -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);
index 95e35b0a09fad0355a6b1e267c8f632213ba1c14..44b1ae161649abe33eac2fa0cde12002772e0735 100755 (executable)
@@ -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")]
                /*
index a81061304c1d711127701a8cb3a1f26dc6c3b6d3..7584c9501434417c0ab9008b2c677430eb2e6968 100644 (file)
@@ -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)
index e45675fe0ef8e5eb66a2ba85d6606b1987582b6f..a3b4163ace9132b146cba092c869d8abef99b9f7 100644 (file)
@@ -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
index 4b00a0b3517532a1e2f2ec5e3e378cfe5b05f4c2..6d4ad5e2220b000110d932fa3e78044987b7fca0 100644 (file)
@@ -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
index 20d09f206152fcf4fca9733a3b6abe8089ff37bc..42d772832044beb16265e1ae2a7cf03b37553179 100644 (file)
@@ -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
index 29c0a5d55b1960aa679e1f25d50246b0df3635a1..a70cfe4695f6d8f8f1add7cc459149f749635d0b 100644 (file)
@@ -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
index 7292b2cd6cdbe9363c338a20aebcbfdee58f7323..a99f8ea5f948c8b1867cd1d1110c1dd55d32ce54 100644 (file)
@@ -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
index e6079fb34e5e27ad1870325533c5571622651141..957899d49da87b8005bc663869385dfa7e23e8f4 100644 (file)
@@ -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
index 5556659a1694e3412e7f40ce73725ebc0e995d22..6e77a38aaf0a0b2ac61e1a0ff93f285edd33b845 100644 (file)
@@ -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
index 0f0a487bb143a7a4894c242a53be6fac06a37cd3..ac6f8a47e044b69e18f9cc27da877fe5a628e188 100644 (file)
@@ -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
index a509d3c570333a41038c8859b22c5e3a44fae128..9dbb1ed60719bb9ec3b7873eb4b5362afd5ba3ab 100644 (file)
@@ -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
index c06c53dff15444be8092b610b627988e96f5d16e..0fe5d931cb4e2bdcc87fdfeaf4471907666704f5 100644 (file)
@@ -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
index 6ab9dd06dd61da65130414ebb5fcbfcf9f874ac1..fd172299877351ae58308573445e153a198c7252 100644 (file)
@@ -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
index b5a123387d5b2829baac53cf0a60e7860565007a..9f61089726559e1358bf2246b9f23246a4d321ea 100644 (file)
@@ -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
index 62896f256fb9eac8c414a8cdfb25a9a34faea60f..4d89d2801be28c06be35dd9e9ff7db03fc91485b 100644 (file)
@@ -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
index ed3659d289c75208e8109c4d5876d944fcdd3fc9..56f10ca421558ddd7821c59ad96a09d9ae492fa8 100644 (file)
@@ -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
index 0ef36293594e727eb69272bd4259f2d02d6ed054..30de12d357ae4e5e9d61b0270234d326a0575fbd 100644 (file)
@@ -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
index d2576ff0622b2809cddfb27fd5669d48b2ba93b3..2fda823bb11cb8a59722b838f719a85b96f26a8c 100644 (file)
@@ -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
index cb872d2ead1bc3b43bb3823beefac7cace0f370e..5d4fc38d10c306c0c8926bf3b7475221c6420121 100644 (file)
@@ -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
index 8d610eb54c3026cb73a505bf0dbe0a1cdf78dc3e..264b46d1367ee7be5ec6675cd3ac67b454e81150 100644 (file)
@@ -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
index dce09836f27bb19ccf92883263b0582a1372af9d..ad09f0567cb291cfaf2d026be3f347baf51ccbba 100644 (file)
@@ -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
index 11ff428be014d5392fbddcd6524fe9f74241342e..a50c39eb8c5e7c89d1d9e6bfd7312f5ec651a47c 100644 (file)
@@ -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
index f627ad1bf389532da1b2df7d043ffa4ad6791ec8..8ac3d43a3e0bfd9f595df6f7f276babe94636b88 100644 (file)
@@ -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
index 8c9fee26e5b4ba7c492a5ed75343dfa4d217aad6..26a7377fb957f255639d198b63d0338b232c3a8b 100644 (file)
@@ -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
index 8bf4c927946a0ea410b96c4ab380a26a619cf90d..4130275b490ae294667f0b719f83b7551a819a16 100644 (file)
@@ -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
index fe02397683ca3f89fda9b8b11dddc4f21254c3be..119df8eacf658af16bd49734ae3b670dd23a1842 100644 (file)
@@ -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
index 7a5a9ec16005f4c06931e74acafdb3c5d2db1519..6b2833bd780ce51e5261832799d05fb5454b1b13 100644 (file)
@@ -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
index e12f1f0adeda460fe5fa446c6f48a7f9101ea823..10c5c58d5973d475221ed6bf61ae3a47b6951363 100644 (file)
@@ -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
index da9f285b5d644f8a013be35320e2cbffb5d77dd3..4787560a34176a39205efb8d963cf1c456ab62ac 100644 (file)
@@ -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; }
 
index 97d6ca06773880b632f3fc3bc6af21c2bda6a258..699eb0ac7b8bf3ba580c80d4fe5a505b2ef63672 100644 (file)
@@ -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
index 4b37bcef639d000e196d1522df4366e04deed850..e89a91df1b57211b1549856400ce1fbbdc8cb417 100644 (file)
@@ -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
index 9b2a9b63c9260138b04ec1328f3de80a3959624b..ce1f9469ec0e01281f0018f8423d67bc16092e7a 100644 (file)
@@ -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
index 81ea8544649ba83d04db4af60b127505a25ba370..2091b2c7f7792e9ad6e3a29e038ceb81758fcef6 100644 (file)
@@ -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);
index be64183c576b932667c613b6107740b88876c10d..83a7b3dec7fb97ff1f3e6568d6801b259f2a5b01 100644 (file)
@@ -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;
index 32d9e3606bf5cb2d38f680c8cb45833cdf258a2b..f7fc5d893aaf859f0a8d8cfd67afcd1a8c9c7fed 100644 (file)
@@ -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
        }
 }
index 9485b3ba1122b7b85affa5f503ca3fbe72c0d74c..4effb2e71a7d4f5a51c0e0c0de63122986f7c1e0 100644 (file)
@@ -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
        }
 }
index 9bf8fad7b16d74d9fa2b4346411b91f013145771..895062e1b33bd135f478df8099b652a5b84a2ec3 100644 (file)
@@ -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]
index 5f4081bda7cde91a1fa88265379c61e9ee04ac20..cb2a163bbe189bf871e67f9baabc7c32bfa45659 100644 (file)
@@ -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> (
index d145ed18e4fe67e2615776797ac57b5ab59228ea..50c27e36b4818d298895b54ab4e79de0289b1f82 100644 (file)
@@ -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> ();
                }
        }
index b9dc0ab748df237b0440160306389619cf1b2caa..fece7f3edc55ef6e830f1568af2cba01e3cc14e7 100644 (file)
@@ -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;
index 6ebafbd99da921404d65d3adb895336911dfc45b..1eed451b7c2208163c5c8e9f5947b2d039a6c98f 100644 (file)
@@ -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;
index 84388adcb087a721ba4997cc371084baa54be586..ee06d69d499326e2a996046d203bb0fca8a5e911 100644 (file)
@@ -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);
                }
                
index b14d7a2290b9cd944fcd8e8626d14b884e10b772..e016772f0b504c25bd260c28d7a329bbf4d522d6 100644 (file)
@@ -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
index 008bcea3e84221084a8a72513e1fdc8bc465350f..91caa49cc3743cadbf5bf1efd6ca1db13ccd04c6 100644 (file)
@@ -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 {
index 3ca509187b74517459651adcefc412f76ce12c44..5bdd0c53ef4c03b48e1e79db2d7918a18417da9e 100644 (file)
@@ -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; }
index 3189ae8020264c747500ae999fdbf8fbadaf17c7..623743d0c7cc39e62e8a32ccab0d4e723ace2414 100644 (file)
@@ -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)
                {
index 409acc2cddd31a7045ded3fd850920476f1e3ee3..4fbc78e56ba2abd91fee2c0dd06a7d1e2a6067ce 100644 (file)
@@ -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)]
index f4defed57e5ca966dbcdc4a00d35d2c0fbd61e23..a7b8448f12bc44b9de40c3d6ee30b4ecd338cd3c 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_4_0
 //
 // Author:
 //     Atsushi Enomoto <atsushi@ximian.com>
@@ -111,4 +110,3 @@ namespace System.ServiceModel.Configuration
        }
 
 }
-#endif
index 91bc13bec8bf542caf071055e1ad0d7f59f9b0a1..0ed2ed6290d66aa28b2e8e30d01a750f89bcebac 100644 (file)
@@ -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
index 0fd02c3395726d018ff63bd1eb702d72fc244d8a..3997993b641d51b343ae5fe8c4c108f966a25679 100644 (file)
@@ -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
        }
 
 }
index 7ab8f4eed590eb593b0bd439101e20cd8d66cda1..a7d0a61f272f6a78b13e5ed4b65bc53aa966ba3c 100644 (file)
@@ -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
                }
        }
 }
index 55f85396c821c6672707d5a333c7be8b010564ca..aaacef3525e4c1dbec051002457ae7c55df1e3c9 100644 (file)
@@ -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
                }
        }
 
index 7f1ea7a10ea858a7d2be5f2f57c93a3197980af2..2982bcfc1febf5bc3ea26b3bbe9304bc505d3e81 100644 (file)
@@ -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,
index 1ead2f89dc8706b534d7236431ea27ee5d5b8cf3..9ef944dc3f942861e5da492e59107d6fdf2b50b0 100644 (file)
@@ -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,
index 05b36bc047a9447da4deec5196cc014ee031e38a..58e7be10ec51e25d0570d4c45aa12e71948ca035 100644 (file)
@@ -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
index d4843c4564746af02d0af588aa223e7b21ec7f78..093ea28a82984ee393d5fcae92cf662d7c4ab03b 100644 (file)
@@ -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
index 66a8082dbbd80aae3b74ee7b948d5f7903c68cf8..f6c21fe2eb3f6a0b8c9870ef5943f85defecd3ff 100644 (file)
@@ -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
index b9d6d2da833d94e4c922a1a76973b68a8e7623ec..98dca152f4aab4de86effa383f0f881a4176fdb3 100644 (file)
@@ -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
        }
 
 }
index b44abe84190f00b6494e27aa7433fec0a882e18e..952ba7a0a9e558a209496752f1f22303a65c2311 100644 (file)
@@ -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,
index 3d8a380b37a8f76ba3b589a6bea6ef14aa55d610..911cdd35cfb638501a5d03ed75c5843354972bd2 100644 (file)
@@ -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);
                }
 
index 90ee4341543bd3b52609898f19ae1c72811d3b17..1a994ec907556b020ccfc75bc61e4204d7e59010 100644 (file)
@@ -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
index 1e1be8d17428d04349ba3e23efbfe314214adcad..1c8cd7a9d231427826401dbee4bf5be644bd0302 100644 (file)
@@ -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
index 87dfb0a6a14057c259ba4cae04e922cd699c26af..4c9d5d2f45eed65116d1c450d9cb69f9e7e663be 100644 (file)
@@ -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
        }
 }
index 71b983a58b086ce9e56f06ee9df22683a57d43d9..32946fe8993cb5b093ecbe151fae3eb031a6787d 100644 (file)
@@ -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
index 00eca499191f4681058b8b43c4b0a67cd012996d..559481da6b7486efc75c5e69f4a4e66738f0d10f 100644 (file)
@@ -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
index 83b46e2aaf8b2cd33e592e3d0856f3adb3c46b90..8ec996f042cb4df4bc0527237b92ef0b623de5ae 100644 (file)
@@ -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
index 3e6537f55769f1b0d8ddc7ad9b2f9db4cd9c82e5..2a82a49ac5fa32fd1526b9a655671005dac034aa 100644 (file)
@@ -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
index 05d14aae331ec37b9622aa7fc4a43d7ffc9881a5..6ff636543262829f4dcc662e507f22d3ea97ee42 100644 (file)
@@ -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; }
 
index 259670f53cdd50f95f8f8ec545fe132ad8779826..708faf245095a64094013240cdcda3d08ec9a19d 100644 (file)
@@ -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 {
index 6abcf13c18cfcdbddff652cdf8365fb5793ebd01..5e9b0e050b5b98553efc148996a7014eaf87616e 100644 (file)
@@ -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
index 9d96aaa3d46bf56a5ae8c95bc905f19a0fd0644c..190bc0ea247c10658c4a78664a4ff415909d3835 100644 (file)
@@ -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;
index 2ad7f63d9f746faa7ac9c15ae099f1c7088119aa..494195bd4b675903fd1e4cf87dd6ec9081356acf 100644 (file)
@@ -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);
 
index 4feebc7a115d7a98ceb6ef70cefc67d83f62c679..d74ec8bbc9e8a38fe55425542c98ecb3ef0b6a3f 100644 (file)
@@ -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) {
index 05235edcb9b6dfc703ea7a69f96e0fa3351512f3..c671f1e79752197c83bd6c8151ca27909bd8e7f8 100644 (file)
@@ -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:
index 889f9e74c4006563ef3dd052b99b7110d1b763e5..ba1232250e4179aeaed8160ea6b560f98972ab46 100644 (file)
@@ -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
                }
        }
 }
index 1042cbc9f300b309177a3cda36fa992c3d70254c..1c65906f6bee524b0b364816f86f1b5dac6efb71 100644 (file)
@@ -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:
index 442a33113f543c1ee0fae0fc83a71ec0e4ab94af..6835651516ed869087b30804db791e77cef69531 100644 (file)
@@ -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)
index 07952e04f14b259244d2670055584905efdcf213..09f72793c27e486e858b9feee2a0bd83d116a067 100644 (file)
@@ -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;
index 0eaf6c0e1acfd858d32fb73fe825fb48e90bd029..f437b1a495b5b43cbabf5fca29b4e8204be77da8 100644 (file)
@@ -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; }
index 7e6c0fbf82ec135f342f58581c63b7a4f8ab6c00..0ad486cb09762df99e5045deb356404937b24e70 100644 (file)
@@ -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
        }
 }
index f9e112d1d4b79a9b28a9c2d45a4a7c4fc893e2fe..f0bf2b4eb8f7328dee11b1f9d8dabc4c03f023c5 100644 (file)
@@ -237,12 +237,10 @@ namespace System.ServiceModel
                {
                }
 
-#if NET_4_0
                [MonoTODO]
                public SynchronizationContext SynchronizationContext {
                        get { throw new NotImplementedException (); }
                        set { throw new NotImplementedException (); }
                }
-#endif
        }
 }
index 9e7970fc021ab569ca094642d06bc7c475827b0c..4e1d5c4dfd0196da7d44cf5fe40327b198840c4d 100644 (file)
@@ -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 {
index 54c4ac9eb8d7d9451e3473fde6fd64f909c9a67e..26adc885cddc5ee1b1378f002f3ce0ad888ab89f 100644 (file)
@@ -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
                }
        }
 }
index 9d5524913f958cb883ccae8cff573907a0b60fad..29a3d4aba6d72c5328cb908ee67a835a54b8f677 100644 (file)
@@ -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.");
index ae6d80d252c5d66a1eac4c3bad172487d9fedd50..e41c00bb1975faf8deb8d39ea51030e6c33307a5 100644 (file)
@@ -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; }
index 2964e9f1a2e920b98592ffb7d952ba12d8366ae0..d93be038818e9fd64c2b59b5163c26a0b5cd0dd1 100644 (file)
@@ -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
        }
 }
index fed1f8e9c0e366f69dabddf4750125396dd670a8..6d8a1d5aff20a3183334d63da3df6dc3f03c31a6 100644 (file)
@@ -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
index ad82f287178e5f9405f6c72f63a6ab80055bcb59..20b4858ae40a30a0d0c40ebc1674b9f6f2c03105 100644 (file)
@@ -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 ("")]
index 8055508ca60ac24d930891dfd04a5d5bdfb0f355..b0e5072ddf65c55acea3f6cb799e589c7c7cbab3 100644 (file)
@@ -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
index f0c6bd07c558b562639fc0fc64c15b75adb49755..6310cc0d2fbcd5c30be92646db3cc2da79b40a7b 100644 (file)
@@ -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
index c9c5a6732bb8e865b4f9fc3686aa39258af4c61a..d0299ef73fd34c81f9f786451db5c50beb112342 100644 (file)
@@ -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
index 2a6376ce3a685c4f738bd799179c0c9c7b5a80fd..cd9139966f16b554281d1f40fa5469c3772458e4 100644 (file)
@@ -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
index 9185dae33a49b7bd7978cff94415c14e01e20d7b..b5cc9638340779535179bfe67a7e99149eb79df0 100644 (file)
@@ -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
index 6f99f8970ff75f10a37f8bc837b842785cbab25c..700847493252ec1a5d7366a144a9922ee727e476 100644 (file)
@@ -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
index e604fc7ce0b10d52db03dbae2afa6538efa97abb..c2fad9de494551a623fc61c0aaaae6bf225875af 100644 (file)
@@ -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
index 37235b43f65510179b9f2d3415c40bfc548abb9b..f81db297f8dfe06b300afbacb04216e0283f4d2f 100644 (file)
@@ -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
        }
 }
index 6581c0c1f77134541d3bf0dc5d542ce2b281e762..64975a813c0f8a93e76439a141399da2c45fee8e 100644 (file)
@@ -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
        }
 }
index d542aa33447360ff8270fefa3b347140fd3b988f..bd8c126723d89ed24a488f31e7191566e4748ddf 100644 (file)
@@ -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
index 2ff06735fb7486c5636b1a5d04639e30facbd77d..4c7c919d1e4d6d9b4bcfb7b9f26fe6ef6d30b8e2 100644 (file)
@@ -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
index 96b59dad4df1fac7ae75b87bd5b677993a41ab36..d5a783b8d09e603678ce561ff676d4136cf1e7b8 100644 (file)
@@ -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
index 5aea5a5663a142b2fcb18b635527d54057bffbba..247b53866a86fadb1d37cbcf3702b31d26eb48af 100644 (file)
@@ -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
index bf1d6f576aae614cb0cbdcb7175a7d5acd841fef..d71e791b87942d903e7d1c38a250c1ac41d50945 100644 (file)
@@ -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; } }
index 197a7abd1c41f85b70d12be013a3b6b96026537b..e861ce5616945c0aac9753b3b5e9e7cf51e8b347 100644 (file)
@@ -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; }
                }
index 2bf8ebd2f21cab505e43be196eec8eef63716be5..c83060493e3a8ad10637213138bc358ef21a7b14 100644 (file)
@@ -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 ();
index adb5f74edd7796cba02135b17ef3bfb31265f6cb..93789acbea6aa6e3877424eadb57bbc9e655e297 100644 (file)
@@ -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);
index 33cd857f8ffe576e465863195a583b98f747471a..a56c2c148aa2a061227c5a0766993f4f09419e22 100644 (file)
@@ -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
index 8fef0a47cff9c6a4c04cfb1ca54ac071f020605d..52fc7a1981d4389939735a268cfb293a4b8be8f6 100644 (file)
@@ -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
index 1c15c2f260b4a17dab7c38ec82834a46dede30ed..61edd04b93aaf9adef8f2925c87aada6cef2ed17 100644 (file)
@@ -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
index 149513512d192e69611e6949d3b3138d181fe22f..563eb0ba09e3167ed85035e797d709d9608cbd51 100644 (file)
@@ -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
index 9f4259774806235cf974bc283e3424827373119d..ee9b9c2a461393138160d63bb8ba59b130975d81 100644 (file)
@@ -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
index 504996807c0f7efa582f7af54a69b723902af396..4f33434663ca3df2ca53f75fbaaec88e600790b5 100644 (file)
@@ -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
index bb2e6ea07847a211144d002ff9f5532e45e40a03..c7313e561e06a42ae61b528f61a946a87e9da2a6 100644 (file)
@@ -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
index 9095cb866d3d26f4980bfd635c4794a257342056..ae4272b40e3b1582fb29e2f69fbe1e2af978f274 100644 (file)
@@ -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)
index 7944ff08d6454eac85e904ef0643939f899caf0b..b63bb72bb8d361e3532dd8cb8950e7aa1fc44d3f 100644 (file)
@@ -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
index c73332b2613e1fea4d8c95b9e3bf8731ebdbb6b8..97d411ac39eb4a42394d7f169a556ac7666a6a02 100644 (file)
@@ -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
index f0b3e7760f8f97278f682f77fde8dce61e31221b..0d08402b1cac2d0980d2db7e049c6bbb11721c90 100644 (file)
@@ -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)
index 69641e2c81f80cbd51779488ad0bc7b788775f82..d5534d8e3db18e07d517a7feb651409399a88466 100644 (file)
@@ -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;
index 1b95a559d36c4712176581c67a095d1c3a4aff30..ef27f6b01b607d930d1727433abfe42ad319e3b6 100644 (file)
@@ -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);
 
index 12d38152640fe6860065256d749532b014e8c6f0..5487f687a3e3d7bc9a83931a0578678ffde23a63 100644 (file)
@@ -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
index b8e4d604ed241e9abf596c2d073557b46683d741..c163c73ae9bc5717ea1201a407c808d72e2450ac 100644 (file)
@@ -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
index b98548c1c33af0c96a84a2b8d11710d903e8f73a..00118433b47dd8b7642c74269af733f0eed91789 100644 (file)
@@ -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);
index 9a1b14a16ab81b884434f04ab4aa7ad23f09e77d..a9a0d091cf2adeefa34bc196b87a6fe4bee737a2 100644 (file)
@@ -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);
index b4ac0c209e08dbd37f679bcc9236ab363e577610..62c6957c7face677ab623db49be706617ebb6c8f 100644 (file)
@@ -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
        }
 }
index aeb02c319b2e0a68a9215c39e016182769fcf419..0e284839cde15d0874b66592981e8ad754c05c16 100644 (file)
@@ -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
        }
 }
index 077f987529e4d9d0dd707af2e5848120184809e4..7e7d92135e48940a805253fb77f42574780cc6de 100644 (file)
@@ -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
index 7993e4428ff3f4c34aacf6fe915e4f1732d276b1..b3e4a1c16dcf32f25e1e66d93c70ecb37699e7d9 100644 (file)
@@ -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?
index f6412ff2aa66b7a1bb607932f45e911be154ba5d..4ae2289c5e3e05d15879e6e61d3523f84b3c6bc0 100644 (file)
@@ -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
index ad3c8bf4439959d84e44ae1cb45f4876bedf812c..693d1dceac0604db76281686b7b6bffefe41c225 100644 (file)
@@ -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,
index 6d15a46795ed127c9de88fe6922e1750d0dc14d0..ff0bc2e13dec78c70fb242a751ae8fb120f83969 100644 (file)
@@ -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
index 7bd0b01ca01f9298b0e7f2d0be48d9e2c4bf2d89..eeef0dda75ee4f0d39cfc1b1063a879b731528c9 100644 (file)
@@ -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>
index 3edc78dd3f45236143b8109fd614751dff4ce9e4..8e67ad106a469eb47f6effd5eeec77f79ecf31a2 100644 (file)
@@ -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
index dabfac1416ee5acc535e62dd0a283fd06c1c7e46..f067b5ffcab0981722a7157a50f6f156b7880dde 100644 (file)
@@ -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
index dde26eb6b995ec61d03220eac615bb3dd7f71f57..6fad0950bbae9a5146aa44730d2ec1469ce02e3a 100644 (file)
@@ -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
                }
        }
 }
index 81371d106b9e6fc44bfebc5bf45b54ec39c80069..3449b3bd4cd2dc6fb7bb07bb82142890bb389510 100644 (file)
@@ -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
index 0b133b04193125fd76b7e186c9c46efe7249e852..a10e374faffeb47a23970dcff414db462187aa62 100644 (file)
@@ -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")]
index e9d54eb42afdf2377bd4e16de9ac004108005c8e..1e7b393df0116f7b346fa74c9f7ac8e95ddd9a7d 100644 (file)
@@ -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)
                {
                }
index 6e80d67f8261c09e97e3b59a051f5b131bbc2fb7..a9ac0a6328a3e5ab786e2689233279d7da56e197 100644 (file)
@@ -39,9 +39,7 @@ using System.Web.Util;
 
 namespace System.Web.Caching
 {
-#if NET_4_0
        [Serializable]
-#endif
        sealed class CachedVaryBy
        {
                string[] prms;
index 6012049e3af9730047955aa0f932ee4f80a6a652..fd576c97747f80cf7dad5443d5aad5110bb4fe73 100644 (file)
@@ -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 ()
index 26d8efc49ee04b144c2b72e631341ba87b085846..31095078eef257e7a67ee992e697b4845299551f 100644 (file)
@@ -30,9 +30,7 @@ using System.Configuration.Provider;
 
 namespace System.Web.Caching
 {
-#if NET_4_0
        public 
-#endif
        abstract class OutputCacheProvider : ProviderBase
        {
                protected OutputCacheProvider ()
index f3f12486592dd64fe8e57c1d98c4dfdc1f0b3f22..f53701cdcc712ebf7bf2c34daceb7ae92b0e317f 100644 (file)
@@ -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 ()
                {
index 3a503c247370962582fd6d6de42a0f93f30cf2af..4a43b737014538920708a85d9f5dabe1820d8a41 100644 (file)
@@ -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;
                        }
                }
index d6c5cc7b2a5b7e1aa74bd192f3a94824a2a04c8b..41c06816a8c9ca202cbb8a7fc2403f35fd3f9c68 100644 (file)
@@ -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;
index 3a9d22e089ea683659d1bb43fb68125dc4fabf73..af165313b0230761b6b79a188160260d39ab9459 100644 (file)
@@ -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;
                }
index 401c760b6617608be08b6674ef8368fbe0b0ec77..53fb1ca45e851980e0740e1c930e4b8eb28abc03 100644 (file)
@@ -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) {
index 68fe0bd770904f0882f8a04c9d5c7e81a1747dce..e9f814984009233da45a9609379afb58e097c19a 100644 (file)
@@ -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
                }
index 149eb3a6050e2e80f4871a3bab60829bb79d270d..406230ae638b3c0acc0a4bb01e7d78a782c16626 100644 (file)
@@ -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);
index 9d3b879599bab250d2e6ac917e654a2ebd294e9b..74a1a2d49478758621c314b33663582084b1e808 100644 (file)
@@ -41,9 +41,7 @@ namespace System.Web.Compilation
                CodeRender,
                CodeRenderExpression,
                Include,
-#if NET_4_0
                CodeRenderEncode
-#endif
        }
 }
 
index 4b3482b7308be36c836ae3f4bbc83cbed61c3534..7dab906cc2b71f96b603302c638dcd7ae55a9a2a 100644 (file)
@@ -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;
                }
                
index de0813803f8b4e8e36ee264b13b117967ed73477..cf9aeb6dc824c7ec99b0c1bc20f1aabe97325f69 100644 (file)
@@ -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);
                }
 
index 9725763e4c285932a0b5430fbde44a32087dba2f..79968cd0ef4733529380b64386cd830d3fabf676 100644 (file)
@@ -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]; }
                }
index 82d490429221f76919aa53d972701a61fa0de501..441d29bb2a0cf3326177daca35365e50773018ad 100644 (file)
@@ -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
                }
        }
 }
index 105623a1ed50f506a2f708219624f52c5e57d61f..5db33b67d6b3aca8b6c00ec146e81386f110d99a 100644 (file)
@@ -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 {
index d37fa87d923f65f8eadab43ebb3ff797975ead2f..ce1ed81d3c05e64ed396145bef20d9afabea9c3c 100644 (file)
@@ -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
        }
 }
 
index 30e8b6af6112c82e1b242471ff13098d99868c50..b2b979cfe605006db62736981fb45d074875f389 100644 (file)
@@ -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")]
index 56f29e4536546e23647d541cbd712071ed6eb4d5..1ec33313b0c61c469f9631481fe9ee2474f5039a 100644 (file)
@@ -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)]
index f022a6d49d54aba50d3056b94d42573749520c10..47d7ef1be88a2344fbc2dd4eeb1d093450fd6bde 100644 (file)
@@ -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
        }
 }
 
index 42973b5859274627848656c187c1f329c3cab05c..9ad6baf7f9e410b7423ed534a75c5bd6b3ba1ed8 100644 (file)
@@ -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
                        }
                }
        }
index 3d1606a3a96b5c95bec8b211eb7a6dd4846b0210..7fd3f3558c319bd38f6c47ceebace0a2ddf4db12 100644 (file)
@@ -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; }
index fb109b3a392dc96335f8c67658f3c9fd136ddb6e..780a7cab9852b89c9d51f0a9848be900965f7250 100644 (file)
@@ -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; }
                }
index 1a59215534163b0e16a7703391ab87cee2a26dd5..e7f8aae0d1cde5eaeb69666222dfb115d79cd958 100644 (file)
@@ -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;
index 1490fa3f341eae9741ec6c65f88a2d6a525186e6..414505f526bbcc29cbe516c5a4582706b082e3a1 100644 (file)
@@ -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
        }
 }
 
index 5c814b716867dc4f0a0ec4cc3815e751099b1072..470a10512e62340d6bf014ec886418efa4ffe0a2 100644 (file)
@@ -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)
                {
index e69f495b8c9911699b1a786451bb783c6829a1b0..4492ffb0cc5e9e70845af43cd57a675f40ee32fe 100644 (file)
@@ -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"]; }
                }
index 242965407a96ab8a855a42b94c3e5d6a48a00be6..4920153fc0245bbdff76d13332d99ee89019679f 100644 (file)
@@ -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
        {
index f5f1a2d135350b0fffdb138ab6819e2159b922a7..8f2f244099cf0d56a64d792edb9cbd0710d13652 100644 (file)
@@ -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
        {
index 1cb061e88d0317c2f016379526d343d71a420edf..3085a930752e064d21b8e45383793e6e4d0f7acc 100644 (file)
@@ -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";
index 3c5bbe4530b24be844168f3f42b3a492c78e5f04..ab273d4970bb7a4cd641996ed585173d01bd1379 100644 (file)
@@ -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;
index 29323f8065a9d5254aeb4b2bea6dd583e4cda0c1..f40793ef1f4021722fe9baf67ff05d611b38b99d 100644 (file)
@@ -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;
index 6f0fcdf17d9245639586bb15d38616ad11232228..71fddb48a04934144eb911ae5d277452511f4bfb 100644 (file)
@@ -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,
index bae2e79c37cdeeb3d458cb70e68fa6c77458536e..a5f9e31a70ee2d4f7f28fb3b0e0d3bdbe734c3e9 100644 (file)
@@ -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
        {
index 5595fa17992dfce42794265a6f2c80c9a0c0295e..b46cc98f22e9e0127f6e6cbd7ada508ac8659de2 100644 (file)
@@ -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;
 
index 69c3315d0e76014bd86a9f3866dd5c666a5a41ae..5bf60eb9080cafa194e54b90ba12b393f98bca30 100644 (file)
@@ -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
        {
index ff731a0a8ec325180e7d45ebd45cca002663a154..294861808d9dafded2c27d171aa51ac0c6ad8613 100644 (file)
@@ -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, 
index 75b8d4ba4bd137ac805f96820c3e35db697566dd..068e1c45ccff43b779236ceaeeaf4fc2f1d3fee2 100644 (file)
@@ -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
        }
 }
 
index 71a8a1730fa8ba1d9d1ba75dacc9c0b630cf444e..be25a051cc7d85ccc06b63cc3493a88d75963799 100644 (file)
@@ -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)
index 13a7319cbaed3428f4ba9501735f16f848855c40..c370f21661bf432ac7d42bd09251d6a7db82db12 100644 (file)
@@ -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;
index 61d486345c393eb1cff95544ffecae1845b458e9..bbb689fa3eb1060e1fa7c713a53927be03965bd8 100644 (file)
@@ -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
        {
index 614077aae3750d6f8a704fa41c5f85adfe652743..1c475112c66862411cb2a4b42a4291aeaf30689c 100644 (file)
@@ -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);
 }
 
index df886faa2b74dfbcd7719de4103e1ee7f145409f..292e815803f4ad92ff25a75ed5de3d769078a6e5 100644 (file)
@@ -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;
index 3cc9e8a7b742752ff025a2c82e000bbc8da8804e..3cad8b56402e4d88229aaa1353b9fe25b0762301 100644 (file)
@@ -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);
 }
index 85b91feb244b1b802e52693bd82e7d45e880cff7..0fd828f16797b6983c95015e10e6fda619cf6560 100644 (file)
@@ -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 ();
index fc12602df8b263779cd0e29a009fb11daac902d0..a68f89bf64d19d2dfca5306ae3b64bbf8ff776f2 100644 (file)
@@ -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 ()
index b210f8274765a079709791812c9a109135b0eadc..4e8c3220dfe83e720dbde43cfc519eb410cb4e3c 100644 (file)
@@ -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;
index d7b9daeda25bb8006d99eab1c7e95b4c0961dec6..ad9079c09fe9e909cd624643b058c472e66ca36b 100644 (file)
@@ -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 ()
index c84a9f1132dde2dc50ef8c98bd9144ccffd10dab..cca4e838166cbbd279bf56d9ee389d7c6dd54f6c 100644 (file)
@@ -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);
                                        }
index f311585b849eeee433dc770506d6a9d1fbb06e7d..ea189038e8ec5c18519fe5ca14d474efeda39a36 100644 (file)
@@ -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;
index 16802f90831af5502f134e0414caed02986e0816..b1c85a7bb44e61cfe2279560a024477a9bcc565f 100644 (file)
@@ -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 ();
                        }
index 6c80c75f3ae56f3ee0c8ab36e5332d2dfb76787b..2f17b8a696153dbcbd2a1b9e164a0bbc01492003 100644 (file)
@@ -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 ();
                        }
index 635934c5a4b5fbcb3caf5374dd109c9b352ecb6e..495b941099cadedb3088c7adeddd89a96d783039 100644 (file)
@@ -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);
index 1e1773f810d8c6e50ffe6589d755577fafc4d6fc..a890fc10f4b80edf848071aabceea5ece6eb4b25 100644 (file)
@@ -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 {
index 5511381d25a131b6c54ca0130493959f26cbc120..e255f407852cc6333c1cddeea183ceac73cadeae 100644 (file)
@@ -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;
index b7d99f28e7797ceae7ecd9b0b86291c199552301..178c576e6b39ec53e8647b691dc93fe027519bea 100644 (file)
@@ -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; }
index aa1f49c7121f393b51db3f985d6d194b6080b351..5f67b35db343e39b6a9969ce331839607fb54a1c 100644 (file)
@@ -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 {
index 33a6c84e9f31b364975110b16013ecaf743beea3..8c20dd30505a01f1550b30d728b0fe2a011cfa06 100644 (file)
@@ -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),
index 0169ffa1e7a4687082cb8faff827ecb53c61784a..905740a1ea9d9f4d4e896cadb7e7ceaa1e177f25 100644 (file)
@@ -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;
                        }
index a68fb9ef388f00e83abd0d018e913c97899cddf1..7cb9ba78c5704999c099f4c0d4232665d6f53bd0 100644 (file)
@@ -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);
                }
 
index 1564338e1006644cc3684c596c4fedca375de891..88614e2a1b4573ffb1cc99d3363d9edc0abccc08 100644 (file)
@@ -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 ()
                {
                }
index 9467ad227568f10e2e97a4d21660b7a854582591..a94d6a3560a4fe70fba7fd8e998bf286958ef155 100644 (file)
@@ -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)
index ad6e81abf96454fb0d1e7233efdc278f67e7b5ab..be5171213f371dd52366709a39314c99b3801f99 100644 (file)
@@ -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)
index cbc0cb17bfd2aba99c8b4fa1abd061b1e05ffac5..347671436853274b9013b0855bc4da7278e7bb80 100644 (file)
@@ -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) {
index 0a27a71c28ac5b397884cefc5db4e0553ce2c321..a25879c90901fe16e68261fdcb02b8deec6ec6c8 100644 (file)
@@ -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;
                        }
                }
index e476c63c8c6f2a11a2c960f6d314ae2556fc493e..c2c1bd32a01f5e4e8d4ba32f74035444356d3cfd 100644 (file)
@@ -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);
index 988f58e4039a3d9b9c6ccdf4bfc289f26429073a..b007474c550997c5dd73a059a672cc6d51c5e196 100644 (file)
@@ -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);
index 1590db5d44d402a88dd67019449ab2e243b15100..67580e485bc2c9e5a9dd8bab0598a0bedea33486 100644 (file)
@@ -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
index 33a305d443e1636c1c2dbd4b59279d85480a7e12..3e6711bb8d4111b17f94299344d0fe3c65804f77 100644 (file)
@@ -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;
index 1c40031f0d8423f12677026626a0cb6bcb460460..55decb19cab8956616cca87da85a38ecc6aa59eb 100644 (file)
@@ -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)
index 5ad478a201bf9f36a7eb25957ac6d3c559c1442a..ff8b000baaf3c863f006ad619b3aeed2a4e3288c 100644 (file)
@@ -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
        }
 }
 
index 9dee6b68199b475461a2601bba69be5212ff4b91..8e2695137dc52db23095d788fe99b00ddf509982 100644 (file)
@@ -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)
index 7873e1c0785c73fc2ed9b13f1223b8101c9af01d..b90a4f0b947b60d2ed63d39668ffb4cde390d6ba 100644 (file)
@@ -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
        }
 }
index 1a4f8eb43116aae69bff0bb6754c8341d3df2f4e..85a62d5df94d2da5c07decdfaf9fc226289b8377 100644 (file)
@@ -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; }
index 2f346d0621a7b0c7ebffe810976ae096e37c2c77..19178cf889e69dde45ff290519b664f256faa766 100644 (file)
@@ -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);
@@ -195,10 +193,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
                }
 
index 6cb79f80aa0e49ada70ff9b4498c99bbcdbf7ff0..d9a0f271921dd965ed29464feccc169217a0f83a 100644 (file)
@@ -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;
index 3b567f19b26c002473b975b4ac7f6e1e71e7b87c..9c5cbd5996d2a7572c745ccf28e7ee119c23d06e 100644 (file)
@@ -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));
index d801a1ba49f3e08b8d4c18a07d188d609f1c81c7..cdf6513928b7d45f5e5a9bb40c4284bb5d681962 100644 (file)
@@ -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);
index 2a4361795e187c0a9f484d01e3ebcabe21e78566..241934632a0e22d727f304ba5311c501125d226b 100644 (file)
@@ -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
        }
 }
 
index 51958555846157661b1ac8200b9e67449bed3dcf..392a665c57a962e5ccba736c02ae1de720eb8471 100644 (file)
@@ -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;
index e2f27565139f90b1c10497984a56eb9b9a41ade4..11a2e49ad900d9d8a924c1bafcb397baa160edda 100644 (file)
@@ -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) {
index 4f381f6bc9f2a8bac4479f8bf47b4e868a21493b..912f6c4f55771c1bd6a6f20152f8799744a961e6 100644 (file)
@@ -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;
                }
                
index ec11be5a43c7761a736331b7662cfff62270b216..16ff899aa9e59cdb7f1a40fdabdf3ab63f60b027 100644 (file)
@@ -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);
index ffe730962472eee0ebe5cf606348e5d3a5ecc0cc..85bc219b9ef61cfb6125ea16aa93803a3c8d8a57 100644 (file)
@@ -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 ());
                        }
index a6525f69151011d1e971d2ece9318920b3bfadf5..f808807a3644678e83abc80ddad24d8db64f4d3c 100644 (file)
@@ -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);
index 400fd88b01710ba598ee5fd01d6db88573ea933a..560acf8c5b0221bcd948a97541c800b967822a7d 100644 (file)
@@ -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;
index 51f0d41d1e4c73e192c620c2aef48b5b0430c117..70a6f89ce053c8bf0d86224c57185719e4bec3dc 100644 (file)
@@ -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);
                        }
 
index ab50eac3bbaae01115ab707f762b25304cbbcf77..45b3ad1c6afb53bb865fc2188b3069464d147c61 100644 (file)
@@ -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)
index 7cef7c1774a8c6e03e8fa9a2e342d374f0535060..e6813d1eef1cfd2bec7afb8b89456e5e4d42b910 100644 (file)
@@ -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)
index e2dfde75bf9fd271723389819c4f15d79fc5e5d6..86ba336d3e46b68c4e92e591d59fe0b24ee1d4be 100644 (file)
@@ -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.");
 
index 47b00056839113f7cd8024e55c4eba3809324b89..953d23981ce05e66f58043095f9ffae058bc1a88 100644 (file)
@@ -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;
index 845f2e2623bd31c9aff922247dcafd6b7acd450c..d0ff4c5c7e8eff08f1c5ed4112be007f0b59eb6e 100644 (file)
@@ -33,9 +33,7 @@ namespace System.Web.UI.WebControls {
        {
                Table,
                Flow,
-#if NET_4_0
                UnorderedList,
                OrderedList
-#endif
        }
 }
index e3d69ec7b125ae3934a908a436943495ab6eb934..e90afda34ee92084bf41790ee14a80ea3d236d78 100644 (file)
@@ -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)
index ed015c662707f9fc283832d64c5a878e6e233c67..e27be97b4108819d78de5879bcd1b41c5783e78b 100644 (file)
@@ -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 {
index ae155611f5a505b899df7e25cbd142eba4db4ba2..a8cd3c18aae7931b5ce2e6e5223c859230a3952c 100644 (file)
@@ -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)
index 7441b06d62a66a451c9de46a1ce8c5e20f206cdb..85605c4d536e3485825143ffe07417dd3efc0aa8 100644 (file)
@@ -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 ()
index 0a9561ab17b837188e02d87e1f406cd854be1f3c..b257a5751a245717ed342736555b59b95618c0b6 100644 (file)
@@ -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); }
                }
index f7668a2a227c10b53999679305a355b491fc9063..63191b2bc9ee9c2bd9b8fb10bd6051076b682bd8 100644 (file)
@@ -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);
index 1d4179df225b57b2195ead3f0e5befe90e3c0250..8cbe355de06f645184281cdd853fe29a774b0825 100644 (file)
@@ -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)
index 612e7038a3631c4a32ffce7a734051673dc4cca1..1840e3cf479ebff908a2e60c2d2ae487534fa417 100644 (file)
@@ -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);
                        }
                        
index a6a2a3d76489803cde193d26c8a215e857e0aba5..f0ebcdeb3eaf0d54cd235454161b097dac8f7eeb 100644 (file)
@@ -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);
                }
 
index 99d037ef542bebb1fb0e701c34ab5c5e552dbf4c..48dd3cd77a176162df4b6b530cdebd0d7e4e31ee 100644 (file)
@@ -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);
index 8ab3a7ca66f49e0284a560f9561624049265fa57..53718973b246a653d420cabbbced015265b71c69 100644 (file)
@@ -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)
                {
index 7d3ccd8635bed4bcd76dc474549877126303cc92..3cb54bf0dfd7aa6a3bd0f9e2c169982c398d6097 100644 (file)
@@ -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) {
index 9cd0b8481bd16cf593010ba7f417e93dba88afd8..b7409f2d20df5175703c397c9f30ac38ba63c49c 100644 (file)
@@ -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
        }
 }
 
index cd836960f3cf88a0281c4c3694c94b04662a30b1..fb6028e0831277354920b14db745d3d86ea7373f 100644 (file)
@@ -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"; }
                }
index 4480d49092c103169c33048821662de17ef838f1..05b884a1d9e2209eb2d57671c91821736e89c870 100644 (file)
@@ -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 
index 25b89ec47ed0e70e5287dbd4264381e704b32f79..ed29adeda55e8afa12bf77fb267486cd7f622b1c 100644 (file)
@@ -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;
index c3b23b4a6bd0f8a7ef82558c43bb747d0661c40d..e45d311f8c95b8154cfa5a4a38296888c2a05383 100644 (file)
@@ -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)
index aebf42cd95b3bf331cf09549dd67cb45cbd1c4ac..d50949ac5026825a2b52219f95518946ef11e4f1 100644 (file)
@@ -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
        }
 }
index 5c56bf1a0734ad11dfea14afc1d9a4a7fd4ce078..f409581ce29d0041945ae79a2fffb3b650c2a906 100644 (file)
@@ -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 {
index 07daeb5f5038a58ab8ad7579bf07f8b885faa67b..384ba52a162177566b890b4b2827d51078114110 100644 (file)
@@ -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++)
index 2c965437f74fb7cca1a4f95491af44eb1ed7f73d..4af2e54bd2e321108282c4d3859e6e7353a26bb9 100644 (file)
@@ -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);
index 2a08d709579effcd5db512fd2b50cf9435eec13f..65a309016578580221680f5bf32bb924cc30becb 100644 (file)
@@ -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)
                {
index f782cc706a8e10cf1a11dcf8c55bc66abbfb4a97..80833dbc4359679ca6ff89c53062aeb9c025c906 100644 (file)
@@ -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 ()
index 1a8d2b4c084fd6335b5af3d239c6e15a9989f3cd..69cd30decdf551af411d6dfa7937b71d1ecc26ad 100644 (file)
@@ -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)]
index f5f4899f05924e40be2e4c53782416000689666a..670eb2dc6530c9d0d72b8b85f0c5aaf8dadca90e 100644 (file)
@@ -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; }
                }
index c92eaa32ff6c9d7521cfb7b9ad92037ded625a67..0172e63557803957f3b82d6c29f028668ea21dad 100644 (file)
@@ -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; }
                }
index 9daea73b4f71ec23059c4ca485e49477a31ddb54..f14b80f0cd7c9a475638d788542b89e0d8288174 100644 (file)
@@ -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 ();
index 55dd1c16cc4a2c248b05eba71a99559bac37a4c8..416385013ba24eb494f6881ade54407013ef088d 100644 (file)
@@ -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; }
index 99707a3529ee06ce8624963ba230e3d56cee6743..e1439341e60d97682169c9e5e0e5186e0eed241d 100644 (file)
@@ -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);
index b93e19fb57a74edfa84275451e6cc3357057512b..550781ce7fe751ce418679e081f242fc48cdfa86 100644 (file)
@@ -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
        }
 }
 
index 68da3951f2f300b88f8d48a82759c91f6131d0f1..2a2800483afb18d95988e12e0bf52c75dd0b0380 100644 (file)
@@ -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
                        );
                }
                
index 87f65dab7d98ca162db0af80d40625db0858bcd2..eb0f1b69d2f80d936fd46b423b9ba15ff4b6770a 100644 (file)
@@ -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;
                }
index ee795721a7fb80862765ad72516944cb984baed4..68c098dcc261c264a2237318072781429e24192b 100644 (file)
@@ -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];
index d2801b013f0c6ab09565522c44ed6be2d446c28c..597379a9bad1bf9fd94c6a0ead55e9c87673080f 100644 (file)
@@ -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));
index 1db9bb5669db61968a4ccfc5441a29183394e357..2e025f96be62b249df30081d92c37407d962779a 100644 (file)
@@ -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> ();
index 460963ff66eb342168f57179ca67dde17dcf7f82..ecac270be4f55dbef8e313bdd6c10eaacb61e8c5 100644 (file)
@@ -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 */
index f58c2a67448913c6502c44363b20d1a256743701..9d28fbc04bd026121af47930fc6798260658a518 100644 (file)
@@ -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 */
index 2f1779e62608d3cee94265e45187ad1707ba9154..5171412528a58ae0ab3e84cfcdbd5c0bdd01cc63 100644 (file)
@@ -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);
index d4b839f3fdb92fb9815d7077d795e135ef4c4f6b..a2887fde5371e2dd26f2411e32881a2afdc85fd7 100644 (file)
@@ -63,11 +63,7 @@ namespace System.Web
                                return pageTemplate;
                        }
                }
-#if NET_4_0
                public
-#else
-               internal
-#endif
                int WebEventCode 
                {
                        get { return webEventCode; }
index b015d16ef6ec45ec185052ff0e17381add7103f1..e04f1cae772efd7a304de50dd7cd203c35c7d89a 100644 (file)
@@ -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;
index 37b07eb66f1cf0e706d2316808c9a57039b3e773..c0da39bd53a8a894dfa01a8e3c8074f7441a118b 100755 (executable)
@@ -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
index c1215887302a87a842ffa935d9d1de52d98c54c8..26b3b7d79c51442bdd299276b27ca86184e957c2 100644 (file)
@@ -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);
                }
 
index 9eb9fee8c191849981bfc80c8ed3eb4b98866cd2..574bbade505e556e0881c3c6f1ecea296e67f46f 100644 (file)
@@ -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;
                        }
                }
index 7189276746944a768c178305d2d45f42ca2400da..786956ee9da6646d5a3ca849134b09b1a66b9dac 100644 (file)
@@ -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)
index 9cf0e042b687e3292ee7db95e36d1849feeafbf3..9ac4329fbe78aa65a527d4c13780d8b033958ba7 100644 (file)
@@ -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 ();
index 1b31f888086d888c6d1816039f1edec2176e9828..4480c051e74eb835bfb9b494ad6c51e59df5bf03 100644 (file)
 
 
 namespace System.Xml {
-#if NET_4_0
        public enum DtdProcessing 
        {
                Prohibit = 0,
                Ignore = 1,
                Parse = 2
        }
-#endif
 }
index 0b2b0818e3b97cdf243c2aa3ee1b6a8f5f7c0b21..2adf034e98d6ae23905c57809d9ed716b7514a5a 100644 (file)
 namespace System.Xml {
 
        [Flags]
-#if NET_4_0
        public
-#else
-       internal
-#endif
        enum NamespaceHandling {
                Default,
                OmitDuplicates = 1,
index 640ee7b1c697a470785487c41867e821e961e4c6..a73e593c87136ebb333e9c40059db6355bc7ce84 100644 (file)
@@ -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
        }
 }
index af1a9c7a1b5973b8513839b16257e43325e53095..dd130686ef3d6b002cdcebc22e8586c82a9a8ae4 100644 (file)
@@ -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 {
index 4833cbdc293fa5416ddaa2dd4936e881236dfe5c..ef90b40e5d4109a2c13fc90a9adb874102b0dc25 100644 (file)
@@ -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);
                }
index cb029083af511cef78e29f58aa8e330f9a2c9024..767d057d1aed8f9fd6c514fec1438aa58adfd199 100644 (file)
@@ -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; }
index 15d081f8acb6cb5d7d2c7b093c04adc02fd274b4..a7c85b8d0068e8da0accae5df82d79ab3f34447f 100644 (file)
@@ -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 {
index 0309709cfdcda1fe779169f5b6698fb50cdaf75b..29d196686eb47b3e58d35ccc172579efb8ba3f1c 100755 (executable)
@@ -189,11 +189,7 @@ namespace System.Xml
                        Close ();
                }
 
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose() 
-#endif
                {
                        Dispose (false);
                }
index b90079bb6d88636367c6feb754b3ab95b05fc1c5..e79b7d366ca45fbfc87629d4c6510bedb5a23815 100644 (file)
@@ -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
index 8fb7362f5ec07b9b74d9239e0026eff7a94cc012..378cb5e6dcaf0662e5605e12bbdcd5387a032d1d 100644 (file)
@@ -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
index f2753fc07cf201243b7a75c148b98d40fc4773ad..18bdeb43ec46ae6cfb1f48eb5a4b362e499c0013 100644 (file)
@@ -33,8 +33,6 @@ namespace System.Xml.Linq
        {
                None = 0,
                DisableFormatting = 1,
-#if NET_4_0
                OmitDuplicateNamespaces = 2
-#endif
        }
 }
index a285e0ab8ba73d41a8bd75d08d037d73673b9bb5..2b30918ebf18856cf7fc0cfebb1b8bc8c7e4c840 100644 (file)
@@ -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
        }
 }
index 4fa7889633c5374110dea1d1c169b160ae0976d8..52a8be506e190a90ed7cf131977f725261c571ed 100644 (file)
@@ -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);
index e98811ed434c181db2c9f1ed853a605115e85bc9..06d3e5df2b3074c65a56dbb789a143922f68f0bb 100644 (file)
@@ -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 ()
                {
index 95631f1bbaaf3121ebc4a6a6d5017a36eba59125..076125bd1d14b9b65afb39ac618164fc59023e29 100644 (file)
@@ -47,9 +47,7 @@ namespace System.Xml.Linq
                        start = node;
                }
                
-#if NET_4_0
                internal bool OmitDuplicateNamespaces { get; set; }
-#endif
 
                int IXmlLineInfo.LineNumber {
                        get {
index 1c45409b4aee60390e0f93a13675193847deefd8..adffc9f8e15f30b2bd9e2cde18c1577567938ccb 100644 (file)
@@ -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 ()
                {
index 88c95c9a9058ef0e899bd29966894e321fdc91a0..33e899b42f68be4c5c63dd37afc0821bc713f282 100644 (file)
@@ -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 (" -- ");
index 030d75428eb9baabb0b9104993dc4d51b9b29d39..85893419f723594af57216765f063333ad7836cf 100644 (file)
@@ -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)
index 723252ea94b3f433280235316de0600cc5eaa4f6..d6331ea779f07e69de176d786f250d97f04886d2 100644 (file)
@@ -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;
index 22a47fa73d5be10247ba20b3873d5b70554b2382..fa78dd2abb5fe2ecf75eee1d8ed372a684f22683 100644 (file)
@@ -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;
index 21be8058ac01697b991a6a0bdd2f7c259818b4db..1816d213774615bbc790c1db454bd2e255f4daf3 100644 (file)
@@ -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)]
index 8ba271fc0fae4cd33bbefe388cd40649ed5a64da..dce0a542e89f0f17f90fc3eeecbc589c89d51e21 100644 (file)
@@ -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)]
index 339e63c9aa2079d44290b9a939defd982c23c329..68426f9317d1ae5d5f2c0aa3a32907e6873a53c5 100644 (file)
@@ -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
index baa05c038d2c01bfa299c1a47ae1b3798f3c4510..67adb053210157681438c5c087c3e0d9764d5616 100644 (file)
@@ -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
index a0e633556d241d7955b30390ef103bf6d8a89c24..2a32876cf7b843851424e0d3415e7e91e2e951a9 100644 (file)
@@ -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
index 55d5d1cf4c8bb259ed6310d21f78403b4e326397..f516b508d69733bcf2e12a55150b16b9763e7043 100644 (file)
@@ -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
index 26d9ee8129e40572a92f3fef081251c5b84def7c..04597907bee1156160b309675c28e1cf760110a1 100644 (file)
@@ -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
index 66b3f9e6fc20d1d0ed36a1c5821cb713dc0c4b84..250bcbe76e7774190afcaf74ec0ca045130c4684 100644 (file)
@@ -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
index fb300c20208729f5f6f648f61e38203aab336e67..38371caf017d29241ae5c3363c44d4e62413fb48 100644 (file)
@@ -28,7 +28,6 @@
 
 using System;
 
-#if NET_4_0
 
 namespace System.Diagnostics.CodeAnalysis {
 
@@ -48,4 +47,3 @@ namespace System.Diagnostics.CodeAnalysis {
        }
 }
 
-#endif
index 6608f60f855372433ce41475932dd2b0e96273fb..d4aac126e88b2991b87eaba54e131ef2026c24d8 100644 (file)
@@ -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)
index e5eb6cf682b5e1c29582c6163830acb01a042422..4fcd04293bd595a075e7b956ea5f47ac73e24a19 100644 (file)
@@ -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
        }
 }
 
index 20897267f6c234510fc44363f4c3c53f111ea9d6..8aa429ea3a730c4aee72cdcb287de89b81d7c046 100644 (file)
@@ -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; }
index 45720eb92a82372f56a6d2145868b77561c38ba5..81b0c6ac1e515a39c93ec59ee3d027f14b75ff05 100644 (file)
@@ -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)
index 81a5a04d1b650259b07eee235e198d0c1c9f53ad..4b5002a7ee042cedaef5933afe2c3cefcb994831 100644 (file)
@@ -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);
 
index c7f6259172d3d4adbc0c35eac98a54512c80679a..b9e8ccc05c8d93161d38cc13cba0d7a111438351 100644 (file)
@@ -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 ()
                {
index b44a061159207ba22e4f1ec05cd8c236eb4cbf5d..f3d2ecc908fab8cc1c258e402d5accde960061e5 100644 (file)
@@ -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;
index 7cad18c5b647783e79237cefa4334d1e88564417..a7f119e60b942c86317b0a0377d3fb750e3b860b 100644 (file)
@@ -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
index 79f878cf591627aec2e61d0487d3e6c48b8d8030..3d8ca2150540ae3d05c6d26e8b1690b5d0ae90be 100644 (file)
@@ -153,9 +153,7 @@ namespace System.Net
                        GC.SuppressFinalize (this);  \r
                }\r
                \r
-#if NET_4_0\r
                protected override\r
-#endif         \r
                void Dispose (bool disposing)\r
                {\r
                        if (this.disposed)\r
@@ -173,9 +171,7 @@ namespace System.Net
                        fileStream = null;\r
                        if (stream != null)\r
                                stream.Close (); // also closes webRequest\r
-#if NET_4_0\r
                        base.Dispose (disposing);\r
-#endif\r
                }\r
                \r
                private void CheckDisposed ()\r
index d1133f9c3429132ac5996310bf3a373151ae127d..a7d76f195065bd52cabe77384a2654ee17a21ad7 100644 (file)
@@ -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]
index 91b943ab89364d4c30d079a9dfa2d11dc4752ff3..b1afa08a7bbe421e964502286ee45bafe3889ceb 100644 (file)
@@ -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
index 79e61a436249dc4f6653567b75d6080e397f4c72..b4008299239a9ad5b6ba652f834fdbae9153abec 100644 (file)
@@ -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 () 
                {
index 92c0f8e6e070b00090c2f27754b1bc65ff3de697..89fb47563b59af70715583545fe050662c7fea2f 100644 (file)
@@ -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 {
index 271a1fb041b457d5ee992792fbe801e22ff089a3..faba55dd4fe05654831e9b0c02be46146bc7198c 100644 (file)
@@ -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)
                {
index ad85920cfc1f31c075f285caf63e76564114e57d..59079da8d24b14cfea49dc3220b8418f05d331c1 100644 (file)
@@ -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 ();
index bf0b79eec1b8a5bfef97d32b5c4f5228f9a317c1..f59b24fc1c38cfbe8e491a3db3fc8cf81f7d000a 100644 (file)
@@ -85,7 +85,6 @@ namespace System.Net
                public virtual Uri ResponseUri {                \r
                        get { throw new NotSupportedException (); }\r
                }               \r
-#if NET_4_0\r
 \r
                public virtual bool SupportsHeaders {\r
                        get {\r
@@ -94,7 +93,6 @@ namespace System.Net
                                return true;\r
                        }\r
                }\r
-#endif\r
                // Methods\r
                \r
                public virtual void Close()\r
@@ -106,26 +104,16 @@ namespace System.Net
                {\r
                        throw new NotSupportedException ();\r
                }\r
-#if   NET_4_0\r
                public void Dispose ()\r
-#else\r
-               void IDisposable.Dispose()\r
-#endif\r
                {\r
-#if NET_4_0\r
                        Dispose (true);\r
-#else\r
-                       Close ();\r
-#endif\r
                }\r
                \r
-#if NET_4_0\r
                protected virtual void Dispose (bool disposing)\r
                {\r
                        if (disposing)\r
                                Close ();\r
                }\r
-#endif\r
 \r
                void ISerializable.GetObjectData\r
                        (SerializationInfo serializationInfo,\r
index 7aec94896c6c8692be01bfd1cf018191a8f4b31c..2b3a8eefb3f60f42836cd2b7eecffff08312cf20 100644 (file)
@@ -26,7 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
 //\r
 \r
-#if NET_4_0\r
 using System;\r
 using System.IO;\r
 using System.Runtime.Serialization;\r
@@ -89,4 +88,3 @@ namespace System.Net
                }\r
        }\r
 }\r
-#endif\r
index e3760877d280557be2c2123aa156ab402c06986c..7e546f0b76e947a9f3da61efcb4d7efcfc5f7f79 100644 (file)
@@ -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
index f95f575d15689963726807bdb9fe3f36248382ce..3ebbde92945b084a93865f8feab464e2f38377b3 100644 (file)
@@ -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
index bd62e6e8144a59509010d17d7c8f22847cb84198..ec341ea85e244436a9725551e3f4007f87ec962c 100644 (file)
@@ -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
index 3dd7f4b5eb7ec5ff5f77a63a5c1c316c13eb2fab..357e946c59f6356ce12a596c9cbb02c120121edf 100644 (file)
@@ -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
index 63dc57295b6f49c7c735768b8e4ea8a9a9e7f9ef..4e49d3a394d315d680c888975df1de52a05aea8c 100644 (file)
@@ -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
index 2baea55e8abe65bdf2401581250a083988c65d43..6fd9e22c291a9cd46a00ff85ff313a6fbcaf2a0d 100644 (file)
@@ -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
index 5d99a595c46467fdd1ef81e15e79911414cbed0f..820116ada539f97d7ddb5e194b6e5aa67b56167a 100644 (file)
@@ -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
index ec038d76babb09b110407c1019055edda68219dd..9010edfeac200b73ad2baffeb31a2da3a77047e4 100644 (file)
@@ -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
index 229999df7182959f1bb4f7dc8c4e950b1028ec7f..fdc87776e6796661479feb4458a03681d3069ba7 100644 (file)
@@ -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
index fb9c14eead150e43c8385ea23551dc577d82fc1b..f44c3160307b1ba3c7b5fc5328fcd4e10cac5d92 100644 (file)
@@ -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);
index ca28836b77eac6b73680fc57456728a41a67436e..3464e0a971a9938dd0fd661294c3678855255e70 100644 (file)
@@ -74,10 +74,8 @@ namespace System
                
                public UriBuilder (Uri uri)
                {
-#if NET_4_0
                        if (uri == null)
                                throw new ArgumentNullException ("uri");
-#endif
                        Initialize (uri);
                }
                
index 1e215c388be04574ff605de50f98522f5f9717c1..6860619ae40df9c06076fd711ccac2216d5a08df 100644 (file)
@@ -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)
                {
index 397b508dcd8f8dcfa12392471bd20518f02f74bb..f1f85372255e19f8833b17f540178c39d05c9283 100644 (file)
@@ -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) &&
index af581d199d8ffae93c2000c040cf64ecd7351436..2127c3a35382328d015cab012f4cccdc5a55e8f6 100644 (file)
@@ -25,7 +25,6 @@
 // THE SOFTWARE.
 //
 
-#if NET_4_0
 
 using System;
 using System.Data.Common;
@@ -46,4 +45,3 @@ namespace WebMatrix.Data
        }
 }
 
-#endif
index 58a68b57ddf49dac6959a72e81b5ea757e92f35d..976ffb7a03097384ed196a4fa3e75dfd2b28ea0d 100644 (file)
@@ -25,7 +25,6 @@
 // THE SOFTWARE.
 //
 
-#if NET_4_0
 
 using System;
 using System.Linq;
@@ -239,4 +238,3 @@ namespace WebMatrix.Data
        }
 }
 
-#endif
index ec1b1a0c3abbb28ec429a8ce507a5ee3264d84a6..c3413af99872267e1d07beffef7c9add6e75e53c 100644 (file)
@@ -25,7 +25,6 @@
 // THE SOFTWARE.
 //
 
-#if NET_4_0
 
 using System;
 using System.Dynamic;
@@ -149,4 +148,3 @@ namespace WebMatrix.Data
        }
 }
 
-#endif
index 2ec5f3be0b489652f82eb7d21ab39be1c4241b0c..46a63bcda9f811f39593c8b75832d0d9b2820a08 100644 (file)
 //     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
index b88daa26ded17802ee130bafb906109d7692b4f3..850d7d60519f76ff9b2e213b5047dc800d34fb07 100644 (file)
 //     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
index eac7130d6401004f4d0e4e618b82fe7bb404aa7c..a6a2e57f986097df5cbe17e08e835ae7a6d9e462 100644 (file)
 //     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
index 82ad8cac2eb9efe906da37d054ae7756a2509756..f9a24bb59e9d488ad73cdc88240c993ef1569ad3 100644 (file)
 //     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
index d82cf717b4f835ef9be5b7884685358ccdef73ff..993f5479618b0d6f3907ebc7ffa4a45fc141eb6c 100644 (file)
 //     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
index 85e5d909ec4c50b480e925f60a80e7972ffaa83f..8fa9fb0fd6b2ff16e59286d42739609dcb2e2749 100644 (file)
 //     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
index 07f9c248d86d5c3ed4397f0734c907500a7ea7bc..345be2b99d9ab47dfd300d1f57348e599b246729 100644 (file)
@@ -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
index 04ce07998b905c804bfe6b68483423bef87c7cf0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index dacda058adaf62180b7ed299fa13a407f58c12a2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 9be1751dd316aa28b91402c6fa48e0c9c1b4e3f0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 888e90105fddb499f4608af087eac9a68ab9949f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index b7a604a48d5dba148d02ba14966ab660db07f3fe..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 817dca4f0335e2a61a73fbd7130eca81d0aff62d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 0f6ce9b93751b124b363adb3bdfdaf58704218dc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 69edc72ee02342938b6092638af035c76a3e37e1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 75e2a5c46fcf9220179a9d194012ff4787167722..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 62faad68508bf80a9dc628844d7a84c83243c1db..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 9a053d52e130c63a34c3fc776e4b98160633e309..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 4126496926280666771814d1090892b9fc47f70d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 975aa4b7f0dbd9289bb539e1ee033811d7fd33c5..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 8d6b7cd0d8ce702fbfd1d66f04f4cc4ff3cebfed..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 353a9ad104235464668f7d8176b74de7ddda62c8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 1f0c73823f7b273d3366746d3f3557552a23f60d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index b486f04607f07f6a40ba4244eef9ae9f8dd8ad7b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 1211a935b54bee3f8c5e4f87ec983d032d584627..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 140786645664d50a753f5e41406f5a7562c748b8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index f865ab313b22f676bccc2a862945d686ea843751..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 435499d5f4810f94bd6541bd3df8e15492e06a75..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 7f3fd9047f8697cf8a3461d78c2cf598eca9e201..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index a5b9206d59eb2a2233f5a321e90b7ccd7c6ca63a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 777be0e40b9df45cf841cd7c6e57ea6fb3dc7347..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 52b942697282abbde6257035197acaa01c996a99..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index 15512eaf47a64740c7cb62f38d5c65449be88f47..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index eccd70a0833278d187b17db41854c85f8bd11a27..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -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
index e340b9e885796f463dc4e698b3462d531fc327bf..e83eddc8e811581d2d8c6ea3376e68ce177224a7 100644 (file)
@@ -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
 
index 31a4dc681400e7d48ea4c16bb79ae5fa992f3153..b4ad9f294c3ea0f3f63c816d4339e96998fdec4a 100644 (file)
@@ -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
        }
 }
 
index 9b6ef1aa2201c2ec7ccc49f0dfcec930ec253d09..778ccf34afc34668fe8feb487db0e33da659fc74 100644 (file)
@@ -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 (
index 2d742a6ee9385007de91fb0778d6a17ee4953dd6..7f0ffea0426bcb3b2726fe5696d23a437bf6a8e3 100644 (file)
@@ -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)
index d7621356baefd5f49de69561b2a87e8176ea7288..b7994b3257125ea8456857421a01eb0d56415694 100644 (file)
@@ -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
 
index e94e1f210334e4219ed16d05102b98a6d5eb895f..38f5c23026eb8f89d7d01d5c13e499727ed6ed07 100644 (file)
@@ -40,9 +40,7 @@ namespace Microsoft.Win32
                DWord,
                MultiString = 7,
                QWord = 11,
-#if NET_4_0
                None = -1
-#endif
        }
 }
 
index 96e9c51c358208254fe18bffa7c4724b1224c3fb..645b5c3eb4321aecf3e2155854d82e101a3fc417 100644 (file)
@@ -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
 
index 1cb4c39eacd0546b35dd423a20445001b4c3542a..968346caad870d252aca1e7eba80d66f57fbc368 100644 (file)
@@ -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
                
        }
 }
index a3108ec2b992442d116088210016a90ed13f5cf6..c5335ffd0e951c7110b139209055c0581dd99eb0 100644 (file)
@@ -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)
                {
index 6ca6e8e6fc5cb5710163da9aa04f732dd6efec06..71f11a58a33e1aa8b23b43fc405706f2c7f82a6d 100644 (file)
@@ -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
index 79bb2f4dc949c5d13befaad989fb85ca5792b792..554cef9661a04743786a7d53afc72959e8170800 100644 (file)
@@ -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
index 954324c67154bc34e83428a7fdceff8daeb3756e..8e9748a04afef0d0913f8737a4ae9e8fa9f20200 100644 (file)
@@ -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
index 8098cdbc5828bfd6e7cd188e3bab68dd4127b619..a53b99d00789d03ebd4c2712316669e5f61fc2c0 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -462,4 +461,3 @@ namespace System.Collections.Concurrent
                }
        }
 }
-#endif
index 783a367537c65e2b16ae9354a7d67f0e4f78352e..0d0ba10e3ed1c7cceaf761e6d45c082920c15d96 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -337,4 +336,3 @@ namespace System.Collections.Concurrent
        }
 }
 
-#endif
index 958fc6153594c03f42b443fcb2f6959f907b6f76..7d55859dc647f7d8ca36cb2727b8c66828d297e5 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -248,4 +247,3 @@ namespace System.Collections.Concurrent
                }
        }
 }
-#endif
index b9195722a093f5de2f0ab5528a4091c7ed8b24ad..8cf28b4d4622fc10f480b12cb966a13471d7613e 100644 (file)
@@ -26,7 +26,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -279,5 +278,4 @@ namespace System.Collections.Concurrent
                }
        }
 }
-#endif
 
index 4f991e289749c527f2431c088f5d0757b595fa26..b91d8f505b94eeeb1c86131caa44517064d9613e 100644 (file)
@@ -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
index b1368dd75718d40b0828d5f9612e24295834ae9b..5a47fb5dafb5f8a9a9edb271ccb698a64d21360a 100644 (file)
@@ -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
index 9f4f72ab50bd46b6c5e881419ffd3da092d52bdd..6542b3fe038d10b5cfc2487d6c3ff0e5c63bb67a 100644 (file)
@@ -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
index 193e439a31e19093b8e919fcf3a61aa1c1a8c526..b5bc700adeff43391d7ae673d6092fa9ae110673 100644 (file)
@@ -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
index b589da6c31b38056e993bd3f24c7ce72550576bd..f975c97fc4a19db2774a99fe541abd645eb43a62 100644 (file)
@@ -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);
        }
index a4025cff885956480441eeff50e42aa80eea0c2e..8e268c9aa45d5d0a91c08c7b41a68da2ad635a37 100644 (file)
@@ -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 ();
        }
index 355dcd2a3be40415bf66a2ab45fe906d6d4897ac..8bc27f81a348fa9181c2f705435c4c5d9d382d65 100644 (file)
@@ -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;
index 5a1a093be37e86213974a819e876a06ad976875c..9ec6cba4e4665b1dae1bf6eedca08184dd6ac702 100644 (file)
@@ -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);
index 3df02b5a41b4f05b67d63baee73d910998f9c93f..b41670c14d91c87fcad04623c9c1e933a026ad8c 100644 (file)
@@ -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
index cc4177395e03686fa214d3aef79289e440313a99..ff071ec17e48c6157e88265b9af7c2ba8b60e9bd 100644 (file)
@@ -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
index 9ce2574ebb18bb71eae8d5c98784f15f7d537702..84c69ef9d0f008c7acd24bd8ff697316b850363b 100644 (file)
@@ -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
index 0caa12dab1e5afa0547b3704960b41a37cd6ead7..350fbcf27598878553c5fe3f17cd44d79a9687ff 100644 (file)
@@ -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
index 67d7dc0c9145576cbf46004eb3399741a2219511..d9cb5ea8c1236fb6a4915de642af3b6b9253e8f8 100644 (file)
@@ -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
index ac0e891e6834fa7b474709e6dedd5c6e00094c3a..1edc36c8f635f45c02dcc65aef0e531275fceb43 100644 (file)
@@ -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
index 757d1cbec8d7dc945a66f02de017b61fb0725036..a2d241c4e0a779c957135ffdd141a64e979929d1 100644 (file)
@@ -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
index ebf94402f9c2c83bbfa4a5d088355ea583529ba0..9b98c959cfab53e7165029de9ed86ceb3fe5788e 100644 (file)
@@ -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
index 92ee520a5de58632746b5ec7b432dd32af8e806d..5b70637b7ed575278949a79d5cffa4296a3d4b3a 100644 (file)
@@ -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
index 671932511bf50a0110debbb28d4481d000c2b2a6..c2a51ce17653cec5dc6196ffd9fd372f5f7adcd9 100644 (file)
@@ -30,11 +30,7 @@ using System;
 
 namespace System.Diagnostics.Contracts {
 
-#if NET_4_0
        public
-#else
-       internal
-#endif
 
        enum ContractFailureKind {
                Precondition,
index b3cfa275eaf5bf4a762104dfd8efe5e18d87b7ab..67fe12f6555d1c10c61d314508776be77b804fa6 100644 (file)
@@ -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
 
index a542650f02de5c1cb7f9fea9e8a20a4ee6859256..a22f9ee1927828e54422d0e045d7f7ca2962ce33 100644 (file)
@@ -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
index 66435b28367deab98481a8a2fb6b8a9aa20da3cb..c8fbf3ff24c317d425be4c3b5e9589e54a7ea6af 100644 (file)
@@ -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
 
index a6887206d4d8f02933f81aeb4891dbd95a2dfdfc..41c690f44b486b0ef72df1be19f9629abf1aed3f 100644 (file)
@@ -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
 
index fea4bda234e88451509af90e6f5c6f476714fea2..c660e8a814d1d5095b82790e27daf469b8852e6a 100644 (file)
@@ -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
index 9a61629883ce9e6cf78daec1966d3d7afc43254b..c1e72a632cb17f7c6a7b3a1901e666cee23db81c 100644 (file)
@@ -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
 
index b2602b259686850ce14ad65b857a0ddc49ef7ce1..84ab86913c0009d9e60ba306e75f6ae35af3f4b5 100644 (file)
@@ -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
index 9e0fdd00b6776ed4276759e455746239b2916d7e..90b27cb9eb04574e6ebdb96e40b0c1fb11dd8075 100644 (file)
@@ -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()
                {
                }
index 81eff7c6d8007a83de09b1da81df3afb4157566d..9be308de78d44b4de845d32f551fbbe0684de79d 100644 (file)
@@ -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
index 642410e7b8e45eea7a1411df6defd09d1552bd54..5eddc76636eae7b36105729f1a3ed5b22494f8d4 100644 (file)
@@ -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
 
index 2b13ee397ab9009f6887ee42b704b812cca3a4e8..4c610c22ba194e015de04eb281a606604dd78fa0 100644 (file)
@@ -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
 
index 25482a4b5fd991e625ac043b29bb9fab99a5bddd..cb24371d04248d732621f0b822000936138e3bb5 100644 (file)
@@ -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
 
index ce8e6058a77e1e169379edf72841e1bf95769cce..884b00cd8942f1a7123815ce88900665e632a741 100644 (file)
@@ -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
        }
 }
index 48e98f516ea998949cf974eb58379aef37c0ea2f..935bd6c890c64370d97ae89f1b98ff2a650c442f 100644 (file)
@@ -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)
index dd87843174eee01dc468331ed6491fe3cd471f1f..0da2a8ef8c6b1a49b150c7f9e95c384bbb83ce19 100644 (file)
@@ -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)
                {
index 0d3b391fbc66ca4ab983559abe1c628989a95017..7dbb214d671aab9949741d1ab1907c6b6983bd61 100644 (file)
@@ -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
 
index 285b70e331e3f48362ca2d2d1ab52a239cfc2083..3bacddecaed120ca25b1c8d9c0822822015d72a1 100644 (file)
@@ -28,7 +28,6 @@
 
 using System.Security;
 
-#if NET_4_0
 
 namespace System.IO.IsolatedStorage
 {
@@ -65,5 +64,4 @@ namespace System.IO.IsolatedStorage
        }
 }
 
-#endif
 
index d7b92b38541e42a0d7888c6f06acf15fb94c85f1..ad24f8ca8c5a5ca2f534ba535429301370e32908 100644 (file)
@@ -117,11 +117,7 @@ namespace System.IO {
                        charBuffer = null;
                }
 
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose() 
-#endif
                {
                        Dispose (true);
                }
index be47858d4800486f5ea80d6a12e7f960196f0190..bab371824c0b6dcdef290485c79ed7d7fe4209e2 100644 (file)
@@ -100,11 +100,7 @@ namespace System.IO {
                        Dispose (true);
                }
 
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose() 
-#endif
                {
                        Dispose (true);
                }
index 64d5b7dbb76fddf87d40a64bb3de6f9947025fbc..f263eeb1cc9c5673811165cf436fbfb7693285ff 100644 (file)
@@ -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)
                {
index 09ed552f62e2322351a52ff6966f805c3248b033..8289c288c20ffe228d3133c28a4c4569bf05b9d1 100644 (file)
@@ -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
        }
 }
index 79486b165a8811a7a805b50327187b4ce4cda215..de1758611c936cd78e37e8310a5ae226f906e8c9 100644 (file)
@@ -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
        }
 }
index 62be3c834f4b45562475d9c863997efec66fbf76..8c6fa0cc6a1b019e1825ff91a573ade23aba8e11 100644 (file)
@@ -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)
                {
index 3ea8cfe0069885bab701d456ca6ed83dbcc23469..660c08f27318946915ae6eba9056f5e4e5c51aae 100644 (file)
@@ -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)
index 303795ed9127f154c95dc39cc29bbe62b76a96ea..79f67371deb17b30596e01c188dafd6c4222c115 100644 (file)
@@ -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
 
index 8b9f52da931eeb0cf408f2ff47c0b7a435a2941c..feb7b4abc7f4a27b25235ae9f94b44b91ebed4bd 100644 (file)
@@ -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
index 3c5bf402f1c0d4b0af3b99b63162d9e0ee925627..dc8801f5e18cfadc66acfa8f5aeca55ed8e766e4 100644 (file)
@@ -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
        }
 }
index 6a8e4908edfff1f9d2342b0937292e11e495ef01..80864bc83514b992ea8d5052f1bace10b13ef591 100644 (file)
@@ -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
index 55cc465e04421bd331aa9fc5d4369478a097fd60..3d1bdf152830e8d3618747e975b890c27de06c04 100644 (file)
@@ -41,9 +41,7 @@ namespace System.Reflection.Emit
                Save = 2,
                RunAndSave = 3,
                ReflectionOnly = 6,
-#if NET_4_0
                RunAndCollect = 9
-#endif
   }
 }
 #endif
index aa0f78a235c58b0cf9daabb8c6167561f86a860d..05b0bec63be73a83715df664ce8982a87c30d27a 100644 (file)
@@ -179,9 +179,7 @@ namespace System.Reflection.Emit {
                        }
                }
 
-#if NET_4_0
                [Obsolete]
-#endif
                public Type ReturnType {
                        get {
                                return null;
index a3be40abcae2614e71a7d5d452a9cfad91956859..85a622a7ebaa1b4aff863f91fd43f8b7e06b580c 100644 (file)
@@ -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)
index 240bc7297e7603106d3ce00e8f462eacd60d2ddb..eecc6b33ab28abe78bf0853a8c43f2473ea5d58f 100644 (file)
@@ -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);
index a4cfc9ca4fdd2985fc620038b0d4e006580f3609..06241b7baa169f7a6d9c766f1281ccb5e6e0238c 100644 (file)
@@ -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,
index bc8b2538378428a3f993e62afc5a8840e373a851..44fa9d56321bcb5793ef9e20f0346ad283c599f4 100644 (file)
@@ -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; }
                }
index d5f8c1407b53508b9495b54084ad5661a7cdb67c..37489061aeb2ef5bfa060687b37d862b4ba15928 100644 (file)
@@ -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
index 32aa0b81fbe407e3c628485bfef489947820f426..e5326dc08f603cd258460221d1d28a53c24d16f5 100644 (file)
@@ -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 {
index d56f96256c0230333e03a1afe31b549d5c289e21..924eb674e154ef2c487f892e5d54a897fa502f3c 100644 (file)
@@ -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
index 15e2f8a975744af7c73ee595da145b8effaf1b4c..253b2bb39f77847cd1617d07bcd73d67ae7fd31d 100644 (file)
@@ -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)
                {
index 1a744b8ab5ca279c10fc03a7ab40edaac27cc392..9428605ace9097bf1c64769402ebce2da3190ea4 100644 (file)
@@ -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 {
index fd81dcb1b39fc79c235a1552b0af2cb73d3cf805..65237fe796f15e07440afaef61e9fae8151845e9 100644 (file)
@@ -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
 
        }
 }
index 615bf7de8acf76df4ad102c95cd8f9ba1140755e..4a5918281f4333dc4c7f4521b559ba1feb812d00 100644 (file)
@@ -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 ();
index ecee7719de49ffce76381be1de38f8df7c1b3a83..446aa5d0379306a0b493eb2153fda0862654e88b 100644 (file)
@@ -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 {
index c73e32c9a949f817af86a8ae42ed854606be4613..88b551dcc1db677f35290088bef7175f3737e4c9 100644 (file)
@@ -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 {
index 696e9aa0d401b5dfd68d422be635ee66c3ef4802..6c965d38382d5404083e72f0414e2e4e4b62aa60 100644 (file)
@@ -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)
index ed94d54b17a487493637cae25b9e2657b4f345ca..d108d1e4153c4702fd9a1e9d1da52f651b2b4e20 100644 (file)
@@ -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;
index 06ea3e8e70cd8c01e2d8475819928bceb9bdd9ac..5838902b2ac15ed3d48fc4e5abd570d76bc494c3 100644 (file)
@@ -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)
index d39d382810007e5338558b3ed4c213c22d5c6007..5bd024b87087dbc5edf6c9e896e711528b833e86 100644 (file)
@@ -41,11 +41,7 @@ namespace System.Reflection {
                internal ushort position;
                #endregion
 
-#if NET_4_0
                protected
-#else
-               internal
-#endif
                LocalVariableInfo () {
                }
 
index a0f5f3713a285ccae35329f65e958697297dc6b4..5dd9301c5770477e687bbeb2fee4a4d4044e2412 100644 (file)
@@ -44,11 +44,7 @@ namespace System.Reflection
                {
                }
 
-#if NET_4_0
                public
-#else
-               internal
-#endif
                ManifestResourceInfo (Assembly containingAssembly, string containingFileName, ResourceLocation resourceLocation)
                {
                        _assembly = containingAssembly;
index 89e2a3fcd290bb7404f14c02e14ad049ed3ed36b..4b250ba253d75086f54be228a9b0873bd526b272 100644 (file)
@@ -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 {
index d0fa181629f502c5856f656002068953fcc066e0..011a2832af589f2abb43862661269dda314570fe 100644 (file)
@@ -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 {
index ae2a8cd15b7b85bec30d7005ad0056aa06d8a67b..9cc5ca040de9ab23abed6cee1c109545a2e873cf 100644 (file)
@@ -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;
                }
index 74f96f55428f03dcc775dcd1c09698251f8af648..b63d5887788c07bf282b8d797a00b24c5268ab7a 100644 (file)
@@ -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)
index c2f6e1f0ec5a25e48cca6e82d6691ea33edc066b..1c2c3e998e4daf60be6a0b885a9df43743c940af 100644 (file)
@@ -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 {
index fedff328ce7dd41801dbe977817df96c9a7b81fe..80eb4c79d76c8f2269af0b0a6ad8f18fd7c43b91 100644 (file)
@@ -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 ();
index 4a83f4b88cecdf8f7824325144d3f617610059d8..4f354d0a6f7cca75b475c405df3ba0ef370d2abc 100644 (file)
@@ -165,10 +165,8 @@ namespace System.Reflection {
                                ToString(), MemberTypes.Event);
                }
 
-#if NET_4_0
                public override IList<CustomAttributeData> GetCustomAttributesData () {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
-#endif
        }
 }
index 7fe23e6b737e2b65030a19d9259472ef8240bcac..e374e5176621d48595264ef32eb58ca28504d5e9 100644 (file)
@@ -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)
index 68dd9fb88734b0cd9f2ec78f2e63fcb9e51f35c6..928e1269b0f44cfe73146a52471389860e913cd0 100644 (file)
@@ -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
        }
 }
index f5498565260c528bdb0e57fec3fec7ff6ed0fc26..19c756a0d65ce88db213e25dafd0c93350eb2d3e 100644 (file)
@@ -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
        }
 }
index ce4fdda324c6944a7fda60656fcdcfae736cef70..afa1a399abb03996fa550d53686f985826fee5e2 100644 (file)
@@ -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)
index 24dcf8b7470f9cb7542ef9873c1213658027b8f1..162ee87d1e64a86509c869f0f94b207ec17cc6dc 100644 (file)
@@ -410,10 +410,8 @@ namespace System.Reflection {
                                ToString(), MemberTypes.Property);
                }
 
-#if NET_4_0
                public override IList<CustomAttributeData> GetCustomAttributesData () {
                        return CustomAttributeData.GetCustomAttributes (this);
                }
-#endif
        }
 }
index 466ae0f70b5228fa0f2ecfc0ab1f58e1d27b4372..7627635ee95803b0e943f0599d0489976d8bfdb3 100644 (file)
@@ -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 
                }
        }
 }
index 6675d2e6c69f7bdbbf18d71b2393815e6458b947..a2780089c78391eff6904eebfaeed0bc7cab6e77 100644 (file)
@@ -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)
index 961f8679819ed2c4c0368b9e26c2803bd0e5651c..3dff4e439216b1a6b4e89914181a1f19ae389449 100644 (file)
@@ -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;
index ae5f679ff289ab3a1e05190a788a2da456ab08e0..f73a8f8683d1cb581d5bb82119fffa9cc0706926 100644 (file)
@@ -477,11 +477,7 @@ namespace System.Resources
                        Dispose(true);
                }
 
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose ()
-#endif
                {
                        Dispose(true);
                }
index 024cab9d5b5a4cb7abf8848d50a294d2e0ffdcbf..f54476d78a456ef6c2e53c487a7a4f55d5f39dd4 100644 (file)
@@ -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)
index b1af3ff9e624b5d7e5dcc0d1c850a232388169b4..436a3636925cf0a96e32ae025494b4308e526605 100644 (file)
@@ -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
index 3f6230d0b8b7f6d8897237cbea8a870d73cc2130..b87a7a5b05e4ee095b5f9a9381bf3cc78a5eb5bd 100644 (file)
@@ -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
 
index bdd8e8d9bf8ed9d8f54f1f4d00ebe2077b902269..925de6dbfd42b65f0fd58f37e44525527de2f3c4 100644 (file)
@@ -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)
index a8c019531728e1157fdb59d2bff11726e994346a..a2a496cf187dbdeadce280e63c1e0069b6f90731 100644 (file)
@@ -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
index f287001e7797d9550ee2723d5d57da0591989bcc..928c529ed301c4d8bcdbd6e956674112c2b5eb15 100644 (file)
@@ -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
index e57d58f58bd9bb2cda66182bd562d179253345e0..adfe8f60912d7caff02a6657d2c439f185f91bdb 100644 (file)
@@ -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
index 6c84da5da5e766b8924ae5a70c9d2e1179102a09..4f7ccec15e87ea5abc2edc53be3d243c31f127e2 100644 (file)
@@ -34,9 +34,7 @@ namespace System.Runtime.Hosting {
        [Serializable]
        [ComVisible (true)]
        public sealed class ActivationArguments
-#if NET_4_0
                : EvidenceBase
-#endif
        {
 
                private ActivationContext _context;
index af66426e6f2f76218cca403d17d311ec0402e4d3..5f392b89793a292770767162ff7d6be6e66a7696 100644 (file)
@@ -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; } }
        }
index e43d5aaaf87700d649f24ccb23f5ab650e919832..d2808208368d3309fc4fd3ae9ea82b32ca756d82 100644 (file)
@@ -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;
index 5d6737272ffd52080cb4c6f142283ed16926676c..003949762454d432692c6ce15c17dd2128d9989d 100644 (file)
@@ -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
index 962282404413b563cc15a01f4038186b3f62f7e8..94e66d9aa38e8b0a7470fbb21dc8acae1a3bac97 100644 (file)
@@ -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
index e3a9f1a74c5e8a090219e8725e04fad477c94dee..7c5d62aae85ee71a969a03cfdd6b676f4503a7ce 100644 (file)
@@ -49,9 +49,7 @@ namespace System.Runtime.InteropServices
                ImportAsX86 = 256,
                ReflectionOnlyLoading = 4096,
                SerializableValueClasses = 32,
-#if NET_4_0
                NoDefineVersionResource = 8192
-#endif
        }
 }
 #endif
index f3379290e4c3c46e24837a44f1e80e8432725c65..12e96c54bc06205e66356eb70b5fc11f77130fca 100644 (file)
@@ -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 ()
                {
                }
index 804806536ffb58d4661182ae1db6dd1525514e41..4005fa8a135e5ed9c7fa3742de40291015b31055 100644 (file)
@@ -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,
index 9d3c42bbd19d6e3c85134a0c2639f20adc501bcc..d88fd2975ebaebef64c5aa92b8c815650154bac4 100644 (file)
@@ -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;
index f8171915a41777a68a75bd7027d496b839a12894..4e9338b2f5929235ec41835c0e8ac4af114a1fc7 100644 (file)
@@ -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
        }
 }
index 998d03d593dcd9d90ffc1ae6587f20d6995b6e10..d5e636fe40d0f9cf19a0f750a3bb7a9cf06caa5e 100644 (file)
@@ -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
index 06344ee6a7f80e4ef17305311577d6991dc7d05e..79d6679abe0dbf9d8db4b4f48a6342cfac1828ea 100644 (file)
@@ -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
index f91c311ea3346486b815195a2a5f4bd29a056ab8..a047d81a597991e76c18233839e85cba5b957c6e 100644 (file)
@@ -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
        }
 }
index d5125d3ddad6ea6260ce2a72d3be934d75633a74..0437329c1f4f9775da82176ff75545aa545d86ee 100644 (file)
@@ -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 ()
index 557c6f4bdfd87c1ec1c6088450f2bc953729f411..d0c5f6227f16042b37ea8ca28ceea7f3496f51ca 100644 (file)
@@ -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
index df843aeff87d4102ef4b7e896e402d38d622a578..70c0bbb037ef77e70a9a86923eed1eaab95a5c61 100644 (file)
@@ -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
index e0d906ca46c60b9b3178992dbcd183a35e7a4aa3..a8f8c8f53f4d0193f2a30d6d072818640253236f 100644 (file)
@@ -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
index d8f0db1740338709e97e108b0f7d8bd5daee16aa..6ee17559d9c24baff5de75d7826ff29204d6c715 100644 (file)
@@ -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
index cdf75e3b00ff71e4561f7bc855fbd9b6c5d5c9c1..f0458f874587ca1776f96f9075033a08fa82966e 100644 (file)
@@ -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
 
index 9550f8b782d90f06de77561d42eee8a90286c20a..c4f83a7345e8d6435ac90e1b73581caecbe1435e 100644 (file)
@@ -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
 
index 4d6c71c0dec3de215a7540e30fb406d0636e06db..d621d725a1d9d0bfd667658827f03650b2cc174b 100644 (file)
@@ -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
 
index a875b7864ae209cf60b93b97106e022ec0c247fe..038fc71b8eeba46156fbe28da5a6e59e1d55c19c 100644 (file)
@@ -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 ();
index 8d930093fdea9e7c4216a4c7c5283fc919972519..4bed60fc3b93acbda77c62ddc51f284fc284254c 100644 (file)
@@ -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
 
index 8ca0307c4dcf3f245f61d41c4fecc2354afb541e..f1c27f3309d8a36cc4d0f156f187e58e701890f9 100644 (file)
@@ -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
        }
 }
index 47ce386ebd8ff0ab3653ad6a5f97adf12c4af9f9..5f1591d4854da8a74e92c78716eebf6907d640ba 100644 (file)
@@ -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);             
index 777017de58972acdf5f7817c0120e3dae9148793..e359b1ab1967332a9c143498ba9ada95c3b394d4 100644 (file)
@@ -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
index fb04371d255541121980b291524f9e50a879e312..74e4d73a1f708595d5b6c246cfe7d3d402b6328e 100644 (file)
@@ -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 {
 
index 0a57ad272e5556289fdebca9e2efa8e7e0f1417f..5b79db673f39829a37c2824b9f4b1a019b5c0c9a 100644 (file)
@@ -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)
index 220ad2a8f22046443c37270d34e9cdb04be56978..bb40c751b455c6851b5cd4a0c5d3d214b1a638a2 100644 (file)
@@ -43,9 +43,7 @@ namespace System.Security.Cryptography {
                UseArchivableKey = 16,
                UseNonExportableKey = 4,
                UseUserProtectedKey = 32,
-#if NET_4_0
                CreateEphemeralKey = 128
-#endif
        }
 }
 
index 2d782fba475459c3a580a71a987516ad344b141d..5c986fe6d160b7e77065214a0d10b7de9db77ca1 100644 (file)
@@ -31,11 +31,7 @@ using System.Runtime.InteropServices;
 namespace System.Security.Cryptography {\r
 \r
        [ComVisible (true)]
-#if NET_4_0
        public abstract class DeriveBytes : IDisposable {
-#else
-       public abstract class DeriveBytes {
-#endif
                protected DeriveBytes ()
                {
                }\r
@@ -44,7 +40,6 @@ namespace System.Security.Cryptography {
 \r
                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
        }\r
 }\r
index bf4150c57d1e404e332ab54d4348388f60c5b90b..b23967ea8a48543d56663d22d1022c5fa05395ce 100644 (file)
@@ -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
index 07074f8aef3ee6b3be94a8203be37ffd3759ca31..e8404f230212f8934d2dac0d26353a6a92991c4c 100644 (file)
@@ -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
index 80a1dbeead1776cffba2738d31df3710c0aee4b1..57d80eafba05fd9a7a789c52d34178db73e5202c 100644 (file)
@@ -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) 
        {
index f70ac329846d96cf935779aa656eb4909050e6fa..29e40efbadfdddbc2247ca6b0c066162ea00881f 100644 (file)
@@ -146,11 +146,9 @@ namespace System.Security.Cryptography {
                        }
                }
 
-#if NET_4_0
                protected override void Dispose (bool disposing)
                {
                        base.Dispose (disposing);
                }
-#endif
        }
 }
index d367997770d0d76f5297b3db9f6f1a1462c68e81..d66e2f93a244a0bb88ba9899791556f27423fda9 100644 (file)
@@ -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
        }
 }
index bb92272029f1b0af2391616a4a2f11a0800cd039..98e8dd30661e3f66e4316d8a43f772c2c3968c2c 100644 (file)
@@ -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
        } 
 }
 
index 6910f112aae6f247f5b0b3b36665947194eed831..ed731f8d494713b969a6ab6c63f6e6cb52976db1 100644 (file)
@@ -77,11 +77,7 @@ namespace System.Security.Cryptography {
                {
                }
 
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose () 
-#endif
                {
                        _st.Clear ();
                }
index ba713e8c6e5a3b41374f05672ec3e3421147f111..4c01166480447a474cfd2cafd2c4b8fb10919baf 100644 (file)
@@ -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
index b862ed03cc5cce91512f2a1ed49908c06aa334f5..ddf4394b667a9436263b5603fe780041124ff237 100644 (file)
@@ -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
index 849a0865b55a850404d5ed27bffbeef53d9cd2e6..68d85e81064b0ee0abef7798e76020fef7442b58 100644 (file)
@@ -73,9 +73,7 @@ namespace System.Security.Permissions {
                        }
                }
                
-#if NET_4_0
                [Obsolete]
-#endif
                public bool ReflectionEmit
                {
                        get { return reflectionEmit; }
index f2d65498c317c977237426cfc3a6f2e348abd950..438c65e094413b8c8e77185b57ae7f87831cc5d3 100644 (file)
@@ -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)]
index f45abac05ea7ae3e0229a172fba7c827b59acff4..94d14df749a69d1c3990f8234e6e341ed6be6e43 100644 (file)
@@ -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,
        }
 }
index 55a8e7f1d35a31b357d05cf794ec9ef1b462cad0..af447942b6d33b3424f2c9689267f12bcf01b5c1 100644 (file)
@@ -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;
index a73f5daabc1a2f3ed470730d43aa1258331973a7..702cd0bcdc9059d9a5f136fdd6f7a6f55340b6a3 100644 (file)
@@ -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
 
index 366593159ca19e6ec71316f5a16054c6ececda7c..db004052e61c2a1cd3269dec934fe07ea6327769 100644 (file)
@@ -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 ();
index f4251697aa409a5c68ec15e7890b6c928ad19cb9..95e10031946d6ee82a25fa53acc834dddd3f0987 100644 (file)
@@ -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
index d5cae7f5aa90325e89e06216022b2989da5ee1ff..47c4478101d66df1e7e4ebe7412af7ecfc4eb1b9 100644 (file)
@@ -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 ()
index c0923df14720635c50db1b394ec9a11ce2e9fc46..df720ea81d637566c8d348a9d9d77dd829b6a103 100644 (file)
@@ -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;
index 484bfd394b916d979b83e7ed0d0a151963834293..2b8e80792f7fc4b28e7ef4608925158d57cbd2b7 100644 (file)
@@ -35,9 +35,7 @@ namespace System.Security.Policy {
        [Serializable]\r
        [ComVisible (true)]
        public sealed class PermissionRequestEvidence :\r
-#if NET_4_0\r
                EvidenceBase,\r
-#endif\r
                IBuiltInEvidence {
 \r
                private PermissionSet requested, optional, denied;\r
index d473e98d59afb13edfc8ab5761fd4d3c98d1b5aa..827505d455882a04316985c3e3a73004e050ee33 100644 (file)
@@ -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;
index 6cef12ef808788bc5999fca939d28795bdceb0f9..0c79eb822792e47ae89cba869c1f069c4776a3c4 100644 (file)
@@ -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;
index 940e5c3f04dde0dc0439ed48f0c31044e5490a55..977eac06868a15d4529063dfffc8c0e355a4f5a8 100644 (file)
@@ -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;
index 2f421b635cd2b2e808f5dbf0f1a862c001c4daa2..fe17e55568f34eaa100103edfc29e68ec4b46c4e 100644 (file)
@@ -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;
index 33d406c0178bafd1ef97045adcd065c9556dfbff..b65d55460d4fde6b99f69ec029a2da815ff45ea5 100644 (file)
@@ -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;
index 60ab898d2816b7ccffc0422dd55069798307294b..765f61981df9a2f11fbca50627965f35295e4174 100644 (file)
@@ -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)
index 71f1f50ad1f6dd47506cad38efe7994aeef3fe4b..7d3f942fc8c473953e535a97bec25ce3065939b1 100644 (file)
@@ -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
 
index d2b39e7c655656a54f8933e40ab49cbf8739d5f9..b3cc24bd1fd1618f3c3897a621a871df5c9cea79 100644 (file)
@@ -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
index 41d816a2461f45efdc33db85dba49778eb16d28e..ed01b54abde7f1cd0b27207343e575d66c4f7a0d 100644 (file)
@@ -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; }
                }
index 3bdf3cfdda7fd66c2319cf49104c46c24636d216..37be161994647e2cec4f44d8ee7fd35da3704e96 100644 (file)
@@ -28,9 +28,7 @@
 
 namespace System.Security {
 
-#if NET_4_0
        [Obsolete]
-#endif
        public enum SecurityCriticalScope {
                Explicit,
                Everything
index 39320b1c4d728117d952496c701a42388c39da1c..d8a3e72dafb9de280de4972010ea09a2b4b11544 100644 (file)
@@ -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
        }
 }
 
index b808dc55ac4b984224c8a1b3c20d3d3adb42003c..a9f6b3f20437cc382bb89b04842324d6df3461aa 100644 (file)
@@ -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
        }
 }
 
index c74d00552ff22c86955bd6cde098376649081c9e..f67e35c0173ee7179570b40f058f6291421db50b 100644 (file)
@@ -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
index d923d11dbd33a6eb080dcf7b39c6d37df83f11ef..b6ed53fb918d8ecc00db942dc6e3b0c658947c5f 100644 (file)
@@ -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
index 45f0a3419f394a30a9fe57d0bc7b0b96465dd15e..dd18b62f5bae39a26daff7038a9c4bc2cd4ab9a6 100644 (file)
@@ -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 ()
index 7c471baf7c0220a7cd84270c1d765274041be5f3..a972e9ee24466739793ae3a2dc85c73cac347088 100644 (file)
@@ -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
index 2e13164a5124cdf55dc0d8bd6ea12aabbdcbcd02..51d1c2d28f2ad7183a1eda9a2c721739cf15c471 100644 (file)
@@ -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
index 9a9aadd06c617325e1f26d1d00e101962de5d4ad..68e209f9663fcab54068af02b9931652c18282d5 100644 (file)
@@ -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
index f509feacd02af8f00c776b6678f736b731ebe064..6b3d2638b75295304b38f4b89da01ae03e288ae4 100644 (file)
@@ -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
index b432ea5688cb1fa6c299ff74d087bfe3cf6714c8..73eef72f019c94411e2d4b26f265fc404011039c 100644 (file)
@@ -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
index e5606d5f115737b644e5e95bb7a9154a4f3cbb65..e0d309f1641d58c4398dd0e50aea52510baed48e 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 using System;
 using System.Threading;
 
@@ -94,4 +93,3 @@ namespace System.Threading.Tasks
        }
        
 }
-#endif
index 6bc0b6bc1cb93ebecc87adc194fba75a12b101a8..42861efb9178f7e1204af94a4fc097d3f65ec27e 100644 (file)
@@ -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
index 68bcf1f0a356f6cae11759089f27e244f2355b3f..c8197b82d4a89407eda8c67ec571401518abb7da 100644 (file)
@@ -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
index c8a7b3319a5f7c7d1732e42ff842985ff5f616a3..4753936d768e2d3578ceb64ec9664d01a324a261 100644 (file)
@@ -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
index 18382055ba50016fcd0cc5f0a7b07d6cdd86c018..cea07339f9dd671eec5335d625ed16606eab096b 100644 (file)
@@ -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
index 7ca9a591a0c20e6dc08c5ea307dae04102a6dd4d..fe1517a819cee79b0549cb43912bb95fb2720437 100644 (file)
@@ -28,7 +28,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -1418,4 +1417,3 @@ namespace System.Threading.Tasks
                #endregion
        }
 }
-#endif
index 72a486f7a806e066243703865ad460e7b17d9404..0f68ff499d992f1be57f9cf51392ee405e74d14d 100644 (file)
@@ -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
index 1fc5d1a7a1c71a4c6c84978152ae4ea5d3ac065f..30176924c0f325cbac000852d9feb3bda8db0b6c 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 using System;
 using System.Runtime.Serialization;
 
@@ -63,4 +62,3 @@ namespace System.Threading.Tasks
                }
        }
 }
-#endif
index 6746907e908bb13b51610570a871a5105a9c46f1..2830c87f3f52a6da694d1231c448e604b1d549a7 100644 (file)
@@ -26,7 +26,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Threading;
@@ -77,4 +76,3 @@ namespace System.Threading.Tasks
        }
 }
 
-#endif
index f0bc902310ea922fb8a20b3addab6a53fbb79f03..9df569342c2284423a8d1cffe04e9ac7473a1a6f 100644 (file)
@@ -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
index 8277fc1b76cbd716aa35f21c9725615c2b2cb050..d10135a133c7cd22191f9eca65d15b7f3dec5ae1 100644 (file)
@@ -26,7 +26,6 @@
 //
 //
 
-#if NET_4_0
 
 namespace System.Threading.Tasks
 {
@@ -48,4 +47,3 @@ namespace System.Threading.Tasks
        }
 }
 
-#endif
index e33cb8fb3b1a8a18fb31f0cea7fe412a8861c608..c85be4898196b0549cc438100a6c9b49457b1082 100644 (file)
@@ -27,7 +27,6 @@
 //
 //
 
-#if NET_4_0
 
 using System.Collections.Generic;
 
@@ -398,4 +397,3 @@ namespace System.Threading.Tasks
        }
 }
 
-#endif
index 58fc82dc5c06cbb3d468ddbcf838dfa6cb2384a2..0b5a390e682340aa24805b7efda291d0d46feea3 100644 (file)
@@ -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
index e5105f6ac1c3070b0b394d6d6275a9334d4b3c5e..47944f9434978efaef95e4ad2f3140fa13eec4dc 100644 (file)
@@ -27,7 +27,6 @@
 //
 //
 
-#if NET_4_0
 
 namespace System.Threading.Tasks
 {
@@ -44,4 +43,3 @@ namespace System.Threading.Tasks
 #endif
        }
 }
-#endif
index 6f424b9383281841d15a59750d2f0b15d03757d6..943f97a9c557ad6a93f16f57bc1a0f9d95f854cf 100644 (file)
@@ -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
index c20fbdafd38aa35cf5862110211cebce5b6eeea0..f3cc9c14ae7597dafb0e625463472a6b86d15c2d 100644 (file)
@@ -28,7 +28,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Collections.Concurrent;
@@ -88,4 +87,3 @@ namespace System.Threading.Tasks
        }
 }
 
-#endif
index 8654a5f037e6770be448b2ec9532a3e25fba77e0..ed0f2a02fc8b06d05926e4e1e4adae7cd363ffff 100644 (file)
@@ -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
index a558c622c5ebf2cf5a3158394a86ecd9da609966..183d8c2572ccb3c8b15fc032ae636f5a7fe604f2 100644 (file)
@@ -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
index e8ce5276346c9ff259a1b5a950c539f61a5a861b..36b5d9fdf7b52c7f02ad2dd3f47e5d61bd490d32 100644 (file)
@@ -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
index a4031c0a50dbd3705fd9482eef6a57d8221c4c3d..9096f717f69fa29e48cace05aa9cb1858611c373 100644 (file)
@@ -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
index 9d94b223d6a1f9b75c4dde5318cc308c41d25fa9..4d0bd75ca46c5f1f5e1d45d5467cafe240f48100 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 using System;
 using System.Runtime.Serialization;
 
@@ -61,4 +60,3 @@ namespace System.Threading.Tasks
                }
        }
 }
-#endif
index 853afad3736a5046b2307e2ba726f271ed5dacbf..fda07a845cda6960587933d74247d5d2c3c8fd8a 100644 (file)
@@ -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
index d336909db9d90bdfd2d5ac4d0a5e74a3b49a8403..ac7d740e9cec5867bde49378f5ef09ad8c4ee0a3 100644 (file)
@@ -27,7 +27,6 @@
 //
 //
 
-#if NET_4_0
 
 using System.Runtime.CompilerServices;
 
@@ -338,4 +337,3 @@ namespace System.Threading.Tasks
 #endif
        }
 }
-#endif
index a584a174c8d20d6ebeae42dab8afb966ee35f5a2..b3995a0cc01195fcd750c82a8c806749eb66eae0 100644 (file)
@@ -29,7 +29,6 @@
 //
 //
 
-#if NET_4_0
 
 using System.Collections.Generic;
 
@@ -79,4 +78,3 @@ namespace System.Threading.Tasks
                }
        }
 }
-#endif
index 2db34db8c8328ad87638f83a1ed12ba6eeb05b74..5fd1ce05a55df91801ceeeec9cbff488e6b8b405 100644 (file)
@@ -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
 //
index cdd937359558445e68579e8fd05add6f9e17f5c9..43aee69d6f590bcb1664535006661d0b05e053dc 100644 (file)
@@ -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 ();
index 82c7094ef6403d2ee6b8fe6569021c28bc6c8427..4336cac133bc65189540e0e0b5a76ebd6b11f563 100644 (file)
@@ -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
index 54fe237c79383a4c4eb8d9ca65e37d7a5d014b50..0d0e3fbfe900959cf5bed774b7cd7c61dcaadd34 100644 (file)
@@ -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
index a80524928daf5d9bf716075d2b5a0fb1b267872d..5321a06ac0b3fa6092e592c086c47233754306d6 100644 (file)
@@ -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
index 9a41f26be27eeeee5bdf8d2f46d16b673b660ea6..e440ba068b70b52d7a9cc3dcca3d9ea42cf4c733 100644 (file)
@@ -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)
index ceffc45a52376c6e79bfcb800e53af3c28533550..489c1e2ad7cfa2e790158d32d9e771eb0104469a 100644 (file)
@@ -26,7 +26,6 @@
 //
 //
 
-#if NET_4_0
 
 namespace System.Threading
 {
@@ -208,4 +207,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index f312223e02e168027ab13e591b4c2a4ffbfe2b40..d8336f28e33210f1358ce7d94ea299e9e21bad01 100644 (file)
@@ -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)]
index 4802aa3e45cb745e7825e71ff9bad289c06832e1..193aca5613bbdef123f184c7a9e039678d23c736 100644 (file)
@@ -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
index e8213063200c04b91989011269ebc5e5cf524327..6f58597a66d849449d885bf9b7cbf08d55090523 100644 (file)
@@ -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
index f7a2bb8865fabb3e37827f4b3ea939b56eae699b..8a4f4bb8d127eae0f7a685bf9b5ed635cf597983 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 
-#if NET_4_0
 
 using System;
 using System.Runtime.Serialization;
@@ -63,4 +62,3 @@ namespace System.Threading
        }
 }
 
-#endif
index a34370d460be051bbdaf54315d093cb8f573b037..225c6065e90db981c24ac175184c2de8d4cb036f 100644 (file)
@@ -26,7 +26,6 @@
 //
 //
 
-#if NET_4_0
 
 namespace System.Threading
 {
@@ -268,4 +267,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index 8b2d4dca9cd879ebbd871290c2a9024cbc8bb733..a227b683da4ac07db8524e3d4b0c99a5d2eb3214 100644 (file)
@@ -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);
index db91e6d070d477e3daea9f95ea911c525ba32a54..93024f2165e4a899e0bd40ef94a9d57e343bbfeb 100644 (file)
@@ -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
index f9cad7e56cd8ba1c886f79909d80e25a3c7ace52..28bb1527340f407d56860e23ee2f6762254b26a6 100644 (file)
@@ -23,7 +23,6 @@
 //
 //
 
-#if NET_4_0
 
 using System;
 using System.Collections.Concurrent;
@@ -196,4 +195,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index 136836746cc87e830c772e23c310ae1c822f0600..5afcdf1bbcb1e795076dc1d4a5d0503e51d432a2 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 using System;
 
 namespace System.Threading
@@ -96,4 +95,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index 985c8613d8a1da9c10b0c34ae1ab05b7460ec126..ae58ef4ba7f69af62d9f316919b1ddc9b810f145 100644 (file)
@@ -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)]
index 67501fcfdadaa6b5e061260920a21ef9a6f12934..ac9ed8cddf9a280a22466b9a8cd037f14fd720f9 100644 (file)
@@ -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
index 850925323621a9b454dae803487a9aea38cd7d4e..5558efad52f46159fe85716d319e60902ec26eaa 100644 (file)
@@ -239,11 +239,7 @@ namespace System.Threading
                        Dispose(true);
                }
 
-#if NET_4_0
                public void Dispose ()
-#else          
-               void IDisposable.Dispose ()
-#endif
                {
                        Close ();
                }
index ab75eb9ab95e499eed6300f3fd18d9fbb59abe01..ef19461d0bcb3bb01f546fe0b50a2a28a5db4d5f 100644 (file)
@@ -22,7 +22,6 @@
 //
 //
 
-#if NET_4_0
 using System;
 
 namespace System.Threading
@@ -60,4 +59,3 @@ namespace System.Threading
                }
        }
 }
-#endif
index 0ed90a1a3b75c747151b1d3aafae437b363c92a1..438f7fc31d253c143d0821075483d5f6331ecaaf 100644 (file)
@@ -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
 }
index 5c9ceb18d9f6875c274a35bea135b563b94c4343..1e6d26c92fc389e93b824987c148cde8c77e3253 100644 (file)
@@ -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
        }
 }
index ec99bc190cfd5421c42356028611df6fd6101ae4..7a2d1f4a21efe76b60539824ebf75ad2359d56cc 100644 (file)
@@ -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
index 2293f444e4d4b0c4e6af8ea4a957e7c8f6df917c..d6db872bcf7f3020227c63d3399d9c6c8a7e14ca 100644 (file)
@@ -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
        }
 }
index 519b8d1a09a4d649aeedf51e9275ef2bb8edcd91..d0ad692056c94f0222a260d113cb317e79da4905 100644 (file)
@@ -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)
index 3261e516c68f33ae2d7253fbc68380c2b10629c1..4d9b6e3b39385fe00fc1b0cae4d76873a2dbdd4b 100644 (file)
@@ -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,
index 16e2cc3029b1ef5298a86ab0f853ed69fc8c9cfd..9327b72a892e23e1503537abaaab37877c38b8ba 100644 (file)
@@ -70,11 +70,7 @@ namespace System
                        }
                }
                
-#if NET_4_0
                public void Dispose ()
-#else
-               void IDisposable.Dispose ()
-#endif
                {
                        // nop
                }               
index 7bedcdcabc665d9373c7f7106afb15733b9d5369..f15ba11b37cb03c40dfb040745db314c7ccef5c1 100644 (file)
 
 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 
 }
 
index 1ec7e8a694bc625d443ca4bde1ad6b3a498c6093..52871f1a08980f3904c06e40389e129e45ceb65c 100644 (file)
@@ -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);
index b152a708eef53c18cd4c3683d1dfafbf2141254c..07e56188ea3c8f8be602d69761593bdda8e371d8 100644 (file)
@@ -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
 }
index 54ac8dea8ae08d32b464bd9d47832d00f2b9b600..c4e3c8f5da5893c5b1fa014d6ebe3e8c8c1857f3 100644 (file)
@@ -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)]
index 860eee2dee1177334166ca5c7e3efabf8595d6af..4fbc2ac79c3f31f1a321e4fecc6ca992f263dccf 100644 (file)
@@ -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)
                {
index 341da41c15e2505cebb59d3b0891d2e66390a479..4fe5eaa5d5f561462628404bf0bc8346aa89a694 100644 (file)
@@ -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
        }
 }
index d0a91ed3997cbde4e2ed48875b497f2bf21bc063..d3847e55142268f858755396508e500927b356a8 100644 (file)
@@ -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; }
                }
index 5ccf4bd494b6cbc7f3069b6a5c1bfde5aa20f22e..e7df399c6f72b0350007714902bc6ab28e7c4c63 100644 (file)
@@ -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 {
index f23140d959434c639ca6971946231c9a44f07fc1..7abf6be3d0fa913d3efe8f128af4bd134d7ef57e 100644 (file)
@@ -35,9 +35,7 @@ using System.Runtime.InteropServices;
 
 namespace System
 {
-#if NET_4_0
        [Obsolete]
-#endif
        [Serializable]
        [ComVisible (true)]
        public sealed class ExecutionEngineException : SystemException
index a4e07f40c5cee5cd0a500a584a340b1c78cc7ab5..df011e8cea8e06cbcd4842f2373b35359a406ef7 100644 (file)
@@ -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
 }
index dbd9314c4ed22a236f1790d89eb4d1c728496f66..1b1a5d4f58758feb26c58ffa69401684744acd3d 100644 (file)
@@ -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
        }
 }
index 4581e772c12d8d22862cf38fafa0dbe750cc83ac..630f54b8daa0ec7ed43ac705512df4bc5ae5da55 100644 (file)
@@ -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
                                );
                }
        }
index 08cc1aa326e240da338b77eeb7118c8d50d03547..c5330021b0ef2919014a5cb86bdaa170154e61a2 100644 (file)
@@ -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
 }
index 677bdf3872845a814aad3650428fb7a6a30b4b69..5274dbb30cd9e2b528988fad3303162d7b01ed53 100644 (file)
@@ -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
index 2201e067483c0580f2604989f519d0788b8033cf..f6aaf6bb3206cc6d36467f51ec6971390bec4955 100644 (file)
@@ -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
index 6a7706b92d5aff563c5878c67b5549683e83f544..e41677ad12ae86f30e216573168988fd04a04b55 100644 (file)
@@ -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
 
index 20c06387df145cf27b2ec5500c4ee79f3266d83e..e594d49bbb90907f87642d9eaefbc53af8327b71 100644 (file)
@@ -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
        }
 }
index 7beb2d4982c93f211fe8de1d6fc1f6d0abd26d5c..27dd66a92a52c389a5026d59c979f35aa0ba85fa 100644 (file)
@@ -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 ()
index 64726938348da02caaa53dc70ed7a5223984db6c..0b99056a361c21caffa3caf4ec3ff3ecae8ad429 100644 (file)
@@ -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
index 4bce62bd679c69e9abecdc2c11a3f96df6ba16f7..85ba2449491b314d6c9a21bc16507fe922c4f93e 100644 (file)
@@ -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 {
index 7532041aad6791d1de5c89612d5a5b3a01b6980e..6849961a0760f25db350f168579fe7f996d7ffb4 100644 (file)
@@ -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
        }
 }
index 595cf8a1730423e0850d8c229082a5f0bd7376bc..66086b0a9bb91a5457faeff075d9ebc51c8ad0ab 100644 (file)
 
 namespace System
 {
-#if NET_4_0
        public delegate bool Predicate <in T> (T obj);
-#else
-       public delegate bool Predicate <T> (T obj);
-#endif 
 }
 
index 6dd03c5d9b3951fc40316ade7bec8b326b0d863b..98ca78e261f61087dca2b6103a841c69353beefa 100644 (file)
@@ -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
        }
 }
index de0f7c4ea1a5a137cb1a78c805984adb4fc98b4a..5edf40d490b472c4e9ac480118f89b85181ffec4 100644 (file)
@@ -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)
                {
index 65e460647ca4955aecd1a8c4b97cccae46d9f582..0ff8030fec4d03125179fe65c1d8ad516aedf162 100644 (file)
@@ -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;
index f6937ef3ca21dcbe0febed672cb8fde222e6191b..a16b77ab82dd72a3798b0f4f4c32b7632145c304 100644 (file)
@@ -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
 
        }
 }
index 643b82104b385eddeefe74e3532e6a9ff55b521c..1333d971c826edee46a28f925357ffb3cac714df 100644 (file)
@@ -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 ()
index c22d3ef203004eb132edfdcd589970bcb7675596..6a5951ed02d3c42467a53dbe1f70ee822f9184d1 100644 (file)
@@ -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
index a9631dbbdaf01de52c7fe1d8c201fbc60bc1d72f..24a39b69d5154861fb8d12c09f5eae42ca8ff152 100644 (file)
@@ -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
 
index efc542caa6f2d8d159676719aec3de5aedc91dbe..f99b7c0d5943775e1fb43b6fcdfc02b253e75bac 100644 (file)
@@ -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
index 7a1418e3dad8c86014923c78ddd61129950d29e6..13a2bbe0fed2de9636610881dafcdd2543b8aa96 100644 (file)
@@ -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
 
index a3d4af2a590e241d2c50e019e942a1cf19583561..d525dc13fe135807344686e03b5668de64bb7954 100644 (file)
@@ -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
 
index a412044619cb467ad6223f68ba8a915be5bb515a..1070563aca0017d6df71cfa04b7b79f8905785c8 100644 (file)
@@ -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
        }
 }
index 9c828c524ff3a7d71f4a71c3ab398e1a666a892e..ae750fb7ce87fb448f5e01ef1cb374b2ddcae006 100644 (file)
@@ -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
index 7bf3ed2109d085db1759c67ae82ed7295722f518..37c71de14bf3ce011d94bf4a11eab28e13c212ac 100644 (file)
@@ -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 ();