public static PacketReceiveProfile Acquire(int packetId) { if (!BaseProfile.Profiling) { return(null); } PacketReceiveProfile prof; if (!mProfiles.TryGetValue(packetId, out prof)) { mProfiles.Add(packetId, prof = new PacketReceiveProfile(packetId)); } return(prof); }
public static PacketReceiveProfile Acquire( int packetId ) { if( !BaseProfile.Profiling ) { return null; } PacketReceiveProfile prof; if( !mProfiles.TryGetValue( packetId, out prof ) ) { mProfiles.Add( packetId, prof = new PacketReceiveProfile( packetId ) ); } return prof; }