Пример #1
0
        /// <summary>
        /// Activates the WorkBench and the middleware of its services previously initiated.
        /// </summary>
        /// <param name="builder">The builder of the core application</param>
        /// <returns>The builder of the core application</returns>
        public static IServiceCollection AddWorkBench(this IServiceCollection service, IConfiguration Configuration, bool hasIdentityServer = false)
        {
            WorkBench.Configuration = Configuration;
            //Add Secrets options
            WorkBench.Configuration = Configuration.UseSecrets();

            service.AddHttpContextAccessor();

            //Inject Swagger (Open API specification) and API Versioning
            WebApiVersion.AddApiVersion(service);
            Swagger.AddSwagger(service);

            //Inject JWT pattern and security
            AuthenticationExtension.AddAuth(service, hasIdentityServer);

            TelemetryExtensions.AddTelemetry(service);

            return(service);
        }
Пример #2
0
 public InitialVersionAttribute(WebApiVersion initialVersion)
 {
     InitialVersion = initialVersion;
 }
Пример #3
0
 public InitialVersionAttribute(WebApiVersion initialVersion)
 {
     InitialVersion = initialVersion;
 }