perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed

This commit is contained in:
2025-05-29 21:48:08 +03:00
parent 1b0f25e854
commit bf8fbebae3
35 changed files with 116 additions and 115 deletions

View File

@@ -21,7 +21,7 @@ public class StateEnable : IStateEnable
bool previousState = _enabled;
_enabled = value;
OnEnabledChanged?.InvokeSafe(this, previousState);
OnEnabledChanged?.Invoke(this, previousState);
}
}
@@ -33,7 +33,7 @@ public class StateEnable : IStateEnable
_entity = entity;
OnAssign(entity);
OnEntityAssigned?.InvokeSafe(this);
OnEntityAssigned?.Invoke(this);
return true;
}
@@ -43,7 +43,7 @@ public class StateEnable : IStateEnable
return false;
_entity = null!;
OnUnassigned?.InvokeSafe(this);
OnUnassigned?.Invoke(this);
return true;
}
}