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