Beispiel #1
0
        public IndexAttribute(params int[] indices)
        {
            if (null == indices)
            {
                throw new ArgumentNullException("indices");
            }

            if (indices.Length == 0)
            {
                throw new ArgumentException(Resources.MapIndex_EmptyIndices, "indices");
            }

            _fields = NameOrIndexParameter.FromIndexArray(indices);
        }
Beispiel #2
0
        public MapIndex(int[] indices)
        {
            if (null == indices)
            {
                throw new ArgumentNullException("indices");
            }

            if (indices.Length == 0)
            {
                throw new ArgumentException("At least one field ndex must be specified", "indices");
            }

            _fields = NameOrIndexParameter.FromIndexArray(indices);
        }
 public void IntArrayTest()
 {
     NameOrIndexParameter[] nips = NameOrIndexParameter.FromIndexArray(new int[] { 12345, 56789 });
     Assert.AreEqual(nips[0].Index, 12345);
     Assert.AreEqual(nips[1].Index, 56789);
 }