Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Orleans Chipter sample to net8.0 #6745

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions orleans/Chirper/Chirper.Client/Chirper.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -16,12 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Client" Version="7.0.0" />
<PackageReference Include="Spectre.Console" Version="0.43.0" />
<PackageReference Include="Spectre.Console.ImageSharp" Version="0.43.0" />
<PackageReference Include="Spectre.Console" Version="0.48.0" />
<PackageReference Include="Spectre.Console.ImageSharp" Version="0.48.0" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 8 additions & 8 deletions orleans/Chirper/Chirper.Client/ShellHostedService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using System.Text.RegularExpressions;
using Chirper.Grains;
Expand Down Expand Up @@ -75,7 +75,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
var following = await _account.GetFollowingListAsync();
AnsiConsole.Write(new Rule($"{_account.GetPrimaryKeyString()}'s followed accounts")
{
Alignment = Justify.Center,
Justification = Justify.Center,
Style = Style.Parse("blue")
});

Expand All @@ -86,7 +86,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)

AnsiConsole.Write(new Rule
{
Alignment = Justify.Center,
Justification = Justify.Center,
Style = Style.Parse("blue")
});
}
Expand All @@ -98,7 +98,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
var followers = await _account.GetFollowersListAsync();
AnsiConsole.Write(new Rule($"{_account.GetPrimaryKeyString()}'s followers")
{
Alignment = Justify.Center,
Justification = Justify.Center,
Style = Style.Parse("blue")
});

Expand All @@ -109,7 +109,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)

AnsiConsole.Write(new Rule
{
Alignment = Justify.Center,
Justification = Justify.Center,
Style = Style.Parse("blue")
});
}
Expand Down Expand Up @@ -265,13 +265,13 @@ private static void ShowHelp(bool title = false)

[GeneratedRegex("/user (?<username>\\w{1,100})")]
private static partial Regex SetUsernameRegex();

[GeneratedRegex("/chirp (?<message>.+)")]
private static partial Regex ChirpMessageRegex();

[GeneratedRegex("/unfollow (?<username>\\w{1,100})")]
private static partial Regex UnfollowUsernameRegex();

[GeneratedRegex("/follow (?<username>\\w{1,100})")]
private static partial Regex FollowUsernameRegex();
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.0.0" />
</ItemGroup>

</Project>
5 changes: 2 additions & 3 deletions orleans/Chirper/Chirper.Grains/Chirper.Grains.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions orleans/Chirper/Chirper.Server/Chirper.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.0.0" />
<PackageReference Include="OrleansDashboard" Version="7.0.0" />
<PackageReference Include="Microsoft.Orleans.Server" Version="8.0.0" />
<PackageReference Include="OrleansDashboard" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Chirper.Grains\Chirper.Grains.csproj" />
<ProjectReference Include="..\Chirper.Grains\Chirper.Grains.csproj">
<TreatAsUsed>true</TreatAsUsed>
</ProjectReference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion orleans/Chirper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ There is also an `IChirperViewer` observer interface for applications to subscri

## Sample prerequisites

This sample is written in C# and targets .NET 7.0. It requires the [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) or later.
This sample is written in C# and targets .NET 8.0. It requires the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) or later.

## Building the sample

Expand Down
Loading