View Article

GlobalContext Helper methods

By Xelence Documentation posted 04-30-2025 01:14

  

using Sagitec.Rules.Core.Instance.Attributes;
using Sagitec.Rules.Core.Interface;
using Sagitec.Rules.Interface.Helper.Execution;
 
namespace Sagitec.Rules.Interface.Context
{
    /// <summary>
    /// Provides global context information and methods for the application.
    /// </summary>
 
    [TransientInstance]
    public interface IGlobalContext : IExecutionContextHelper, ICoreInstance
    {
        #region Public Properties
 
        /// <summary>
        /// Gets the application date.
        /// </summary>
        DateTime ApplicationDate { get; }
 
        /// <summary>
        /// Gets the application date and time.
        /// </summary>
        DateTime ApplicationDateTime { get; }
 
        /// <summary>
        /// Gets the global parameters dictionary.
        /// </summary>
        IDictionary<string, object> idictGlobalParameters { get; }
 
        /// <summary>
        /// Gets the user serial ID.
        /// </summary>
        int iintUserSerialID { get; }
 
        /// <summary>
        /// Gets the session ID.
        /// </summary>
        string istrSessionID { get; }
 
        /// <summary>
        /// Gets the user ID.
        /// </summary>
        string istrUserID { get; }
 
        /// <summary>
        /// Gets the user security key.
        /// </summary>
        string istrUserSecurityKey { get; }
 
        /// <summary>
        /// Gets the metadata wrapper instance.
        /// </summary>
        IMetadataWrapper Metadata { get; }
 
        /// <summary>
        /// Gets the system setting value for the specified key.
        /// </summary>
        /// <param name="astrKey">The key for the system setting.</param>
        /// <returns>The system setting value.</returns>
        string GetSystemSetting(string astrKey);
 
        #endregion Public Properties
    }


#Rules

0 comments
17 views