internal void SetAt(uint index, object value) { IList list = JitHelpers.UnsafeCast <IList>((object)this); ListToBindableVectorAdapter.EnsureIndexInt32(index, list.Count); try { list[(int)index] = value; } catch (ArgumentOutOfRangeException ex) { throw WindowsRuntimeMarshal.GetExceptionForHR(-2147483637, (Exception)ex, "ArgumentOutOfRange_IndexOutOfRange"); } }
internal void InsertAt(uint index, object value) { IList list = JitHelpers.UnsafeCast <IList>(this); ListToBindableVectorAdapter.EnsureIndexInt32(index, list.Count + 1); try { list.Insert((int)index, value); } catch (ArgumentOutOfRangeException ex) { ex.SetErrorCode(-2147483637); throw; } }
internal void RemoveAt(uint index) { IList list = JitHelpers.UnsafeCast <IList>((object)this); ListToBindableVectorAdapter.EnsureIndexInt32(index, list.Count); try { list.RemoveAt((int)index); } catch (ArgumentOutOfRangeException ex) { int hr = -2147483637; ex.SetErrorCode(hr); throw; } }
internal object GetAt(uint index) { IList list = JitHelpers.UnsafeCast <IList>(this); ListToBindableVectorAdapter.EnsureIndexInt32(index, list.Count); object result; try { result = list[(int)index]; } catch (ArgumentOutOfRangeException innerException) { throw WindowsRuntimeMarshal.GetExceptionForHR(-2147483637, innerException, "ArgumentOutOfRange_IndexOutOfRange"); } return(result); }