Skip to content

Commit 4a05080

Browse files
committed
Merge branch 'dev/interProcCom' into 'master'
2 parents 2675352 + 003c12d commit 4a05080

15 files changed

Lines changed: 44 additions & 24 deletions

File tree

InterProcessCommunication/TradingApp/AppBootEx/AppBootEx.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>AppBootEx</RootNamespace>
1111
<AssemblyName>AppBootEx</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
66
<appSettings>
7-
<add key="BaseAddress" value="http://localhost:9000/" />
7+
<add key="BaseAddress" value="http://localhost:9000/"/>
88

99
<add key="IPortfolioService_Address" value="http://localhost:9001/"/>
1010
<add key="IQuotationService_Address" value="http://localhost:9002/"/>
1111
<add key="IOrdersService_Address" value="http://localhost:9003/"/>
1212
</appSettings>
13-
</configuration>
13+
</configuration>

InterProcessCommunication/TradingApp/ConsoleHost/ConsoleHost.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<OutputType>Exe</OutputType>
99
<RootNamespace>ConsoleHost</RootNamespace>
1010
<AssemblyName>ConsoleHost</AssemblyName>
11-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>

InterProcessCommunication/TradingApp/ConsoleHost/Controllers/QuotationController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public IEnumerable<Quotation> GetByExchange(string exchange, string instrument,
1818
return quotationService.GetQuotations(exchange, instrument, from, to);
1919
}
2020

21-
public IEnumerable<Quotation> GetBySecurity(string securityCode, DateTime from, DateTime to)
21+
public IEnumerable<Quotation> GetBySecurity([FromUri] string securityCode, [FromUri] DateTime from, [FromUri] DateTime to)
2222
{
2323
return quotationService.GetQuotations(securityCode, from, to);
2424
}
2525

26-
public IEnumerable<Quotation> GetBySecurities([FromUri] string[] securities, DateTime from, DateTime to)
26+
public IEnumerable<Quotation> GetBySecurities([FromUri] string[] securities, [FromUri] DateTime from, [FromUri] DateTime to)
2727
{
2828
return quotationService.GetQuotations(securities, from, to);
2929
}

InterProcessCommunication/TradingApp/ConsoleHost/Filters/ConsoleLogFilter.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,19 @@ private static string GetRemote(HttpActionContext actionContext)
3333

3434
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
3535
{
36-
HttpStatusCode status = actionExecutedContext.Response.StatusCode;
37-
Console.WriteLine($"\t - Status: {(int)status} - {status} Reason: {actionExecutedContext.Response?.ReasonPhrase}\n");
36+
if (actionExecutedContext.Response != null)
37+
{
38+
HttpStatusCode status = actionExecutedContext.Response.StatusCode;
39+
Console.WriteLine($"\t - Status: {(int) status} - {status} Reason: {actionExecutedContext.Response?.ReasonPhrase}\n");
40+
}
41+
else if (actionExecutedContext.Exception != null)
42+
{
43+
Console.WriteLine($"\t Error: {actionExecutedContext.Exception.Message}");
44+
}
45+
else
46+
{
47+
Console.WriteLine("\t Unknown call status");
48+
}
3849
}
3950
}
4051
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
55
</startup>
66
<appSettings>
77
<add key="IPortfolioService_Address" value="http://localhost:9000/"/>
88
<add key="IQuotationService_Address" value="http://localhost:9000/"/>
99
<add key="IOrdersService_Address" value="http://localhost:9000/"/>
1010
</appSettings>
11-
</configuration>
11+
</configuration>

InterProcessCommunication/TradingApp/ConsoleUi/ConsoleUi.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
<OutputType>Exe</OutputType>
99
<RootNamespace>ConsoleUi</RootNamespace>
1010
<AssemblyName>ConsoleUi</AssemblyName>
11-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>

InterProcessCommunication/TradingApp/Infrastructure/Common/Infra.Hosts/Infra.Hosts.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Infra.Hosts</RootNamespace>
1111
<AssemblyName>Infra.Hosts</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>

InterProcessCommunication/TradingApp/Infrastructure/Proxies/Proxies.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Proxies</RootNamespace>
1111
<AssemblyName>Proxies</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>

InterProcessCommunication/TradingApp/Infrastructure/Proxies/QuotationServiceProxy.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public Quotation[] GetQuotations(string exchange, string instrument, DateTime @f
2828
}
2929
}
3030

31-
public Quotation[] GetQuotations(string securityCode, DateTime @from, DateTime to)
31+
public Quotation[] GetQuotations(string securityCode, DateTime from, DateTime to)
3232
{
3333
using (HttpClient client = HttpHelpers.CreateNewClient<IQuotationService>())
3434
{
3535
string path = HttpHelpers.GetServicePath<IQuotationService>("GetBySecurity");
36-
string uri = $"{path}?securityCode={securityCode}&from={from}&to={to}";
36+
string uri = $"{path}?securityCode={securityCode}&from={from:yyyy-MM-dd}&to={to:yyyy-MM-dd}";
3737
HttpResponseMessage response = client.GetAsync(uri).Result;
3838
if (response.IsSuccessStatusCode)
3939
{
@@ -45,7 +45,7 @@ public Quotation[] GetQuotations(string securityCode, DateTime @from, DateTime t
4545
}
4646
}
4747

48-
public Quotation[] GetQuotations(string[] securities, DateTime @from, DateTime to)
48+
public Quotation[] GetQuotations(string[] securities, DateTime from, DateTime to)
4949
{
5050
using (HttpClient client = HttpHelpers.CreateNewClient<IQuotationService>())
5151
{

0 commit comments

Comments
 (0)