public async Task <IActionResult> GetBuildDate()
        {
            Logger.Info($"API - ENDPOINT :: BUILD DATE/TIME :: {DependencyInjection.Container.container.Resolve<Configuration.ISettings>().BuildDate}");
            var result = await Task.Run(() => DependencyInjection.Container.container.Resolve <Configuration.ISettings>().BuildDate);

            return(Ok(result));
        }
        public async IAsyncEnumerable <string> GetDisableSwaggerSetting()
        {
            Logger.Info($"API - ENDPOINT :: SWAGGERSETTING :: {DependencyInjection.Container.container.Resolve<Configuration.ISettings>().DisableSwagger}");
            var result = await Task.Run(() => DI.container.Resolve <Configuration.ISettings>().DisableSwagger);

            yield return(result);
        }
Ejemplo n.º 3
0
 public void OnActionExecuting(ActionExecutingContext context)
 {
     Logger.Info($": : : : : Settings Filter - OnActionExecuting : : : : :");
     // Setting up a condition where if there are args, then display error
     if (context.ActionArguments.Count > 0)
     {
         DI.container.Resolve <Models.IError>().SetError(DI.container.Resolve <Configuration.ISettings>().ErrorObjectIsNull);
         context.Result = new BadRequestObjectResult(DI.container.Resolve <Models.IError>());
     }
 }
Ejemplo n.º 4
0
 public void OnActionExecuted(ActionExecutedContext context)
 {
     Logger.Info($": : : : : Settings Filter - OnActionExecuted : : : : :");
 }