Skip to content

Commit

Permalink
ServiceModel changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bashtavenko committed Apr 24, 2014
1 parent 8824447 commit cc689a2
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 0 deletions.
17 changes: 17 additions & 0 deletions SqlCop.ServiceModel/CheckRules.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using ServiceStack;
using SqlCop.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlCop.ServiceModel
{
[Route("/check", "POST")]
public class CheckRules : IReturn<List<RuleProblem>>
{
public string Sql { get; set; }
public RuleModel[] Rules { get; set; }
}
}
17 changes: 17 additions & 0 deletions SqlCop.ServiceModel/GetRules.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using ServiceStack;
using SqlCop.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlCop.ServiceModel
{
[Route("/rules", "GET")]
[Route("/rules/{Id}", "GET")]
public class GetRules : IReturn<List<RuleModel>>
{
public string Id { get; set; }
}
}
18 changes: 18 additions & 0 deletions SqlCop.ServiceModel/RuleProblem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using SqlCop.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlCop.ServiceModel
{
public class RuleProblem
{
public string Description { get; set;}
public string ErrorMessageString { get; set; }
public RuleProblemSeverity Severity { get; set; }
public int StartColumn { get; set; }
public int StartLine { get; set;}
}
}
73 changes: 73 additions & 0 deletions SqlCop.ServiceModel/SqlCop.ServiceModel.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D7131A2D-CD72-4347-93FC-56797AD2D34D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SqlCop.ServiceModel</RootNamespace>
<AssemblyName>SqlCop.ServiceModel</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ServiceStack.Common">
<HintPath>..\packages\ServiceStack.Common.4.0.18\lib\net40\ServiceStack.Common.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces">
<HintPath>..\packages\ServiceStack.Interfaces.4.0.18\lib\net40\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text">
<HintPath>..\packages\ServiceStack.Text.4.0.18\lib\net40\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="CheckRules.cs" />
<Compile Include="GetRules.cs" />
<Compile Include="RuleProblem.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SqlCop.Common\SqlCop.Common.csproj">
<Project>{018c98cc-d80d-44e3-a668-3accda856eb5}</Project>
<Name>SqlCop.Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
6 changes: 6 additions & 0 deletions SqlCop.ServiceModel/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ServiceStack.Common" version="4.0.18" targetFramework="net45" />
<package id="ServiceStack.Interfaces" version="4.0.18" targetFramework="net45" />
<package id="ServiceStack.Text" version="4.0.18" targetFramework="net45" />
</packages>

0 comments on commit cc689a2

Please sign in to comment.