public ExpandRet ExpandPages_OrThrow(uint newPageSize, LimitsPaged limits, bool throwOnNoChange = false) { ExpandRet ret = this.ExpandPages(newPageSize, limits); this.ThrowErrorForExpandReturn(ret, throwOnNoChange); return(ret); }
public ExpandRet ExpandEntries_OrThrow(uint newEntriesCt, LimitEntries limits, bool throwOnNoChange = false) { ExpandRet ret = this.ExpandEntries(newEntriesCt, limits); this.ThrowErrorForExpandReturn(ret, throwOnNoChange); return(ret); }
private ExpandRet _ExpandInternal(uint newByteSize) { ExpandRet ret = this.__ExpandInternal(newByteSize); if (ret == ExpandRet.Successful) { fixed(byte *pb = this.data) { this._pdata = pb; } } return(ret); }
private void ThrowErrorForExpandReturn(ExpandRet ret, bool throwOnNoChange = false) { if (throwOnNoChange == true && ret == ExpandRet.Err_NoChange) { throw new System.Exception("Attempting to expand data store did not result in any change."); } if (ret == ExpandRet.Err_TooLarge) { throw new System.Exception("Attempting to expand data store larger than the maximum size."); } if (ret == ExpandRet.Err_TooSmall) { throw new System.Exception("Attempting to expand data store smaller than the minimum size."); } }