/// <summary> /// Returns an array representing the current restriction but reversed. /// </summary> public static uint[] ToArrayReverse(this RestrictionsDb.RestrictionEnumerator enumerator) { var restriction = new uint[enumerator.Count]; for (var i = 0; i < enumerator.Count; i++) { restriction[i] = enumerator[(int)enumerator.Count - i - 1]; } return(restriction); }
/// <summary> /// Returns an array representing the current restriction. /// </summary> public static uint[] ToArray(this RestrictionsDb.RestrictionEnumerator enumerator, bool reverse = false) { if (reverse) { return(enumerator.ToArrayReverse()); } var restriction = new uint[enumerator.Count]; for (var i = 0; i < enumerator.Count; i++) { restriction[i] = enumerator[i]; } return(restriction); }