Compare commits
No commits in common. "develop" and "master" have entirely different histories.
@ -1,23 +1,8 @@
|
|||||||
using System.Reflection;
|
|
||||||
using System.IO;
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
builder.Services.AddControllers();
|
||||||
var controllers = builder.Services.AddControllers();
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
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.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
builder.Services.AddSwaggerGen();
|
builder.Services.AddSwaggerGen();
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,6 @@ namespace api;
|
|||||||
|
|
||||||
public class WeatherForecast
|
public class WeatherForecast
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public string Description { get; set; }
|
|
||||||
|
|
||||||
public DateOnly Date { get; set; }
|
public DateOnly Date { get; set; }
|
||||||
|
|
||||||
public int TemperatureC { get; set; }
|
public int TemperatureC { get; set; }
|
||||||
@ -13,6 +9,4 @@ public class WeatherForecast
|
|||||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||||
|
|
||||||
public string? Summary { get; set; }
|
public string? Summary { get; set; }
|
||||||
|
|
||||||
public double AnotherThing { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user