/// <summary>Add a new sample of outgoing traffic for the current time.</summary> /// <param name="bytes">the number of bytes of traffic.</param> /// <param name="type">the type of traffic.</param> public void PutOutgoingTraffic(int bytes, TrafficTypes type) { UpdateLists(); switch (type) { case TrafficTypes.Protocol: _outTraffic.First.Value[type] += bytes; break; case TrafficTypes.Data: _outTraffic.First.Value[type] += bytes; break; case TrafficTypes.Any: throw new ArgumentException("Must be a specific type when adding."); } _outTraffic.First.Value[TrafficTypes.Any] += bytes; }
public void AddToTrafficTypes(TrafficTypes trafficTypes) { base.AddObject("TrafficTypes", trafficTypes); }
public static TrafficTypes CreateTrafficTypes(int trafficType, string text) { TrafficTypes trafficTypes = new TrafficTypes(); trafficTypes.TrafficType = trafficType; trafficTypes.Text = text; return trafficTypes; }
public void SetType(int element) { TrafficType = (TrafficTypes) element; }