Inheritance: BasePacketProfile
Example #1
0
        public static PacketReceiveProfile Acquire(int packetId)
        {
            if (!_profiles.TryGetValue(packetId, out PacketReceiveProfile prof))
            {
                _profiles.Add(packetId, prof = new PacketReceiveProfile(packetId));
            }

            return(prof);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
		public static PacketReceiveProfile Acquire( int packetId ) {
			PacketReceiveProfile prof;

			if ( !_profiles.TryGetValue( packetId, out prof ) ) {
				_profiles.Add( packetId, prof = new PacketReceiveProfile( packetId ) );
			}

			return prof;
		}