Skip to content

Commit

Permalink
Add missing partial to Boilerplate classes #8631
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Sep 14, 2024
1 parent f761f34 commit 938f5b5
Show file tree
Hide file tree
Showing 121 changed files with 137 additions and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Boilerplate.Client.Core.Data;

public class OfflineDbContext(DbContextOptions<OfflineDbContext> options) : DbContext(options)
public partial class OfflineDbContext(DbContextOptions<OfflineDbContext> options) : DbContext(options)
{
static OfflineDbContext()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Extensions.Configuration;

public static class IConfigurationBuilderExtensions
public static partial class IConfigurationBuilderExtensions
{
/// <summary>
/// Configuration priority (Lowest to highest) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.JSInterop;

public static class IJSRuntimeExtensions
public static partial class IJSRuntimeExtensions
{
public static ValueTask<string> GetBrowserPlatform(this IJSRuntime jsRuntime)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Microsoft.Extensions.DependencyInjection;

public static class IServiceCollectionExtensions
public static partial class IServiceCollectionExtensions
{
public static IServiceCollection AddClientCoreProjectServices(this IServiceCollection services)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Microsoft.AspNetCore.Components;

public static class NavigationManagerExtensions
public static partial class NavigationManagerExtensions
{
public static string GetUriWithoutQueryParameter(this NavigationManager navigationManager, string key)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Client.Core.Services;

public static class AppPlatform
public static partial class AppPlatform
{
public static bool IsBlazorHybrid { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Boilerplate.Client.Core.Services;

public static class AppRenderMode
public static partial class AppRenderMode
{
public static readonly bool PrerenderEnabled = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Boilerplate.Client.Core.Services.HttpMessageHandlers;

public class AuthDelegatingHandler(IAuthTokenProvider tokenProvider, IServiceProvider serviceProvider, IStorageService storageService, RetryDelegatingHandler handler)
public partial class AuthDelegatingHandler(IAuthTokenProvider tokenProvider, IServiceProvider serviceProvider, IStorageService storageService, RetryDelegatingHandler handler)
: DelegatingHandler(handler)
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Boilerplate.Client.Core.Services.HttpMessageHandlers;

public class ExceptionDelegatingHandler(IStringLocalizer<AppStrings> localizer, JsonSerializerOptions jsonSerializerOptions, HttpClientHandler httpClientHandler)
public partial class ExceptionDelegatingHandler(IStringLocalizer<AppStrings> localizer, JsonSerializerOptions jsonSerializerOptions, HttpClientHandler httpClientHandler)
: DelegatingHandler(httpClientHandler)
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Boilerplate.Client.Core.Services.HttpMessageHandlers;

public class RequestHeadersDelegationHandler(AuthDelegatingHandler handler)
public partial class RequestHeadersDelegationHandler(AuthDelegatingHandler handler)
: DelegatingHandler(handler)
{
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// The generated HTTP client proxy by Bit.SourceGenerators will automatically include these request options in the constructed HttpRequestMessage.
/// You can access these values within HTTP message handlers, such as <see cref="AuthDelegatingHandler"/>.
/// </summary>
public class RequestOptionNames
public partial class RequestOptionNames
{
public const string IControllerType = nameof(IControllerType);
public const string ActionName = nameof(ActionName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Boilerplate.Client.Core.Services.HttpMessageHandlers;

public class RetryDelegatingHandler(ExceptionDelegatingHandler handler)
public partial class RetryDelegatingHandler(ExceptionDelegatingHandler handler)
: DelegatingHandler(handler)
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Core.Services;

public class MessageBoxData(string message, string title, TaskCompletionSource<bool> taskCompletionSource)
public partial class MessageBoxData(string message, string title, TaskCompletionSource<bool> taskCompletionSource)
{
public string Message { get; set; } = message;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// Currently only Windows clients have local http server to have better support for social login.
/// In other platforms, we don't have local http server and we use a noop implementation.
/// </summary>
public class NoopLocalHttpServer : ILocalHttpServer
public partial class NoopLocalHttpServer : ILocalHttpServer
{
public int Start(CancellationToken cancellationToken) => -1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Boilerplate.Client.Core.Services;
/// <summary>
/// https://docs.microsoft.com/en-us/odata/concepts/queryoptions-overview
/// </summary>
public class ODataQuery
public partial class ODataQuery
{
public int? Top { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Boilerplate.Client.Core.Services;
/// <summary>
/// For more information <see cref="IPrerenderStateService"/> docs.
/// </summary>
public class PrerenderStateService : IPrerenderStateService, IAsyncDisposable
public partial class PrerenderStateService : IPrerenderStateService, IAsyncDisposable
{
private PersistingComponentStateSubscription? subscription;
private readonly PersistentComponentState? persistentComponentState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Core.Services;

public static class PubSubMessages
public static partial class PubSubMessages
{
public const string USER_DATA_UPDATED = nameof(USER_DATA_UPDATED);
public const string SHOW_MESSAGE = nameof(SHOW_MESSAGE);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Core.Styles;

public class ThemeColors
public partial class ThemeColors
{
public static readonly string PrimaryDarkBgColor = "#000000";
public static readonly string PrimaryLightBgColor = "#FFFFFF";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private static void SetupBlazorWebView()
}

#if iOS || Mac
public class CustomWKNavigationDelegate : WKNavigationDelegate
public partial class CustomWKNavigationDelegate : WKNavigationDelegate
{
public override void DecidePolicy(WKWebView webView, WKNavigationAction navigationAction, WKWebpagePreferences preferences, Action<WKNavigationActionPolicy, WKWebpagePreferences> decisionHandler)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Boilerplate.Client.Maui.Platforms.Android;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleInstance,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
public partial class MainActivity : MauiAppCompatActivity
{
protected override void OnCreate(Bundle? savedInstanceState)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Boilerplate.Client.Maui.Platforms.Android;
AllowBackup = true,
SupportsRtl = true
)]
public class MainApplication : MauiApplication
public partial class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Boilerplate.Client.Maui.Platforms.MacCatalyst;

[Register(nameof(AppDelegate))]
public class AppDelegate : MauiUIApplicationDelegate
public partial class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Client.Maui.Platforms.MacCatalyst;

public class Program
public partial class Program
{
static void Main(string[] args)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Maui;

class Program : MauiApplication
partial class Program : MauiApplication
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Boilerplate.Client.Maui.Platforms.iOS;

[Register(nameof(AppDelegate))]
public class AppDelegate : MauiUIApplicationDelegate
public partial class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Client.Maui.Platforms.iOS;

public class Program
public partial class Program
{
static void Main(string[] args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Boilerplate.Client.Maui.Services;
/// <summary>
/// More info at <see cref="IBitDeviceCoordinator"/>
/// </summary>
public class MauiDeviceCoordinator : IBitDeviceCoordinator
public partial class MauiDeviceCoordinator : IBitDeviceCoordinator
{
public double GetStatusBarHeight()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Maui.Services;

public class MauiExternalNavigationService : IExternalNavigationService
public partial class MauiExternalNavigationService : IExternalNavigationService
{
public async Task NavigateToAsync(string url)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Maui.Services;

public class MauiStorageService : IStorageService
public partial class MauiStorageService : IStorageService
{
private readonly Dictionary<string, string?> tempStorage = [];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace Boilerplate.Client.Web.Services;

public class WebDeviceCoordinator : IBitDeviceCoordinator
public partial class WebDeviceCoordinator : IBitDeviceCoordinator
{
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Windows.Configuration;

public class WindowsUpdateSettings
public partial class WindowsUpdateSettings
{
public bool AutoReload { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

namespace Boilerplate.Client.Windows.Services;

public class WindowsDeviceCoordinator : IBitDeviceCoordinator { }
public partial class WindowsDeviceCoordinator : IBitDeviceCoordinator { }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Boilerplate.Client.Windows.Services;

public class WindowsStorageService : IStorageService
public partial class WindowsStorageService : IStorageService
{
private readonly Dictionary<string, string?> tempStorage = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Boilerplate.Client.Windows.Services;

public class WindowsTelemetryInitializer : ITelemetryInitializer
public partial class WindowsTelemetryInitializer : ITelemetryInitializer
{
private string sessionId { get; } = Guid.NewGuid().ToString();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//+:cnd:noEmit
namespace Boilerplate.Server.Api;

public class AppSettings : IValidatableObject
public partial class AppSettings : IValidatableObject
{
public IdentitySettings Identity { get; set; } = default!;

Expand Down Expand Up @@ -29,7 +29,7 @@ public IEnumerable<ValidationResult> Validate(ValidationContext validationContex
}
}

public class IdentitySettings : IdentityOptions
public partial class IdentitySettings : IdentityOptions
{
public TimeSpan BearerTokenExpiration { get; set; }
public TimeSpan RefreshTokenExpiration { get; set; }
Expand Down Expand Up @@ -59,7 +59,7 @@ public class IdentitySettings : IdentityOptions
public TimeSpan RevokeUserSessionsDelay { get; set; }
}

public class EmailSettings
public partial class EmailSettings
{
[Required]
public string Host { get; set; } = default!;
Expand All @@ -78,7 +78,7 @@ public class EmailSettings
public bool HasCredential => (string.IsNullOrEmpty(UserName) is false) && (string.IsNullOrEmpty(Password) is false);
}

public class SmsSettings
public partial class SmsSettings
{
public string? FromPhoneNumber { get; set; }
public string? TwilioAccountSid { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Boilerplate.Server.Api.Data;

public class AppDbContext(DbContextOptions<AppDbContext> options)
public partial class AppDbContext(DbContextOptions<AppDbContext> options)
: IdentityDbContext<User, Role, Guid>(options), IDataProtectionKeyContext
{
public DbSet<DataProtectionKey> DataProtectionKeys { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Server.Api.Data.Configurations.Identity;

public class CategoryConfiguration : IEntityTypeConfiguration<Category>
public partial class CategoryConfiguration : IEntityTypeConfiguration<Category>
{
public void Configure(EntityTypeBuilder<Category> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Boilerplate.Server.Api.Data.Configurations.Identity;

public class RoleConfiguration : IEntityTypeConfiguration<Role>
public partial class RoleConfiguration : IEntityTypeConfiguration<Role>
{
public void Configure(EntityTypeBuilder<Role> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Boilerplate.Server.Api.Data.Configurations.Identity;

public class UserConfiguration : IEntityTypeConfiguration<User>
public partial class UserConfiguration : IEntityTypeConfiguration<User>
{
public void Configure(EntityTypeBuilder<User> builder)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Boilerplate.Server.Api.Data.Configurations;

// Cannot write DateTimeOffset with Offset=XX:XX:XX to PostgreSQL type 'timestamp with time zone', only offset 0 (UTC) is supported.
public class PostgresDateTimeOffsetConverter : ValueConverter<DateTimeOffset, DateTimeOffset>
public partial class PostgresDateTimeOffsetConverter : ValueConverter<DateTimeOffset, DateTimeOffset>
{
public PostgresDateTimeOffsetConverter()
: base(
Expand All @@ -13,7 +13,7 @@ public PostgresDateTimeOffsetConverter()
}
}

public class NullablePostgresDateTimeOffsetConverter : ValueConverter<DateTimeOffset?, DateTimeOffset?>
public partial class NullablePostgresDateTimeOffsetConverter : ValueConverter<DateTimeOffset?, DateTimeOffset?>
{
public NullablePostgresDateTimeOffsetConverter()
: base(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Server.Api.Data.Configurations.Identity;

public class ProductConfiguration : IEntityTypeConfiguration<Product>
public partial class ProductConfiguration : IEntityTypeConfiguration<Product>
{
public void Configure(EntityTypeBuilder<Product> builder)
{
Expand Down
Loading

0 comments on commit 938f5b5

Please sign in to comment.