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

            return(prof);
        }
Exemple #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);
        }
Exemple #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);
        }
		public static PacketReceiveProfile Acquire( int packetId ) {
			PacketReceiveProfile prof;

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

			return prof;
		}