Remove unused property from Scope

This commit is contained in:
Paul Johnson
2022-01-13 10:07:08 +00:00
parent d543dccb27
commit 8719010e8a
2 changed files with 2 additions and 37 deletions

View File

@@ -20,11 +20,6 @@ namespace Umbraco.Cms.Core.Scoping
/// </summary>
ISqlContext SqlContext { get; }
/// <summary>
/// Gets the scope event messages.
/// </summary>
EventMessages Messages { get; }
/// <summary>
/// Gets the scope notification publisher
/// </summary>
@@ -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);

View File

@@ -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<Guid, Dictionary<int, int>> ReadLocks => _readLocksDictionary;
internal Dictionary<Guid, Dictionary<int, int>> 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
}
}
/// <inheritdoc />
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