Browse Source

Fix the broken samples

pull/1162/head
Pratik Sanglikar 5 years ago
parent
commit
b12ee4b057
  1. 3
      NuGet.config
  2. 24186
      samples/apps-with-core-angular/MoviesApp/package-lock.json
  3. 4
      samples/apps-with-core-angular/MoviesApp/package.json
  4. 6
      samples/dapr/service-invocation/SentenceApp/SentenceApp.csproj
  5. 7
      samples/dapr/service-invocation/SentenceApp/Services/LowercaseServiceClient.cs
  6. 7
      samples/dapr/service-invocation/SentenceApp/Services/TitlecaseServiceClient.cs
  7. 11
      samples/dapr/service-invocation/SentenceApp/Services/UppercaseServiceClient.cs

3
NuGet.config

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<disabledPackageSources />
</configuration>

24186
samples/apps-with-core-angular/MoviesApp/package-lock.json

File diff suppressed because it is too large

4
samples/apps-with-core-angular/MoviesApp/package.json

@ -32,13 +32,13 @@
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"karma-jasmine-html-reporter": "^1.6.0",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",

6
samples/dapr/service-invocation/SentenceApp/SentenceApp.csproj

@ -5,9 +5,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.0.0" />
<PackageReference Include="Dapr.Client" Version="1.0.0" />
<PackageReference Include="Microsoft.Tye.Extensions.Configuration" Version="0.5.0-alpha.20555.1" />
<PackageReference Include="Dapr.AspNetCore" Version="1.3.0" />
<PackageReference Include="Dapr.Client" Version="1.3.0" />
<PackageReference Include="Microsoft.Tye.Extensions.Configuration" Version="0.9.0-alpha.21380.1" />
</ItemGroup>
<ItemGroup>

7
samples/dapr/service-invocation/SentenceApp/Services/LowercaseServiceClient.cs

@ -1,5 +1,6 @@
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Dapr.Client;
using Shared;
@ -26,9 +27,9 @@ namespace SentenceApp.Services
public async Task<ConvertedResult> Convert(string sentence)
{
// Using Dapr sidecar and service invocation building block
return await _daprClient.InvokeMethodAsync<object, ConvertedResult>("lowercaseservice", "lowercase", new object(),
HttpInvocationOptions.UsingGet()
.WithQueryParam("sentence", sentence));
var req = _daprClient.CreateInvokeMethodRequest("lowercaseservice", $"lowercase?sentence={sentence}");
req.Method = HttpMethod.Get;
return await _daprClient.InvokeMethodAsync<ConvertedResult>(req);
// If you're using Tye alone (without dapr)
//var responseMessage = await _client.GetAsync($"/lowercase?sentence={sentence}");

7
samples/dapr/service-invocation/SentenceApp/Services/TitlecaseServiceClient.cs

@ -1,5 +1,6 @@
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Dapr.Client;
using Shared;
@ -26,9 +27,9 @@ namespace SentenceApp.Services
public async Task<ConvertedResult> Convert(string sentence)
{
// Using Dapr sidecar and service invocation building block
return await _daprClient.InvokeMethodAsync<object, ConvertedResult>("titlecaseservice", "titlecase", new object(),
HttpInvocationOptions.UsingGet()
.WithQueryParam("sentence", sentence));
var req = _daprClient.CreateInvokeMethodRequest("titlecaseservice", $"titlecase?sentence={sentence}");
req.Method = HttpMethod.Get;
return await _daprClient.InvokeMethodAsync<ConvertedResult>(req);
// If you're using Tye alone (without dapr)
//var responseMessage = await _client.GetAsync($"/titlecase?sentence={sentence}");

11
samples/dapr/service-invocation/SentenceApp/Services/UppercaseServiceClient.cs

@ -1,6 +1,9 @@
using System.Net.Http;
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using Dapr.Client;
using Shared;
@ -26,9 +29,9 @@ namespace SentenceApp.Services
public async Task<ConvertedResult> Convert(string sentence)
{
// Using Dapr sidecar and service invocation building block
return await _daprClient.InvokeMethodAsync<object, ConvertedResult>("uppercaseservice", "uppercase", new object(),
HttpInvocationOptions.UsingGet()
.WithQueryParam("sentence", sentence));
var req = _daprClient.CreateInvokeMethodRequest("uppercaseservice", $"uppercase?sentence={sentence}");
req.Method = HttpMethod.Get;
return await _daprClient.InvokeMethodAsync<ConvertedResult>(req);
// If you're using Tye alone (without dapr)
//var responseMessage = await _client.GetAsync($"/uppercase?sentence={sentence}");

Loading…
Cancel
Save