View Article

CurrentContext Helper methods

By Xelence Documentation posted 04-25-2025 02:53

  

using Sagitec.Rules.Core.Instance.Attributes;
using Sagitec.Rules.Core.Interface;
using Sagitec.Rules.Interface.Helper.Execution;
using System.Data;
 
namespace Sagitec.Rules.Interface.Context
{
    /// <summary>
    /// Represents the current execution context for the rules processing.
    /// Provides access to framework-level database connections, transactions, and sender information.
    /// Implements <see cref="IExecutionContextHelper"/> and <see cref="ICoreInstance"/> for context initialization and instance management.
    /// </summary>
 
    [TransientInstance]
    public interface IutlCurrentContext : IExecutionContextHelper, ICoreInstance
    {
        #region Public Properties
 
        /// <summary>
        /// Gets the database connection used by the framework.
        /// </summary>
        /// <remarks>
        /// This property provides access to the database connection object used for executing database operations within the current context.
        /// </remarks>
        IDbConnection iconFramework { get; }
 
        /// <summary>
        /// Gets the name of the form associated with the current context.
        /// </summary>
        /// <remarks>
        /// This property is used to identify the form that initiated the current execution context.
        /// </remarks>
        string istrFormName { get; }
 
        /// <summary>
        /// Gets the name of the sender form that triggered the current context.
        /// </summary>
        /// <remarks>
        /// This property is used to track the form that has sent the request or initiated the current operation.
        /// </remarks>
        string istrSenderForm { get; }
 
        /// <summary>
        /// Gets the unique identifier of the sender.
        /// </summary>
        /// <remarks>
        /// This property is used to identify the sender of the current operation, such as a user or system component.
        /// </remarks>
        string istrSenderID { get; }
 
        /// <summary>
        /// Gets the key associated with the sender.
        /// </summary>
        /// <remarks>
        /// This property provides additional information about the sender, such as a session key or token.
        /// </remarks>
        string istrSenderKey { get; }
 
        /// <summary>
        /// Gets the database transaction used by the framework.
        /// </summary>
        /// <remarks>
        /// This property provides access to the database transaction object used for managing transactional operations within the current context.
        /// </remarks>
        IDbTransaction itrnFramework { get; }
 
        #endregion Public Properties
    }
}


#Rules

0 comments
30 views