Walter.Web.FireWall
UserTypeChangedEventArgs Class
Members  Example 
Walter.Web.FireWall Assembly > Walter.Web.FireWall.EventArguments Namespace : UserTypeChangedEventArgs Class
Class UserTypeChangedEventArgs is triggered when the firewall detects a user group association change. Implements the EventArgs
Object Model
UserTypeChangedEventArgs ClassDiscoveredRout ClassIFirewallUser Interface
Syntax
public class UserTypeChangedEventArgs : System.EventArgs 
Example
The bellow sample assumes that you are using a ILogger instance to document the changes and that we never block a search engine as behaving badly
private void MyFireWall_OnUserTypeChange(object? sender, UserTypeChangedEventArgs e)
             {
                 _logger?.Lazy().LogDebug("User is being changed from {oldType} to {newType}\n  Route: {route}\n   Rules:\n   Data: {data}"
                     , e.OriginalType
                     , e.NewType
                     , e.Rout
                     , string.Join("\n   ", e.Rules)
                     );
            
                 //allow the change
                 e.AllowRaiseIncident = true;
            
                 if (e.OriginalType.HasFlag(UserTypes.IsSearchEngine) && e.NewType.HasFlag(UserTypes.IsMalicious))
                 {
                     //remove the malicious flag from search engines to not prevent search engines from
                     //indexing the site
                     e.NewType &= ~UserTypes.IsMalicious;
                 }
             }
Inheritance Hierarchy

System.Object
   System.EventArgs
      Walter.Web.FireWall.EventArguments.UserTypeChangedEventArgs

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UserTypeChangedEventArgs Members
Walter.Web.FireWall.EventArguments Namespace
EventArgs
UserTypes user classification