Exemple #1
0
        public static ActivityDefinitionList Discover(
            this ActivityDefinitionList list,
            Action <ITypeSourceSelector> selector)
        {
            var typeSourceSelector = new TypeSourceSelector();

            selector(typeSourceSelector);

            var serviceCollection = new ServiceCollection();

            typeSourceSelector.Populate(serviceCollection, RegistrationStrategy.Replace(ReplacementBehavior.All));

            foreach (var service in serviceCollection)
            {
                list.Add(ActivityDescriber.Describe(service.ImplementationType));
            }

            return(list);
        }
Exemple #2
0
 public static ActivityDefinitionList Add <T>(this ActivityDefinitionList list) where T : IActivity
 {
     return(list.Add(ActivityDescriber.Describe <T>()));
 }