perf: DelegateExtensions.InvokeSafe marked obsolete for memory allocation reasons, soon to be removed
This commit is contained in:
@@ -33,7 +33,7 @@ public abstract class BaseEntity : IEntity
|
||||
string previousId = _id;
|
||||
|
||||
_id = value;
|
||||
OnIdChanged?.InvokeSafe(this, previousId);
|
||||
OnIdChanged?.Invoke(this, previousId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ public abstract class BaseEntity : IEntity
|
||||
|
||||
_initialized = value;
|
||||
if (value)
|
||||
OnInitialized?.InvokeSafe(this);
|
||||
OnInitialized?.Invoke(this);
|
||||
else
|
||||
OnFinalized?.InvokeSafe(this);
|
||||
OnFinalized?.Invoke(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public abstract class BaseEntity : IEntity
|
||||
_stateEnable = stateEnable;
|
||||
_stateEnable.Assign(this);
|
||||
OnAssign(stateEnable);
|
||||
OnStateEnableAssigned?.InvokeSafe(this);
|
||||
OnStateEnableAssigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class BaseEntity : IEntity
|
||||
|
||||
_stateEnable = null!;
|
||||
_stateEnable.Unassign();
|
||||
OnUnassigned?.InvokeSafe(this);
|
||||
OnUnassigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user