Class UserAddressNotificationArgs
- Namespace
- Dynamicweb.Security.UserManagement.Notifications
- Assembly
- Dynamicweb.Security.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(Dynamicweb.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 != null && args is UserAddressNotificationArgs)
{
UserAddressNotificationArgs item = (UserAddressNotificationArgs)args;
if (item.UserAddress != 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
UserAddress- The 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.