示例#1
0
 /// <summary>
 /// Creates a new BiDi object with preallocated memory for internal structures.
 /// </summary>
 /// <param name="maxLength">The maximum text or line length that internal memory will be preallocated for</param>
 /// <param name="maxRunCount">The maximum anticipated number of same-level runs that internal memory will be preallocated for</param>
 public BiDi(int maxLength, int maxRunCount)
 {
     _biDi = NativeMethods.ubidi_openSized(maxLength, maxRunCount, out var errorCode);
     ExceptionFromErrorCode.ThrowIfError(errorCode, "Creating BiDi object failed! " + errorCode);
 }