コード例 #1
0
 private void OnPostCreated(Post post)
 {
     // Check if there is any subscriber, then invoke
     PostCreated?.Invoke(this, new PostEventArgs(post));
 }
コード例 #2
0
 public void CreatePost(Post post)
 {
     _posts.Add(post);
     PostCreated?.Invoke(post);
 }