public CosmosDiagnosticsContextCore( string operationName, string userAgentString) { this.UserAgent = userAgentString ?? throw new ArgumentNullException(nameof(userAgentString)); this.OperationName = operationName ?? throw new ArgumentNullException(nameof(operationName)); this.StartUtc = DateTime.UtcNow; this.ContextList = new BoundedList <CosmosDiagnosticsInternal>(Capacity); this.Diagnostics = new CosmosDiagnosticsCore(this); this.overallScope = new CosmosDiagnosticScope("Overall"); }
public TrafficHandler(ITrafficHandler eventHandler) { this.eventHandler = eventHandler; reliableMonitor = new ReliableMonitor(this); packetReceivedCallbacks = new Dictionary <Packet.Reliability, Action <Packet> >(); packetReceivedCallbacks[Packet.Reliability.None] = packet => { }; packetReceivedCallbacks[Packet.Reliability.Ack] = OnAckReceived; packetReceivedCallbacks[Packet.Reliability.Reliable] = OnReliableReceived; packetReceivedCallbacks[Packet.Reliability.Unreliable] = OnUnreliableReceived; latestReceived = new BoundedList <Packet>(1024 * 8); pendingOut = new BlockingQueue <Packet>(); }
/* Private Methods * ==========================================================================*/ private void initDice() { Dice = new BoundedList<GameObject>(MAX_DICE); foreach(GameObject die in initialDice) Dice.Add(die); }
public BoundedListEnumerator(BoundedList <K> list) { this.list = list; }