/// <summary>
        /// Adds the Cosmos extension to the provided <see cref="IWebJobsBuilder"/>.
        /// </summary>
        /// <param name="builder">The <see cref="IWebJobsBuilder"/> to configure.</param>
        /// <param name="configure">An <see cref="Action{CosmosOptions}"/> to configure the provided <see cref="CosmosOptions"/>.</param>
        public static IWebJobsBuilder AddCosmos(this IWebJobsBuilder builder, Action <CosmosOptions> configure)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (configure == null)
            {
                throw new ArgumentNullException(nameof(configure));
            }

            builder.AddCosmos();
            builder.Services.Configure(configure);

            return(builder);
        }
예제 #2
0
 public void Configure(IWebJobsBuilder builder)
 {
     builder.AddCosmos();
 }