public static AuctionEvent From(string message) { if (!message.Contains(":") || !message.Contains(";")) { return(new AuctionEvent(AuctionEventType.Unknown, new Dictionary <string, string>())); } Dictionary <string, string> fields = GetFields(message); AuctionEventType eventType = GetEventType(fields); return(new AuctionEvent(eventType, fields)); }
private AuctionEvent(AuctionEventType type, Dictionary <string, string> fields) { Type = type; _fields = fields; }