Re:Stack Overflow open sources their ASP.net MVC mini profiler
by nick_craver on Thursday June 09, 2011 @08:21AM
(#2636840)
In the case of an extension method, it's actually just syntactic sugar the compiler provides. An extension method is actually a static method underneath, this allows null checking to be centralized, and cleaner everywhere a step is used. The method looks like this: "public static IDisposable Step(this MiniProfiler profiler, string name, ProfileLevel level = ProfileLevel.Info) { return profiler == null ? null : profiler.StepImpl(name, level); }"
[ Parent
| on HN ]
There are no comments on this comment yet.