Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

2 changed files with 2 additions and 23 deletions

View File

@ -1,23 +1,8 @@
using System.Reflection;
using System.IO;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
var controllers = builder.Services.AddControllers();
Console.WriteLine(Environment.CurrentDirectory);
Console.WriteLine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
var files = Directory.GetFiles($"{Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)}/plugins");
Console.WriteLine(files.Length);
foreach (var file in files)
{
Console.WriteLine(file);
var assembly = Assembly.LoadFrom(file);
controllers = controllers.AddApplicationPart(assembly);
}
// var assembly = Assembly.LoadFrom("pluginA.dll");
// // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

View File

@ -2,10 +2,6 @@ namespace api;
public class WeatherForecast
{
public string Name { get; set; }
public string Description { get; set; }
public DateOnly Date { get; set; }
public int TemperatureC { get; set; }
@ -13,6 +9,4 @@ public class WeatherForecast
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
public double AnotherThing { get; set; }
}