internal static void GetTableObjHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) { PtsCache ptsCache = Dispatcher.CurrentDispatcher.PtsCache as PtsCache; Invariant.Assert(ptsCache != null, "Cannot retrieve PtsCache from the current Dispatcher."); ptsCache.GetTableObjHandlerInfoCore(ptsHost, pobjectinfo); }
internal static void ReleaseContext(PtsContext ptsContext) { PtsCache ptsCache = ptsContext.Dispatcher.PtsCache as PtsCache; Invariant.Assert(ptsCache != null, "Cannot retrieve PtsCache from PtsContext object."); ptsCache.ReleaseContextCore(ptsContext); }
internal PtsContext(bool isOptimalParagraphEnabled, TextFormattingMode textFormattingMode) { this._pages = new ArrayList(1); this._pageBreakRecords = new ArrayList(1); this._unmanagedHandles = new PtsContext.HandleIndex[16]; this._isOptimalParagraphEnabled = isOptimalParagraphEnabled; this.BuildFreeList(1); this._ptsHost = PtsCache.AcquireContext(this, textFormattingMode); }
//------------------------------------------------------------------- // // Internal Methods // //------------------------------------------------------------------- #region Internal Methods /// <summary> /// Acquires new PTS Context and associates it with new owner. /// </summary> /// <param name="ptsContext">Context used to communicate with PTS component.</param> internal static PtsHost AcquireContext(PtsContext ptsContext, TextFormattingMode textFormattingMode) { PtsCache ptsCache = ptsContext.Dispatcher.PtsCache as PtsCache; if (ptsCache == null) { ptsCache = new PtsCache(ptsContext.Dispatcher); ptsContext.Dispatcher.PtsCache = ptsCache; } return ptsCache.AcquireContextCore(ptsContext, textFormattingMode); }
internal static PtsHost AcquireContext(PtsContext ptsContext, TextFormattingMode textFormattingMode) { PtsCache ptsCache = ptsContext.Dispatcher.PtsCache as PtsCache; if (ptsCache == null) { ptsCache = new PtsCache(ptsContext.Dispatcher); ptsContext.Dispatcher.PtsCache = ptsCache; } return(ptsCache.AcquireContextCore(ptsContext, textFormattingMode)); }
//------------------------------------------------------------------- // // Constructors // //------------------------------------------------------------------- #region Constructors /// <summary> /// Constructor. /// </summary> /// <remarks> /// The array of entries initially can store up to 16 entries. Upon /// adding elements the capacity increased in multiples of two as /// required. The first element always contains index to the next /// free entry. All free entries are forming a linked list. /// </remarks> internal PtsContext(bool isOptimalParagraphEnabled, TextFormattingMode textFormattingMode) { _pages = new ArrayList(1); _pageBreakRecords = new ArrayList(1); _unmanagedHandles = new HandleIndex[_defaultHandlesCapacity]; // Limit initial size _isOptimalParagraphEnabled = isOptimalParagraphEnabled; BuildFreeList(1); // 1 is the first free index in UnmanagedHandles array // Acquire PTS Context _ptsHost = PtsCache.AcquireContext(this, textFormattingMode); }
internal static bool IsDisposed() { bool disposed = true; Dispatcher dispatcher = Dispatcher.CurrentDispatcher; if (dispatcher != null) { PtsCache ptsCache = Dispatcher.CurrentDispatcher.PtsCache as PtsCache; if (ptsCache != null) { disposed = (ptsCache._disposed == 1); } } return(disposed); }
// Token: 0x06006902 RID: 26882 RVA: 0x001DA1FC File Offset: 0x001D83FC internal static bool IsDisposed() { bool result = true; Dispatcher currentDispatcher = Dispatcher.CurrentDispatcher; if (currentDispatcher != null) { PtsCache ptsCache = Dispatcher.CurrentDispatcher.PtsCache as PtsCache; if (ptsCache != null) { result = (ptsCache._disposed == 1); } } return(result); }
internal override void OnShutDown(object target, object sender, EventArgs e) { PtsCache ptsCache = (PtsCache)target; ptsCache.Shutdown(); }
public PtsCacheShutDownListener(PtsCache target) : base(target) { }