Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuki committed Dec 21, 2022
1 parent cde862f commit c26d243
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions samples/ChatApp/ChatApp.Server/ChatService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ public ChatService(ILogger<ChatService> logger)
_logger = logger;
}

public UnaryResult<Nil> GenerateException(string message)
public UnaryResult GenerateException(string message)
{
throw new System.NotImplementedException();
}

public UnaryResult<Nil> SendReportAsync(string message)
public UnaryResult SendReportAsync(string message)
{
_logger.LogDebug($"{message}");

return UnaryResult(Nil.Default);
return UnaryResult.CompletedResult;
}
}
}
6 changes: 3 additions & 3 deletions samples/ChatApp/ChatApp.Shared/Services/IChatService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MagicOnion;
using MagicOnion;
using MessagePack;

namespace ChatApp.Shared.Services
Expand All @@ -8,7 +8,7 @@ namespace ChatApp.Shared.Services
/// </summary>
public interface IChatService : IService<IChatService>
{
UnaryResult<Nil> GenerateException(string message);
UnaryResult<Nil> SendReportAsync(string message);
UnaryResult GenerateException(string message);
UnaryResult SendReportAsync(string message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ private ChatServiceClient(MagicOnionClientOptions options, ClientCore core) : ba
protected override global::MagicOnion.Client.MagicOnionClientBase<IChatService> Clone(global::MagicOnion.Client.MagicOnionClientOptions options)
=> new ChatServiceClient(options, core);

public global::MagicOnion.UnaryResult<global::MessagePack.Nil> GenerateException(global::System.String message)
=> this.core.GenerateException.InvokeUnary(this, "IChatService/GenerateException", message);
public global::MagicOnion.UnaryResult<global::MessagePack.Nil> SendReportAsync(global::System.String message)
=> this.core.SendReportAsync.InvokeUnary(this, "IChatService/SendReportAsync", message);
public global::MagicOnion.UnaryResult GenerateException(global::System.String message)
=> this.core.GenerateException.InvokeUnaryNonGeneric(this, "IChatService/GenerateException", message);
public global::MagicOnion.UnaryResult SendReportAsync(global::System.String message)
=> this.core.SendReportAsync.InvokeUnaryNonGeneric(this, "IChatService/SendReportAsync", message);
}
}

Expand Down
2 changes: 1 addition & 1 deletion sandbox/Sandbox.AspNetCore/Services/GreeterService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class GreeterService : ServiceBase<IGreeterService>, IGreeterService
{
public UnaryResult<string> HelloAsync()
{
return UnaryResult("Konnichiwa from MagicOnion + ASP.NET Core");
return UnaryResult.FromResult("Konnichiwa from MagicOnion + ASP.NET Core");
}
}
}

0 comments on commit c26d243

Please sign in to comment.