Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Monitor Namespace / IPrincipalResolver Interface / TryResolveCurrentPrincipal Method
The principal that was resolved, if any.

In This Topic
    TryResolveCurrentPrincipal Method (IPrincipalResolver)
    In This Topic
    Resolve the user principal for the current activity
    Syntax
    'Declaration
     
    
    Function TryResolveCurrentPrincipal( _
       ByRef principal As IPrincipal _
    ) As Boolean
    bool TryResolveCurrentPrincipal( 
       out IPrincipal principal
    )

    Parameters

    principal
    The principal that was resolved, if any.

    Return Value

    True if the IPrincipal was resolved.
    Remarks

    Implementations should be optimized to not throw exceptions but instead return false if no principal could be resolved. Since this method is called on each logging thread before queuing data it is important to have a high performance, non-blocking implementation.

    To avoid deadlocks and infinite loops, any attempt to log within this method (directly or indirectly through a dependency) will be ignored.

    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