Skip to content

Commit 613b938

Browse files
committed
Initial commit
0 parents  commit 613b938

14 files changed

+629
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
9+
# Build results
10+
11+
[Dd]ebug/
12+
[Rr]elease/
13+
x64/
14+
[Bb]in/
15+
[Oo]bj/
16+
17+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
18+
!packages/*/build/
19+
20+
# MSTest test Results
21+
[Tt]est[Rr]esult*/
22+
[Bb]uild[Ll]og.*
23+
24+
*_i.c
25+
*_p.c
26+
*.ilk
27+
*.meta
28+
*.obj
29+
*.pch
30+
*.pdb
31+
*.pgc
32+
*.pgd
33+
*.rsp
34+
*.sbr
35+
*.tlb
36+
*.tli
37+
*.tlh
38+
*.tmp
39+
*.tmp_proj
40+
*.log
41+
*.vspscc
42+
*.vssscc
43+
.builds
44+
*.pidb
45+
*.log
46+
*.scc
47+
48+
# Visual C++ cache files
49+
ipch/
50+
*.aps
51+
*.ncb
52+
*.opensdf
53+
*.sdf
54+
*.cachefile
55+
56+
# Visual Studio profiler
57+
*.psess
58+
*.vsp
59+
*.vspx
60+
61+
# Guidance Automation Toolkit
62+
*.gpState
63+
64+
# ReSharper is a .NET coding add-in
65+
_ReSharper*/
66+
*.[Rr]e[Ss]harper
67+
68+
# TeamCity is a build add-in
69+
_TeamCity*
70+
71+
# DotCover is a Code Coverage Tool
72+
*.dotCover
73+
74+
# NCrunch
75+
*.ncrunch*
76+
.*crunch*.local.xml
77+
78+
# Installshield output folder
79+
[Ee]xpress/
80+
81+
# DocProject is a documentation generator add-in
82+
DocProject/buildhelp/
83+
DocProject/Help/*.HxT
84+
DocProject/Help/*.HxC
85+
DocProject/Help/*.hhc
86+
DocProject/Help/*.hhk
87+
DocProject/Help/*.hhp
88+
DocProject/Help/Html2
89+
DocProject/Help/html
90+
91+
# Click-Once directory
92+
publish/
93+
94+
# Publish Web Output
95+
*.Publish.xml
96+
97+
# NuGet Packages Directory
98+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
99+
#packages/
100+
101+
# Windows Azure Build Output
102+
csx
103+
*.build.csdef
104+
105+
# Windows Store app package directory
106+
AppPackages/
107+
108+
# Others
109+
sql/
110+
*.Cache
111+
ClientBin/
112+
[Ss]tyle[Cc]op.*
113+
~$*
114+
*~
115+
*.dbmdl
116+
*.[Pp]ublish.xml
117+
*.pfx
118+
*.publishsettings
119+
120+
# RIA/Silverlight projects
121+
Generated_Code/
122+
123+
# Backup & report files from converting an old project file to a newer
124+
# Visual Studio version. Backup files are not needed, because we have git ;-)
125+
_UpgradeReport_Files/
126+
Backup*/
127+
UpgradeLog*.XML
128+
UpgradeLog*.htm
129+
130+
# SQL Server files
131+
App_Data/*.mdf
132+
App_Data/*.ldf
133+
134+
135+
#LightSwitch generated files
136+
GeneratedArtifacts/
137+
_Pvt_Extensions/
138+
ModelManifest.xml
139+
140+
# =========================
141+
# Windows detritus
142+
# =========================
143+
144+
# Windows image file caches
145+
Thumbs.db
146+
ehthumbs.db
147+
148+
# Folder config file
149+
Desktop.ini
150+
151+
# Recycle Bin used on file shares
152+
$RECYCLE.BIN/
153+
154+
# Mac desktop service store files
155+
.DS_Store
156+
157+
# NuGet Packages
158+
*.nupkg
159+
# The packages folder can be ignored because of Package Restore
160+
**/packages/*
161+
# except build/, which is used as an MSBuild target.
162+
!**/packages/build/
163+
# Uncomment if necessary however generally it will be regenerated when needed
164+
!**/packages/repositories.config
165+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26228.10
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizTalkComponents.Utilities.DbQueryUtility", "Src\DbQueryUtility\BizTalkComponents.Utilities.DbQueryUtility.csproj", "{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizTalkComponents.Utilities.DbQueryUtility.Test.UnitTest", "Test\UnitTest\BizTalkComponents.Utilities.DbQueryUtility.Test.UnitTest.csproj", "{4F068C0A-3855-4B7E-B60E-DA0D3E1F6D2F}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{4F068C0A-3855-4B7E-B60E-DA0D3E1F6D2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{4F068C0A-3855-4B7E-B60E-DA0D3E1F6D2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{4F068C0A-3855-4B7E-B60E-DA0D3E1F6D2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{4F068C0A-3855-4B7E-B60E-DA0D3E1F6D2F}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{0EEDBC0A-7992-44F2-BCC6-E78BBE7D2782}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>BizTalkComponents.Utilities.DbQueryUtility</RootNamespace>
11+
<AssemblyName>BizTalkComponents.Utilities.DbQueryUtility</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="System" />
34+
<Reference Include="System.Configuration" />
35+
<Reference Include="System.Core" />
36+
<Reference Include="System.Xml.Linq" />
37+
<Reference Include="System.Data.DataSetExtensions" />
38+
<Reference Include="Microsoft.CSharp" />
39+
<Reference Include="System.Data" />
40+
<Reference Include="System.Net.Http" />
41+
<Reference Include="System.Xml" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<Compile Include="DbQueryUtilityService.cs" />
45+
<Compile Include="Properties\AssemblyInfo.cs" />
46+
<Compile Include="Repository\IDbQueryRepository.cs" />
47+
<Compile Include="Repository\SqlDbQueryRepository.cs" />
48+
<Compile Include="SqlDbQueryApplicationService.cs" />
49+
</ItemGroup>
50+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
51+
</Project>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using BizTalkComponents.Utilities.DbQueryUtility.Repository;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Xml.XPath;
8+
9+
namespace BizTalkComponents.Utilities.DbQueryUtility
10+
{
11+
public class DbQueryUtilityService
12+
{
13+
private readonly IDbQueryRepository _dbQueryRepository = null;
14+
public DbQueryUtilityService(IDbQueryRepository dbQueryRepository)
15+
{
16+
if(dbQueryRepository == null)
17+
{
18+
throw new ArgumentNullException("dbQueryRepository");
19+
}
20+
21+
_dbQueryRepository = dbQueryRepository;
22+
}
23+
24+
public XPathNavigator Query(string query, string configurationKey)
25+
{
26+
var doc = _dbQueryRepository.Query(query, configurationKey);
27+
var nav = doc.CreateNavigator();
28+
29+
return nav.CreateNavigator();
30+
}
31+
}
32+
}
Lines changed: 36 additions & 0 deletions
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("BizTalkComponents.Utilities.DbQueryUtility")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("BizTalkComponents.Utilities.DbQueryUtility")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
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("0eedbc0a-7992-44f2-bcc6-e78bbe7d2782")]
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")]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Xml.Linq;
7+
using System.Xml.XPath;
8+
9+
namespace BizTalkComponents.Utilities.DbQueryUtility.Repository
10+
{
11+
public interface IDbQueryRepository
12+
{
13+
XDocument Query(string query, string configurationKey);
14+
}
15+
}

0 commit comments

Comments
 (0)