From 8719010e8aabdc865a13e0af1cbb2e0d24c950ab Mon Sep 17 00:00:00 2001 From: Paul Johnson Date: Thu, 13 Jan 2022 10:07:08 +0000 Subject: [PATCH] Remove unused property from Scope --- src/Umbraco.Infrastructure/Scoping/IScope.cs | 6 +--- src/Umbraco.Infrastructure/Scoping/Scope.cs | 33 +------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/Umbraco.Infrastructure/Scoping/IScope.cs b/src/Umbraco.Infrastructure/Scoping/IScope.cs index fb96a0f8a2..8027e10606 100644 --- a/src/Umbraco.Infrastructure/Scoping/IScope.cs +++ b/src/Umbraco.Infrastructure/Scoping/IScope.cs @@ -20,11 +20,6 @@ namespace Umbraco.Cms.Core.Scoping /// ISqlContext SqlContext { get; } - /// - /// Gets the scope event messages. - /// - EventMessages Messages { get; } - /// /// Gets the scope notification publisher /// @@ -74,6 +69,7 @@ namespace Umbraco.Cms.Core.Scoping void ReadLock(TimeSpan timeout, int lockId); void EagerWriteLock(params int[] lockIds); + void EagerWriteLock(TimeSpan timeout, int lockId); void EagerReadLock(TimeSpan timeout, int lockId); diff --git a/src/Umbraco.Infrastructure/Scoping/Scope.cs b/src/Umbraco.Infrastructure/Scoping/Scope.cs index 4c47200227..e0f947b4aa 100644 --- a/src/Umbraco.Infrastructure/Scoping/Scope.cs +++ b/src/Umbraco.Infrastructure/Scoping/Scope.cs @@ -41,7 +41,6 @@ namespace Umbraco.Cms.Core.Scoping private ICompletable _fscope; private IsolatedCaches _isolatedCaches; - private EventMessages _messages; private IScopedNotificationPublisher _notificationPublisher; private StackQueue<(LockType lockType, TimeSpan timeout, Guid instanceId, int lockId)> _queuedLocks; @@ -205,6 +204,7 @@ namespace Umbraco.Cms.Core.Scoping } internal Dictionary> ReadLocks => _readLocksDictionary; + internal Dictionary> WriteLocks => _writeLocksDictionary; // a value indicating whether to force call-context @@ -295,15 +295,6 @@ namespace Umbraco.Cms.Core.Scoping } } - public EventMessages MessagesOrNull - { - get - { - EnsureNotDisposed(); - return ParentScope == null ? _messages : ParentScope.MessagesOrNull; - } - } - // true if Umbraco.CoreDebugSettings.LogUncompletedScope appSetting is set to "true" private bool LogUncompletedScopes => _coreDebugSettings.LogIncompletedScopes; @@ -417,28 +408,6 @@ namespace Umbraco.Cms.Core.Scoping } } - /// - public EventMessages Messages - { - get - { - EnsureNotDisposed(); - if (ParentScope != null) - { - return ParentScope.Messages; - } - - return _messages ??= new EventMessages(); - - // TODO: event messages? - // this may be a problem: the messages collection will be cleared at the end of the scope - // how shall we process it in controllers etc? if we don't want the global factory from v7? - // it'd need to be captured by the controller - // - // + rename // EventMessages = ServiceMessages or something - } - } - public IScopedNotificationPublisher Notifications { get