Here are the examples of the csharp api System.Collections.Generic.IDictionary.ContainsKey(OutgoingPacketType) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : GameProtocol_v772.cs
with MIT License
from jlnunez89
with MIT License
from jlnunez89
public void RegisterPacketWriter(OutgoingPacketType forType, IPacketWriter packetWriter)
{
packetWriter.ThrowIfNull(nameof(packetWriter));
if (this.packetWritersMap.ContainsKey(forType))
{
throw new InvalidOperationException($"There is already a writer registered for the packet type: {forType}.");
}
this.logger.Verbose($"Registered packet writer for type {forType}.");
this.packetWritersMap[forType] = packetWriter;
}