/// <summary>
        /// Adds resource handling
        /// </summary>
        /// <param name="serviceCollection"></param>
        /// <param name="configureOptions"></param>
        /// <returns></returns>
        public static IServiceCollection AddMcmaResourceHandling(this IServiceCollection serviceCollection,
                                                                 Action <ResourceHandlerRegistryOptions> configureOptions = null)
        {
            // create registry options for service collection
            var opts = new ResourceHandlerRegistryOptions(serviceCollection);

            // apply any configuration
            configureOptions?.Invoke(opts);

            return
                (serviceCollection.AddScoped <IResourceHandlerRegistry, ResourceHandlerRegistry>()
                 .AddScoped(svcProvider => opts.Configure(svcProvider)));
        }
 /// <summary>
 /// Instantiates a <see cref="ResourceHandlerRegistry"/>
 /// </summary>
 /// <param name="options"></param>
 public ResourceHandlerRegistry(ResourceHandlerRegistryOptions options)
 {
     Options = options;
 }