/// <summary>
        /// Registers the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void Register(IWebJobsConventionContext context)
        {
            if (_options.AutomaticUnitOfWork)
            {
#pragma warning disable 618
                context.Services.TryAddEnumerable(ServiceDescriptor.Scoped <IFunctionFilter, MartenFunctionFilter>());
#pragma warning restore 618
            }
        }
            public void Register(IWebJobsConventionContext context)
            {
                if (context == null)
                {
                    throw new ArgumentNullException(nameof(context));
                }

                context.AddExtension(typeof(IAbc));
                context.Services.AddSingleton(A.Fake <IAbc>());
                context.Services.AddSingleton(A.Fake <IAbc2>());
                context.Services.AddHostedService <Abc2>();
            }
Exemple #3
0
 //#endif
 //#if UseWebJobs
 public void Register(IWebJobsConventionContext context)
 {
 }