public MangosNetworkLog(NetworkLogMode mode) : base(mode) { if (mode == NetworkLogMode.Writing) { throw new NotSupportedException(); } }
/// <summary> /// Initializes a new instance of <see cref="Kamilla.Network.Logging.NetworkLog"/> class /// in the specified <see cref="Kamilla.Network.Logging.NetworkLogMode"/>. /// </summary> /// <param name="mode"> /// The <see cref="Kamilla.Network.Logging.NetworkLogMode"/> in which /// to open the <see cref="Kamilla.Network.Logging.NetworkLog"/>. /// </param> /// <exception cref="System.ArgumentException"> /// mode is invalid. /// </exception> public NetworkLog(NetworkLogMode mode) { switch (mode) { case NetworkLogMode.Abstract: case NetworkLogMode.Reading: m_packets = new List<Packet>(); break; case NetworkLogMode.Writing: if (this is IHasStartTicks) ((IHasStartTicks)this).StartTicks = (uint)Environment.TickCount; if (this is IHasStartTime) ((IHasStartTime)this).StartTime = DateTime.Now; break; default: throw new ArgumentException("mode"); } }
public NetworkLog Activate(NetworkLogMode mode) { if (IsReadOnly) { if (mode == NetworkLogMode.Writing) throw new NotSupportedException("This dump reading class does not support writing data."); mode = NetworkLogMode.Abstract; } try { return (NetworkLog)Activator.CreateInstance(m_type, mode); } catch (Exception e) { Console.WriteLine("Error: [NetworkLogWrapper] Failed to activate a new instance of {0} with mode {1}: {2}", m_type, mode, e); return null; } }
public NetworkLog Activate(NetworkLogMode mode) { if (IsReadOnly) { if (mode == NetworkLogMode.Writing) { throw new NotSupportedException("This dump reading class does not support writing data."); } mode = NetworkLogMode.Abstract; } try { return((NetworkLog)Activator.CreateInstance(m_type, mode)); } catch (Exception e) { Console.WriteLine("Error: [NetworkLogWrapper] Failed to activate a new instance of {0} with mode {1}: {2}", m_type, mode, e); return(null); } }
/// <summary> /// Initializes a new instance of <see cref="Kamilla.Network.Logging.NetworkLog"/> class /// in the specified <see cref="Kamilla.Network.Logging.NetworkLogMode"/>. /// </summary> /// <param name="mode"> /// The <see cref="Kamilla.Network.Logging.NetworkLogMode"/> in which /// to open the <see cref="Kamilla.Network.Logging.NetworkLog"/>. /// </param> /// <exception cref="System.ArgumentException"> /// mode is invalid. /// </exception> public NetworkLog(NetworkLogMode mode) { switch (mode) { case NetworkLogMode.Abstract: case NetworkLogMode.Reading: m_packets = new List <Packet>(); break; case NetworkLogMode.Writing: if (this is IHasStartTicks) { ((IHasStartTicks)this).StartTicks = (uint)Environment.TickCount; } if (this is IHasStartTime) { ((IHasStartTime)this).StartTime = DateTime.Now; } break; default: throw new ArgumentException("mode"); } }
public WowNetworkLog(NetworkLogMode mode) : base(mode) { }
public Pkt31NetworkLog(NetworkLogMode mode) : base(mode) { }
public TrinityNetworkLog(NetworkLogMode mode) : base(mode) { if (mode == NetworkLogMode.Writing) throw new NotSupportedException(); }
public Krpd2NetworkLog(NetworkLogMode mode) : base(mode) { }
public KrpdNetworkLog(NetworkLogMode mode) : base(mode) { }