public static void ThrowIfDisposed(this WrappingServerSession obj)
 {
     try
     {
         var methodInfo = typeof(WrappingServerSession).GetMethod("ThrowIfDisposed", BindingFlags.NonPublic | BindingFlags.Instance);
         methodInfo.Invoke(obj, new object[] { });
     }
     catch (TargetInvocationException ex)
     {
         throw ex.InnerException;
     }
 }
        public static void Dispose(this WrappingServerSession obj, bool disposing)
        {
            var methodInfo = typeof(WrappingServerSession).GetMethod("Dispose", BindingFlags.NonPublic | BindingFlags.Instance);

            methodInfo.Invoke(obj, new object[] { disposing });
        }
        public static bool _ownsWrapped(this WrappingServerSession obj)
        {
            var fieldInfo = typeof(WrappingServerSession).GetField("_ownsWrapped", BindingFlags.NonPublic | BindingFlags.Instance);

            return((bool)fieldInfo.GetValue(obj));
        }