Skip to content

Commit 26d2019

Browse files
author
Ethan Hann
committed
Merge branch 'develop'
2 parents 9576d77 + 025fbe3 commit 26d2019

28 files changed

+469
-68
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{BBF7B784-DF72-4561-92B9-4021B5F7D8E3}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>IntegrationEngine.Client.net40</RootNamespace>
11+
<AssemblyName>IntegrationEngine.Client.net40</AssemblyName>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
15+
<RestorePackages>true</RestorePackages>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>lib\net40\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="RestSharp">
36+
<HintPath>..\packages\RestSharp.105.0.1\lib\net4\RestSharp.dll</HintPath>
37+
</Reference>
38+
<Reference Include="System" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="System.Xml.Linq" />
41+
<Reference Include="System.Data.DataSetExtensions" />
42+
<Reference Include="Microsoft.CSharp" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Xml" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<Compile Include="..\configuration\SharedAssemblyInfo.cs">
48+
<Link>Properties\SharedAssemblyInfo.cs</Link>
49+
</Compile>
50+
<Compile Include="..\IntegrationEngine.Client\Client.cs">
51+
<Link>Client.cs</Link>
52+
</Compile>
53+
<Compile Include="..\IntegrationEngine.Client\EndpointName.cs">
54+
<Link>EndpointName.cs</Link>
55+
</Compile>
56+
<Compile Include="Properties\AssemblyInfo.cs" />
57+
</ItemGroup>
58+
<ItemGroup>
59+
<None Include="packages.config" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<ProjectReference Include="..\IntegrationEngine.Model.net40\IntegrationEngine.Model.net40.csproj">
63+
<Project>{dfcd19ce-a96a-4b19-8cf1-9cac560e7f42}</Project>
64+
<Name>IntegrationEngine.Model.net40</Name>
65+
</ProjectReference>
66+
</ItemGroup>
67+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
68+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
69+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
70+
<PropertyGroup>
71+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
72+
</PropertyGroup>
73+
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
74+
</Target>
75+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
76+
Other similar extension points exist, see Microsoft.Common.targets.
77+
<Target Name="BeforeBuild">
78+
</Target>
79+
<Target Name="AfterBuild">
80+
</Target>
81+
-->
82+
</Project>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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("IntegrationEngine.Client.net40")]
9+
10+
// Setting ComVisible to false makes the types in this assembly not visible
11+
// to COM components. If you need to access a type in this assembly from
12+
// COM, set the ComVisible attribute to true on that type.
13+
[assembly: ComVisible(false)]
14+
15+
// The following GUID is for the ID of the typelib if this project is exposed to COM
16+
[assembly: Guid("446e2264-b09d-4fb2-91d6-cae870d1b4d6")]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="RestSharp" version="105.0.1" targetFramework="net40" />
4+
</packages>

IntegrationEngine.Client/Client.cs

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using IntegrationEngine.Model;
5+
using RestSharp;
6+
7+
namespace IntegrationEngine.Client
8+
{
9+
public class Client
10+
{
11+
public RestClient RestClient { get; set; }
12+
13+
public Client()
14+
: this("http://localhost:9001/api/")
15+
{
16+
}
17+
18+
public Client(string apiUrl)
19+
{
20+
RestClient = new RestClient(apiUrl);
21+
}
22+
23+
#region CronTrigger
24+
public List<ICronTrigger> GetCronTriggers()
25+
{
26+
var request = new RestRequest(EndpointName.CronTrigger, Method.GET);
27+
return RestClient.Execute<List<ICronTrigger>>(request).Data;
28+
}
29+
30+
public CronTrigger GetCronTriggerById(string id)
31+
{
32+
var request = new RestRequest(EndpointName.CronTrigger + "/{id}", Method.GET);
33+
request.AddUrlSegment("id", id);
34+
return RestClient.Execute<CronTrigger>(request).Data;
35+
}
36+
37+
public CronTrigger CreateCronTrigger(CronTrigger cronTrigger)
38+
{
39+
var request = new RestRequest(EndpointName.CronTrigger, Method.POST);
40+
request.AddObject(cronTrigger);
41+
return RestClient.Execute<CronTrigger>(request).Data;
42+
}
43+
44+
public CronTrigger UpdateCronTrigger(CronTrigger cronTrigger)
45+
{
46+
var request = new RestRequest(EndpointName.CronTrigger + "/{id}", Method.PUT);
47+
request.AddUrlSegment("id", cronTrigger.Id);
48+
request.AddObject(cronTrigger);
49+
return RestClient.Execute<CronTrigger>(request).Data;
50+
}
51+
52+
public CronTrigger DeleteCronTrigger(string id)
53+
{
54+
var request = new RestRequest(EndpointName.CronTrigger + "/{id}", Method.DELETE);
55+
request.AddUrlSegment("id", id);
56+
return RestClient.Execute<CronTrigger>(request).Data;
57+
}
58+
#endregion
59+
60+
#region SimpleTrigger
61+
public List<SimpleTrigger> GetSimpleTriggers()
62+
{
63+
var request = new RestRequest(EndpointName.SimpleTrigger, Method.GET);
64+
return RestClient.Execute<List<SimpleTrigger>>(request).Data;
65+
}
66+
67+
public SimpleTrigger GetSimpleTriggerById(string id)
68+
{
69+
var request = new RestRequest(EndpointName.SimpleTrigger + "/{id}", Method.GET);
70+
request.AddUrlSegment("id", id);
71+
return RestClient.Execute<SimpleTrigger>(request).Data;
72+
}
73+
74+
public SimpleTrigger CreateSimpleTrigger(SimpleTrigger simpleTrigger)
75+
{
76+
var request = new RestRequest(EndpointName.SimpleTrigger, Method.POST);
77+
request.AddObject(simpleTrigger);
78+
return RestClient.Execute<SimpleTrigger>(request).Data;
79+
}
80+
81+
public SimpleTrigger UpdateSimpleTrigger(SimpleTrigger simpleTrigger)
82+
{
83+
var request = new RestRequest(EndpointName.SimpleTrigger + "/{id}", Method.PUT);
84+
request.AddUrlSegment("id", simpleTrigger.Id);
85+
request.AddObject(simpleTrigger);
86+
return RestClient.Execute<SimpleTrigger>(request).Data;
87+
}
88+
89+
public SimpleTrigger DeleteSimpleTrigger(string id)
90+
{
91+
var request = new RestRequest(EndpointName.SimpleTrigger + "/{id}", Method.DELETE);
92+
request.AddUrlSegment("id", id);
93+
return RestClient.Execute<SimpleTrigger>(request).Data;
94+
}
95+
#endregion
96+
97+
#region TimeZone
98+
public List<TimeZone> GetTimeZones()
99+
{
100+
var request = new RestRequest(EndpointName.TimeZone, Method.GET);
101+
return RestClient.Execute<List<TimeZone>>(request).Data;
102+
}
103+
#endregion
104+
105+
#region JobType
106+
public List<string> GetJobTypes()
107+
{
108+
var request = new RestRequest(EndpointName.JobType, Method.GET);
109+
return RestClient.Execute<List<string>>(request).Data;
110+
}
111+
#endregion
112+
}
113+
}
114+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System;
2+
3+
namespace IntegrationEngine.Client
4+
{
5+
public class EndpointName
6+
{
7+
public static string CronTrigger = "CronTrigger";
8+
public static string SimpleTrigger = "SimpleTrigger";
9+
public static string JobType = "JobType";
10+
public static string TimeZone = "TimeZone";
11+
}
12+
}
13+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{F3FCB706-F0DD-46C1-B121-785757FAE9B9}</ProjectGuid>
7+
<OutputType>Library</OutputType>
8+
<RootNamespace>IntegrationEngine.Client</RootNamespace>
9+
<AssemblyName>IntegrationEngine.Client</AssemblyName>
10+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
12+
<RestorePackages>true</RestorePackages>
13+
</PropertyGroup>
14+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
15+
<DebugSymbols>true</DebugSymbols>
16+
<DebugType>full</DebugType>
17+
<Optimize>false</Optimize>
18+
<OutputPath>bin\Debug</OutputPath>
19+
<DefineConstants>DEBUG;</DefineConstants>
20+
<ErrorReport>prompt</ErrorReport>
21+
<WarningLevel>4</WarningLevel>
22+
<ConsolePause>false</ConsolePause>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>full</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>lib\net45\</OutputPath>
28+
<ErrorReport>prompt</ErrorReport>
29+
<WarningLevel>4</WarningLevel>
30+
<ConsolePause>false</ConsolePause>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="System" />
34+
<Reference Include="RestSharp">
35+
<HintPath>..\packages\RestSharp.105.0.1\lib\net4\RestSharp.dll</HintPath>
36+
</Reference>
37+
</ItemGroup>
38+
<ItemGroup>
39+
<Compile Include="..\configuration\SharedAssemblyInfo.cs">
40+
<Link>Properties\SharedAssemblyInfo.cs</Link>
41+
</Compile>
42+
<Compile Include="Properties\AssemblyInfo.cs" />
43+
<Compile Include="Client.cs" />
44+
<Compile Include="EndpointName.cs" />
45+
</ItemGroup>
46+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
47+
<ItemGroup>
48+
<ProjectReference Include="..\IntegrationEngine.Model\IntegrationEngine.Model.csproj">
49+
<Project>{0B499FE4-0BDB-4080-BCB7-F8D4CE54A4FF}</Project>
50+
<Name>IntegrationEngine.Model</Name>
51+
</ProjectReference>
52+
</ItemGroup>
53+
<ItemGroup>
54+
<None Include="packages.config" />
55+
<None Include="package.nuspec">
56+
<SubType>Designer</SubType>
57+
</None>
58+
</ItemGroup>
59+
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
60+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
[assembly: AssemblyTitle("IntegrationEngine.Client")]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>$id$</id>
5+
<version>$version$</version>
6+
<title>InEngine.NET Client</title>
7+
<authors>$author$</authors>
8+
<owners>Ethan Hann</owners>
9+
<licenseUrl>https://github.com/ethanhann/InEngine.NET/blob/master/IntegrationEngine/LICENSE</licenseUrl>
10+
<projectUrl>https://github.com/ethanhann/InEngine.NET</projectUrl>
11+
<releaseNotes>http://inengine.net/change-log.html</releaseNotes>
12+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
13+
<description>Client of IntegrationServer, an asynchronous job scheduling server.</description>
14+
<copyright>Copyright 2015</copyright>
15+
<tags>Integration Scheduling Server RabbitMQ Elasticsearch Quartz.NET</tags>
16+
<references>
17+
<reference file="IntegrationEngine.Client.dll" />
18+
</references>
19+
<dependencies>
20+
<dependency id="IntegrationEngine.Model" version="$version$" />
21+
<dependency id="RestSharp" version="105.0.1" />
22+
</dependencies>
23+
</metadata>
24+
<files>
25+
<file src="..\IntegrationEngine.Client.net40\lib\net40\IntegrationEngine.Client.dll" target="lib\net40" />
26+
</files>
27+
</package>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="RestSharp" version="105.0.1" targetFramework="net45" />
4+
</packages>

IntegrationEngine.ConsoleHost/IntegrationEngine.ConsoleHost.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<ErrorReport>prompt</ErrorReport>
3232
<WarningLevel>4</WarningLevel>
3333
<Externalconsole>true</Externalconsole>
34-
<PlatformTarget>x86</PlatformTarget>
34+
<PlatformTarget>AnyCPU</PlatformTarget>
3535
</PropertyGroup>
3636
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
3737
<DebugSymbols>true</DebugSymbols>
@@ -59,14 +59,12 @@
5959
<Reference Include="Microsoft.Owin.Host.HttpListener">
6060
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
6161
</Reference>
62-
<Reference Include="RazorEngine, Version=3.5.0.0, Culture=neutral, PublicKeyToken=9ee697374c7e744a, processorArchitecture=MSIL">
63-
<SpecificVersion>False</SpecificVersion>
64-
<HintPath>..\packages\RazorEngine.3.5.0\lib\net45\RazorEngine.dll</HintPath>
65-
</Reference>
6662
<Reference Include="System" />
6763
<Reference Include="System.ComponentModel.DataAnnotations" />
68-
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
69-
<SpecificVersion>False</SpecificVersion>
64+
<Reference Include="RazorEngine">
65+
<HintPath>..\packages\RazorEngine.3.5.0\lib\net45\RazorEngine.dll</HintPath>
66+
</Reference>
67+
<Reference Include="System.Web.Razor">
7068
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll</HintPath>
7169
</Reference>
7270
</ItemGroup>

0 commit comments

Comments
 (0)