• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

Lets say that I have a code:

public class Test {     private readonly IFactory _factory;     private readonly ISomeClass _someClass;      public Test(IFactory factory, ISomeClass someClass)     {         _factory = factory;         _someClass = someClass;     }      ....      public void TestMethod() {         _someClass.Do(_factory.CreateSomeObject());     } }  public class Factory {     public SomeObject CreateSomeObject() {         return new SomeObject();     } }  public class SomeClass {     public void Do(SomeObject obj){         ....     } } 

I would like to get return type of CreateSomeObject from InvocationExpressionSyntax of someClass.Do(_factory.CreateSomeObject()); Is it possible?

I have a list of arguments (ArgumentSyntax) but I have no clue how to get method return type from ArgumentSyntax. Is there better and easier way to do it other then scanning a solution for Factory class and analyzing CreateSomeObject method?

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]