internal static void CheckHandle(this AMSIHandleSession handleSession) { if (handleSession.IsInvalid) { throw AMSIException.FailedToInitializeSession(); } }