Comments (10)
Thank you for try to use.
Hmn, could you show target class?
from magiconion.
sure below that
IMyFirstService.cs
using MagicOnion;
namespace FooSample
{
public interface IMyFirstService : IService
{
UnaryResult SumAsync(int x, int y);
}
}
additionally my project folder
from magiconion.
thanks, I've find if exists invalid class, can not generate.
I'll fix it but quick solution, separete service definition
https://github.com/neuecc/MagicOnion#project-structure and pass ServiceDefinition.csproj
.
from magiconion.
thanks. i will try service project seperate.
from magiconion.
additionally i tried generate separate definition project and add method.
then same issue
D:\library\Unity\MagicOnion\src\MagicOnion.CodeGenerator\bin\Debug\moc.exe --input=ServiceDefin
tion\ServiceDefintion.csproj --output=GRPC-Client\Assets\Scripts\MagicOnionGenerated.cs
Project Compilation Start:ServiceDefintion\ServiceDefintion.csproj
Project Compilation Complete:00:00:06.3494738
Method Collect Start
처리되지 않은 예외: System.Exception: Invalid Return Type, method:SumLegacyTaskA
sync returnType:System.Threading.Tasks.Task<MagicOnion.UnaryResult>
위치: MagicOnion.CodeAnalysis.MethodCollector.ExtractRequestResponseType(IMet
hodSymbol method, MethodType& methodType, String& requestType, String& responseT
ype, ITypeSymbol& unwrappedOriginalResponseType) 파일 D:\library\Unity\MagicOnio
n\src\MagicOnion.CodeGenerator\CodeAnalysis\MethodCollector.cs:줄 187
위치: MagicOnion.CodeAnalysis.MethodCollector.CreateMethodDefinition(IMethodS
ymbol y) 파일 D:\library\Unity\MagicOnion\src\MagicOnion.CodeGenerator\CodeAnaly
sis\MethodCollector.cs:줄 123
위치: System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() 위치: System.Linq.Buffer
1..ctor(IEnumerable1 source) 위치: System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source)
위치: MagicOnion.CodeAnalysis.MethodCollector.b__8_0(INamedTypeSymbol
x) 파일 D:\library\Unity\MagicOnion\src\MagicOnion.CodeGenerator\CodeAnalysis\Me
thodCollector.cs:줄 73
위치: System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() 위치: System.Linq.Enumerable.<ConcatIterator>d__58
1.MoveNext()
위치: System.Linq.Buffer1..ctor(IEnumerable
1 source)
위치: System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
위치: MagicOnion.CodeAnalysis.MethodCollector.Visit() 파일 D:\library\Unity\M
agicOnion\src\MagicOnion.CodeGenerator\CodeAnalysis\MethodCollector.cs:줄 72
위치: MagicOnion.CodeGenerator.Program.Main(String[] args) 파일 D:\library\Un
ity\MagicOnion\src\MagicOnion.CodeGenerator\Program.cs:줄 93
IMyFirstService.cs
using MagicOnion;
using System.Threading.Tasks;
namespace FooSample
{
public interface IMyFirstService : IService
{
UnaryResult SumAsync(int x, int y);
Task<UnaryResult> SumLegacyTaskAsync(int x, int y);
Task<ClientStreamingResult<int, string>> ClientStreamingSampleAsync();
Task<ServerStreamingResult> ServerStreamingSampleAsync(int x, int y, int z);
Task<DuplexStreamingResult<int, string>> DuplexStreamingSampleAsync();
}
}
from magiconion.
additionally more information to below
can not initialize ReferenceSymbols.cs INamedTypeSymbols
- Task
- TaskOfT
- GenerateDefineIf
from magiconion.
Is your project type new csproj?
from magiconion.
Yes seperated new project.
Can i append project to solution?
from magiconion.
Sorry, new means VS2017's new csproj structure.
from magiconion.
Yes. that is VS2017's new csproj structure
from magiconion.
Related Issues (20)
- Question: Possible to use Task and ValueTask instead of UnaryResult and such? HOT 1
- Question: ObjectDisposedException on proxy side
- Question: Is a MagicOnion server possible from within Unity?
- can support Webgl http2 and net8?
- I can't have multiple implementations!
- .NET 8 Support
- Client filter is not triggered for ServerStreamingResult method in services. HOT 1
- Performance is very slow, taking 355ms for the Add function to return the result HOT 2
- How can I disconnect a client by server?
- InternalsVisibleTo lead to warnings on dependent project HOT 1
- Implement Protobuf Endpoint
- ServerReflection does not work
- Cannot work after changing to MemoryPack HOT 2
- Console app probem: PlatformNotSupportedException HOT 1
- support webgl? HOT 2
- error CS0305: Using the generic type 'MemoryPackWriter<TBufferWriter>' requires 1 type arguments HOT 3
- Memory leak when reusing GrpcChannel on many clients HOT 1
- Can't lunch Swagger if I use Vector2 for the communication
- The type or namespace name 'MessagePack' does not exist in the namespace 'MagicOnion.Serialization' HOT 2
- Question: Is there a way to force the server to disconnect the client's connection when using the streaminghub?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magiconion.