Opc.Ua.ConditionState.GetCurrentUserId C# (CSharp) Method

GetCurrentUserId() protected method

Gets the current user id from the system context.
protected GetCurrentUserId ( ISystemContext context ) : string
context ISystemContext The system context.
return string
        protected string GetCurrentUserId(ISystemContext context)
        {
            IOperationContext operationContext = context as IOperationContext;

            if (operationContext != null && operationContext.UserIdentity != null)
            {
                return operationContext.UserIdentity.DisplayName;
            }

            return null;
        }