Exemple #1
0
 public RequestedLink(Guid processId, OpenedLibrary requestingLibrary, OpenedLibrary targetLibrary)
 {
     ProcessId = processId;
     RequestingLibraryId = requestingLibrary.Id;
     RequestingLibraryName = requestingLibrary.Name;
     RequestingAdministratorId = requestingLibrary.AdministratorId;
     RequestingAdministratorPicture = requestingLibrary.AdministratorPicture;
     TargetLibraryId = targetLibrary.Id;
     TargetLibraryName = targetLibrary.Name;
     TargetAdministratorId = targetLibrary.AdministratorId;
     TargetAdministratorPicture = targetLibrary.AdministratorPicture;
 }
Exemple #2
0
 public LibraryLink(Guid processId, OpenedLibrary requestingLibrary, OpenedLibrary acceptingLibrary)
 {
     ProcessId = processId;
     RequestingLibraryId = requestingLibrary.Id;
     RequestingLibraryName = requestingLibrary.Name;
     RequestingAdministratorId = requestingLibrary.AdministratorId;
     RequestingAdministratorPicture = requestingLibrary.AdministratorPicture;
     AcceptingLibraryId = acceptingLibrary.Id;
     AcceptingLibraryName = acceptingLibrary.Name;
     AcceptingAdministratorId = acceptingLibrary.AdministratorId;
     AcceptingAdministratorPicture = acceptingLibrary.AdministratorPicture;
 }
Exemple #3
0
 public LibraryBook(Guid processId, OpenedLibrary library, string title, string author, string isbn, int publishYear)
 {
     ProcessId = processId;
     LibraryId = library.Id;
     LibraryName = library.Name;
     LibraryAdminId = library.AdministratorId;
     AdministratorPicture = library.AdministratorPicture;
     Title = title;
     Author = author;
     Isbn = isbn;
     PublishYear = publishYear;
 }
        public override void When(Domain.OpenLibrary.LibraryOpened @event)
        {
            AuthenticatedUser user            = Session.Get <AuthenticatedUser>(@event.AdministratorId);
            OpenedLibrary     existingLibrary = Session.Get <OpenedLibrary>(@event.AggregateId);

            if (existingLibrary != null)
            {
                return;
            }

            OpenedLibrary openedLibrary = new OpenedLibrary(@event.AggregateId, @event.Name, user.Id, user.Picture);

            Session.Save(openedLibrary);
        }