public INativeContext GetContext() { INativeContext context = ContextAllocator.GenerateContext(); this.GetContext(context); return(context); }
public INativeContext GetThreadContext(int threadId) { INativeContext context = ContextAllocator.GenerateContext(); using (IContextDirectAccessor w = context.OpenForDirectAccess()) { // context buffer is now locked // We initialize to a HUGE number so that we make sure GetThreadContext is updating the size variable. If it doesn't, // then we will hit the assert statement below. this.GetThreadContext(threadId, w.RawBuffer, w.Size); } return(context); }