17 lines
428 B
C#
17 lines
428 B
C#
using CommunityToolkit.Mvvm.Messaging;
|
|
using salesbook.Shared.Core.Dto;
|
|
|
|
namespace salesbook.Shared.Core.Messages.Contact;
|
|
|
|
public class NewContactService
|
|
{
|
|
public event Action<CRMCreateContactResponseDTO>? OnContactCreated;
|
|
|
|
public NewContactService(IMessenger messenger)
|
|
{
|
|
messenger.Register<NewContactMessage>(this, (_, o) =>
|
|
{
|
|
OnContactCreated?.Invoke(o.Value);
|
|
});
|
|
}
|
|
} |