Fixing some basic fx cop warnings

--HG--
branch : dev
This commit is contained in:
Dave Reed
2010-11-12 12:47:06 -08:00
parent a9d30c36dd
commit e869a4f467
70 changed files with 147 additions and 116 deletions

View File

@@ -42,7 +42,6 @@ namespace Orchard.Packaging.Commands {
using ( var stream = File.Create(filename) ) {
packageData.PackageStream.CopyTo(stream);
stream.Close();
}
var fileInfo = new FileInfo(filename);

View File

@@ -23,7 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardSecurity.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

View File

@@ -204,6 +204,7 @@ namespace Orchard.Packaging.Services {
public string Path { get { return _packagePath; } }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "Supposed to return an open stream.")]
public Stream GetStream() {
var stream = new MemoryStream();
_webSiteFolder.CopyFileTo(_virtualPath, stream);