internal CompressedStackRunData(CompressedStack cs, ContextCallback cb, Object state) { this.cs = cs; this.callBack = cb; this.state = state; this.cssw = new CompressedStackSwitcher(); }
[HandleProcessCorruptedStateExceptions] // #endif // FEATURE_CORRUPTING_EXCEPTIONS internal static CompressedStackSwitcher SetCompressedStack(CompressedStack cs, CompressedStack prevCS) { CompressedStackSwitcher cssw = new CompressedStackSwitcher(); RuntimeHelpers.PrepareConstrainedRegions(); try { // Order is important in this block. // Also, we dont want any THreadAborts happening when we try to set it RuntimeHelpers.PrepareConstrainedRegions(); try { // Empty try block to ensure no ThreadAborts in the finally block } finally { // SetCompressedStackThread can throw - only if it suceeds we shd update the switcher and overrides SetCompressedStackThread(cs); cssw.prev_CS = prevCS; cssw.curr_CS = cs; cssw.prev_ADStack = SetAppDomainStack(cs); } } catch { cssw.UndoNoThrow(); throw; // throw the original exception } return(cssw); }
internal static CompressedStackSwitcher SetCompressedStack(CompressedStack cs, CompressedStack prevCS) { CompressedStackSwitcher compressedStackSwitcher = new CompressedStackSwitcher(); RuntimeHelpers.PrepareConstrainedRegions(); try { RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { CompressedStack.SetCompressedStackThread(cs); compressedStackSwitcher.prev_CS = prevCS; compressedStackSwitcher.curr_CS = cs; compressedStackSwitcher.prev_ADStack = CompressedStack.SetAppDomainStack(cs); } } catch { compressedStackSwitcher.UndoNoThrow(); throw; } return(compressedStackSwitcher); }
internal static CompressedStackSwitcher SetCompressedStack(CompressedStack cs, CompressedStack prevCS) { CompressedStackSwitcher result = default(CompressedStackSwitcher); RuntimeHelpers.PrepareConstrainedRegions(); try { RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { CompressedStack.SetCompressedStackThread(cs); result.prev_CS = prevCS; result.curr_CS = cs; result.prev_ADStack = CompressedStack.SetAppDomainStack(cs); } } catch { result.UndoNoThrow(); throw; } return(result); }
public override bool Equals(Object obj) { if (obj == null || !(obj is CompressedStackSwitcher)) { return(false); } CompressedStackSwitcher sw = (CompressedStackSwitcher)obj; return(this.curr_CS == sw.curr_CS && this.prev_CS == sw.prev_CS && this.prev_ADStack == sw.prev_ADStack); }
public override bool Equals(object obj) { if ((obj == null) || !(obj is CompressedStackSwitcher)) { return(false); } CompressedStackSwitcher switcher = (CompressedStackSwitcher)obj; return(((this.curr_CS == switcher.curr_CS) && (this.prev_CS == switcher.prev_CS)) && (this.prev_ADStack == switcher.prev_ADStack)); }
public static bool op_Equality (CompressedStackSwitcher c1, CompressedStackSwitcher c2) { if (c1._cs == null) return (c2._cs == null); if (c2._cs == null) return false; if (c1._t.ManagedThreadId != c2._t.ManagedThreadId) return false; return c1._cs.Equals (c2._cs); }
public override bool Equals(object obj) { if (obj == null || !(obj is CompressedStackSwitcher)) { return(false); } CompressedStackSwitcher compressedStackSwitcher = (CompressedStackSwitcher)obj; if (this.curr_CS == compressedStackSwitcher.curr_CS && this.prev_CS == compressedStackSwitcher.prev_CS) { return(this.prev_ADStack == compressedStackSwitcher.prev_ADStack); } return(false); }
public static bool op_Equality(CompressedStackSwitcher c1, CompressedStackSwitcher c2) { if (c1._cs == null) { return(c2._cs == null); } if (c2._cs == null) { return(false); } if (c1._t.ManagedThreadId != c2._t.ManagedThreadId) { return(false); } return(c1._cs.Equals(c2._cs)); }
public static bool op_Inequality(CompressedStackSwitcher c1, CompressedStackSwitcher c2) { return(!op_Equality(c1, c2)); }
[HandleProcessCorruptedStateExceptions] // #endif // FEATURE_CORRUPTING_EXCEPTIONS internal static CompressedStackSwitcher SetCompressedStack(CompressedStack cs, CompressedStack prevCS) { CompressedStackSwitcher cssw = new CompressedStackSwitcher(); RuntimeHelpers.PrepareConstrainedRegions(); try { // Order is important in this block. // Also, we dont want any THreadAborts happening when we try to set it RuntimeHelpers.PrepareConstrainedRegions(); try { // Empty try block to ensure no ThreadAborts in the finally block } finally { // SetCompressedStackThread can throw - only if it suceeds we shd update the switcher and overrides SetCompressedStackThread(cs); cssw.prev_CS = prevCS; cssw.curr_CS = cs; cssw.prev_ADStack = SetAppDomainStack(cs); } } catch { cssw.UndoNoThrow(); throw; // throw the original exception } return cssw; }
internal static CompressedStackSwitcher SetCompressedStack(CompressedStack cs, CompressedStack prevCS) { CompressedStackSwitcher switcher = new CompressedStackSwitcher(); RuntimeHelpers.PrepareConstrainedRegions(); try { RuntimeHelpers.PrepareConstrainedRegions(); try { } finally { SetCompressedStackThread(cs); switcher.prev_CS = prevCS; switcher.curr_CS = cs; switcher.prev_ADStack = SetAppDomainStack(cs); } } catch { switcher.UndoNoThrow(); throw; } return switcher; }
public static bool op_Inequality (CompressedStackSwitcher c1, CompressedStackSwitcher c2) { return !op_Equality (c1, c2); }