internal void OnAddComponent(AddComponentOp op) { if (!componentSpecificDispatchers.TryGetValue(op.Data.ComponentId, out var specificDispatcher)) { throw new UnknownComponentIdException( string.Format(Errors.UnknownComponentIdError, op.GetType(), op.Data.ComponentId)); } specificDispatcher.OnAddComponent(op); }
private void OnAddComponent(AddComponentOp op) { if (!componentSpecificDispatchers.TryGetValue(op.Data.ComponentId, out var specificDispatcher)) { worker.LogDispatcher.HandleLog(LogType.Error, new LogEvent(UnknownComponentIdError).WithField("Op Type", op.GetType()) .WithField("ComponentId", op.Data.ComponentId)); return; } specificDispatcher.OnAddComponent(op); }