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