1

In code, you initialize the NHibernateProfiler with this call:

HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();

Is there a way to determine if a profile has been initialized or not? I was looking for something like:

HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.IsInitialized()

But to no avail (I wasn't really expecting this to work since the call is against a class, not an object).

Does such an API call exist?

kdawg
  • 2,019
  • 21
  • 31

1 Answers1

0

No, this option in not available as there is very little need for it, mainly because that you should initialize the profiler in the very beginning of your application.

Fitzchak Yitzchaki
  • 9,095
  • 12
  • 56
  • 96
  • Understood, but what if the profiler is accessed in shared code where a client never initialized the profiler? I'd like it not to be a requirement of every client that it has to initialize the profiler. In the shared code, I'd like to be able to see if the profiler was initialized before I write my custom log message to it. – kdawg Oct 01 '13 at 15:57
  • Why would you have deployed code that initializes the profiler? The profile is not recommended to run this way... If you want to run the profiler on one deployed client you can do it this way http://www.hibernatingrhinos.com/products/nhprof/Learn/Usage/ProfileAppWithConfiguration – Rippo Oct 02 '13 at 07:43