Skip to content

Commit

Permalink
Revert "DYN-6619-Localizing-StreamWriter-Exception (#15001)" (#15012)
Browse files Browse the repository at this point in the history
This reverts commit 857fbeb.
  • Loading branch information
QilongTang authored Mar 13, 2024
1 parent b3ac50a commit d0c0387
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 351 deletions.
27 changes: 8 additions & 19 deletions src/Libraries/DSOffice/CSVNodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using DSOffice.Properties;

namespace DSOffice
{
Expand All @@ -21,30 +20,20 @@ public static partial class Data
/// <search>write,text,file</search>
public static void ExportCSV(string filePath, object[][] data)
{
try
using (var writer = new StreamWriter(DSCore.IO.FileSystem.AbsolutePath(filePath)))
{
using (var writer = new StreamWriter(DSCore.IO.FileSystem.AbsolutePath(filePath)))
foreach (var line in data)
{
foreach (var line in data)
int count = 0;
foreach (var entry in line)
{
int count = 0;
foreach (var entry in line)
{
writer.Write(entry);
if (++count < line.Length)
writer.Write(",");
}
writer.WriteLine();
writer.Write(entry);
if (++count < line.Length)
writer.Write(",");
}
writer.WriteLine();
}
}
catch (Exception ex)
{
if (ex is DirectoryNotFoundException)
throw new Exception(Resources.StreamWriterNotFoundException);
else
throw;
}
}

/// <summary>
Expand Down
14 changes: 0 additions & 14 deletions src/Libraries/DSOffice/DSOffice.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
<Compile Include="CSVNodes.cs" />
<Compile Include="Excel.cs" Condition=" $(RuntimeIdentifier.Contains('win')) " />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="DSOffice.Migrations.xml">
Expand Down Expand Up @@ -58,15 +53,6 @@
<Name>CoreNodes</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.en-US.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="GenerateFiles" AfterTargets="ResolveSateliteResDeps" Condition=" '$(OS)' != 'Unix' ">
<!-- Generate customization dll -->
<GenerateResource SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)" UseSourcePath="true" Sources="$(ProjectDir)DSOfficeImages.resx" OutputResources="$(ProjectDir)DSOfficeImages.resources" />
Expand Down
72 changes: 0 additions & 72 deletions src/Libraries/DSOffice/Properties/Resources.Designer.cs

This file was deleted.

123 changes: 0 additions & 123 deletions src/Libraries/DSOffice/Properties/Resources.en-US.resx

This file was deleted.

123 changes: 0 additions & 123 deletions src/Libraries/DSOffice/Properties/Resources.resx

This file was deleted.

0 comments on commit d0c0387

Please sign in to comment.