private void OnPostCreated(Post post) { // Check if there is any subscriber, then invoke PostCreated?.Invoke(this, new PostEventArgs(post)); }
public void CreatePost(Post post) { _posts.Add(post); PostCreated?.Invoke(post); }
private void OnPostCreated(Post post) { // Check if there is any subscriber, then invoke PostCreated?.Invoke(this, new PostEventArgs(post)); }
public void CreatePost(Post post) { _posts.Add(post); PostCreated?.Invoke(post); }