Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
285781b
Run code cleanup
May 4, 2022
1979e6d
Run dotnet format
May 4, 2022
1a7acba
Start manual fixes
May 4, 2022
2bdad52
Manual fixing of warnings
May 5, 2022
e2ad8f1
Merge remote-tracking branch 'origin/v10/dev' into v10/bugfix/fix-bui…
May 6, 2022
7bd1871
Fix nullability in columnalias
May 6, 2022
59488f6
Fix tests
May 6, 2022
8d7d9e4
Merge branch 'v10/dev' into v10/bugfix/fix-build-warnings-Infrastructure
May 6, 2022
c26b57c
Merge branch 'v10/dev' into v10/bugfix/fix-build-warnings-Infrastructure
May 24, 2022
66a49b7
Fix up after merge
May 24, 2022
9e7c4ab
Start updating after review
Zeegaan May 31, 2022
14b2cca
Update editorconfig to contain new static & const rules
Jun 1, 2022
508327e
Fix up editorconfig to not contain duplicate rules
Jun 1, 2022
fce3756
Fix up static member names
Jun 1, 2022
a817df3
Fix up according to review
Jun 1, 2022
1026659
Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.…
Zeegaan Jun 1, 2022
dbf60f9
Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.…
Zeegaan Jun 1, 2022
da50863
Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.…
Zeegaan Jun 1, 2022
30237ba
Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs
Zeegaan Jun 1, 2022
7867ccd
Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs
Zeegaan Jun 1, 2022
1a3ce86
Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs
Zeegaan Jun 1, 2022
5d74430
Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs
Zeegaan Jun 1, 2022
831d104
Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs
Zeegaan Jun 1, 2022
727bbf1
Update src/Umbraco.Infrastructure/Examine/ExamineUmbracoIndexingHandl…
Zeegaan Jun 1, 2022
b54cffb
Update src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopula…
Zeegaan Jun 1, 2022
4af20fd
Update src/Umbraco.Infrastructure/Extensions/InstanceIdentifiableExte…
Zeegaan Jun 1, 2022
c8d18dc
Update src/Umbraco.Infrastructure/HostedServices/RecurringHostedServi…
Zeegaan Jun 1, 2022
763a7e2
Update src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs
Zeegaan Jun 1, 2022
f6ef508
Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensi…
Zeegaan Jun 1, 2022
463b455
Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensi…
Zeegaan Jun 1, 2022
38d2afc
Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs
Zeegaan Jun 1, 2022
2d0bccf
Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs
Zeegaan Jun 1, 2022
4c57f06
Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs
Zeegaan Jun 1, 2022
cd71c03
Update src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/…
Zeegaan Jun 1, 2022
7ab14e2
Update src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_0_0/AddMemb…
Zeegaan Jun 1, 2022
122b2f9
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
6ad4c4e
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
44d563c
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
f8501c3
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
c0cc6fd
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
2e2293c
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
96e1f9d
Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs
Zeegaan Jun 1, 2022
25baebc
Update src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs
Zeegaan Jun 1, 2022
db789ec
Update src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs
Zeegaan Jun 1, 2022
27d20f7
Update src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMappe…
Zeegaan Jun 1, 2022
ad41121
Update src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs
Zeegaan Jun 1, 2022
e4ec837
Update src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs
Zeegaan Jun 1, 2022
a606436
Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMa…
Zeegaan Jun 1, 2022
98e1e5c
Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMa…
Zeegaan Jun 1, 2022
489e9b4
Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMap…
Zeegaan Jun 1, 2022
d10fc51
Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMap…
Zeegaan Jun 1, 2022
0e6aaf9
Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMap…
Zeegaan Jun 1, 2022
572557b
Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMap…
Zeegaan Jun 1, 2022
3f2ee39
Update src/Umbraco.Infrastructure/Persistence/NPocoMapperCollectionBu…
Zeegaan Jun 1, 2022
bd22002
Update src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisi…
Zeegaan Jun 1, 2022
c2cb96c
Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/…
Zeegaan Jun 1, 2022
2de0f07
Fix [..] to substring
Jun 1, 2022
fc10ed5
Merge branch 'v10/dev' into v10/bugfix/fix-build-warnings-Infrastructure
Jun 1, 2022
e6fd0b7
Fix after merge with 10/dev
Jun 1, 2022
2f44d5d
Fox ContentValueSetValidator.cs
Jun 1, 2022
bbd53b0
Update LoggerConfigExtensions
Jun 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 8 additions & 19 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ dotnet_naming_style.internal_error_style.required_suffix = ____INTERNAL_ERROR___

# All public/protected/protected_internal constant fields must be PascalCase
# https://docs.microsoft.com/dotnet/standard/design-guidelines/field
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_accessibilities = public, protected, protected_internal, internal, private
dotnet_naming_symbols.public_protected_constant_fields_group.required_modifiers = const
dotnet_naming_symbols.public_protected_constant_fields_group.applicable_kinds = field
dotnet_naming_rule.public_protected_constant_fields_must_be_pascal_case_rule.symbols = public_protected_constant_fields_group
Expand Down Expand Up @@ -356,24 +356,13 @@ dotnet_naming_rule.parameters_rule.symbols = parameters_group
dotnet_naming_rule.parameters_rule.style = camel_case_style
dotnet_naming_rule.parameters_rule.severity = warning

# Private static fields use camelCase and start with s_
dotnet_naming_symbols.private_static_field_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_field_symbols.required_modifiers = static, shared
dotnet_naming_symbols.private_static_field_symbols.applicable_kinds = field
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.symbols = private_static_field_symbols
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.style = camel_case_and_prefix_with_s_underscore_style
dotnet_naming_rule.private_static_fields_must_be_camel_cased_and_prefixed_with_s_underscore.severity = warning
dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.required_prefix = s_
dotnet_naming_style.camel_case_and_prefix_with_s_underscore_style.capitalization = camel_case

# Instance fields use camelCase and are prefixed with '_'
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_field_symbols.applicable_kinds = field
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.symbols = private_field_symbols
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.style = camel_case_and_prefix_with_underscore_style
dotnet_naming_rule.private_instance_fields_must_be_camel_cased_and_prefixed_with_underscore.severity = warning
dotnet_naming_style.camel_case_and_prefix_with_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization = camel_case
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = warning
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _

##########################################
# License
Expand Down Expand Up @@ -408,4 +397,4 @@ dotnet_naming_style.camel_case_and_prefix_with_underscore_style.capitalization
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
##########################################
##########################################
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ public override string GetConcat(params string[] args)
return string.Join(" || ", args.AsEnumerable());
}

public override string GetColumn(DatabaseType dbType, string tableName, string columnName, string columnAlias,
string? referenceName = null, bool forInsert = false)
public override string GetColumn(DatabaseType dbType, string tableName, string columnName, string? columnAlias, string? referenceName = null, bool forInsert = false)
{
if (forInsert)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,55 @@
using Umbraco.Cms.Core.Sync;
using Umbraco.Cms.Infrastructure.Persistence;

namespace Umbraco.Cms.Core.Cache
namespace Umbraco.Cms.Core.Cache;

/// <summary>
/// Ensures that distributed cache events are setup and the <see cref="IServerMessenger" /> is initialized
/// </summary>
public sealed class DatabaseServerMessengerNotificationHandler :
INotificationHandler<UmbracoApplicationStartingNotification>, INotificationHandler<UmbracoRequestEndNotification>
{
private readonly IUmbracoDatabaseFactory _databaseFactory;
private readonly ILogger<DatabaseServerMessengerNotificationHandler> _logger;
private readonly IServerMessenger _messenger;
private readonly IRuntimeState _runtimeState;

/// <summary>
/// Ensures that distributed cache events are setup and the <see cref="IServerMessenger"/> is initialized
/// Initializes a new instance of the <see cref="DatabaseServerMessengerNotificationHandler" /> class.
/// </summary>
public sealed class DatabaseServerMessengerNotificationHandler : INotificationHandler<UmbracoApplicationStartingNotification>, INotificationHandler<UmbracoRequestEndNotification>
public DatabaseServerMessengerNotificationHandler(
IServerMessenger serverMessenger,
IUmbracoDatabaseFactory databaseFactory,
ILogger<DatabaseServerMessengerNotificationHandler> logger,
IRuntimeState runtimeState)
{
_databaseFactory = databaseFactory;
_logger = logger;
_messenger = serverMessenger;
_runtimeState = runtimeState;
}

/// <inheritdoc />
public void Handle(UmbracoApplicationStartingNotification notification)
{
private readonly IServerMessenger _messenger;
private readonly IUmbracoDatabaseFactory _databaseFactory;
private readonly ILogger<DatabaseServerMessengerNotificationHandler> _logger;
private readonly IRuntimeState _runtimeState;

/// <summary>
/// Initializes a new instance of the <see cref="DatabaseServerMessengerNotificationHandler"/> class.
/// </summary>
public DatabaseServerMessengerNotificationHandler(
IServerMessenger serverMessenger,
IUmbracoDatabaseFactory databaseFactory,
ILogger<DatabaseServerMessengerNotificationHandler> logger,
IRuntimeState runtimeState)
if (_runtimeState.Level != RuntimeLevel.Run)
{
_databaseFactory = databaseFactory;
_logger = logger;
_messenger = serverMessenger;
_runtimeState = runtimeState;
return;
}

/// <inheritdoc/>
public void Handle(UmbracoApplicationStartingNotification notification)
if (_databaseFactory.CanConnect == false)
{
if (_runtimeState.Level != RuntimeLevel.Run)
{
return;
}

if (_databaseFactory.CanConnect == false)
{
_logger.LogWarning("Cannot connect to the database, distributed calls will not be enabled for this server.");
return;
}

// Sync on startup, this will run through the messenger's initialization sequence
_messenger?.Sync();
_logger.LogWarning(
"Cannot connect to the database, distributed calls will not be enabled for this server.");
return;
}

/// <summary>
/// Clear the batch on end request
/// </summary>
public void Handle(UmbracoRequestEndNotification notification) => _messenger?.SendMessages();
// Sync on startup, this will run through the messenger's initialization sequence
_messenger?.Sync();
}

/// <summary>
/// Clear the batch on end request
/// </summary>
public void Handle(UmbracoRequestEndNotification notification) => _messenger?.SendMessages();
}
Loading