public static async Task Main(string[] args) { Console.WriteLine("Initialising Database..."); await AuditorDbContext.InitializeAsync(); Console.WriteLine("Setting up Nuget Search Service Api..."); await NugetServiceIndex.SetupSearchApiAsync(); Console.WriteLine("Processing feed..."); await NugetAuditRobot.ProcessAsync(); }
public static async Task Main(string[] args) { //setup SettingsHelper.ConfigurationProvider = new ConfigurationProvider(); LogHelper.WriteLine("Initialising Database..."); await AuditorDbContext.InitializeAsync(); LogHelper.WriteLine("Setting up Nuget Search Service Api..."); await NugetServiceIndex.SetupSearchApiAsync(); LogHelper.WriteLine("Processing feed..."); await NugetAuditRobot.ProcessAsync(); }
public static async Task <HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequestMessage req, TraceWriter log, ExecutionContext context) { SettingsHelper.ConfigurationProvider = new ConfigurationProvider(); LogHelper.Logger = new LoggerProvider(log); var config = SettingsHelper.ConfigurationProvider.GetConnectionString("dbConn"); LogHelper.WriteLine("Initialising Database..."); await AuditorDbContext.InitializeAsync(); LogHelper.WriteLine("Setting up Nuget Search Service Api..."); await NugetServiceIndex.SetupSearchApiAsync(); LogHelper.WriteLine("Processing feed..."); await NugetAuditRobot.ProcessAsync(); return(req.CreateResponse(HttpStatusCode.OK, "Boom!")); }