run formatter

This commit is contained in:
Jonas Dellinger 2022-11-27 13:29:35 +01:00
parent f6513bcbb9
commit cb2e0cccc8
45 changed files with 146 additions and 146 deletions

View File

@ -1,6 +1,6 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System;
namespace SpotifyAPI.Web.Auth
{

View File

@ -1,10 +1,10 @@
using System.Reflection;
using System.Threading;
using System.Web;
using System.Globalization;
using System.Text;
using System;
using System.Globalization;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using EmbedIO;
using EmbedIO.Actions;

View File

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using SpotifyAPI.Web;

View File

@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

View File

@ -2,14 +2,14 @@ using System;
namespace Example.ASPBlazor.Data
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureC { get; set; }
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; }
}
}

View File

@ -4,22 +4,22 @@ using System.Threading.Tasks;
namespace Example.ASPBlazor.Data
{
public class WeatherForecastService
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
var rng = new Random();
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
}).ToArray());
}
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
var rng = new Random();
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
}).ToArray());
}
}
}

View File

@ -4,17 +4,17 @@ using Microsoft.Extensions.Hosting;
namespace Example.ASPBlazor
{
public class Program
{
public static void Main(string[] args)
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

View File

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Example.ASPBlazor.Data;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Hosting;
@ -9,52 +10,51 @@ using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Example.ASPBlazor.Data;
namespace Example.ASPBlazor
{
public class Startup
public class Startup
{
public Startup(IConfiguration configuration)
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
}
}

View File

@ -1,6 +1,6 @@
using System.Reflection;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using SpotifyAPI.Web;
using SpotifyAPI.Web.Auth;

View File

@ -1,12 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using System;
using SpotifyAPI.Web.Auth;
using SpotifyAPI.Web;
using System.Collections.Generic;
using Newtonsoft.Json;
using static SpotifyAPI.Web.Scopes;
using SpotifyAPI.Web;
using SpotifyAPI.Web.Auth;
using Swan.Logging;
using static SpotifyAPI.Web.Scopes;
namespace Example.CLI.PersistentConfig
{

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SpotifyAPI.Web;

View File

@ -1,10 +1,10 @@
using System.Reflection;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Moq;
using NUnit.Framework;
using SpotifyAPI.Web.Http;
using System.Threading;
namespace SpotifyAPI.Web.Tests
{

View File

@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Net.Http;
using System.Text;
using Moq;
using NUnit.Framework;
using SpotifyAPI.Web.Http;
using System.Net.Http;
namespace SpotifyAPI.Web.Tests
{

View File

@ -1,5 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using NUnit.Framework;
namespace SpotifyAPI.Web.Tests

View File

@ -1,5 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using NUnit.Framework;
namespace SpotifyAPI.Web.Tests

View File

@ -13,7 +13,7 @@ namespace SpotifyAPI.Web
{
Ensure.ArgumentNotNullOrEmptyString(albumId, nameof(albumId));
return API.Get<FullAlbum>(URLs.Album(albumId),cancel);
return API.Get<FullAlbum>(URLs.Album(albumId), cancel);
}
public Task<FullAlbum> Get(string albumId, AlbumRequest request, CancellationToken cancel = default)

View File

@ -1,9 +1,9 @@
using System.Net;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using URLs = SpotifyAPI.Web.SpotifyUrls;
using System.Threading;
namespace SpotifyAPI.Web
{

View File

@ -1,9 +1,9 @@
using System.Threading;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using SpotifyAPI.Web;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web
{

View File

@ -1,6 +1,6 @@
using System.Threading;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;

View File

@ -1,8 +1,8 @@
using System.Net;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using System.Threading;
namespace SpotifyAPI.Web
{

View File

@ -1,10 +1,10 @@
using System.Text;
using System;
using System.Net.Http;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using System.Threading;
namespace SpotifyAPI.Web
{

View File

@ -1,9 +1,9 @@
using System.Threading;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using System.Runtime.CompilerServices;
namespace SpotifyAPI.Web
{

View File

@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web
{

View File

@ -1,5 +1,5 @@
using System.Net.Http;
using System;
using System.Net.Http;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web

View File

@ -1,8 +1,8 @@
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using SpotifyAPI.Web.Http;
using System;
using System.Runtime.Serialization;
namespace SpotifyAPI.Web
{

View File

@ -1,6 +1,6 @@
using System;
using System.Globalization;
using System.Runtime.Serialization;
using System;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web

View File

@ -1,6 +1,6 @@
using System;
using System.Globalization;
using System.Runtime.Serialization;
using System;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web

View File

@ -1,5 +1,5 @@
using System.Runtime.Serialization;
using System;
using System.Runtime.Serialization;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web

View File

@ -1,9 +1,9 @@
using System.Net.Http;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace SpotifyAPI.Web.Http
{

View File

@ -1,9 +1,9 @@
using System.Net;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
namespace SpotifyAPI.Web.Http
{

View File

@ -1,11 +1,11 @@
using System.Net;
using System.Text;
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace SpotifyAPI.Web.Http
{

View File

@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Reflection;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

View File

@ -1,5 +1,5 @@
using System.Linq;
using System;
using System.Linq;
namespace SpotifyAPI.Web.Http
{

View File

@ -1,5 +1,5 @@
using System.Globalization;
using System;
using System.Globalization;
namespace SpotifyAPI.Web
{
public class FeaturedPlaylistsRequest : RequestParams

View File

@ -1,6 +1,6 @@
using System.Globalization;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Web;

View File

@ -1,9 +1,9 @@
using System.Collections.Concurrent;
using System.Reflection;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json.Linq;
namespace SpotifyAPI.Web

View File

@ -2,7 +2,7 @@ using System;
namespace SpotifyAPI.Web
{
public class AuthorizationCodeRefreshResponse: IRefreshableToken
public class AuthorizationCodeRefreshResponse : IRefreshableToken
{
public string AccessToken { get; set; } = default!;
public string TokenType { get; set; } = default!;

View File

@ -2,7 +2,7 @@ using System;
namespace SpotifyAPI.Web
{
public class AuthorizationCodeTokenResponse: IRefreshableToken
public class AuthorizationCodeTokenResponse : IRefreshableToken
{
public string AccessToken { get; set; } = default!;
public string TokenType { get; set; } = default!;

View File

@ -2,7 +2,7 @@ using System;
namespace SpotifyAPI.Web
{
public class ClientCredentialsTokenResponse: IToken
public class ClientCredentialsTokenResponse : IToken
{
public string AccessToken { get; set; } = default!;
public string TokenType { get; set; } = default!;

View File

@ -2,7 +2,7 @@ using System;
namespace SpotifyAPI.Web
{
public class PKCETokenResponse: IRefreshableToken
public class PKCETokenResponse : IRefreshableToken
{
public string AccessToken { get; set; } = default!;
public string TokenType { get; set; } = default!;

View File

@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using SpotifyAPI.Web.Http;
using System.Threading;
using System.Threading.Tasks;
using SpotifyAPI.Web.Http;
namespace SpotifyAPI.Web
{

View File

@ -1,7 +1,7 @@
using System;
using System.Reflection;
using System.Linq;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
namespace SpotifyAPI.Web
{

View File

@ -1,8 +1,8 @@
using System.Web;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
namespace SpotifyAPI.Web
{

View File

@ -1,5 +1,5 @@
using System.Web;
using System;
using System.Web;
namespace SpotifyAPI.Web
{
public class URIParameterFormatProvider : IFormatProvider