Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions uSync.AutoTemplates/TemplateWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public partial class TemplateWatcher : IRegisteredObject
private readonly ILogger<TemplateWatcher> _logger;
private readonly ITemplateService _templateService;
private readonly IShortStringHelper _shortStringHelper;
private readonly IHostEnvironment _hostEnvironment;

private readonly IFileSystem? _templateFileSystem;

Expand All @@ -51,14 +50,13 @@ public TemplateWatcher(
ITemplateService templateService)
{
_shortStringHelper = shortStringHelper;
_hostEnvironment = hostEnvironment;
_hostingLifetime = hostingLifetime;

_logger = logger;

_templateFileSystem = fileSystems.MvcViewsFileSystem;

_viewsFolder = _hostEnvironment.MapPathContentRoot(Constants.SystemDirectories.MvcViews);
_viewsFolder = hostEnvironment.MapPathContentRoot(Constants.SystemDirectories.MvcViews);


//
Expand Down Expand Up @@ -157,7 +155,7 @@ private void CheckTemplates()
}


private static object lockObject = new Object();
private static readonly Lock lockObject = new();

private void CheckFile(string filename)
{
Expand Down
2 changes: 1 addition & 1 deletion uSync.BackOffice/Boot/uSyncBootExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IUmbracoBuilder AdduSyncFirstBoot(this IUmbracoBuilder builder)
/// <summary>
/// Handler to mange app starting for first boot migrations
/// </summary>
internal class FirstBootAppStartingHandler
internal sealed class FirstBootAppStartingHandler
: INotificationAsyncHandler<UmbracoApplicationStartingNotification>
{

Expand Down
2 changes: 1 addition & 1 deletion uSync.BackOffice/Configuration/SyncConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private string[] FetchFolders()
.ToArray();
}

private class SyncFolderItem
private sealed class SyncFolderItem
{
public required string Path { get; set; }
public int Weight { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

using uSync.BackOffice.Configuration;
using uSync.BackOffice.Services;
using uSync.BackOffice.SyncHandlers.Interfaces;

namespace uSync.BackOffice.Notifications;

internal class SyncScopedNotificationPublisher
internal sealed class SyncScopedNotificationPublisher
: ScopedNotificationPublisher<INotificationHandler>, IScopedNotificationPublisher
{
private readonly ILogger<SyncScopedNotificationPublisher> _logger;
Expand Down
5 changes: 2 additions & 3 deletions uSync.BackOffice/Services/uSyncTriggers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace uSync.BackOffice;
/// <summary>
/// used to trigger uSync events from within other elements of uSync
/// </summary>
internal class uSyncTriggers
internal sealed class uSyncTriggers
{
internal static event uSyncTriggerEventHandler? DoExport;
internal static event uSyncTriggerEventHandler? DoImport;
Expand Down Expand Up @@ -47,12 +47,11 @@ public static void TriggerImport(string folder, IEnumerable<string> entityTypes,

}

internal class uSyncTriggerArgs
internal sealed class uSyncTriggerArgs
{
public string Folder { get; set; } = string.Empty;

public IEnumerable<string> EntityTypes { get; set; } = [];

public SyncHandlerOptions? HandlerOptions { get; set; }

}
2 changes: 1 addition & 1 deletion uSync.BackOffice/SyncHandlers/SyncHandlerRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ private async Task<SyncChangeInfo> IsItemCurrentAsync(XElement node, SyncSeriali
return null;
}

private class SyncChangeInfo
private sealed class SyncChangeInfo
{
public ChangeType Change { get; set; }
public XElement? CurrentNode { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion uSync.BackOffice/Tracker/SyncTrackerNotificationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace uSync.BackOffice.Tracker;

internal class SyncTrackerNotificationHandler
internal sealed class SyncTrackerNotificationHandler
: INotificationAsyncHandler<uSyncImportCompletedNotification>
{
private readonly ISyncTrackerService _syncTrackerService;
Expand Down
2 changes: 1 addition & 1 deletion uSync.BackOffice/uSyncBackOffice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class Trees
internal const string Group = "sync";
}

internal class Sets
internal sealed class Sets
{
internal const string DefaultSet = "Default";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public override IDictionary<string, object> GetConfigurationImport(IDictionary<s

return configuration;
}
private class IdValuePair
private sealed class IdValuePair
{
public int? Id { get; set; }
public string? Value { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override IDictionary<string, object> GetConfigurationImport(IDictionary<s
return configuration;
}

private class IdValuePair
private sealed class IdValuePair
{
public int? Id { get; set; }
public string? Value { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion uSync.Core/Json/OrderedPropertiesJsonResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace uSync.Core.Json;
/// less changes in the files = faster comparison checks.
/// </para>
/// </remarks>
internal class OrderedPropertiesJsonResolver : DefaultJsonTypeInfoResolver
internal sealed class OrderedPropertiesJsonResolver : DefaultJsonTypeInfoResolver
{
public override JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
{
Expand Down
2 changes: 1 addition & 1 deletion uSync.Core/Mapping/Mappers/MultiUrlMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override Task<IEnumerable<uSyncDependency>> GetDependenciesAsync(object v
// we need to just be able to read / manipulate the storage
// to make things generic .
[DataContract]
internal class LinkDto
internal sealed class LinkDto
{
[DataMember(Name = "name")]
public string? Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ virtual protected IEnumerable<uSyncChange> DeserializeExtraProperties(TObject it
return [];
}

private class TabInfo
private sealed class TabInfo
{
public TabInfo(string alias)
{
Expand Down Expand Up @@ -1002,8 +1002,8 @@ protected IEnumerable<uSyncChange> CleanTabs(TObject item, XElement node, SyncSe
if (tabNode == null) return [];

var newTabs = tabNode.Elements("Tab")
.Select(x => GetTabAliasFromTabGroup(x))
.ToList();
.Select(GetTabAliasFromTabGroup)
.ToArray();

var inheritedTabs =
item.ContentTypeComposition
Expand Down Expand Up @@ -1141,7 +1141,7 @@ private bool SetMasterFromElement(IContentTypeBase item, XElement? masterNode)
return false;
}

private class PropertyTypeResult
private sealed class PropertyTypeResult
{
public bool IsNew { get; set; }
public IPropertyType? Property { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion uSync.Core/Serialization/Serializers/DomainSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public override async Task SaveItemAsync(IDomain item)
await _domainService.UpdateDomainsAsync(contentKey.Result, updateModel);
}

private class DomainSyncModel
private sealed class DomainSyncModel
{
public required Guid Key { get; set; }
public required string DomainName { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion uSync.History/uSyncHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class uSyncHistory : ISyncAddOn
public int SortOrder => 20;
}

internal class SyncHistoryConstants
internal sealed class SyncHistoryConstants
{
public const string ApiName = "uSync.History";
public const string AppName = "uSync.History";
Expand Down
8 changes: 4 additions & 4 deletions uSync.SchemaGenerator/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace uSync;

internal class AppSettings
internal sealed class AppSettings
{
public uSyncDefinition uSync { get; set; }

/// <summary>
/// Configuration of uSync settings
/// </summary>
internal class uSyncDefinition
internal sealed class uSyncDefinition
{
/// <summary>
/// uSync settings
Expand All @@ -33,12 +33,12 @@ internal class uSyncDefinition
/// </summary>
public AutoTemplatesDefinition AutoTemplates { get; set; }

internal class uSyncSetsDefinition
internal sealed class uSyncSetsDefinition
{
public uSyncHandlerSetSettings Default { get; set; }
}

internal class AutoTemplatesDefinition
internal sealed class AutoTemplatesDefinition
{
/// <summary>
/// Enable AutoTemplates feature
Expand Down
2 changes: 1 addition & 1 deletion uSync.SchemaGenerator/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace uSync;

internal class Options
internal sealed class Options
{
[Option('o', "outputFile", Required = false,
HelpText = "",
Expand Down
2 changes: 1 addition & 1 deletion uSync.SchemaGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace uSync;
/// Generate the JSON Schema file for uSync.
/// just like in the Umbraco Core - https://github.com/umbraco/Umbraco-CMS/tree/v9/contrib/src/JsonSchema
/// </summary>
internal class Program
internal sealed class Program
{
public static async Task Main(string[] args)
{
Expand Down
Loading