Example #1
0
 public static void MapBookingEvents()
 {
     TypeMap.AddType <RoomBooked>("RoomBooked");
     TypeMap.AddType <BookingPaymentRegistered>("BookingPaymentRegistered");
     TypeMap.AddType <BookingCancelled>("BookingCancelled");
     TypeMap.AddType <BookingImported>("BookingImported");
 }
Example #2
0
 public static void Register()
 {
     TypeMap.AddType <ArticlePublished>("ArticlePublished");
     TypeMap.AddType <BodyUpdated>("BodyUpdated");
     TypeMap.AddType <TitleUpdated>("TitleUpdated");
     TypeMap.AddType <DescriptionUpdated>("DescriptionUpdated");
     TypeMap.AddType <ArticleDeleted>("ArticleDeleted");
     TypeMap.AddType <ArticleFavorited>("ArticleFavorited");
     TypeMap.AddType <ArticleUnfavorited>("ArticleUnfavorited");
 }
Example #3
0
 public static void Register()
 {
     TypeMap.AddType <UserRegistered>(nameof(UserRegistered));
     TypeMap.AddType <UsernameUpdated>(nameof(UsernameUpdated));
     TypeMap.AddType <PasswordUpdated>(nameof(PasswordUpdated));
     TypeMap.AddType <BioUpdated>(nameof(BioUpdated));
     TypeMap.AddType <ImageUpdated>(nameof(ImageUpdated));
     TypeMap.AddType <EmailUpdated>(nameof(EmailUpdated));
     TypeMap.AddType <AccountFollowed>(nameof(AccountFollowed));
     TypeMap.AddType <AccountUnfollowed>(nameof(AccountUnfollowed));
 }
Example #4
0
        public SubscriptionWorkerTests()
        {
            Logger.Initialise(NullLogger.Instance);

            this.domainEventHandlerResolver = new();

            this.AllSubscriptions = (TestData.GetPersistentSubscriptions_DemoEstate());

            this.getAllSubscriptions    = async _ => this.AllSubscriptions;
            this.SubscriptionRepository = Shared.EventStore.SubscriptionWorker.SubscriptionRepository.Create(this.getAllSubscriptions);

            TypeMap.AddType <EstateCreatedEvent>("EstateCreatedEvent");

            this.EventStoreConnectionString = "esdb://*****:*****@127.0.0.1:2113?tls=false&tlsVerifyCert=false";
        }
Example #5
0
        /// <summary>
        /// Loads the domain events type dynamically.
        /// </summary>
        /// <param name="assemblyFilters">The assembly filters.</param>
        public static void LoadDomainEventsTypeDynamically(List <String> assemblyFilters = null)
        {
            Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();

            if (assemblyFilters == null)
            {
                assemblyFilters = TypeProvider.DefaultAssemblyFilters;
            }

            IEnumerable <Type> allTypes = null;

            foreach (String filter in assemblyFilters)
            {
                allTypes = assemblies.Where(a => a.FullName.Contains(filter) == false).SelectMany(a => a.GetTypes());
            }

            List <Type> filteredTypes = allTypes.Where(t => t.IsSubclassOf(typeof(DomainEvent))).OrderBy(e => e.Name)
                                        .ToList();

            foreach (Type type in filteredTypes)
            {
                TypeMap.AddType(type, type.Name);
            }
        }
Example #6
0
 public static void Register()
 {
     TypeMap.AddType <CourseSelected>(nameof(CourseSelected));
     TypeMap.AddType <GolferSelected>(nameof(GolferSelected));
     TypeMap.AddType <HoleScoreSubmitted>(nameof(HoleScoreSubmitted));
 }
Example #7
0
 public static void MapBookingEvents()
 {
     TypeMap.AddType <RoomBooked>("RoomBooked");
     TypeMap.AddType <BookingPaid>("BookingPaid");
     TypeMap.AddType <BookingCancelled>("BookingCancelled");
 }
Example #8
0
 static PubSubTests()
 {
     TypeMap.AddType <TestEvent>("test-event");
 }
Example #9
0
 public static void MapEvents()
 {
     TypeMap.AddType <RoomBooked>("RoomBooked");
     TypeMap.AddType <BookingPaid>("BookingPaid");
     TypeMap.AddType <DiscountApplied>("DiscountApplied");
 }
Example #10
0
        public PersistentSubscriptionTests()
        {
            Shared.Logger.Logger.Initialise(NullLogger.Instance);

            TypeMap.AddType <EstateCreatedEvent>("EstateCreatedEvent");
        }
Example #11
0
 public static void MapEventTypes()
 {
     TypeMap.AddType <BookingEvents.V1.RoomBooked>("RoomBooked");
     TypeMap.AddType <BookingEvents.V1.BookingExtended>("BookingExtended");
 }