Giter VIP home page Giter VIP logo

Comments (10)

neuecc avatar neuecc commented on May 14, 2024

Thank you for try to use.
Hmn, could you show target class?

from magiconion.

zzragida avatar zzragida commented on May 14, 2024

sure below that

IMyFirstService.cs

using MagicOnion;

namespace FooSample
{
public interface IMyFirstService : IService
{
UnaryResult SumAsync(int x, int y);
}
}

additionally my project folder
image

from magiconion.

neuecc avatar neuecc commented on May 14, 2024

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.

zzragida avatar zzragida commented on May 14, 2024

thanks. i will try service project seperate.

from magiconion.

zzragida avatar zzragida commented on May 14, 2024

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.Buffer1..ctor(IEnumerable1 source) 위치: System.Linq.Enumerable.ToArray[TSource](IEnumerable1 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__581.MoveNext()
위치: System.Linq.Buffer1..ctor(IEnumerable1 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.

zzragida avatar zzragida commented on May 14, 2024

additionally more information to below
can not initialize ReferenceSymbols.cs INamedTypeSymbols

  • Task
  • TaskOfT
  • GenerateDefineIf

image

from magiconion.

neuecc avatar neuecc commented on May 14, 2024

Is your project type new csproj?

from magiconion.

zzragida avatar zzragida commented on May 14, 2024

Yes seperated new project.
Can i append project to solution?

from magiconion.

neuecc avatar neuecc commented on May 14, 2024

Sorry, new means VS2017's new csproj structure.

from magiconion.

zzragida avatar zzragida commented on May 14, 2024

Yes. that is VS2017's new csproj structure

from magiconion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.