Bug 41044 - Executing methods imported via "using static" is not working
Summary: Executing methods imported via "using static" is not working
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger (show other bugs)
Version: 6.0.0 (C7)
Hardware: PC Mac OS
: Low enhancement
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2016-05-12 01:18 UTC by Iakiv Kramarenko
Modified: 2018-01-11 17:34 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
screenshot with evaluator dialog (82.14 KB, image/png)
2016-05-12 01:18 UTC, Iakiv Kramarenko
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 41044 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Iakiv Kramarenko 2016-05-12 01:18:00 UTC
Created attachment 15980 [details]
screenshot with evaluator dialog

When I try to evaluate expression which invokes a method from current scope, 
e.g. S("#new-todo")

(it's from NSelene library, imported via: using static NSelene.Utils;


it fails with 

S("#new-todo")	Method `S' not found in type `NSeleneExamples.TodoMVC.DraftTests'.
Comment 1 Iakiv Kramarenko 2016-05-12 01:18:30 UTC
also can be reproduced in alpha version: 6.1
Comment 2 David Karlaš 2016-05-12 04:46:24 UTC
Title says any, but comment one is saying "using static NSelene.Utils;", so it doesn't see any method or just ones from"using static NSelene.Utils;"?
Comment 3 Iakiv Kramarenko 2016-05-12 05:20:03 UTC
Sorry...

Not any...
Comment 4 Iakiv Kramarenko 2016-05-12 05:26:38 UTC
I fixed the Title.

Actually the following "direct" code would work:

NSelene.Utils.S("#new-todo")

And the following:


NSelene.Utils.S("#new-todo").SetValue("do something")

Do not...

Where SetValue - is an Extension method for Class that S returns...

So, 

methods that does not work:
- imported via using static
- extension methods

Seems like extension methods do not work because because in order to use them I should 
add a "using" statement for them.

In my case:

using NSelene

Seems like "any method" - makes sense with a condition: "any method that needs importing via using statement"