Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fcsobel committed Mar 19, 2020
1 parent ba0905c commit df9a90d
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 10 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@
################################################################################

*.dll
/c3o.SqlCopy.Console.App/bin
/c3o.SqlCopy.Console.App/obj
/c3o.MySqlBulkCopy/obj
/c3o.SqlCopy.Lib.Common/bin
/c3o.SqlCopy.Lib.Common/obj
/c3o.SqlCopy.Win.App/bin
/c3o.SqlCopy.Win.App/obj
/c3o.SqlCopy.Win.Service/bin/x64/Debug
/c3o.SqlCopy.Win.Service/obj
/c3o.MySqlBulkCopy/bin
/packages
/.vs/SqlCopy/v16
*.user
/c3o.SqlCopy.Win.Service/bin/Debug
37 changes: 31 additions & 6 deletions SqlCopy.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.29230.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "c3o.SqlCopy.Win.App", "c3o.SqlCopy.Win.App\c3o.SqlCopy.Win.App.csproj", "{A028C3DF-0DA2-4160-8FF5-CD83325518B5}"
EndProject
Expand All @@ -14,57 +14,82 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MySqlBulkCopy", "c3o.MySqlBulkCopy\MySqlBulkCopy.csproj", "{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}"
EndProject
Global
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|x64.ActiveCfg = Debug|x64
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|x64.Build.0 = Debug|x64
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|x86.ActiveCfg = Debug|x86
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Debug|x86.Build.0 = Debug|x86
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|Any CPU.Build.0 = Release|Any CPU
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|x64.ActiveCfg = Release|x64
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|x64.Build.0 = Release|x64
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|x86.ActiveCfg = Release|x86
{A028C3DF-0DA2-4160-8FF5-CD83325518B5}.Release|x86.Build.0 = Release|x86
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|x64.ActiveCfg = Debug|x64
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|x64.Build.0 = Debug|x64
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|x86.ActiveCfg = Debug|x86
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Debug|x86.Build.0 = Debug|x86
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|Any CPU.Build.0 = Release|Any CPU
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|x64.ActiveCfg = Release|x64
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|x64.Build.0 = Release|x64
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|x86.ActiveCfg = Release|x86
{7F5B91AE-DE0E-4CCE-90C6-2A5D8179A6FB}.Release|x86.Build.0 = Release|x86
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|x64.ActiveCfg = Debug|x64
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|x64.Build.0 = Debug|x64
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|x86.ActiveCfg = Debug|x86
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Debug|x86.Build.0 = Debug|x86
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|Any CPU.Build.0 = Release|Any CPU
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|x64.ActiveCfg = Release|x64
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|x64.Build.0 = Release|x64
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|x86.ActiveCfg = Release|x86
{19CF4B40-7AB4-4810-8E2F-8FBDA3B05A3D}.Release|x86.Build.0 = Release|x86
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|x64.ActiveCfg = Debug|x64
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|x64.Build.0 = Debug|x64
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|x86.ActiveCfg = Debug|x86
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Debug|x86.Build.0 = Debug|x86
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|Any CPU.Build.0 = Release|Any CPU
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|x64.ActiveCfg = Release|x64
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|x64.Build.0 = Release|x64
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|x86.ActiveCfg = Release|x86
{DF43D7D7-01C8-488A-8687-7B423816DBA8}.Release|x86.Build.0 = Release|x86
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Debug|x64.ActiveCfg = Debug|x64
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Debug|x64.Build.0 = Debug|x64
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Debug|x86.ActiveCfg = Debug|Any CPU
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Release|Any CPU.Build.0 = Release|Any CPU
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Release|x64.ActiveCfg = Release|x64
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Release|x64.Build.0 = Release|x64
{9C1D13BA-AB1B-4879-8539-FAD92B365EEE}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BDB1C49F-8951-4A4D-BB8D-8B0D24BF91EB}
EndGlobalSection
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions c3o.MySqlBulkCopy/MySqlBulkCopy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.9.6\lib\net40\MySql.Data.dll</HintPath>
Expand Down
18 changes: 18 additions & 0 deletions c3o.SqlCopy.Console.App/c3o.SqlCopy.Console.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,24 @@
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
30 changes: 30 additions & 0 deletions c3o.SqlCopy.Lib.Common/Common/ErrorLog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace c3o.SqlCopy.Common
{

public sealed class ErrorLog
{
public List<string> Errors { get; set; }

private ErrorLog()
{
this.Errors = new List<string>();
}

public static ErrorLog Instance { get { return Nested.instance; } }
private class Nested
{
// Explicit static constructor to tell C# compiler not to mark type as beforefieldinit
static Nested()
{
}

internal static readonly ErrorLog instance = new ErrorLog();
}
}
}
19 changes: 19 additions & 0 deletions c3o.SqlCopy.Lib.Common/c3o.SqlCopy.Lib.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,24 @@
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.6\lib\net45\MySql.Data.dll</HintPath>
Expand Down Expand Up @@ -118,6 +136,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Business\CopyManager.cs" />
<Compile Include="Common\ErrorLog.cs" />
<Compile Include="Common\ObjectCopier.cs" />
<Compile Include="Common\SerializationHelper.cs" />
<Compile Include="Data\IDbData.cs" />
Expand Down
8 changes: 5 additions & 3 deletions c3o.SqlCopy.Win.App/DataGridViewProgressColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Drawing;
using System.ComponentModel;
using System.Linq;
using c3o.SqlCopy.Common;

namespace c3o.SqlCopy
{
Expand Down Expand Up @@ -67,8 +68,9 @@ protected override void Paint(System.Drawing.Graphics g, System.Drawing.Rectangl
g.DrawString(progressVal.ToString() + "%", cellStyle.Font, foreColorBrush, cellBounds.X + 6, cellBounds.Y + 2);
}
}
catch (Exception e) { }

catch (Exception e) {
ErrorLog.Instance.Errors.Add(e.Message);
}
}
}
}
}
1 change: 0 additions & 1 deletion c3o.SqlCopy.Win.App/SqlCopyForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ public void CopyTables(object sender, DoWorkEventArgs e)

void manager_OnRowsCopied(object sender, RowsCopiedEventArgs e)
{
string test = "tt";
//throw new NotImplementedException();
}

Expand Down
18 changes: 18 additions & 0 deletions c3o.SqlCopy.Win.App/c3o.SqlCopy.Win.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
18 changes: 18 additions & 0 deletions c3o.SqlCopy.Win.Service/c3o.SqlCopy.Win.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,24 @@
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
Expand Down

0 comments on commit df9a90d

Please sign in to comment.