Class UserAddressNotificationArgs
- Namespace
- Dynamicweb.Security.UserManagement.Notifications
- Assembly
- Dynamicweb.Core.dll
Represents a user address notification agruments.
public class UserAddressNotificationArgs : NotificationArgs
- Inheritance
-
UserAddressNotificationArgs
- Inherited Members
Examples
using Dynamicweb.Extensibility.Notifications;
using Dynamicweb.Security.UserManagement.Notifications;
namespace Dynamicweb.UserManagement.Examples.Notifications;
/// <summary>
/// The Class UserAddressBeforeSaveObserverSample represents observer for user address before save event
/// </summary>
[Subscribe(Security.UserManagement.Notifications.Notifications.UserAddressOnBeforeSave)]
public class UserAddressBeforeSaveObserverSample : NotificationSubscriber
{
/// <summary>
/// This method called when user address before save event fires
/// </summary>
/// <param name="notification">notification</param>
/// <param name="args">args</param>
public override void OnNotify(string notification, NotificationArgs args)
{
if (args is UserAddressNotificationArgs item)
{
if (item.UserAddress is not null)
Logging.LogManager.Current.GetLogger("UserManagement").Log($"UserAddressBeforeSaveObserverSample called. Address id: {item.UserAddress.ID}.");
}
}
}
Constructors
UserAddressNotificationArgs(UserAddress)
Creates a new instance of a class.
public UserAddressNotificationArgs(UserAddress userAddress)
Parameters
userAddress
UserAddressThe changed user address.
Properties
UserAddress
Gets the user address which has been changed.
public UserAddress UserAddress { get; }
Property Value
- UserAddress
User address which has been changed.