Skip to content

Commit

Permalink
Removing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofx committed Mar 1, 2024
1 parent b013f3e commit 474c4bd
Show file tree
Hide file tree
Showing 8 changed files with 200 additions and 311 deletions.
18 changes: 0 additions & 18 deletions samples/Playground/src/Playground/Features/Errors/ErrorList.cs

This file was deleted.

51 changes: 0 additions & 51 deletions samples/Playground/src/Playground/Features/Errors/ErrorNew.cs

This file was deleted.

17 changes: 0 additions & 17 deletions samples/Playground/src/Playground/Features/Errors/New.cshtml

This file was deleted.

20 changes: 2 additions & 18 deletions samples/Playground/src/Playground/Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StackExchange.Exceptional.AspNetCore" Version="2.2.32" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Miru\Miru.csproj" />
<ProjectReference Include="..\..\..\..\src\Miru.Sqlite\Miru.Sqlite.csproj" />
Expand All @@ -21,19 +17,7 @@
</ItemGroup>

<ItemGroup>
<_ContentIncludedByDefault Remove="Features\Accounts\Login.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\Edit.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\Forgot.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\Reset.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Edit.mail.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Edit.turbo.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Forgot.mail.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Forgot.turbo.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Reset.mail.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Passwords\_Reset.turbo.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\Register.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\_Register.turbo.cshtml" />
<_ContentIncludedByDefault Remove="Features\Accounts\_Registered.mail.cshtml" />
<_ContentIncludedByDefault Remove="Features\Errors\New.cshtml" />
</ItemGroup>

</Project>
31 changes: 0 additions & 31 deletions samples/Playground/src/Playground/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
using System;
using System.Linq;
using Hangfire;
using Hangfire.Console;
using Hangfire.Console.Extensions;
using Hangfire.Console.Extensions.Serilog;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Miru;
using Miru.Behaviors.BelongsToUser;
using Miru.Fabrication;
using Miru.Foundation.Logging;
using Miru.Globalization;
using Miru.Hosting;
using Miru.Html.HtmlConfigs;
using Miru.Mailing;
using Miru.Mvc;
using Miru.Pipeline;
using Miru.Queuing;
using Miru.Scheduling;
using Miru.Scopables;
using Miru.Security;
using Miru.Sqlite;
using Miru.Userfy;
using Playground.Config;
using Playground.Database;
using Playground.Domain;
using StackExchange.Exceptional;

namespace Playground;

Expand Down Expand Up @@ -89,11 +73,6 @@ public void ConfigureServices(IServiceCollection services)
services
.AddFabrication<PlaygroundFabricator>();

services.AddExceptional(settings =>
{
});
services.AddMvcCore(options => { options.Filters.Add(typeof(ExceptionalExceptionFilter), -9000); });

services.AddSession();
services.AddDistributedMemoryCache();
services.AddMemoryCache();
Expand All @@ -106,8 +85,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
// The Middlewares here are configured in order of executation
// Here, they are organized for Miru defaults. Changing the order might break some functionality

app.UseExceptional();

if (env.IsDevelopmentOrTest())
{
// app.UseDeveloperExceptionPage();
Expand Down Expand Up @@ -139,12 +116,4 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
e.MapRazorPages();
});
}
}

public class ExceptionalExceptionFilter : IExceptionFilter
{
public void OnException(ExceptionContext context)
{
context.Exception.Log(context.HttpContext);
}
}
2 changes: 2 additions & 0 deletions src/Miru/Scheduling/ScheduledJobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ public string Add<TRequest>(

var jobId = GetJobId(request, suffix);

#pragma warning disable CS0618 // Type or member is obsolete
RecurringJob.AddOrUpdate<JobFor<TRequest>>(
jobId, m => m.Execute(request, default, null, queueName), cron, timeZone, queueName);
#pragma warning restore CS0618 // Type or member is obsolete

// RecurringJob.AddOrUpdate<JobFor<TRequest>>(
// jobId,
Expand Down
Loading

0 comments on commit 474c4bd

Please sign in to comment.