public void Map(Enum eventType, ICoreCommand command) { if (RegisterCommand(eventType, command)) { _eventDispatcher.Add(eventType, OnEventReceived); } }
public void Emit(Span span) { var ms = new MemoryStream(); _spanSerializer.SerializeTo(ms, span); _dispatcher.Add(new EventData(ms.ToArray())); }
public void Finish(object token, long timeTakenMilli, string correlationId = null, InstrumentationContext extraContext = null) { var info = (IInstrumentationInfo)token; var so = JsonConvert.SerializeObject(new TraceEvent() { CategoryName = info.CategoryName, InstanceName = info.InstanceName, CorrelationId = correlationId, Text1 = extraContext?.Text1, Text2 = extraContext?.Text2, Numeric = extraContext?.Numeric ?? 0, Decimal = extraContext?.Decimal ?? 0, TimeTakenMilli = timeTakenMilli }); _dispatcher.Add(new EventData(Encoding.UTF8.GetBytes(so))); }
public void OnViewOpened() { eventDispatcher.Add(GameEvent.PlayerDamage, OnPlayerDamage); updater.RunUpdate(Update); }
public void OnViewOpened() { eventDispatcher.Add(GameEvent.PlayerDead, OnPlayerDead); }