Skip to content

Commit c1769b5

Browse files
authored
Merge pull request #6606 from Alkaersig/patch-1
Fixed misspelled method in example and description
2 parents 0a015fc + a9180e9 commit c1769b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

14/umbraco-cms/reference/notifications/contentservice-notifications.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,20 +200,20 @@ We can suppress notifications at the scope level which makes things consistent a
200200

201201
**How to use scopes**:
202202

203-
- Create an explicit scope and call scope.Notifications.Supress().
203+
- Create an explicit scope and call scope.Notifications.Suppress().
204204
- The result of Suppress() is IDisposable, so until it is disposed, notifications will not be added to the queue.
205205

206206
[Example](https://github.com/umbraco/Umbraco-CMS/blob/b69afe81f3f6fcd37480b3b0295a62af44ede245/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/SupressNotificationsTests.cs#L35):
207207

208208
```csharp
209209
using (IScope scope = ScopeProvider.CreateScope(autoComplete: true))
210-
using (IDisposable _ = scope.Notifications.Supress())
210+
using (IDisposable _ = scope.Notifications.Suppress())
211211
{
212212
// TODO: Calls to service methods here will not have notifications
213213
}
214214
```
215215

216-
Child scope will inherit the parent Scope's notification object which means if a parent scope has notifications suppressed, then so does the child scope. You cannot call Supress() more than once for the same outer scope instance else an exception will be thrown. This ensures that you cannot un-suppress notifications at a child level for an outer scope. It also ensures that suppressing events is an explicit thing to do.
216+
Child scope will inherit the parent Scope's notification object which means if a parent scope has notifications suppressed, then so does the child scope. You cannot call Suppress() more than once for the same outer scope instance else an exception will be thrown. This ensures that you cannot un-suppress notifications at a child level for an outer scope. It also ensures that suppressing events is an explicit thing to do.
217217

218218
**Why would one want to suppress events?**
219219

0 commit comments

Comments
 (0)