Esempio n. 1
0
        public User(Guid id, string name, string email, string provider, string providerKey)
        {
            RegisterEvents();

            var @event = new ExternalUserCreatedEvent(id, name, email, provider, providerKey);
            RaiseEvent(@event);
        }
Esempio n. 2
0
        void OnExternalCreated(ExternalUserCreatedEvent @event)
        {
            Id = @event.Id;
            Name = @event.Name;
            Email = @event.Email;

            var account = new Account(@event.Provider, @event.ProviderKey);
            Accounts.Add(account);
        }