public static IEventFlowOptions AddMetadataProviders(
     this IEventFlowOptions eventFlowOptions,
     params Type[] metadataProviderTypes)
 {
     return(eventFlowOptions
            .AddMetadataProviders((IEnumerable <Type>)metadataProviderTypes));
 }
Exemple #2
0
        public static IEventFlowOptions AddMetadataProviders(
            this IEventFlowOptions eventFlowOptions,
            Assembly fromAssembly,
            Predicate <Type> predicate = null)
        {
            predicate = predicate ?? (t => true);
            var metadataProviderTypes = fromAssembly
                                        .GetTypes()
                                        .Where(t => typeof(IMetadataProvider).IsAssignableFrom(t))
                                        .Where(t => predicate(t));

            return(eventFlowOptions.AddMetadataProviders(metadataProviderTypes));
        }
        public static IEventFlowOptions AddMetadataProviders(
            this IEventFlowOptions eventFlowOptions,
            Assembly fromAssembly,
            Predicate <Type> predicate = null)
        {
            predicate = predicate ?? (t => true);
            var metadataProviderTypes = fromAssembly
                                        .GetTypes()
                                        .Where(IsMetadataProvider)
                                        .Where(t => !t.HasConstructorParameterOfType(IsMetadataProvider))
                                        .Where(t => predicate(t));

            return(eventFlowOptions.AddMetadataProviders(metadataProviderTypes));
        }
 public static IEventFlowOptions AddOwinMetadataProviders(
     this IEventFlowOptions eventFlowOptions)
 {
     return(eventFlowOptions
            .AddMetadataProviders(EventFlowOwin.Assembly));
 }
Exemple #5
0
 public AspNetCoreEventFlowOptions AddMetadataProviders()
 {
     _options.AddMetadataProviders(typeof(AspNetCoreEventFlowOptions).Assembly);
     return(this);
 }