﻿// Decompiled with JetBrains decompiler
// Type: System.Data.Common.Int16DataContainer
// Assembly: System.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: C838B317-B488-40F5-BE1A-F899721E7A38
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\System.Data.dll

using System;
using System.Data;

namespace System.Data.Common
{
  internal sealed class Int16DataContainer : DataContainer
  {
    private short[] _values;

    protected override object GetValue(int index)
    {
      return (object) this._values[index];
    }

    protected override void ZeroOut(int index)
    {
      this._values[index] = (short) 0;
    }

    protected override void SetValue(int index, object value)
    {
      this._values[index] = (short) this.GetContainerData(value);
    }

    protected override void SetValueFromSafeDataRecord(int index, ISafeDataRecord record, int field)
    {
      this._values[index] = record.GetInt16Safe(field);
    }

    protected override void DoCopyValue(DataContainer from, int from_index, int to_index)
    {
      this._values[to_index] = ((Int16DataContainer) from)._values[from_index];
    }

    protected override int DoCompareValues(int index1, int index2)
    {
      return (int) this._values[index1] - (int) this._values[index2];
    }

    protected override void Resize(int size)
    {
      if (this._values == null)
      {
        this._values = new short[size];
      }
      else
      {
        short[] numArray = new short[size];
        Array.Copy((Array) this._values, 0, (Array) numArray, 0, this._values.Length);
        this._values = numArray;
      }
    }

    internal override long GetInt64(int index)
    {
      return (long) this._values[index];
    }
  }
}
