Example #1
0
        public override async Task <IEnumerable <Operation> > GetOperationsAsync(AnalysisContext context, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            var operations = new List <Operation>();

            var services = await context.GetDataAsync <ServiceDependencySet>().ConfigureAwait(false);

            operations.Add(await services.ResolveAsync(AddMvcTypeName, AddMvcMethodName));

            var middleware = await context.GetDataAsync <MiddlewareDependencySet>().ConfigureAwait(false);

            operations.Add(await middleware.ResolveAsync(UseMvcTypeName, UseMvcMethodName));

            return(operations);
        }