SPRNET-1460: Drop Framework 1.x Support

This commit is contained in:
Marko Lahma
2011-08-15 19:49:17 +03:00
parent ffdeea9d8d
commit de5b921407
80 changed files with 213 additions and 31027 deletions

View File

@@ -212,14 +212,6 @@ Commandline Examples:
<!-- Displays configuration info, usefull for working out why Spring.NET doesn't build -->
<target name="display-setup" depends="check-htmlhelp-compiler">
<!-- .NET Framework 1.1 -->
<if test="${framework::exists('net-1.1')}">
<property name="nant.settings.currentframework" value="net-1.1"/>
<call target="display-target-framework"/>
</if>
<if test="${not framework::exists('net-1.1')}">
<echo message=".NET Framework 1.1 runtime is not available."/>
</if>
<!-- .NET Framework 2.0 -->
<if test="${framework::exists('net-2.0')}">
<property name="nant.settings.currentframework" value="net-2.0"/>
@@ -228,22 +220,6 @@ Commandline Examples:
<if test="${not framework::exists('net-2.0')}">
<echo message=".NET Framework 2.0 runtime is not available."/>
</if>
<!-- .NET Compact Framework 1.0 -->
<if test="${framework::exists('netcf-1.0')}">
<property name="nant.settings.currentframework" value="netcf-1.0"/>
<call target="display-target-framework"/>
</if>
<if test="${not framework::exists('netcf-1.0')}">
<echo message=".NET Compact Framework 1.0 runtime is not available."/>
</if>
<!-- Mono 1.0 -->
<if test="${framework::exists('mono-1.0')}">
<property name="nant.settings.currentframework" value="mono-1.0"/>
<call target="display-target-framework"/>
</if>
<if test="${not framework::exists('mono-1.0')}">
<echo message="Mono 1.0 runtime is not available."/>
</if>
<!-- Mono 2.0 -->
<if test="${framework::exists('mono-2.0')}">
<property name="nant.settings.currentframework" value="mono-2.0"/>
@@ -319,7 +295,6 @@ Commandline Examples:
<target name="compile-build" description="Compile current build configurations for all runtime configurations">
<echo message="Compiling all framework versions for the ${current.build.config} build configuration."/>
<call target="compile-build-1.1"/>
<call target="compile-build-2.0"/>
<call target="compile-build-3.0"/>
<call target="compile-build-3.5"/>
@@ -329,20 +304,6 @@ Commandline Examples:
</target>
-->
<target name="compile-build-1.1" description="Builds for .NET 1.1 if available">>
<if test="${framework::exists('net-1.1')}">
<call target="compile-net-1.1"/>
</if>
<if test="${not framework::exists('net-1.1')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 1.1 is not available."/>
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 1.1 is not available. Build skipped."/>
</if>
</if>
</target>
<target name="compile-build-2.0" description="Builds for .NET 2.0 if available">
<if test="${framework::exists('net-2.0')}">
@@ -474,7 +435,7 @@ Commandline Examples:
<nant buildfile="src/Spring/Spring.Web.Mvc/Spring.Web.Mvc.build" target="build" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="src/Spring/Spring.Web.Mvc3/Spring.Web.Mvc3.build" target="build" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="src/Spring/Spring.Data/Spring.Data.build" target="build" if="${build-data}"/>
<nant buildfile="src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-1.1' or nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Data.NHibernate12/Spring.Data.NHibernate12.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Data.NHibernate20/Spring.Data.NHibernate20.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'net-3.5' or nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Data.NHibernate21/Spring.Data.NHibernate21.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'net-3.5' or nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Data.NHibernate30/Spring.Data.NHibernate30.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-3.5' or nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
@@ -482,7 +443,7 @@ Commandline Examples:
<nant buildfile="src/Spring/Spring.Data.NHibernate32/Spring.Data.NHibernate32.build" target="build" if="${build-data and (nant.settings.currentframework == 'net-3.5' or nant.settings.currentframework == 'net-4.0' or nant.settings.currentframework == 'mono-2.0')}"/>
<nant buildfile="src/Spring/Spring.Services/Spring.Services.build" target="build" if="${build-services}"/>
<nant buildfile="src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.build" target="build" if="${build-testing-nunit}"/>
<nant buildfile="src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build" target="build" if="${build-testing-microsoft and nant.settings.currentframework != 'net-1.1'}"/>
<nant buildfile="src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.build" target="build" if="${build-testing-microsoft}"/>
<nant buildfile="src/Spring/Spring.Messaging.Ems/Spring.Messaging.Ems.build" target="build" if="${build-ems and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'net-4.0' )}"/>
<nant buildfile="src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.build" target="build" if="${build-nms}"/>
<nant buildfile="src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.build" target="build" if="${build-quartz}"/>
@@ -532,7 +493,7 @@ Commandline Examples:
<nant buildfile="test/Spring/Spring.Web.Mvc.Tests/Spring.Web.Mvc.Tests.build" target="test" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="test/Spring/Spring.Web.Mvc3.Tests/Spring.Web.Mvc3.Tests.build" target="test" if="${nant.settings.currentframework == 'net-4.0'}"/>
<nant buildfile="test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.build" target="test" if="${build-testing-nunit}"/>
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-microsoft and nant.settings.currentframework != 'net-1.1'}"/>
<nant buildfile="test/Spring/Spring.Testing.Microsoft.Tests/Spring.Testing.Microsoft.Tests.build" target="test" if="${build-testing-microsoft}"/>
<nant buildfile="test/Spring/Spring.Messaging.Ems.Tests/Spring.Messaging.Ems.Tests.build" target="test" if="${build-ems and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'net-4.0' ) and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Messaging.Ems.Integration.Tests/Spring.Messaging.Ems.Integration.Tests.build" target="test" if="${build-ems and (nant.settings.currentframework == 'net-2.0' or nant.settings.currentframework == 'net-4.0') and not net-3.0}"/>
<nant buildfile="test/Spring/Spring.Messaging.Nms.Tests/Spring.Messaging.Nms.Tests.build" target="test" if="${build-nms}"/>
@@ -555,21 +516,6 @@ Commandline Examples:
</target>
<target name="compile-net-1.1" description="Builds .NET Framework 1.1 version"
depends="set-net-1.1-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
<call target="copykeys" if="${project.build.sign}"/>
<call target="common.generate-assemblyinfo"/>
<property name="build-ems" value="false" overwrite="true" />
<property name="build-nms" value="false" overwrite="true" />
<property name="build-msmq" value="false" overwrite="true" />
<property name="build-msmq-tests" value="false" overwrite="true" />
<property name="build-velocity" value="false" overwrite="true" />
<property name="build-testing-microsoft" value="false" overwrite="true" />
<property name="build-quartz" value="false" overwrite="true" />
<call target="compile-test" />
</target>
<target name="compile-net-2.0" description="Builds .NET Framework 2.0 version"
depends="set-net-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
<if test="${property::exists('mstest.exe')}">
@@ -1076,10 +1022,6 @@ Commandline Examples:
<target name="build-all-function" description="Build what is in cvs taking into account approrpiate clr versions and root target name">
<!-- net-1.0 dropped since 1.3.0 -->
<call target="${nant.target.root.name}-1.1" />
<call target="${nant.target.root.name}-2.0" />
<call target="${nant.target.root.name}-3.0" />
@@ -1710,29 +1652,10 @@ Commandline Examples:
<property name="sdk.src.dir" value="l:/release/Spring.NET" overwrite="false"/>
<!-- Copy htmlhelp 1.0 files for .NET 1.1 and 2.0 assemblies -->
<copy todir="${current.package.dir}/doc/sdk/1.1/htmlhelp"
file="${sdk.src.dir}/doc/sdk/Spring-1.3/net-1.1/htmlhelp1and2/Spring.NET.chm"/>
<!-- Copy htmlhelp 1.0 files for 2.0 assemblies -->
<copy todir="${current.package.dir}/doc/sdk/2.0/htmlhelp"
file="${sdk.src.dir}/doc/sdk/Spring-1.3/net-2.0/htmlhelp1and2/Spring.NET.chm"/>
<!-- Copy generated htmlhelp 2.x files, install scripts, -->
<!-- and install utility for .NET 1.1 assemblies -->
<copy todir="${current.package.dir}/doc/sdk/1.1/vsnet2003" verbose="${copy-verbose}">
<fileset basedir="${sdk.src.dir}/doc/sdk/Spring-1.3/net-1.1/htmlhelp1and2">
<include name="COL_*.*"/>
</fileset>
</copy>
<copy todir="${current.package.dir}/doc/sdk/1.1/vsnet2003"
file="${sdk.src.dir}/doc/sdk/Spring-1.3/net-1.1/htmlhelp1and2/Spring.NET.hxs"/>
<copy todir="${current.package.dir}/doc/sdk/1.1/vsnet2003"
file="doc/InnovaHxReg.exe"/>
<copy todir="${current.package.dir}/doc/sdk/1.1/vsnet2003"
file="doc\docx\Spring-1.3\net-1.1\RegisterHelp2.bat"/>
<copy todir="${current.package.dir}/doc/sdk/1.1/vsnet2003"
file="doc\docx\Spring-1.3\net-1.1\UnRegisterHelp2.bat"/>
<!-- Copy generated htmlhelp 2.x files, install scripts, -->
<!-- and install utility for .NET 2.0 assemblies -->
<copy todir="${current.package.dir}/doc/sdk/2.0/vsnet2005" verbose="${copy-verbose}">

View File

@@ -295,7 +295,6 @@
<attribute type="AssemblyVersionAttribute" value="${assembly.version}" />
<attribute type="AssemblyDelaySignAttribute" value="false"/>
<attribute type="AssemblyKeyFileAttribute" value="${assembly.keyfile}" if="${(nant.settings.currentframework == 'net-1.0' or nant.settings.currentframework == 'net-1.1') and project.build.sign}" />
<!--
@@ -348,45 +347,6 @@
</if>
<call target="set-${framework::get-target-framework()}-runtime-configuration"/>
</target>
<target name="set-net-1.0-runtime-configuration"
depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
<property name="nant.settings.currentframework" value="net-1.0"/>
<property name="nant.settings.currentframework.number" value="1.0"/>
<property name="nant.settings.currentframework.revisionnumber" value="10"/>
<property name="current.build.debug" value="${build.debug}" dynamic="true"/>
<property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_1_0" dynamic="true"/>
<property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_1_0" dynamic="true"/>
<property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_1_0=True" dynamic="true"/>
<property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_1_0" dynamic="true"/>
<property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_1_0" dynamic="true"/>
<property name="current.bin.dir"
value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}"/>
<property name="current.sdkdoc.dir"
value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
<property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true"/>
<property name="link.sdkdoc.version" value="SDK_v1_0"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default}"/>
</target>
<target name="set-net-1.1-runtime-configuration"
depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
<property name="nant.settings.currentframework" value="net-1.1"/>
<property name="nant.settings.currentframework.number" value="1.1"/>
<property name="nant.settings.currentframework.revisionnumber" value="11"/>
<property name="current.build.debug" value="${build.debug}" dynamic="true"/>
<property name="current.build.defines.csc" value="${build.defines.csc},NET,NET_1_1" dynamic="true"/>
<property name="current.build.defines.jsc" value="${build.defines.jsc},NET,NET_1_1" dynamic="true"/>
<property name="current.build.defines.vbc" value="${build.defines.vbc},NET=True,NET_1_1=True" dynamic="true"/>
<property name="current.build.defines.vjc" value="${build.defines.vjc},NET,NET_1_1" dynamic="true"/>
<property name="current.build.defines.cl" value="${build.defines.cl} /D NET /D NET_1_1" dynamic="true"/>
<property name="current.bin.dir"
value="${bin.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}"/>
<property name="current.sdkdoc.dir"
value="${sdkdoc.dir}/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}"/>
<property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true"/>
<property name="link.sdkdoc.version" value="SDK_v1_1"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default}"/>
</target>
<target name="set-net-2.0-runtime-configuration"
depends="check-bin-dir, check-sdkdoc-dir, check-sdkdoc-debug, check-current-build-config, check-build-debug, check-build-defines">
<property name="nant.settings.currentframework" value="net-2.0"/>
@@ -536,17 +496,4 @@
<property name="link.sdkdoc.version" value="MsdnOnline"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default}"/>
</target>
<target name="set-cli-1.0-configuration" depends="check-bin-dir">
<property name="nant.settings.currentframework" value="net-1.0"/>
<property name="current.build.debug" value="${build.debug}" dynamic="true"/>
<property name="current.build.defines.csc" value="${build.defines.csc},CLI,CLI_1_0" dynamic="true"/>
<property name="current.build.defines.jsc" value="${build.defines.jsc},CLI,CLI_1_0" dynamic="true"/>
<property name="current.build.defines.vbc" value="${build.defines.vbc},CLI=True,CLI_1_0=True" dynamic="true"/>
<property name="current.build.defines.vjc" value="${build.defines.vjc},CLI,CLI_1_0" dynamic="true"/>
<property name="current.build.defines.cl" value="${build.defines.cl} /D CLI /D CLI_1_0" dynamic="true"/>
<property name="current.bin.dir" value="${bin.dir}/cli/1.0/${current.build.config}"/>
<property name="current.sdkdoc.dir" value="${sdkdoc.dir}"/>
<property name="current.sdkdoc.debug" value="${sdkdoc.debug}" dynamic="true"/>
<property name="nowarn.numbers.test" value="${nowarn.numbers.test.default}"/>
</target>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,139 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>NUnitAspEx</name>
</assembly>
<members>
<member name="T:NUnitAspEx.Client.AspFixtureRequest">
<summary>
Encapsulates a request from within a testsuite using the "asptest://" pseudo-protocol.
</summary>
</member>
<member name="T:NUnitAspEx.Client.CustomizableHttpWebRequest">
<summary>
Encapsulates the ugly details of deriving from HttpWebRequest.
</summary>
<remarks>
Since various frameworks like NUnitAsp rely on the output of WebRequest.Create() being of type HttpWebRequest
but HttpWebRequest is not customizable the easy way, this class shields further derived classes from the ugly reflection details.
</remarks>
</member>
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.#ctor(System.Uri)">
<summary>
Creates a new instance for the given uri.
</summary>
<param name="uri">the <see cref="P:NUnitAspEx.Client.CustomizableHttpWebRequest.Uri"/> to create this request for.</param>
</member>
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateHttpWebRequestSerializationInfo(System.Uri)">
<summary>
</summary>
<param name="uri"></param>
<returns></returns>
</member>
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SubmitRequest(System.Byte[],System.IO.Stream)">
<summary>
Override this method in your derived class and call <see cref="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SetResponse(System.Net.HttpWebResponse)"/> to set the response object.
</summary>
</member>
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateOutputStream">
<summary>
Create the stream to be used for uploading content.
</summary>
<returns></returns>
</member>
<member name="T:NUnitAspEx.Client.AspFixtureResponse">
<summary>
Encapsulates a response from an <see cref="T:NUnitAspEx.Client.AspFixtureRequest"/>.
</summary>
</member>
<member name="T:NUnitAspEx.Client.CustomizableHttpWebResponse">
<summary>
Encapsulates the ugly details of deriving from HttpWebResponse.
</summary>
</member>
<member name="T:NUnitAspEx.Client.HttpReflectionUtils">
<summary>
Summary description for HttpReflectionUtils.
</summary>
</member>
<member name="T:NUnitAspEx.Client.HttpWebClient">
<summary>
Summary description for HttpWebClient.
</summary>
</member>
<member name="T:NUnitAspEx.Core.AspFixtureHost">
<summary>
An AspFixtureHost lives inside it's own AppDomain with an initialized HttpRuntime.
</summary>
</member>
<member name="T:NUnitAspEx.IAspFixtureHost">
<summary>
Summary description for IAspFixtureHost.
</summary>
</member>
<member name="M:NUnitAspEx.Core.AspFixtureHost.CreateInstance(System.String,System.String,System.String)">
<summary>
Creates a new Host instance within a new AppDomain based on the passed in Properties.
</summary>
<remarks>
You must not call this method from within an existing Host's AppDomain.
</remarks>
</member>
<member name="M:NUnitAspEx.Core.AspFixtureHost.ShutDown(NUnitAspEx.Core.AspFixtureHost)">
<summary>
Unload the passed Host's AppDomain.
</summary>
</member>
<member name="M:NUnitAspEx.Core.AspFixtureHost.InitializeLifetimeService">
<summary>
Return null to avoid timing out of remoting references
</summary>
<returns></returns>
</member>
<member name="M:NUnitAspEx.Core.AspFixtureHost.Initialize(System.String,System.AppDomain,System.IO.TextWriter,System.String[])">
<summary>
Initializes the newly created host instance.
</summary>
</member>
<member name="P:NUnitAspEx.Core.AspFixtureHost.Current">
<summary>
Use this property to gain access to the Host from within the Host's AppDomain
</summary>
<remarks>
This property is set only within the Host's AppDomain.
Outside the AppDomain it will always return null.
</remarks>
</member>
<member name="P:NUnitAspEx.Core.AspFixtureHost.SyncRoot">
<summary>
Use to synchronize access to this host instance
</summary>
</member>
<member name="P:NUnitAspEx.Core.AspFixtureHost.CreatorDomain">
<summary>
Returns a reference to the AppDomain, that created this Host instance
</summary>
</member>
<member name="P:NUnitAspEx.Core.AspFixtureHost.RootLocation">
<summary>
Returns the physical assembly reference location this AppDomain has been created from.
</summary>
</member>
<member name="T:NUnitAspEx.AspTestClient">
<summary>
Summary description for AspTestClient.
</summary>
</member>
<member name="T:NUnitAspEx.AspTestContext">
<summary>
Summary description for AspTestContext.
</summary>
</member>
<member name="T:NUnitAspEx.AspTestExecutionModule">
<summary>
Summary description for AspTestExecutionModule.
</summary>
</member>
</members>
</doc>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -8,11 +8,7 @@ using System.Reflection;
// associated with an assembly.
//
#if !NET_2_0
[assembly: AssemblyConfiguration("net-1.1.win32; Release")]
#else
[assembly: AssemblyConfiguration("net-2.0.win32; Release")]
#endif
[assembly: AssemblyCompany("http://www.springframework.net")]
[assembly: AssemblyProduct("Spring.NET Framework 1.3.1")]
[assembly: AssemblyCopyright("Copyright 2002-2011 Spring.NET Framework Team.")]
@@ -42,10 +38,6 @@ using System.Reflection;
[assembly: AssemblyVersion("1.3.2.30001")]
#elif NET_2_0
[assembly: AssemblyVersion("1.3.2.20001")]
#elif NET_1_1
[assembly: AssemblyVersion("1.3.2.11001")]
#elif NET_1_0
[assembly: AssemblyVersion("1.3.2.10001")]
#endif

View File

@@ -18,7 +18,6 @@
#endregion
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
@@ -41,17 +40,3 @@ using System.Security;
[assembly: SecurityCritical]
#endif
#if NET_1_0 || NET_1_1
namespace System.Security
{
///<summary>
///</summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Method)]
internal class SecurityCriticalAttribute : Attribute
{ }
[AttributeUsage(AttributeTargets.Method)]
internal class SecurityTreatAsSafeAttribute : Attribute
{ }
}
#endif

View File

@@ -141,15 +141,11 @@ namespace Spring.Context.Support
/// </exception>
protected override void ApplyResourcesToObject(object value, string objectName, CultureInfo culture)
{
#if !NET_1_0
if(value != null)
{
ComponentResourceManager crm = new ComponentResourceManager(value.GetType());
crm.ApplyResources(value, objectName, culture);
}
#else
throw new NotSupportedException("Operation not supported in .NET 1.0 Release.");
#endif
}
/// <summary>

View File

@@ -128,14 +128,10 @@ namespace Spring.Context.Support
/// <seealso cref="Spring.Context.Support.AbstractMessageSource.ApplyResourcesToObject(object, string, CultureInfo)"/>
protected override void ApplyResourcesToObject(object value, string objectName, CultureInfo cultureInfo)
{
#if !NET_1_0
if(value != null)
{
new ComponentResourceManager(value.GetType()).ApplyResources(value, objectName, cultureInfo);
}
#else
throw new System.NotSupportedException("Operation not supported in .NET 1.0 Release.");
#endif
}
/// <summary>

View File

@@ -30,58 +30,9 @@ using System.Text.RegularExpressions;
namespace Spring.Core.TypeConversion
{
#region Specifier parsers
#if NET_1_1
/// <summary>
/// Nullable TimeSpan
/// </summary>
/// <remarks>
/// Can be replaced with a TimeSpan? in .NET 2
/// </remarks>
class TimeSpanNullable {
readonly bool _hasValue;
readonly TimeSpan _value;
/// <summary>
/// ctor without Value;
/// </summary>
public TimeSpanNullable() {
_hasValue = false;
}
/// <summary>
/// ctor with Value
/// </summary>
/// <param name="timeSpan"></param>
public TimeSpanNullable(TimeSpan timeSpan) {
_hasValue = true;
_value = timeSpan;
}
/// <summary>
/// HasValue
/// </summary>
public bool HasValue {
get { return _hasValue; }
}
/// <summary>
/// Value if HasValue==true
/// </summary>
public TimeSpan Value {
get { return _value; }
}
}
#else
using TimeSpanNullable = Nullable<TimeSpan>;
#endif
/// <summary>
/// Base parser for <see cref="TimeSpanConverter"/> custom specifiers.
/// </summary>

View File

@@ -62,7 +62,6 @@ namespace Spring.Globalization.Localizers
/// <returns>A list of resources to apply.</returns>
protected override IList LoadResources(object target, IMessageSource messageSource, CultureInfo culture)
{
#if ! NET_1_0
IList resources;
resources = new ArrayList();
@@ -102,10 +101,6 @@ namespace Spring.Globalization.Localizers
}
}
return resources;
#else
throw new NotSupportedException("Operation not supported in .NET 1.0 Release.");
#endif
}
}
}

View File

@@ -318,14 +318,13 @@ namespace Spring.Objects.Factory.Config
return ((IConfigurationSectionHandler)handler).Create(null, null, sectionContent);
}
#if !NET_1_0 && !NET_1_1
// NET 2.0 ConfigurationSection
if (typeof(ConfigurationSection).IsAssignableFrom(handlerType))
{
ConfigurationSection section = CreateConfigurationSection(handlerType, new XmlNodeReader(sectionContent));
return section;
}
#endif
// Not supported
throw ConfigurationUtils.CreateConfigurationException("Configuration section '" + configSectionName + "' is neither of type IConfigurationSectionHandler nor ConfigurationSection.");
}
@@ -379,7 +378,6 @@ namespace Spring.Objects.Factory.Config
}
#if !NET_1_0 && !NET_1_1
private delegate void DeserializeSectionMethod(ConfigurationSection section, XmlReader reader);
private static DeserializeSectionMethod deserialized = (DeserializeSectionMethod)Delegate.CreateDelegate(typeof(DeserializeSectionMethod),
typeof(ConfigurationSection).GetMethod("DeserializeSection",
@@ -392,7 +390,6 @@ namespace Spring.Objects.Factory.Config
deserialized(section, reader);
return section;
}
#endif
/// <summary>
/// Populates the supplied <paramref name="properties"/> with values from

View File

@@ -179,28 +179,12 @@ namespace Spring.Objects.Factory.Support
{
this.log = LogManager.GetLogger(this.GetType());
this.caseSensitive = caseSensitive;
#if NET_1_0 || NET_1_1
if (caseSensitive)
{
this.aliasMap = new Hashtable();
this.singletonCache = new Hashtable();
this.singletonLocks = new Hashtable();
this.singletonsInCreation = new Hashtable();
}
else
{
this.aliasMap = new CaseInsensitiveHashtable();
this.singletonCache = new CaseInsensitiveHashtable();
this.singletonLocks = new CaseInsensitiveHashtable();
this.singletonsInCreation = new CaseInsensitiveHashtable();
}
#else
IEqualityComparer comparer = (caseSensitive) ? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase;
this.aliasMap = new OrderedDictionary(comparer);
this.singletonCache = new OrderedDictionary(comparer);
this.singletonLocks = new OrderedDictionary(comparer);
this.singletonsInCreation = new OrderedDictionary(comparer);
#endif
this.prototypesInCreation = new LogicalThreadContextSetVariable();
}
@@ -1941,14 +1925,8 @@ namespace Spring.Objects.Factory.Support
try
{
string objectName = TransformedObjectName(name);
#if NET_1_1
lock (monitor)
{
nestingCount++;
}
#else
Interlocked.Increment(ref nestingCount);
#endif
#region Instrumentation
if (log.IsDebugEnabled)
{

View File

@@ -998,11 +998,8 @@ namespace Spring.Objects.Factory.Support
{
string[] candidateNames =
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(this, requiredType, true, descriptor.Eager);
#if NET_1_0 || NET_1_1
IDictionary result = new Hashtable();
#else
IDictionary result = new OrderedDictionary(candidateNames.Length);
#endif
foreach (DictionaryEntry entry in resolvableDependencies)
{
Type autoWiringType = (Type)entry.Key;

View File

@@ -243,7 +243,6 @@ namespace Spring.Objects.Factory.Support
/// <returns>The number of object definitions registered.</returns>
public int RegisterObjectDefinitions(ResourceSet rs, string prefix)
{
#if ! NET_1_0
// Simply create a map and call overloaded method
IDictionary id = new Hashtable();
foreach (DictionaryEntry de in rs)
@@ -251,9 +250,6 @@ namespace Spring.Objects.Factory.Support
id.Add(de.Key, de.Value);
}
return RegisterObjectDefinitions(id, prefix);
#else
throw new NotSupportedException("Operation not supported on NET 1.0");
#endif
}
/// <summary>

View File

@@ -402,17 +402,8 @@ namespace Spring.Objects.Factory.Xml
IResource schema = resourceLoader.GetResource(schemaLocation);
try
{
#if NET_1_0
XmlTextReader schemaDocument = new XmlTextReader(schemaLocation, schema.InputStream);
schemas.Add(namespaceUri, schemaDocument);
#elif NET_1_1
XmlTextReader schemaDocument = new XmlTextReader(schemaLocation, schema.InputStream);
schemas.Add(namespaceUri, schemaDocument, new XmlResourceUrlResolver());
#else
XmlTextReader schemaDocument = new XmlTextReader(schema.Uri.AbsoluteUri, schema.InputStream);
schemas.Add(namespaceUri, schemaDocument);
#endif
}
catch (Exception e)
{

View File

@@ -59,9 +59,6 @@ namespace Spring.Util
/// <returns>Object created by a corresponding <see cref="IConfigurationSectionHandler"/>.</returns>
public static object GetSection(string sectionName)
{
#if !NET_2_0
return ConfigurationSettings.GetConfig(sectionName.TrimEnd('/'));
#else
try
{
return ConfigurationManager.GetSection(sectionName.TrimEnd('/'));
@@ -72,9 +69,8 @@ namespace Spring.Util
}
catch (Exception ex)
{
throw ConfigurationUtils.CreateConfigurationException(string.Format("Error reading section {0}", sectionName), ex);
throw CreateConfigurationException(string.Format("Error reading section {0}", sectionName), ex);
}
#endif
}
/// <summary>
@@ -94,11 +90,7 @@ namespace Spring.Util
/// <param name="sectionName">Name of the configuration section.</param>
public static void RefreshSection(string sectionName)
{
#if !NET_2_0
// TODO : Add support for .NET 1.x
#else
ConfigurationManager.RefreshSection(sectionName);
#endif
}
/// <summary>
@@ -111,11 +103,7 @@ namespace Spring.Util
/// <returns>Configuration exception.</returns>
public static Exception CreateConfigurationException(string message, Exception inner, string fileName, int line)
{
#if !NET_2_0
return new ConfigurationException(message, inner, fileName, line);
#else
return new ConfigurationErrorsException(message, inner, fileName, line);
#endif
}
/// <summary>
@@ -139,11 +127,7 @@ namespace Spring.Util
/// <returns>Configuration exception.</returns>
public static Exception CreateConfigurationException(string message, Exception inner, XmlNode node)
{
#if !NET_2_0
return new ConfigurationException(message, inner, node);
#else
return new ConfigurationErrorsException(message, inner, node);
#endif
}
/// <summary>
@@ -165,11 +149,7 @@ namespace Spring.Util
/// <returns>Configuration exception.</returns>
public static Exception CreateConfigurationException(string message, Exception inner)
{
#if !NET_2_0
return new ConfigurationException(message, inner);
#else
return new ConfigurationErrorsException(message, inner);
#endif
}
/// <summary>
@@ -200,11 +180,7 @@ namespace Spring.Util
/// </returns>
public static bool IsConfigurationException(Exception exception)
{
#if !NET_2_0
return exception is ConfigurationException;
#else
return exception is ConfigurationErrorsException;
#endif
}
/// <summary>
@@ -218,11 +194,7 @@ namespace Spring.Util
{
return ((ITextPosition)node).LineNumber;
}
#if !NET_2_0
return ConfigurationException.GetXmlNodeLineNumber(node);
#else
return ConfigurationErrorsException.GetLineNumber(node);
#endif
}
/// <summary>
@@ -236,11 +208,7 @@ namespace Spring.Util
{
return ((ITextPosition)node).Filename;
}
#if !NET_2_0
return ConfigurationException.GetXmlNodeFilename(node);
#else
return ConfigurationErrorsException.GetFilename(node);
#endif
}
@@ -304,7 +272,6 @@ namespace Spring.Util
/// </summary>
public static void ResetConfigurationSystem()
{
#if NET_2_0
if (SystemUtils.MonoRuntime)
{
return;
@@ -312,18 +279,6 @@ namespace Spring.Util
FieldInfo initStateRef = typeof(ConfigurationManager).GetField("s_initState", BindingFlags.NonPublic | BindingFlags.Static);
object notStarted = Activator.CreateInstance(initStateRef.FieldType);
initStateRef.SetValue(null, notStarted);
#endif
#if NET_1_1
FieldInfo initStateRef = typeof(ConfigurationSettings).GetField("_initState",BindingFlags.NonPublic|BindingFlags.Static);
object notStarted = Activator.CreateInstance(initStateRef.FieldType);
initStateRef.SetValue(null,notStarted);
#endif
#if NET_1_0
FieldInfo initStateRef = typeof(ConfigurationSettings).GetField("_configurationInitialized",BindingFlags.NonPublic|BindingFlags.Static);
FieldInfo configSystemRef = typeof(ConfigurationSettings).GetField("_configSystem",BindingFlags.NonPublic|BindingFlags.Static);
initStateRef.SetValue(null,false);
configSystemRef.SetValue(null,null);
#endif
}
// private static T CreateDelegate<T>(MethodInfo method)
// {

View File

@@ -118,11 +118,7 @@ namespace Spring.Util
}
else
{
#if NET_1_0 || NET_1_1
return Thread.CurrentThread.GetHashCode().ToString();
#else
return Thread.CurrentThread.ManagedThreadId.ToString();
#endif
}
}
}

View File

@@ -127,11 +127,7 @@ namespace Spring.Data.NHibernate
public IApplicationContext ApplicationContext
{
set { this.applicationContext = value; }
#if NET_1_1
get { return this.applicationContext; }
#else
protected get { return this.applicationContext; }
#endif
}
/// <summary>

View File

@@ -18,8 +18,6 @@
#endregion
#if (!NET_1_0)
#region Imports
using System;
@@ -397,5 +395,3 @@ namespace Spring.Data.Core
}
}
}
#endif // (!NET_1_0)

View File

@@ -18,8 +18,6 @@
#endregion
#if (!NET_1_0)
using System.EnterpriseServices;
namespace Spring.Data.Support
@@ -91,4 +89,3 @@ namespace Spring.Data.Support
}
}
}
#endif

View File

@@ -18,8 +18,6 @@
#endregion
#if (!NET_1_0)
using System.EnterpriseServices;
namespace Spring.Data.Support
@@ -72,5 +70,3 @@ namespace Spring.Data.Support
}
}
#endif

View File

@@ -18,8 +18,6 @@
#endregion
#if (!NET_1_0)
using System.EnterpriseServices;
namespace Spring.Data.Support
@@ -123,4 +121,3 @@ namespace Spring.Data.Support
}
}
}
#endif

View File

@@ -18,7 +18,7 @@
#endregion
#if (!NET_1_0 && !MONO)
#if !MONO
#region Imports
@@ -614,4 +614,4 @@ namespace Spring.EnterpriseServices
}
}
#endif // (!NET_1_0)
#endif // (!MONO)

View File

@@ -18,7 +18,7 @@
#endregion
#if (!NET_1_0 && !MONO)
#if !MONO
#region Imports

View File

@@ -18,7 +18,7 @@
#endregion
#if (!NET_1_0 && !MONO)
#if !MONO
#region Imports
@@ -353,4 +353,4 @@ namespace Spring.EnterpriseServices
}
}
#endif // (!NET_1_0)
#endif // !MONO

View File

@@ -1,179 +1,176 @@
#region License
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#endregion
#if (!NET_1_0 && !MONO)
#region Imports
#region License
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#endregion
#if !MONO
#region Imports
using System;
using System.Diagnostics;
using System.Reflection;
using Spring.Util;
using Spring.Objects.Factory;
using Spring.Objects.Factory.Support;
using Spring.Objects.Factory.Config;
#endregion
namespace Spring.EnterpriseServices
{
/// <summary>
/// Factory Object that instantiates and configures ServicedComponent.
/// </summary>
/// <remarks>
/// <p>
/// This factory object should be used to instantiate and configure
/// serviced components created by <see cref="ServicedComponentExporter"/>.
/// </p>
/// </remarks>
/// <author>Aleksandar Seovic</author>
public class ServicedComponentFactory : IConfigurableFactoryObject, IInitializingObject
{
#region Fields
private string name;
private string server;
private bool isSingleton;
private IObjectDefinition productTemplate;
private Type componentType;
private object singletonInstance;
#endregion
#region Constructor(s) / Destructor
/// <summary>
/// Creates new instance of serviced component factory.
/// </summary>
public ServicedComponentFactory()
{
this.isSingleton = false;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets component name, as registered with COM+ Services.
/// </summary>
public string Name
{
get { return name; }
set { name = value; }
}
/// <summary>
/// Gets or sets name of the remote server that COM+ component is registered with.
/// </summary>
public string Server
{
get { return server; }
set { server = value; }
}
#endregion
#region IConfigurableFactoryObject Members
/// <summary>
/// Returns configured instance of the serviced component.
/// </summary>
/// <returns>Configured instance of the serviced component.</returns>
public object GetObject()
{
if (IsSingleton)
{
if (singletonInstance == null)
{
singletonInstance = CreateInstance();
}
return singletonInstance;
}
else
{
return CreateInstance();
}
}
/// <summary>
/// Returns type of serviced component.
/// </summary>
public Type ObjectType
{
get { return componentType; }
}
/// <summary>
/// Gets or sets whether serviced component should be treated as singleton. Default is <b>false</b>.
/// </summary>
public bool IsSingleton
{
get { return isSingleton; }
set { isSingleton = value; }
}
/// <summary>
/// Gets or sets the template object definition
/// that should be used to configure proxy instance.
/// </summary>
public IObjectDefinition ProductTemplate
{
get { return productTemplate; }
set { productTemplate = value; }
}
#endregion
#region IInitializingObject Members
/// <summary>
/// Initializes factory object.
/// </summary>
public void AfterPropertiesSet()
{
ValidateConfiguration();
using Spring.Objects.Factory;
using Spring.Objects.Factory.Config;
#endregion
namespace Spring.EnterpriseServices
{
/// <summary>
/// Factory Object that instantiates and configures ServicedComponent.
/// </summary>
/// <remarks>
/// <p>
/// This factory object should be used to instantiate and configure
/// serviced components created by <see cref="ServicedComponentExporter"/>.
/// </p>
/// </remarks>
/// <author>Aleksandar Seovic</author>
public class ServicedComponentFactory : IConfigurableFactoryObject, IInitializingObject
{
#region Fields
private string name;
private string server;
private bool isSingleton;
private IObjectDefinition productTemplate;
private Type componentType;
private object singletonInstance;
#endregion
#region Constructor(s) / Destructor
/// <summary>
/// Creates new instance of serviced component factory.
/// </summary>
public ServicedComponentFactory()
{
this.isSingleton = false;
}
#endregion
#region Properties
/// <summary>
/// Gets or sets component name, as registered with COM+ Services.
/// </summary>
public string Name
{
get { return name; }
set { name = value; }
}
/// <summary>
/// Gets or sets name of the remote server that COM+ component is registered with.
/// </summary>
public string Server
{
get { return server; }
set { server = value; }
}
#endregion
#region IConfigurableFactoryObject Members
/// <summary>
/// Returns configured instance of the serviced component.
/// </summary>
/// <returns>Configured instance of the serviced component.</returns>
public object GetObject()
{
if (IsSingleton)
{
if (singletonInstance == null)
{
singletonInstance = CreateInstance();
}
return singletonInstance;
}
else
{
return CreateInstance();
}
}
/// <summary>
/// Returns type of serviced component.
/// </summary>
public Type ObjectType
{
get { return componentType; }
}
/// <summary>
/// Gets or sets whether serviced component should be treated as singleton. Default is <b>false</b>.
/// </summary>
public bool IsSingleton
{
get { return isSingleton; }
set { isSingleton = value; }
}
/// <summary>
/// Gets or sets the template object definition
/// that should be used to configure proxy instance.
/// </summary>
public IObjectDefinition ProductTemplate
{
get { return productTemplate; }
set { productTemplate = value; }
}
#endregion
#region IInitializingObject Members
/// <summary>
/// Initializes factory object.
/// </summary>
public void AfterPropertiesSet()
{
ValidateConfiguration();
componentType = Type.GetTypeFromProgID(Name, Server);
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
}
#endregion
#region Private Methods
private void ValidateConfiguration()
{
if (Name == null)
{
throw new ArgumentException("The Name property is required.");
}
}
/// <summary>
/// Creates new instance of serviced component.
/// </summary>
/// <returns>New instance of serviced component.</returns>
private object CreateInstance()
{
}
#endregion
#region Private Methods
private void ValidateConfiguration()
{
if (Name == null)
{
throw new ArgumentException("The Name property is required.");
}
}
/// <summary>
/// Creates new instance of serviced component.
/// </summary>
/// <returns>New instance of serviced component.</returns>
private object CreateInstance()
{
return Activator.CreateInstance(componentType);
}
@@ -182,8 +179,8 @@ namespace Spring.EnterpriseServices
return Assembly.LoadFrom(componentType.Assembly.CodeBase);
}
#endregion
}
}
#endif // (!NET_1_0)
#endregion
}
}
#endif // !MONO

View File

@@ -18,23 +18,20 @@
#endregion
#if (!NET_1_0 && !MONO)
#if !MONO
#region Imports
using System;
using System.Configuration;
using System.Diagnostics;
using System.EnterpriseServices;
using System.IO;
using System.Reflection;
using System.Xml;
using Spring.Context;
using Spring.Context.Support;
using Spring.Core.IO;
using Spring.Objects.Factory.Config;
using Spring.Util;
using ConfigXmlDocument = Spring.Util.ConfigXmlDocument;
#endregion

View File

@@ -11,17 +11,3 @@ using System.Web.UI;
[assembly: AllowPartiallyTrustedCallers]
[assembly: SecurityCritical]
#endif
#if NET_1_0 || NET_1_1
namespace System.Security
{
///<summary>
///</summary>
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Method)]
internal class SecurityCriticalAttribute : Attribute
{ }
[AttributeUsage(AttributeTargets.Method)]
internal class SecurityTreatAsSafeAttribute : Attribute
{ }
}
#endif

View File

@@ -323,15 +323,7 @@ namespace Spring.Context.Support
{
s_weblog.Error(string.Format("failed creating context '{0}', Stacktrace:\n{1}", contextName, new StackTrace()), ex);
}
#if NET_1_1
if (ConfigurationUtils.IsConfigurationException(ex))
{
if (ex.InnerException != null)
{
throw ex.InnerException;
}
}
#endif
throw;
}
}

View File

@@ -139,11 +139,7 @@ namespace Spring.Context.Support
{
if (modules[moduleKey] is SessionStateModule)
{
#if !NET_1_1
HookSessionEvent((SessionStateModule)modules[moduleKey]);
#else
HookSessionEvent11();
#endif
}
}
}
@@ -315,7 +311,6 @@ namespace Spring.Context.Support
}
}
#if !NET_1_1
private static void HookSessionEvent(SessionStateModule sessionStateModule)
{
// Hook only into InProcState - all others ignore SessionEnd anyway
@@ -362,58 +357,6 @@ namespace Spring.Context.Support
, CultureInfo.InvariantCulture
);
}
#else
private static Type t_SessionDictionary;
private static void HookSessionEvent11()
{
// Hook only into InProcState - all others ignore SessionEnd anyway
t_SessionDictionary = typeof(HttpSessionState).Assembly.GetType("System.Web.SessionState.SessionDictionary");
Type t_InProcStateClientManager =
typeof(HttpSessionState).Assembly.GetType("System.Web.SessionState.InProcStateClientManager");
TypeRegistry.RegisterType( "InProcStateClientManager", t_InProcStateClientManager );
CacheItemRemovedCallback circ = new CacheItemRemovedCallback( OnCacheItemRemoved );
CACHEKEYPREFIXLENGTH = (int)ExpressionEvaluator.GetValue(null, "InProcStateClientManager.CACHEKEYPREFIXLENGTH");
s_originalCallback = (CacheItemRemovedCallback)ExpressionEvaluator.GetValue(null, "InProcStateClientManager.s_callback");
ExpressionEvaluator.SetValue(null, "InProcStateClientManager.s_callback", circ);
}
private static HttpSessionState CreateSessionState(string key, object state1)
{
string id = key.Substring(CACHEKEYPREFIXLENGTH);
object dict = ExpressionEvaluator.GetValue(state1, "dict");
if (dict == null)
{
dict = Activator.CreateInstance(t_SessionDictionary, true);
}
object staticObjects = ExpressionEvaluator.GetValue(state1, "staticObjects");
int timeout = (int)ExpressionEvaluator.GetValue(state1, "timeout");
bool isCookieless = (bool)ExpressionEvaluator.GetValue(state1, "isCookieless");
HttpSessionState state2 = (HttpSessionState)Activator.CreateInstance(
typeof(HttpSessionState)
, BindingFlags.Instance|BindingFlags.NonPublic
, null
, new object[]
{
id,
dict,
staticObjects,
timeout,
false,
isCookieless,
SessionStateMode.InProc,
true
}
, CultureInfo.InvariantCulture
);
return state2;
}
#endif
#endregion Session Handling Stuff
}
}

View File

@@ -18,16 +18,8 @@
#endregion
#if !NET_1_1
using System.Web.Compilation;
#endif
#if NET_1_1
using System.Reflection;
using System.Web.UI;
#endif
using System;
using System.IO;
//using System.Web;
using Common.Logging;
using Spring.Util;
using IHttpHandler = System.Web.IHttpHandler;
@@ -45,18 +37,6 @@ namespace Spring.Objects.Factory.Support
// CLOVER:OFF
#if NET_1_1
// Required method for resolving control types
private static MethodInfo miGetCompiledUserControlType = null;
static WebObjectUtils()
{
Type tUserControlParser = typeof(System.Web.UI.UserControl).Assembly.GetType("System.Web.UI.UserControlParser");
miGetCompiledUserControlType =
tUserControlParser.GetMethod("GetCompiledUserControlType", BindingFlags.Static | BindingFlags.NonPublic);
}
#endif
/// <summary>
/// Creates a new instance of the <see cref="Spring.Util.WebUtils"/> class.
/// </summary>

View File

@@ -24,12 +24,10 @@ using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Reflection;
using System.Web;
using System.Web.Caching;
using System.Web.Compilation;
using System.Web.SessionState;
using System.Web.UI;
using Common.Logging;
#endregion
@@ -236,16 +234,6 @@ namespace Spring.Util
private static readonly ILog log = LogManager.GetLogger(typeof (HttpRuntimeEnvironment));
#if NET_1_1
// Required method for resolving control types
private static MethodInfo miGetCompiledUserControlType = null;
static HttpRuntimeEnvironment()
{
Type tUserControlParser = typeof(System.Web.UI.UserControl).Assembly.GetType("System.Web.UI.UserControlParser");
miGetCompiledUserControlType = tUserControlParser.GetMethod("GetCompiledUserControlType", BindingFlags.Static | BindingFlags.NonPublic);
}
#endif
private class RewriteContext : IDisposable
{
private string originalPath;
@@ -269,11 +257,8 @@ namespace Spring.Util
{
originalPath = ctx.Request.Url.PathAndQuery;
string newPath = newVirtualPath + "currentcontext.dummy";
#if NET_1_1
ctx.RewritePath(newPath);
#else
ctx.RewritePath(newPath, rebaseClientPath);
#endif
#region Instrumentation
@@ -294,11 +279,8 @@ namespace Spring.Util
{
log.Debug("restoring path from " + ctx.Request.FilePath + " back to " + originalPath);
}
#if NET_1_1
ctx.RewritePath(originalPath);
#else
ctx.RewritePath(originalPath, rebaseClientPath);
#endif
}
}
}
@@ -340,9 +322,7 @@ namespace Spring.Util
{
return ctx.Request.MapPath(virtualPath);
}
#if NET_1_1
throw new ArgumentException("can't map context relative path outside a context");
#else
if (VirtualPathUtility.IsAbsolute(virtualPath) && virtualPath.StartsWith(HttpRuntime.AppDomainAppVirtualPath))
{
virtualPath = VirtualPathUtility.ToAppRelative(virtualPath);
@@ -354,7 +334,6 @@ namespace Spring.Util
return physicalPath;
}
return virtualPath;
#endif
}
public IDisposable RewritePath(string virtualDirectory, bool rebaseClientPath)
@@ -381,33 +360,15 @@ namespace Spring.Util
{
string rootedVPath = WebUtils.CombineVirtualPaths(CurrentExecutionFilePath, virtualPath);
Type type = null;
#if NET_1_1
if (virtualPath.EndsWith(".aspx"))
{
type = CreateInstanceFromVirtualPath(virtualPath, typeof(Page)).GetType();
}
else if (virtualPath.EndsWith(".ascx"))
{
type = (Type)miGetCompiledUserControlType.Invoke(null, new object[] { rootedVPath, null, HttpContext.Current });
}
#else
type = BuildManager.GetCompiledType(rootedVPath); // requires rooted virtual path!
#endif
Type type = BuildManager.GetCompiledType(rootedVPath);
return type;
}
public object CreateInstanceFromVirtualPath(string virtualPath, Type requiredBaseType)
{
string rootedVPath = WebUtils.CombineVirtualPaths(CurrentExecutionFilePath, virtualPath);
object result;
#if NET_1_1
HttpContext ctx = HttpContext.Current;
string physicalPath = ctx.Server.MapPath(rootedVPath);
result = PageParser.GetCompiledPageInstance(virtualPath, physicalPath, ctx);
#else
result = BuildManager.CreateInstanceFromVirtualPath(rootedVPath, requiredBaseType);
#endif
object result = BuildManager.CreateInstanceFromVirtualPath(rootedVPath, requiredBaseType);
if (!requiredBaseType.IsAssignableFrom(result.GetType()))
{
throw new HttpException(string.Format("Type '{0}' from virtual path '{1}' does not inherit from '{2}'", result.GetType(), rootedVPath, requiredBaseType));

View File

@@ -71,19 +71,8 @@ namespace Spring.Web.UI.Controls
if (!Visible) return;
//log.Debug(string.Format("OnPreRender Content['{0}']", this.contentPlaceHolderID));
#if NET_1_1
Control ctlRoot = this.Page;
if (ctlRoot is Spring.Web.UI.Page)
{
MasterPage masterPage = ((Spring.Web.UI.Page) ctlRoot).Master;
if (masterPage != null)
{
ctlRoot = masterPage;
}
}
#else
Control ctlRoot = (this.Page.Master != null) ? (Control)this.Page.Master : (Control)this.Page;
#endif
Control ctl = ctlRoot.FindControl(this.contentPlaceHolderID);
if (ctl != null)
{

View File

@@ -50,11 +50,7 @@ namespace Spring.Web.UI.Controls
[PersistChildren(true),
ToolboxData("<{0}:DataBindingPanel runat=\"server\" Width=\"125px\" Height=\"50px\"> </{0}:DataBindingPanel>"),
ParseChildren(false),
#if NET_1_1
Designer("System.Web.UI.Design.WebControls.PanelDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"),
#else
Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"),
#endif
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class DataBindingPanel : Panel

View File

@@ -78,11 +78,8 @@ namespace Spring.Web.UI.Controls
/// <param name="writer">The <see langword="HtmlTextWriter"/> object that receives the server control content.</param>
protected override void Render(HtmlTextWriter writer)
{
#if NET_1_1
bool hasIntrinsicHead = false;
#else
bool hasIntrinsicHead = (this.Page.Header != null);
#endif
// don't render begin/end element if we are nested within an ASP.NET <head> control
if (!hasIntrinsicHead)
{

View File

@@ -49,11 +49,7 @@ namespace Spring.Web.UI.Controls
[PersistChildren(true),
ToolboxData("<{0}:Panel runat=\"server\" Width=\"125px\" Height=\"50px\"> </{0}:Panel>"),
ParseChildren(false),
#if NET_1_1
Designer("System.Web.UI.Design.WebControls.PanelDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"),
#else
Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"),
#endif
AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal),
AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class Panel : System.Web.UI.WebControls.Panel, ISupportsWebDependencyInjection

View File

@@ -32,10 +32,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyVersion("1.3.1.30001")]
#elif NET_2_0
[assembly: AssemblyVersion("1.3.1.20001")]
#elif NET_1_1
[assembly: AssemblyVersion("1.3.1.11001")]
#elif NET_1_0
[assembly: AssemblyVersion("1.3.1.10001")]
#endif
//

View File

@@ -26,7 +26,6 @@ using NUnit.Framework;
using Spring.Objects;
using Spring.Aop.Interceptor;
using Spring.Proxy;
using System.Reflection;
using Spring.Expressions;
@@ -229,7 +228,6 @@ namespace Spring.Aop.Framework.DynamicProxy
Assert.AreEqual(3, ni.Count);
}
#if !NET_1_0
[Test]
public void DoesNotInterceptInternalMethod()
{
@@ -247,7 +245,6 @@ namespace Spring.Aop.Framework.DynamicProxy
proxiedClass.InternalToDo();
Assert.AreEqual(0, ni.Count);
}
#endif
[Test]
public void InterceptVirtualMethodThatBelongsToAnInterface()
@@ -426,7 +423,6 @@ namespace Spring.Aop.Framework.DynamicProxy
}
#if !NET_1_0
// "internal virtual" is not supported on net 1.0 CLR
// see http://support.microsoft.com/?scid=kb%3Ben-us%3B317129&x=11&y=12
internal virtual void InternalToDo()
@@ -434,8 +430,6 @@ namespace Spring.Aop.Framework.DynamicProxy
}
#endif
internal protected virtual void InternalProtectedToDo()
{

View File

@@ -178,7 +178,7 @@ namespace Spring.Aop.Support
Assert.IsTrue(matches, "Implementing method from subclass was not decorated with the target attribute " +
"but the method from an indirectly implemented interface was, so this must match.");
}
#if !NET_1_0 && !NET_1_1
/// <summary>
/// Confirms that methods, explicitly implemented in the derived classes will match
/// </summary>
@@ -198,7 +198,7 @@ namespace Spring.Aop.Support
}
}
#endif
#region Helper classes definitions
[AttributeUsage(AttributeTargets.Method)]

View File

@@ -1,9 +1,3 @@
using System;
using System.Collections;
using System.Globalization;
using System.Text;
using Common.Logging;
using Common.Logging.Simple;
@@ -12,17 +6,12 @@ namespace Spring.Aspects.Exceptions
public class CaptureOutputLogger : TraceLogger
{
public static readonly string NAME = "capturingLogger";
#if NET_1_0 || NET_1_1
public CaptureOutputLogger()
: base(NAME, LogLevel.All, false, false, null)
{}
#else
public CaptureOutputLogger()
: base(NAME, LogLevel.All, false, false, null)
// TODO: use this line when upgrading to Common.Logging 2.0:
// : base(false, NAME, LogLevel.All, true, false, false, null)
{ }
#endif
// private LogLevel _currentLogLevel = LogLevel.All;
//

View File

@@ -30,7 +30,6 @@ using NUnit.Framework;
using Spring.Objects;
using Spring.Proxy;
using Spring.Objects.Factory.Support;
using Spring.Reflection.Dynamic;
using Spring.Util;
#endregion
@@ -53,7 +52,6 @@ namespace Spring.Context.Support
private static void ResetConfigurationSystem()
{
#if NET_2_0
if (SystemUtils.MonoRuntime)
{
return;
@@ -61,28 +59,6 @@ namespace Spring.Context.Support
FieldInfo initStateRef = typeof(ConfigurationManager).GetField("s_initState", BindingFlags.NonPublic | BindingFlags.Static);
object notStarted = Activator.CreateInstance(initStateRef.FieldType);
initStateRef.SetValue(null, notStarted);
#endif
#if NET_1_1
FieldInfo initStateRef = typeof(ConfigurationSettings).GetField("_initState",BindingFlags.NonPublic|BindingFlags.Static);
if (initStateRef!=null)
{
object notStarted = Activator.CreateInstance(initStateRef.FieldType);
initStateRef.SetValue(null,notStarted);
}
else
{
FieldInfo configurationInitializedRef = typeof(ConfigurationSettings).GetField("_configurationInitialized",BindingFlags.NonPublic|BindingFlags.Static);
configurationInitializedRef.SetValue(null, false);
}
#endif
#if NET_1_0
FieldInfo initStateRef = typeof(ConfigurationSettings).GetField("_configurationInitialized",BindingFlags.NonPublic|BindingFlags.Static);
FieldInfo configSystemRef = typeof(ConfigurationSettings).GetField("_configSystem",BindingFlags.NonPublic|BindingFlags.Static);
initStateRef.SetValue(null,false);
configSystemRef.SetValue(null,null);
#endif
}
/// <summary>
@@ -100,7 +76,7 @@ namespace Spring.Context.Support
{
return ContextRegistry.GetContext(); // this must fail!
}
#if !NET_1_1
[Test]
public void ThrowsInvalidOperationExceptionOnRecursiveCallsToGetContext()
{
@@ -119,7 +95,6 @@ namespace Spring.Context.Support
}
}
}
#endif
[Test]
public void RegisterRootContext()

View File

@@ -334,7 +334,6 @@ namespace Spring.Context.Support
return sbText.ToString();
}
#if ! NET_1_0
/// <summary>
/// Test applying a family of resources to an object.
/// </summary>
@@ -351,7 +350,6 @@ namespace Spring.Context.Support
Assert.AreEqual("Mark", to.Name);
Assert.AreEqual(35, to.Age);
}
#endif
/// <summary>
/// Test when the code being resolves itself implements IMessageResolvable.

View File

@@ -80,27 +80,14 @@ namespace Spring.Context.Support
msgSource.ToString());
}
[Test]
public void ApplyResources()
{
TestObject value = new TestObject();
StaticMessageSource msgSource = new StaticMessageSource();
#if ! NET_1_0
msgSource.ApplyResources(value, "testObject", CultureInfo.InvariantCulture);
Assert.AreEqual("Mark", value.Name, "Name property value not applied.");
Assert.AreEqual(35, value.Age, "Age property value not applied.");
#else
try
{
msgSource.ApplyResources(value, "testObject", CultureInfo.InvariantCulture);
Assert.Fail("Should not be supported in 1.0");
} catch (NotSupportedException e)
{
Assert.AreEqual("Operation not supported in .NET 1.0 Release.",
e.Message);
}
#endif
}
[Test]
@@ -108,21 +95,9 @@ namespace Spring.Context.Support
{
TestObject value = new TestObject();
StaticMessageSource msgSource = new StaticMessageSource();
#if ! NET_1_0
msgSource.ApplyResources(null, "testObject", CultureInfo.InvariantCulture);
Assert.AreEqual(null, value.Name);
Assert.AreEqual(0, value.Age);
#else
try
{
msgSource.ApplyResources(null, "testObject", CultureInfo.InvariantCulture);
Assert.Fail("Should not be supported in 1.0");
} catch (NotSupportedException e)
{
Assert.AreEqual("Operation not supported in .NET 1.0 Release.",
e.Message);
}
#endif
}
[Test]
@@ -130,7 +105,7 @@ namespace Spring.Context.Support
{
TestObject value = new TestObject();
StaticMessageSource msgSource = new StaticMessageSource();
#if ! NET_1_0
try
{
msgSource.ApplyResources(value, null, CultureInfo.InvariantCulture);
@@ -141,18 +116,6 @@ namespace Spring.Context.Support
}
Assert.AreEqual(null, value.Name);
Assert.AreEqual(0, value.Age);
#else
try
{
msgSource.ApplyResources(value, null, CultureInfo.InvariantCulture);
Assert.Fail("Should not be supported in 1.0");
}
catch (NotSupportedException e)
{
Assert.AreEqual("Operation not supported in .NET 1.0 Release.",
e.Message);
}
#endif
}
[Test]

View File

@@ -31,8 +31,6 @@ using Spring.Context.Support;
#endregion
#if ! NET_1_0
namespace Spring.Globalization.Localizers
{
/// <summary>
@@ -64,5 +62,3 @@ namespace Spring.Globalization.Localizers
}
}
}
#endif

View File

@@ -123,7 +123,7 @@ namespace Spring.Objects.Factory.Config
Assert.AreEqual("value2", dvs.ResolveVariable("key2"));
}
#if (!NET_2_0 && !NET_1_0 && !NET_1_1)
#if !NET_2_0
[Test]
public void Initialize_WithInlineDictionarySyntax()
{

View File

@@ -18,14 +18,9 @@
#endregion
#if !NET_1_1
#region Imports
using System;
using System.Collections;
using System.Collections.Specialized;
using NUnit.Framework;
using Spring.Collections;
using Spring.Objects.Factory.Support;
#endregion
@@ -65,4 +60,3 @@ namespace Spring.Objects.Factory.Xml
}
}
#endif

View File

@@ -20,10 +20,7 @@
#region Imports
using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using NUnit.Framework;
using Spring.Core.IO;
using Spring.Objects.Factory.Config;
@@ -69,7 +66,6 @@ namespace Spring.Objects.Factory.Xml
NamespaceParserRegistry.Reset();
}
#if !NET_1_0
/// <summary>
/// This test doesn't work on .NET 1.0 because there are no XmlResolvers for schema loading...
/// </summary>
@@ -85,6 +81,5 @@ namespace Spring.Objects.Factory.Xml
ConfigXmlDocument newDoc = new ConfigXmlDocument();
newDoc.Load(vr);
}
#endif
}
}

View File

@@ -1126,14 +1126,9 @@ namespace Spring.Objects.Factory.Xml
ITestObject kerry = (ITestObject) xof.GetObject("spouse");
ITestObject kerry2 = (ITestObject)xof.GetObject("spouse2");
ArrayCtorDependencyObject rod7 = (ArrayCtorDependencyObject) xof.GetObject("rod7");
#if NET_1_0 || NET_1_1
// Lack of OrderedDictionary means we can't predict the ordering of the autowiring.
Assert.IsNotNull(rod7.Spouse1);
Assert.IsNotNull(rod7.Spouse2);
#else
Assert.AreEqual(kerry, rod7.Spouse1);
Assert.AreEqual(kerry2, rod7.Spouse2);
#endif
}
[Test]

View File

@@ -22,9 +22,7 @@
using System;
using System.Collections;
#if !NET_1_1
using System.Collections.Generic;
#endif
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
@@ -269,13 +267,11 @@ namespace Spring.Objects
set { this.someList = value;}
}
#if !NET_1_1
public virtual List<string> SomeGenericStringList
{
get { return someGenericStringList; }
set { this.someGenericStringList = value; }
}
#endif
public virtual NameValueCollection SomeNameValueCollection
{
@@ -408,9 +404,7 @@ namespace Spring.Objects
private IDictionary sharedState;
private NameValueCollection someNameValueCollection;
#if !NET_1_1
private List<string> someGenericStringList;
#endif
#endregion

View File

@@ -1213,12 +1213,7 @@ namespace Spring.Util
{
IList attrs = ReflectionUtils.GetCustomAttributes(typeof(ClassWithAttributes));
#if NET_1_1
// "GetCustomAttributes() does not return SecurityAttribute in .NET 1.x"
Assert.AreEqual(1, attrs.Count);
#else
Assert.AreEqual(2, attrs.Count);
#endif
}
[Test]
@@ -1226,12 +1221,7 @@ namespace Spring.Util
{
IList attrs = ReflectionUtils.GetCustomAttributes(typeof(ClassWithAttributes).GetMethod("MethodWithAttributes"));
#if NET_1_1
// "GetCustomAttributes() does not return SecurityAttribute in .NET 1.x"
Assert.AreEqual(1, attrs.Count);
#else
Assert.AreEqual(2, attrs.Count);
#endif
}
#endregion

View File

@@ -18,8 +18,6 @@
#endregion
#if (!NET_1_0)
#region
using System;
@@ -263,5 +261,3 @@ namespace Spring.Data
}
}
}
#endif // (!NET_1_0)

View File

@@ -18,11 +18,9 @@
#endregion
#if !NET_1_0
#region Imports
using System;
using System.Collections;
using System.Runtime.Serialization;
using NUnit.Framework;
using Spring.Aop.Framework;
@@ -229,4 +227,3 @@ namespace Spring.Dao.Attributes
}
}
#endif

View File

@@ -17,10 +17,9 @@
*/
#endregion
#if !NET_1_0
#region Imports
using NUnit.Framework;
using Spring.Aop.Framework;
using Spring.Dao.Support;
using Spring.Objects.Factory.Support;
@@ -54,4 +53,3 @@ namespace Spring.Dao.Attributes
}
}
}
#endif

View File

@@ -17,7 +17,7 @@
*/
#endregion
#if !NET_1_0
#region Imports
using NUnit.Framework;
@@ -99,4 +99,3 @@ namespace Spring.Dao.Attributes
}
}
}
#endif

View File

@@ -225,43 +225,6 @@ namespace Spring.Data.Common
}
#if NET_1_1
[Test]
public void DefaultInstanceWithOleDb11()
{
IDbProvider provider = DbProviderFactory.GetDbProvider("OleDb-1.1");
Assert.AreEqual("OleDb, provider V1.0.5000.0 in framework .NET V1.1", provider.DbMetadata.ProductName);
Assert.IsNotNull(provider.CreateCommand());
Assert.IsNotNull(provider.CreateCommandBuilder());
Assert.IsNotNull(provider.CreateConnection());
Assert.IsNotNull(provider.CreateDataAdapter());
Assert.IsNotNull(provider.CreateParameter());
Assert.AreEqual("?", provider.CreateParameterName("Foo"));
}
[Test]
public void DefaultInstanceWithSqlServer2000()
{
IDbProvider provider = DbProviderFactory.GetDbProvider("SqlServer-1.1");
AssertIsSqlServer2000(provider);
Assert.IsNull(provider.ConnectionString);
Assert.IsNotNull(provider.CreateCommand());
Assert.IsNotNull(provider.CreateCommandBuilder());
Assert.IsNotNull(provider.CreateConnection());
Assert.IsNotNull(provider.CreateDataAdapter());
Assert.IsNotNull(provider.CreateParameter());
Assert.AreEqual("@Foo", provider.CreateParameterName("Foo"));
}
private void AssertIsSqlServer2000(IDbProvider provider)
{
Assert.AreEqual("Microsoft SQL Server, provider V1.0.5000.0 in framework .NET V1.1",
provider.DbMetadata.ProductName);
AssertCommonSqlServerErrorCodes(provider);
}
#endif
private void AssertIsSqlServer2005(IDbProvider provider)
{
Assert.AreEqual("Microsoft SQL Server, provider V2.0.0.0 in framework .NET V2.0",
@@ -286,7 +249,5 @@ namespace Spring.Data.Common
// This had better NOT be
Assert.IsFalse(Array.IndexOf(codes.BadSqlGrammarCodes, "1xx56") >= 0);
}
}
}
}

View File

@@ -212,11 +212,9 @@ namespace Spring.Data.Common
IDbDataAdapter mockDataAdapter = (IDbDataAdapter) mocks.CreateMock(typeof (IDbDataAdapter));
Expect.Call(dbProvider.CreateDataAdapter()).Return(mockDataAdapter).Repeat.Once();
#if !NET_1_1
DbCommandBuilder mockDbCommandBuilder = (DbCommandBuilder) mocks.CreateMock(typeof (DbCommandBuilder));
Expect.Call(dbProvider.CreateCommandBuilder()).Return(mockDbCommandBuilder).Repeat.Once();
#endif
Expect.Call(dbProvider.CreateParameterName("p1")).Return("@p1").Repeat.Once();
Expect.Call(dbProvider.CreateParameterNameForCollection("c1")).Return("cc1");
@@ -226,9 +224,7 @@ namespace Spring.Data.Common
Exception e = new Exception("foo");
Expect.Call(dbProvider.ExtractError(e)).Return("badsql").Repeat.Once();
#if !NET_1_1
DbException dbException = (DbException) mocks.CreateMock(typeof (DbException));
#endif
MultiDelegatingDbProvider multiDbProvider = new MultiDelegatingDbProvider();
@@ -245,19 +241,12 @@ namespace Spring.Data.Common
Assert.IsNotNull(multiDbProvider.CreateCommand());
Assert.IsNotNull(multiDbProvider.CreateParameter());
Assert.IsNotNull(multiDbProvider.CreateDataAdapter());
#if !NET_1_1
Assert.IsNotNull(multiDbProvider.CreateCommandBuilder() as DbCommandBuilder);
#endif
Assert.AreEqual("@p1", multiDbProvider.CreateParameterName("p1"));
Assert.AreEqual("cc1", multiDbProvider.CreateParameterNameForCollection("c1"));
Assert.IsNotNull(multiDbProvider.DbMetadata);
Assert.AreEqual("badsql", multiDbProvider.ExtractError(e));
#if !NET_1_1
Assert.IsTrue(multiDbProvider.IsDataAccessException(dbException));
#endif
Assert.IsFalse(multiDbProvider.IsDataAccessException(e));
mocks.VerifyAll();
}

View File

@@ -18,9 +18,6 @@
#endregion
#if (!NET_1_0)
#region Imports
using System;
@@ -276,4 +273,3 @@ namespace Spring.Data.Core
}
#endif

View File

@@ -63,18 +63,12 @@ namespace Spring.Data
{
LOG.Debug("TransactionActive = " + TransactionSynchronizationManager.ActualTransactionActive);
}
#if !NET_1_0 && !NET_1_1
[Transaction(TransactionPropagation.Required, IsolationLevel.Unspecified, Timeout = 50,
RollbackFor = new Type[]{typeof(ArgumentNullException)},
ReadOnly = false,
EnterpriseServicesInteropOption = System.Transactions.EnterpriseServicesInteropOption.Automatic,
NoRollbackFor = new Type[] { typeof(ArithmeticException), typeof(NotSupportedException) })]
#else
[Transaction(TransactionPropagation.Required, IsolationLevel.Unspecified, Timeout = 50,
RollbackFor = new Type[]{typeof(ArgumentNullException)},
ReadOnly = false,
NoRollbackFor = new Type[] { typeof(ArithmeticException), typeof(NotSupportedException) })]
#endif
public void DeleteTwoTestObjects(string name1, string name2)
{
}

View File

@@ -1,4 +1,3 @@
#if !NET_1_0
#region Licence
/*
@@ -107,4 +106,3 @@ namespace Spring.Support
}
}
}
#endif

View File

@@ -18,7 +18,7 @@
#endregion
#if (NET_2_0 && !MONO)
#if !MONO
#region Imports
@@ -215,4 +215,4 @@ namespace Spring.EnterpriseServices
}
}
#endif // (!NET_1_0)
#endif // !MONO

View File

@@ -25,7 +25,6 @@ using System.Web;
using NUnit.Framework;
using Rhino.Mocks;
using Spring.Context;
using Spring.Objects.Factory.Config;
using Spring.Objects.Factory.Support;
#endregion
@@ -214,54 +213,15 @@ namespace Spring.Web.Support
private static IDisposable Record(MockRepository mocks)
{
#if !NET_1_1
return mocks.Record();
#else
return new RecordModeChanger(mocks);
#endif
}
private static IDisposable Playback(MockRepository mocks)
{
#if !NET_1_1
return mocks.Playback();
#else
return new PlaybackModeChanger(mocks);
#endif
}
#if NET_1_1
private class RecordModeChanger : IDisposable
{
private MockRepository _mocks;
public RecordModeChanger(MockRepository mocks)
{
_mocks = mocks;
}
public void Dispose()
{
_mocks.ReplayAll();
}
}
private class PlaybackModeChanger : IDisposable
{
private MockRepository _mocks;
public PlaybackModeChanger(MockRepository mocks)
{
_mocks = mocks;
}
public void Dispose()
{
_mocks.VerifyAll();
}
}
#endif
#endregion Rhino.Mocks Compatibility Adapter
#endregion Rhino.Mocks Compatibility Adapter
}
}

View File

@@ -23,7 +23,6 @@
using System;
using NUnit.Framework;
using Rhino.Mocks;
using Spring.Util;
#endregion
@@ -136,54 +135,14 @@ namespace Spring.Web.Support
private static IDisposable Record( MockRepository mocks )
{
#if !NET_1_1
return mocks.Record();
#else
return new RecordModeChanger(mocks);
#endif
}
private static IDisposable Playback( MockRepository mocks )
{
#if !NET_1_1
return mocks.Playback();
#else
return new PlaybackModeChanger(mocks);
#endif
}
#if NET_1_1
private class RecordModeChanger : IDisposable
{
private MockRepository _mocks;
public RecordModeChanger(MockRepository mocks)
{
_mocks = mocks;
}
public void Dispose()
{
_mocks.ReplayAll();
}
}
private class PlaybackModeChanger : IDisposable
{
private MockRepository _mocks;
public PlaybackModeChanger(MockRepository mocks)
{
_mocks = mocks;
}
public void Dispose()
{
_mocks.VerifyAll();
}
}
#endif
#endregion Rhino.Mocks Compatibility Adapter
}
}