Skip to content

Commit 96fdcc7

Browse files
committed
Added launcher and test projects
Began implementation
1 parent 932d21a commit 96fdcc7

14 files changed

+542
-1
lines changed

Local.testsettings

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TestSettings name="Local" id="5a7f3b87-d1e1-4b0c-87e2-9bcfa6fc32b0" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3+
<Description>These are default test settings for a local test run.</Description>
4+
<Deployment enabled="false" />
5+
<Execution>
6+
<TestTypeSpecific />
7+
<AgentRule name="Execution Agents">
8+
</AgentRule>
9+
</Execution>
10+
</TestSettings>

SqlCommandVisualizer.sln

+44
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,60 @@ Microsoft Visual Studio Solution File, Format Version 11.00
33
# Visual Studio 2010
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlCommandVisualizer", "SqlCommandVisualizer\SqlCommandVisualizer.csproj", "{5F190D74-5122-4CA2-8206-04B1970127FC}"
55
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualizerLauncher", "VisualizerLauncher\VisualizerLauncher.csproj", "{7653129E-2F96-47E9-BBAC-04DA77F654D8}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{67793B36-C35A-4611-81B3-2A9A2240A76A}"
9+
ProjectSection(SolutionItems) = preProject
10+
Local.testsettings = Local.testsettings
11+
SqlCommandVisualizer.vsmdi = SqlCommandVisualizer.vsmdi
12+
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
13+
EndProjectSection
14+
EndProject
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VisualizerTests", "VisualizerTests\VisualizerTests.csproj", "{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}"
16+
EndProject
617
Global
18+
GlobalSection(TestCaseManagementSettings) = postSolution
19+
CategoryFile = SqlCommandVisualizer.vsmdi
20+
EndGlobalSection
721
GlobalSection(SolutionConfigurationPlatforms) = preSolution
822
Debug|Any CPU = Debug|Any CPU
23+
Debug|Mixed Platforms = Debug|Mixed Platforms
24+
Debug|x86 = Debug|x86
925
Release|Any CPU = Release|Any CPU
26+
Release|Mixed Platforms = Release|Mixed Platforms
27+
Release|x86 = Release|x86
1028
EndGlobalSection
1129
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1230
{5F190D74-5122-4CA2-8206-04B1970127FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1331
{5F190D74-5122-4CA2-8206-04B1970127FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
33+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
34+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Debug|x86.ActiveCfg = Debug|Any CPU
1435
{5F190D74-5122-4CA2-8206-04B1970127FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
1536
{5F190D74-5122-4CA2-8206-04B1970127FC}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
38+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
39+
{5F190D74-5122-4CA2-8206-04B1970127FC}.Release|x86.ActiveCfg = Release|Any CPU
40+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Debug|Any CPU.ActiveCfg = Debug|x86
41+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
42+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Debug|Mixed Platforms.Build.0 = Debug|x86
43+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Debug|x86.ActiveCfg = Debug|x86
44+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Debug|x86.Build.0 = Debug|x86
45+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Release|Any CPU.ActiveCfg = Release|x86
46+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Release|Mixed Platforms.ActiveCfg = Release|x86
47+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Release|Mixed Platforms.Build.0 = Release|x86
48+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Release|x86.ActiveCfg = Release|x86
49+
{7653129E-2F96-47E9-BBAC-04DA77F654D8}.Release|x86.Build.0 = Release|x86
50+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
53+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
54+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Debug|x86.ActiveCfg = Debug|Any CPU
55+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Release|Any CPU.Build.0 = Release|Any CPU
57+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
58+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
59+
{4BF63DCF-239A-4796-B1EB-2B37F96BF2BB}.Release|x86.ActiveCfg = Release|Any CPU
1660
EndGlobalSection
1761
GlobalSection(SolutionProperties) = preSolution
1862
HideSolutionNode = FALSE

SqlCommandVisualizer.vsmdi

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3+
<TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
4+
<RunConfiguration id="5a7f3b87-d1e1-4b0c-87e2-9bcfa6fc32b0" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
5+
</TestList>
6+
</TestLists>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/******************************************************************************
2+
Copyright (c) 2011 Seth H. Richards
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.
19+
******************************************************************************/
20+
using System;
21+
using System.Collections.Generic;
22+
using System.Linq;
23+
using System.Text;
24+
using Microsoft.VisualStudio.DebuggerVisualizers;
25+
using System.Windows.Forms;
26+
27+
[assembly: System.Diagnostics.DebuggerVisualizer(
28+
typeof(shr.Visualizers.SqlCommandVisualizer.SqlCommandVisualizer),
29+
typeof(VisualizerObjectSource),
30+
Target = typeof(System.Text.StringBuilder),
31+
Description = "SqlCommand Visualizer")]
32+
33+
namespace shr.Visualizers.SqlCommandVisualizer
34+
{
35+
public class SqlCommandVisualizer
36+
{
37+
}
38+
}

SqlCommandVisualizer/SqlCommandVisualizer.csproj

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,24 @@
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34+
<Reference Include="Accessibility">
35+
<EmbedInteropTypes>True</EmbedInteropTypes>
36+
</Reference>
37+
<Reference Include="Microsoft.VisualStudio.DebuggerVisualizers, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
3438
<Reference Include="System" />
3539
<Reference Include="System.Core" />
40+
<Reference Include="System.Windows.Forms" />
3641
<Reference Include="System.Xml.Linq" />
3742
<Reference Include="System.Data.DataSetExtensions" />
3843
<Reference Include="Microsoft.CSharp" />
3944
<Reference Include="System.Data" />
4045
<Reference Include="System.Xml" />
4146
</ItemGroup>
4247
<ItemGroup>
43-
<Compile Include="Visualizer.cs" />
48+
<Compile Include="SqlCommandVisualizer.cs" />
4449
<Compile Include="Properties\AssemblyInfo.cs" />
50+
<Compile Include="TSqlGenerator.cs" />
51+
<Compile Include="TSqlParameter.cs" />
4552
</ItemGroup>
4653
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4754
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

SqlCommandVisualizer/TSqlGenerator.cs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/******************************************************************************
2+
Copyright (c) 2011 Seth H. Richards
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.
19+
******************************************************************************/
20+
using System;
21+
using System.Collections.Generic;
22+
using System.Linq;
23+
using System.Text;
24+
using System.Data.SqlClient;
25+
namespace shr.Visualizers.SqlCommandVisualizer
26+
{
27+
28+
public class TSqlGenerator
29+
{
30+
SqlCommand m_Command = null;
31+
32+
public TSqlGenerator(SqlCommand Cmd)
33+
{
34+
m_Command = Cmd;
35+
}
36+
}
37+
}

SqlCommandVisualizer/TSqlParameter.cs

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/******************************************************************************
2+
Copyright (c) 2011 Seth H. Richards
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.
19+
******************************************************************************/
20+
21+
using System;
22+
using System.Collections.Generic;
23+
using System.Linq;
24+
using System.Text;
25+
using System.Data;
26+
using System.Data.SqlClient;
27+
28+
namespace shr.Visualizers.SqlCommandVisualizer
29+
{
30+
public class TSqlParameter
31+
{
32+
protected SqlParameter _Parameter = null;
33+
protected readonly String _Declaration = "";
34+
35+
public TSqlParameter(SqlParameter param1)
36+
{
37+
Dictionary<SqlDbType, Func<SqlParameter, String>> Generators = new Dictionary<SqlDbType, Func<SqlParameter, string>>
38+
{
39+
{SqlDbType.VarChar, VarCharDeclaration}
40+
};
41+
42+
_Parameter = param1;
43+
44+
if (_Parameter == null)
45+
_Declaration = "";
46+
else if (Generators.ContainsKey(_Parameter.SqlDbType))
47+
_Declaration = Generators[_Parameter.SqlDbType](_Parameter);
48+
else
49+
_Declaration = DefaultDeclaration(_Parameter);
50+
}
51+
52+
public static String VarCharDeclaration(SqlParameter Param)
53+
{
54+
String Size;
55+
if (Param.Size > 0)
56+
Size = Param.Size.ToString();
57+
else
58+
Size = "MAX";
59+
return String.Format("DECLARE {0} VARCHAR({1});", Param.ParameterName, Size);
60+
}
61+
public static String DefaultDeclaration(SqlParameter Param)
62+
{
63+
64+
String TypeName = Enum.GetName(typeof(SqlDbType), Param.SqlDbType).ToUpper();
65+
return String.Format("DECLARE {0} {1};", Param.ParameterName, TypeName);
66+
}
67+
68+
public String Declaration
69+
{
70+
get { return _Declaration; }
71+
}
72+
}
73+
}

TraceAndTestImpact.testsettings

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TestSettings name="Trace and Test Impact" id="7eb4199a-566f-46b2-bcbf-950d0f8369eb" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
3+
<Description>These are test settings for Trace and Test Impact.</Description>
4+
<Execution>
5+
<TestTypeSpecific />
6+
<AgentRule name="Execution Agents">
7+
</AgentRule>
8+
</Execution>
9+
</TestSettings>

VisualizerLauncher/Program.cs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
6+
namespace VisualizerLauncher
7+
{
8+
class Program
9+
{
10+
static void Main(string[] args)
11+
{
12+
}
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("VisualizerLauncher")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("VisualizerLauncher")]
13+
[assembly: AssemblyCopyright("Copyright © 2011")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("4b9c028d-1192-4981-a400-c90986f40b59")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{7653129E-2F96-47E9-BBAC-04DA77F654D8}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>VisualizerLauncher</RootNamespace>
12+
<AssemblyName>VisualizerLauncher</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
15+
<FileAlignment>512</FileAlignment>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
18+
<PlatformTarget>x86</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
28+
<PlatformTarget>x86</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="System" />
38+
<Reference Include="System.Core" />
39+
<Reference Include="System.Xml.Linq" />
40+
<Reference Include="System.Data.DataSetExtensions" />
41+
<Reference Include="Microsoft.CSharp" />
42+
<Reference Include="System.Data" />
43+
<Reference Include="System.Xml" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="Program.cs" />
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<ProjectReference Include="..\SqlCommandVisualizer\SqlCommandVisualizer.csproj">
51+
<Project>{5F190D74-5122-4CA2-8206-04B1970127FC}</Project>
52+
<Name>SqlCommandVisualizer</Name>
53+
</ProjectReference>
54+
</ItemGroup>
55+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
56+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
57+
Other similar extension points exist, see Microsoft.Common.targets.
58+
<Target Name="BeforeBuild">
59+
</Target>
60+
<Target Name="AfterBuild">
61+
</Target>
62+
-->
63+
</Project>

0 commit comments

Comments
 (0)