Пример #1
0
        /// <summary>
        /// Returns the invoke object used by a SAP API.
        /// This method should only be used inside the OnBeforeConnection, OnBeforeInvoke or OnAfterInvoke callbacks of a SAP API.
        /// </summary>
        /// <returns> The SAP API invoke, or null when used outside the OnBeforeConnection, OnBeforeInvoke or OnAfterInvoke callbacks.</returns>
        public static SAPRequest GetCurrent()
        {
            var sapInternalContext = SAPInternalContext.GetCurrent();

            if (sapInternalContext != null)
            {
                return(new SAPRequest(sapInternalContext));
            }
            else
            {
                return(null); // not inside of an OnBeforeConnection, OnBeforeInvoke or OnAfterInvoke callback.
            }
        }
Пример #2
0
 private SAPRequest(SAPInternalContext sapInternalContext)
 {
     this.sapInternalContext = sapInternalContext;
 }
Пример #3
0
 private SAPConnection(SAPInternalContext sapContext)
 {
     this.sapContext = sapContext;
 }