public static TimerProfile Acquire( string name ) { if ( !Core.Profiling ) { return null; } TimerProfile prof; if ( !_profiles.TryGetValue( name, out prof ) ) { _profiles.Add( name, prof = new TimerProfile( name ) ); } return prof; }
public static TimerProfile Acquire(string name) { if (!Core.Profiling) { return(null); } if (!_profiles.TryGetValue(name, out var prof)) { _profiles.Add(name, prof = new TimerProfile(name)); } return(prof); }
public static TimerProfile Acquire(string name) { var appSettings = IOC.IoC.Resolve <IUOSettings>(); if (!appSettings.Profiling) { return(null); } TimerProfile prof; if (!_profiles.TryGetValue(name, out prof)) { _profiles.Add(name, prof = new TimerProfile(name)); } return(prof); }