/// <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. } }
private SAPRequest(SAPInternalContext sapInternalContext) { this.sapInternalContext = sapInternalContext; }
private SAPConnection(SAPInternalContext sapContext) { this.sapContext = sapContext; }