add some initial stuff
This commit is contained in:
@@ -1,35 +1,40 @@
|
||||
using CommandLine;
|
||||
|
||||
using Scalar.AspNetCore;
|
||||
using Microsoft.AspNetCore.OpenApi;
|
||||
|
||||
class Program
|
||||
DataContext.Instance = new DataContext();
|
||||
var groupId = "group.Wmk1UTVQTnh0Sjd6a0xiOGhnTnMzZlNkc2p2Q3c0SXJiQkU2eDlNU0hyTT0=";
|
||||
SignalIntegration.Instance = new SignalIntegration("192.168.1.108", 8719, "+4367762751895");
|
||||
await SignalIntegration.Instance.ListGroups();
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddRazorPages();
|
||||
builder.Services.AddOpenApi();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
public class Options
|
||||
{
|
||||
[Option('v', "verbose", Required = false, HelpText = "Set output to verbose messages.")]
|
||||
public bool Verbose { get; set; }
|
||||
}
|
||||
app.UseExceptionHandler("/Error");
|
||||
}
|
||||
else
|
||||
{
|
||||
app.MapOpenApi();
|
||||
app.MapScalarApiReference();
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed<Options>(o =>
|
||||
{
|
||||
if (o.Verbose)
|
||||
{
|
||||
Console.WriteLine($"Verbose output enabled. Current Arguments: -v {o.Verbose}");
|
||||
Console.WriteLine("Quick Start Example! App is in Verbose mode!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Current Arguments: -v {o.Verbose}");
|
||||
Console.WriteLine("Quick Start Example!");
|
||||
}
|
||||
app.UseRouting();
|
||||
|
||||
EntryPoint(o);
|
||||
});
|
||||
}
|
||||
app.UseAuthorization();
|
||||
|
||||
static void EntryPoint(Options o)
|
||||
{
|
||||
Console.WriteLine("Hello world!");
|
||||
}
|
||||
}
|
||||
app.MapStaticAssets();
|
||||
app.MapRazorPages()
|
||||
.WithStaticAssets();
|
||||
|
||||
app.Run();
|
||||
|
||||
//Console.WriteLine("Size: " + DataContext.Instance.Songs.Count());
|
||||
//await SignalIntegration.Instance.ListGroups();
|
||||
Reference in New Issue
Block a user