Class NotificationCollectionManager
Inheritance
System.Object
NotificationCollectionManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Microsoft.UI.Notifications
Assembly: Microsoft.dll
Syntax
public sealed class NotificationCollectionManager
Methods
| Improve this Doc View SourceGetAsync()
Gets the current notification collections.
Declaration
public IAsyncOperation<IReadOnlyList<NotificationCollection>> GetAsync()
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncOperation<System.Collections.Generic.IReadOnlyList<NotificationCollection>> |
GetAsync(String)
Gets a specific collection with the specified collection ID. Returns null if doesn't exist.
Declaration
[DefaultOverload]
public IAsyncOperation<NotificationCollection> GetAsync(string collectionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | collectionId |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncOperation<NotificationCollection> |
GetAsync(String, User)
Gets a specific collection with the specified collection ID for the specified user. Returns null if doesn't exist.
Declaration
public IAsyncOperation<NotificationCollection> GetAsync(string collectionId, User user)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | collectionId | |
| Windows.System.User | user |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncOperation<NotificationCollection> |
GetAsync(User)
Gets the current notification collections for the specified user.
Declaration
public IAsyncOperation<IReadOnlyList<NotificationCollection>> GetAsync(User user)
Parameters
| Type | Name | Description |
|---|---|---|
| Windows.System.User | user |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncOperation<System.Collections.Generic.IReadOnlyList<NotificationCollection>> |
RemoveAllAsync()
Removes all toast collections.
Declaration
public IAsyncAction RemoveAllAsync()
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |
RemoveAllAsync(User)
Removes all toast collections for the specified user.
Declaration
public IAsyncAction RemoveAllAsync(User user)
Parameters
| Type | Name | Description |
|---|---|---|
| Windows.System.User | user |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |
RemoveAsync(String)
Removes the specified collection if it exists.
Declaration
public IAsyncAction RemoveAsync(string collectionId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | collectionId |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |
RemoveAsync(String, User)
Removes the specified collection for the specified user if it exists.
Declaration
public IAsyncAction RemoveAsync(string collectionId, User user)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | collectionId | |
| Windows.System.User | user |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |
SaveAsync(NotificationCollection)
Adds or updates the specified notification collection.
Declaration
public IAsyncAction SaveAsync(NotificationCollection collection)
Parameters
| Type | Name | Description |
|---|---|---|
| NotificationCollection | collection |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |
SaveAsync(NotificationCollection, User)
Adds or updates the specified notification collection for the specified user.
Declaration
public IAsyncAction SaveAsync(NotificationCollection collection, User user)
Parameters
| Type | Name | Description |
|---|---|---|
| NotificationCollection | collection | |
| Windows.System.User | user |
Returns
| Type | Description |
|---|---|
| Windows.Foundation.IAsyncAction |