public static RawMessage BuildMessage(short id, BigEndianReader reader) { if (!Messages.ContainsKey(id)) { return(null); } RawMessage message = Constructors[id](); if (message == null) { return(null); } message.Deserialize(reader); return(message); }