void OnUpdateDummyFlags(ref MyEventDummyFlags msg)
 {
     MyDummyPoint dummy;
     if (MyEntities.TryGetEntityById<MyDummyPoint>(msg.EntityId.ToEntityId(), out dummy))
     {
         dummy.DummyFlags = msg.Flags;
     }
     else
     {
         Alert("Update dummy flags, but no dummy found", msg.SenderEndpoint, msg.EventType);
     }
 }
        public void UpdateDummyFlags(MyDummyPoint dummyPoint)
        {
            Debug.Assert(dummyPoint.EntityId.HasValue);

            var msg = new MyEventDummyFlags();
            msg.Flags = dummyPoint.DummyFlags;
            msg.EntityId = dummyPoint.EntityId.Value.NumericValue;
        }