Ditch pragma for disabling compiler warning in favor of project level nowarn directive (.NET 1.1 strikes again)

This commit is contained in:
lahma
2011-03-21 08:42:35 +00:00
parent 3dd72e8562
commit e2cbd5b248
4 changed files with 7 additions and 8 deletions

View File

@@ -2246,10 +2246,7 @@ namespace Spring.Data.NHibernate
public object DoInHibernate(ISession session)
{
outer.CheckWriteOperationAllowed(session);
// As of NH 3.1 SaveOrUpdateCopy is obsolete, disable compiler warning for now
#pragma warning disable 618
return session.SaveOrUpdateCopy(entity);
#pragma warning restore 618
}
}

View File

@@ -21,8 +21,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>Spring.Data.NHibernate31.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>
</NoWarn>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -33,6 +32,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>Spring.Data.NHibernate31.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">

View File

@@ -27,8 +27,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>Spring.Data.NHibernate31.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>
</NoWarn>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -37,6 +36,9 @@
<DefineConstants>TRACE;NET_2_0,NH_2_1</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Spring.Data.NHibernate31.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>0618</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="Common.Logging, Version=1.0.2.0, Culture=neutral, PublicKeyToken=af08829b84f0328e">

View File

@@ -24,7 +24,7 @@
doc="${current.bin.dir}/${project::get-name()}.xml">
<arg line="${compiler.args}"/>
<nowarn>
<warning number="${nowarn.numbers.test},0169" />
<warning number="${nowarn.numbers.test},0169,0618" />
<warning number="0219" if="${nant.settings.currentframework=='mono-2.0'}"/>
</nowarn>
<sources failonempty="true">