question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get the name of calling class

See original GitHub issue

How do I get the name / type of the class that’s trying to resolve a dependency, let’s say via ctor injection? I tried to resolve IInjectionContext and StaticInjectionContext in ExportFactory but neither of the objects contained any useful information.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:29 (28 by maintainers)

github_iconTop GitHub Comments

1reaction
ipjohnsoncommented, Aug 4, 2020

The latest code line is released as a beta on nuget. I’ll probably look to do a non beta release in the next week or two.

1reaction
ipjohnsoncommented, Jul 26, 2020

Hi Gabriel,

I didn’t want to change the behavior of the default singleton so I added the functionality to something called deferred singleton. Check out this test.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get Class name that is calling my method? [duplicate]
2 Answers 2 ... You could grab it from StackTrace instance. ... GetFrame(1) returns LoggerManager . GetFrame(2) returns Foo . @kabul want to...
Read more >
C# How To: Get Calling Class Name & Method Name Using ...
NET applications I'm designing, we had to identify the name of the calling method as well as the class in which the calling...
Read more >
get_called_class - Manual
Gets the name of the class the static method is called in. Parameters ¶. This function has no parameters. Return Values ¶. Returns...
Read more >
selenium webdriver - Get class name of the calling class
You can just use ..getDeclaringClass(). · You can accept it by clicking on the check mark near the answer. – Mohamed Sulaimaan Sheriff...
Read more >
Getting a caller's class name in Java with Thread. ...
Getting a caller's class name in Java with Thread.currentThread().getStackTrace() - App.java.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found